Versions Compared

Key

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

...

Add and Edit Annotations Programmatically

Command line

To add annotations on a new file during upload:

...

Code Block
synapse set-annotations --id syn00123 --annotations '{"fileFormat":"bam", "assay":"rnaSeq"}'

Python

To add annotations on a new file during upload:

...

Code Block
entity = syn.get_annotations("syn123")

# set key 'fileFormat' to have value 'fastq'
entity['fileFormat'] = 'fastq'

syn.set_annotations(entity)

R

To add annotations on a new file during upload:

...