How to update GA4GH DRS URIs

Allie Cliffe
  • Updated

As of September 2023, DRS URIs have a different format. If you have tables of data with DRS URIs from before the switchover, you will need to update the formatting in order to access the data. Step-by-step instructions to update the formatting of DRS URIs in workspace tables created before September 27, 2023, are below.

 GA4GH Data Repository Service (DRS) specification defines the format of DRS URIs used to identify and access data objects, and this specification is periodically improved and enhanced. The DRS v1.1.0 specification formally introduced the use of compact identifiers in DRS URIs and the use of a colon (:) character to separate the compact identifier from the data object identifier.

Terra has supported the legacy format of DRS URIs, which used a forward slash (/) instead of a colon as the separator. Terra support for the legacy format has ended, and legacy format DRS URIs must now be updated to conform with the current DRS specification.

Legacy DRS URIs format

drs://dg.4503/2802a94d-f540-499f-950a-db3c2a9f2dc4

Current DRS URIs format 

drs://dg.4503:2802a94d-f540-499f-950a-db3c2a9f2dc4

Update DRS URIs formatting in a spreadsheet editor

To update the / to a :, you can modify a TSV outside of Terra following the step-by-step instructions below.

Step 1. Download the existing table

1.1. Select rows to download (edit) in check boxes at left. 

1.2. Click Export in the menu above the table.

1.3. Select Download as TSV from the popup.
Modify-table_Download-as-TSV_Screen_shot.png

Step 2. Edit and save the TSV file using your favorite spreadsheet editor

2.1. Open in your favorite spreadsheet editor and edit.

2.2. Anywhere there are DRS URIs, do a global find and replace fromdrs://dg.4503/ to drs://dg.4503:.

2.3. Save the file as "tab-separated values" or "tab-delimited text".
Your editor may give you a warning, but we assure you, it's fine! Also, Terra will completely ignore the name you give the file. In GCP, the "root entity" in the first column header determines the table name in the workspace. In Azure, you'll specify the table name when you import the TSV. 
Data-QuickStart_Part2_Save-as-Tab-delimited-text.png

A note about  .tsv  versus  .txt  file extensions Depending on what spreadsheet editor you use, when you save in the proper format your spreadsheet may have either a ".tsv" or a ".txt" extension. Terra will accept either one.

Step 3. Upload the TSV file to your workspace

Click the Import Data button at the top left of the workspace data page and follow the directions.
Modify-tables_Upload-TSV_Screen_shot.png

TSV uploads are additive

A note about overwriting table rows When your TSV load file has the same entity (name) as a table already in the workspace, you may get an error message when you try to upload about overwriting data.

Terra will only overwrite data rows with the same ID (in the first column). If the TSV (load) file includes different IDs, these rows will be added to the existing table.

Uploading tsvs with missing columns or rows does not remove that data.  This allows you to upload new TSVs that only contain the rows or columns you want to be added (but must include the entity ID column which is used as the key). 

Step-by-step instructions to update the formatting of DRS URIs in workspace tables created before DATE HERE. 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.