The DCC has derived standards for how content is annotated in Synapse and this page describes the management of the keys, definitions, and references used to annotate files. See Synapse Annotations for general information. Approved terms are available in a searchable
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.
JSON Templates
Each term is stored in a JSON mini-schema, such as the following:
...
language | json |
---|
...
.
...
Editing Schemas
Open Github issue in https://github.com/Sage-Bionetworks/synapseAnnotations/issues
CONTRIBUTING.mdTemplates: https://github.com/Sage-Bionetworks/synapseAnnotations/tree/master/term-templates
JSON schemas: https://github.com/Sage-Bionetworks/synapseAnnotations/tree/masterJSON Schemas: synapseAnnotations/terms
MODEL-AD
terms:Schemas: synapseAnnotations/terms/neuro
- githubSage-BionetworkssynapseAnnotationstreemasterterms/neuro
Create/Edit a JSON schema file
Copy and Paste schema template.2363523282/Manage+metadata+templates+annotations#Metadata-templates-(JSON)
(README)
Edit JSON Schema
Copy a template from: synapseAnnotations/term-templates
Edit new file
Edit
$id
line with
<MODULENAME> and
0.0.1
and should be incremented<KEY>
Increment version with each update
Add
Create a branch name formatted like ‘username-edit-type/‘
Add a brief description of changes to commit
- Data checks will
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. All data checks must successfully pass.Once desired changes are committed, initiate
Address any errors until validation passes
Open a Pull Request and select DCC curators as reviewers.
Update Schemas
Once the PRs have been are merged, the metadata dictionary needs to be updated with the latest version of terms. 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.
To register
R --help
Register all schemas, run :
./register-schemas.R terms/*/*.json
Learn more about this script, run./register-schemas.R --help
Verify if this script runs automatically as part of the Github workflow
To update the Synapse annotations table, run :
./update-annotations-table.R
Generate Template
Github sysbioDCCjsonschemas repo
Add/Remove terms from XLS template file. Alternatively, this can be done programmatically with JSON.
Links
...
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.
...
...