How to add workspace-level data (workspace data table)

Liz Kiernan

Learn how to generate a dedicated Workspace Data table to hold workspace-level resources. 

Why use a Workspace Data table?

The Workspace Data table can hold variables and resources - like the genomic reference sequence file, or a Docker container - that stay the same regardless of the particular sample data analyzed. Keeping these workspace-level resources in one place can make your analysis more efficient. 

Save time and reduce errors

The Workspace Data table lets you configure resource files once and point to them in the workflow configuration pane whenever you need them. You don't need to look up reference file paths (URL), and if you update the resource files, you only need to update in one place.

Workspace Data table in Terra workspace

Managing-Data_Workspace-Data-table_Screen_shot.png
The Workspace Data table (above) includes reference files (URL under Values column) and a key. The files can be called in any workflow analysis, regardless of what data are analyzed. 

How to add a Workspace Data table (in the UI)

If you only have a few files or variables to add as  Workspace Data table, you can add them manually one-by-one right in your workspace.

1. In your Data tab, click on the Workspace Data link under Other Data (left hand side).

Add-Workspace-Data-table_1-Click-on-Workspace-Data_Screenshot.png

2. Click the "+" icon at the bottom right of the page.

Add-Workspace_Data-table_2-Click-plus-icon_Screenshot.png

3. Fill in the data key, value (use gs:// format for files in a Google bucket), and a description (optional), and select the type of data from the dropdown. To add the data to the table, click on the check icon at the far right. 

Add-Workspace-Data-table-3_Fill-in-fields-and-click-check_Screenshot.png

What to expect

You should see the key, value and description you added in the Workspace Data table under Other Data

Add-Workspace-Data-table-4_View-table-in-workspace_Screenshot.png

How to add a Workspace Data table (TSV)

If you have a lot of files to include in a Workspace data table, or if you already have them stored in a spreadsheet, follow the directions below to add the table to your workspace. 

Note: Once you upload a Workspace data table, you can edit the table in Terra. To learn more, see How to edit and modify data tables.

Step 1: Create the TSV file

1.1. Download a template Workspace Data table here.

1.2. Open in your favorite spreadsheet editor.

1.3. Complete the top left column with the first reference file key after "workspace:".

1.4. Fill in the cloud location of the first reference file in the second row of the first column.

1.5. Fill in the key and cloud locations fields (in the header and 2nd row, respectively) for the rest of your workspace-level reference files.

Workspace Data TSV file in a spreadsheet

workspace:ref_fasta ref_fasta_index ref_dict
gs://public-bucket/
Homo_sapiens_assembly.38.fasta
gs://public-bucket/
Homo_sapiens_assembly.38.fai
gs://public-bucket/
Homo_sapiens_assembly.38.dict
  • Parts in red (i.e., "workspace:" must be typed exactly as shown.
  • Customize the resource file key (header row) and full path (second row).
  • Note: Terra will reorganize the files in alphabetical order.

Step 2: Save in tab separated values or tab delimited text format

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. The "workspace:" formatting will tell Terra it is a Workspace data table.
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

3.1. Click the Import Data button at the top left of the workspace data page.

3.2. Select Upload TSV and follow the directions.
Modify-tables_Upload-TSV_Screen_shot.png

The screenshot below is what you'll see when you upload the spreadsheet above to a Workspace Data table. The first column (the "key" - circled on the left) identifies what the file is. The other (circled on the right) includes a link to the cloud location of the file (for example, in a Google bucket):

Example: Workspace Data table in Terra

Workspace-data_Example-table_Screen_shot.png

Additional resources

See these articles for more detailed information on different aspects of data tables. 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

1 comment

  • Comment author
    Andrew Davidson
    • Edited

    to upload the workspace tsv file. You must go to the workspace data tab. Under 'other data' click on 'workspace data', the use the upload tsv. You can not upload using the plus sign next to "TABLE +"

    0

Please sign in to leave a comment.