Versions Compared

Key

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

This vignette will combine concepts from Annotations and queries/wiki/spaces/DOCS/pages/2011070739Uploading and downloading data in bulk. You will learn how to:

  • Create a manifest

  • Upload 100 files

  • Edit annotations on these files using the Synapse programmatic clients

Annotation

...

Dictionaries

The Sage Bionetworks maintains annotation dictionaries in GitHub. You can use the terms in this repository as a starting point, or you can create your own annotation dictionary.

...

Batch Upload Files with Annotations

To batch upload files, create a tab-delimited manifest which contains, at minimum, the columns path and parent. You can also add additional annotations as columns in your manifest. For example, your manifest might have the following headers: pathparentspecimenIDassayspeciesplatformsex, and fileFormat. See Creating a Manifest in Uploading and downloading data in bulk for additional details.

...

  • validate the manifest and upload files in the Python client.

  • validate the manifest and upload files in the R client.

Create a

...

File View (web)

Once the files have been uploaded with annotations, you can use a file view to query, facet, and bulk manipulate the files and metadata.

...

  1. Navigate to your project.

  2. Go to the tables tab, select Tables Tools in the upper right corner, and click Add File View.

  3. In the resulting pop-up, give the new file view a name.

  4. Select the container (Synapse project or folder) of files, and click Next. In this case, you would want the synID of the parent column in the manifest.

  5. Select the columns you would like to keep. Since we are going to edit the annotations later, make sure you have the column etag listed as one of your columns.

  6. Add All Annotations at the end of the opened window will add all existing annotations.

  7. Click Finish to create the file view.

Perform a

...

One-Time Annotation Update or Deletion (web)

An annotation for a single file can be modified in the web client view. For example, you can updatespecimenID:delta_1 to specimenID:echo_1.

  1. From your view, select the pencil icon to edit query results.

  2. In the pop-up window, find the single value you want to change and edit the field.

  3. Scroll down to the bottom and click Save to update the file view.

Perform a

...

Bulk Annotation Update or Deletion

A bulk annotation update is required in the case that species:Velociraptor mongoliensis should be modified to Utahraptor ostrommaysorum in all 100 files.

...