Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

...

Schemas

The synapseAnnotations Github repo includes schemas for metadata terms. Each term is stored in a JSON mini-schema and the terms are organized by modules in each terms/<module>/ folder. There are subfolders for each module, and the term names include the module.

Edit JSON Schema

  • Copy needed a template from: synapseAnnotations/term-templates

  • Paste into 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 curators as reviewers

Update Schemas

  • Once the PRs are approvedmerged, 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, run :

    • ./update-annotations-table.R

Generate Template

  • Github sysbioDCCjsonschemas repo

  • SysBio Metadata Templates: https://github.com/Sage-Bionetworks/sysbioDCCjsonschemas/tree/master/schema_metadata_templates

  • Edit terms in XLS template or construct Construct a JSON schema file to do this programmaticallyEnsure generate XLS template

  • Make sure to register latest versions of JSON schemas have been registered. How to

  • To create a Synapse table of all terms in metadata templates:

    • create_Syn_table_from_Syn_schemas.py

  • To For example, to generate a Metadata Template:

    • create_template_from_Syn_schema_sorted.py

  • Code Block
    cd /Users/ryaxley~/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
            

...