This The DCC has derived standards for how content is annotated in Synapse and this page describes how the DCC manages the content used to annotate files (management of the keys, definitions, and ontological references ). Sage Bionetworks has derived standards for how content is annotated Synapse. used to annotate files.
General info: Synapse Annotations
Community-approved Terms: Table of Annotations
Schemas
The synapseAnnotations Github repo includes schemas for individual metadata terms. The Each term is stored in a JSON mini-schema and the terms are organized by modules in the each terms/<module>/
folder. There are subfolders for each module, and the term names include the module. The mechanisms that manage and implement these annotations are described in the README.
Editing JSON schema
Each individual term is stored in its own JSON mini schema. This is a valid JSON Schema, such as the following:
Code Block | ||
---|---|---|
| ||
{ $schema": "<http://json-schema.org/draft-07/schema#",>
"$id": "<https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/sage.annotations-experimentalData.specimenID-0.0.1",>
"description": "Identifying string linked to a particular sample or specimen",
"type": "string"
} |
Templates for adding new terms are included in the term-templates/ directory.
To register these schemas in Synapse use the register-schemas.R script.
Procedure
Navigate to
terms/modules/
directoryMODEL-AD terms currently reside in synapseAnnotations/terms/neuro
Q: Ask Kelsey about creating a MODEL-AD/ directory for those specific terms
Create or Edit an existing JSON schema file
Paste schema information
Edit
$id
line with Modulename and Key name.Version number should start with
0.0.1
and be increased by one with each update.Add new term, ontology citation, definition
Create branch structured like: ‘username-edit-type/‘
Add description of changes you want to commit
Request Reviewers
Data checks will start to run in the background.
Once the changes have been merged into master, need to run the XYZ script to update the metadata dictionary with the revised terms in synapseAnnotations.
Synapse Table of Metadata Terms: Link
AMP-AD Validation: syn20506363
Synapse Link
Synapse Table of Annotations
Github: GitHub - Sage-Bionetworks/synapseAnnotations (README)
JSON Schemas: synapseAnnotations/terms
MODEL-AD Schemas: synapseAnnotations/terms/neuro
Edit JSON Schema
Copy a template from: synapseAnnotations/term-templates
Edit new file
Edit
$id
line with <MODULENAME> and <KEY>Increment version with each update
Add Term, Definition, and a source for Definition (https://www.ebi.ac.uk/ols/index )
Commit changes to a new branch
Schema validation checks will automatically start to run in the background.
Address any errors until validation passes
Open a Pull Request and select DCC reviewers
Update Schemas
Once the PRs are merged, it is necessary to update the Metadata Dictionary
Navigate to: /Users/ryaxley/Documents/GitHub/synapseAnnotations
To register the schemas in Synapse run the register-schemas.R script
Help:
./register-schemas.R --help
Register all schemas:
./register-schemas.R terms/*/*.json
Verify if this script runs automatically as part of the Github workflow
To update the Synapse annotations table:
./update-annotations-table.R
Generate Template
Github sysbioDCCjsonschemas repo
SysBio Metadata Templates: https://github.com/Sage-Bionetworks/sysbioDCCjsonschemas/tree/master/schema_metadata_templates
Construct a JSON schema file to generate XLS template
Make sure to register latest versions of JSON schemas
To create a Synapse table of all terms in metadata templates:
create_Syn_table_from_Syn_schemas.py
For example, to generate a Metadata Template:
create_template_from_Syn_schema_sorted.py
Code Block cd ~/Documents/GitHub/sysbioDCCjsonschemas/code/python/. python3 create_template_from_Syn_schema_sorted.py \ sysbio.metadataTemplates-ad.manifest \ manifest_test.xlsx excel \ ~/Documents/GitHub/sysbioDCCjsonschemas/schema_metadata_templates/AD/manifest_metadata_template.json
New templates must be uploaded manually to: https://www.synapse.org/#!Synapse:syn18512044