Skip to content

Microreact_Export

Quick Facts

Workflow Type Applicable Kingdom Last Known Changes Command-line Compatibility Workflow Level Dockstore
Exporting Data from Terra Any taxa vX.X.X Yes Set-level Microreact_Export_PHB

Microreact_Export_PHB

This workflow allows users to submit Terra data tables as metadata and phylogenetic trees resulting from other Terra run workflows directly to Microreact using their Access Token. A user can also update an existing Microreact project with a new metadata file or additional tree files. If an access token is unavailable users can manually upload the output project file to Microreact.

Microreact_Export Diagram

Microreact_Export Workflow Diagram

Updating Projects

When updating an existing project there are a few places to obtain the input for project_url. One place to pull this string from is the web address of the project in your account which will look like this, https://microreact.org/project/<project_url>run.

A second location is within the output of microreact_api_response in the id field.

A third location would be from the My Projects tab. The project id is displayed for each project within your account.

Inputs

Terra Task Name Variable Type Description Default Value Terra Status
wf_microreact_export id_column String Column used as the unique identifier for Microreact Required
wf_microreact_export project_name String Name of the project to be uploaded to Microreact Required
wf_microreact_export set_id String ID column of the set being run Required
wf_microreact_export terra_project_name String Terra project location where metadata Terra table is housed Required
wf_microreact_export terra_table_name String Name of the Terra table used as the Microreact metadata table Required
wf_microreact_export terra_workspace_name String Terra workspace location where metadata Terra table is housed Required
create_microreact_project cpu Int Number of CPUs to allocate to the task 2 Optional
create_microreact_project disk_size Int Amount of storage (in GB) to allocate to the task 10 Optional
create_microreact_project docker String The Docker container to use for the task us-docker.pkg.dev/general-theiagen/theiagen/microreact_export:1.0.0 Optional
create_microreact_project memory Int Amount of memory/RAM (in GB) to allocate to the task 4 Optional
download_terra_table cpu Int Number of CPUs to allocate to the task 1 Optional
download_terra_table disk_size Int Amount of storage (in GB) to allocate to the task 10 Optional
download_terra_table docker String The Docker container to use for the task us-docker.pkg.dev/general-theiagen/theiagen/terra-tools:2023-06-21 Optional
download_terra_table memory Int Amount of memory/RAM (in GB) to allocate to the task 2 Optional
wf_microreact_export access_token String Users token used to upload projects to their Microreact account Optional
wf_microreact_export date_column String Column within the input Terra table to be used as the date designation Optional
wf_microreact_export download_table Boolean When true, will download th specified Terra table True Optional
wf_microreact_export matrix_files Array[File] A list of matrix files a user would like to upload to the Microreact project. Can be written as [this.matrix1, this.matrix2, etc]. Optional
wf_microreact_export metadata_columns Array[String] A list of column names from the input Terra table that the user would like to be included in their Microreact metadata table Optional
wf_microreact_export metadata_file File To be used if a separate metadata TSV is required other than downloading a Terra table Optional
wf_microreact_export project_url String URL used to update a microreact project. Can be found as the code within the webpage URL. "microreact.org/project/-""</td> <td></td> <td>Optional</td> </tr> <tr> <td>wf_microreact_export</td> <td><strong>remove_file_columns</strong></td> <td>Boolean</td> <td>When true, this will remove all columns that contain file opjects to prevent the pushing of Google cloud addresses to the metadata table</td> <td>True</td> <td>Optional</td> </tr> <tr> <td>wf_microreact_export</td> <td><strong>restricted_access</strong></td> <td>Boolean</td> <td>Sets the access level of the project to restricted when true. Only those specifically added will be able to access.</td> <td>True</td> <td>Optional</td> </tr> <tr> <td>wf_microreact_export</td> <td><strong>tree_files</strong></td> <td>Array[File]</td> <td>A list of tree files a user would like to upload to the Microreact project. Can be written as [this.tree1, this.tree2, etc].</td> <td></td> <td>Optional</td> </tr> </tbody> </table> </div> <h3 id="workflow-tasks">Workflow Tasks<a class="headerlink" href="#workflow-tasks" title="Permanent link">¶</a></h3> <details class="task"> <summary><code>download_terra_table</code>: Data Retrieval</summary> <p>This <code>download_terra_table</code> task will return a selected Terra table as a TSV file when provided the Terra project, workspace, and table name. </p> <div class="admonition techdetails"> <p class="admonition-title">download_terra_table Technical Details</p> <table> <thead> <tr> <th></th> <th>Links</th> </tr> </thead> <tbody> <tr> <td>Task</td> <td><a href="https://github.com/theiagen/public_health_bioinformatics/blob/main/tasks/utilities/data_export/task_download_terra_table.wdl">task_download_terra_table.wdl</a></td> </tr> </tbody> </table> </div> </details> <details class="task"> <summary><code>microreact_export</code>: Data Export</summary> <p>This task creates new Microreact projects or updates existing projects using Terra tables as metadata inputs. This is done by accessing Microreact using a user's access token and interacting with Microreact's API to submit created project files directly to Microreact. </p> <p>If a user does not have an access token they will still receive a finalized project file in JSON format. If a submission to Microreact is attempted a response JSON will be returned to the user for review. </p> <div class="admonition techdetails"> <p class="admonition-title"><code>microreact_export</code> Technical Details</p> <table> <thead> <tr> <th></th> <th>Links</th> </tr> </thead> <tbody> <tr> <td>WDL Task</td> <td><a href="https://github.com/theiagen/public_health_bioinformatics/blob/main/tasks/utilities/data_export/task_microreact_export.wdl">task_microreact_export.wdl</a></td> </tr> </tbody> </table> </div> </details> <h3 id="outputs">Outputs<a class="headerlink" href="#outputs" title="Permanent link">¶</a></h3> <div class="searchable-table"> <table> <thead> <tr> <th><strong>Variable</strong></th> <th><strong>Type</strong></th> <th><strong>Description</strong></th> </tr> </thead> <tbody> <tr> <td>microreact_api_response</td> <td>File</td> <td>Result of the Microreact API request</td> </tr> <tr> <td>microreact_input</td> <td>File</td> <td>A project file in JSON format that can be used for manual upload to Microreact</td> </tr> </tbody> </table> </div> <h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">¶</a></h2> <blockquote> <p><strong>Microreact</strong>: Argimón S, Abudahab K, Goater R, Fedosejev A, Bhai J, Glasner C, Feil E, Holden M, Yeats C, Grundmann H, Spratt B, Aanensen D. 30/11/2016. M Gen 2(11): doi:10.1099/mgen.0.000093</p> </blockquote>