Selecting the root entity type

Allie Hajian
  • Updated

If you run a workflow from the Workflows page, you need to select the input data table ("root entity type") from the drop-down menu. This article gives guidance for determining the root entity type when you have several tables to choose from.   

Root entity type: Overview

The root entity type is the smallest piece of data a workflow can use as input. Selecting from the "root entity type" drop-down menu (Step 1 in the workflow configuration form) tells Terra which table has the input metadata needed to run the workflow.

Selecting the root entity type isn't always straightforward if the tables are nested. For example, if your workflow runs on arrays of files, the root entity type could be a sample_set or specimen_set table, even though links to the data files are ultimately in the corresponding sample or specimen table. 

Finding the root entity typeIf you can run your workflow on a single entity (like a specimen or  sample) 
The root entity type is that entity (i.e. specimen or sample)

If your workflow takes an array as input and cannot run on a single file
1. The root entity type could be a set table (i.e. sample_set or specimen_set).
Screenshot of sample set table with a single row - a set labeled mouse. The sample_set table (1) name in the lefthand TABLES column under the combined-sample table (1) and the sample (9) table is circled, showing that is the open table. In the samples column of the mouse sample_set row, the link to 5 entries is expanded to reveal the five samples in the set under the contents header - Mouse-FASTQ-lanes-in-sample-set-table_Screen_shot.png

2. The root entity type could be an entity table (i.e. sample) with an array of data files in one column.
Mouse-FASTQ-lanes-array-in-combined-sample-table_Screen_shot.png

If you run a somatic workflow (on tumor/normal pairs)
The root entity type is pair 

Root entity type examples

See the examples below for ways to determine the input entity type your WDL expects (could be a single entity table, a set table, or a pair table).

  • If your workflow can run on a single entity, the root entity is a table of single entities (i.e., sample or specimen).

    How to verify

    Look in the Inputs tab of the workflow form. The Input Type is "File".
    Configure-workflows_Type-File_Screen_shot.png

  • If your workflow runs on an array of files, the root entity can be a set table (i.e., sample_set or specimen_set) or an entity table (i.e., sample or specimen) with an array in a column.

    How to verify

    Look in the Inputs tab of the workflow form. The Input Type is "Array[File]".
    Configure-workflows_Type-Arrays_Screen_shot.png

     

  • If you run a somatic workflow, the root entity is pair. The file type could be File or Array[File] (depending on the workflow).
    Configure-workflow_Root-entity-type-par_Screen_shot.png

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.