Skip to content

Commit

Permalink
[Mercury] prevent silent failures (#648)
Browse files Browse the repository at this point in the history
* prevent silent failures

* add clarifying text
  • Loading branch information
sage-wright authored Oct 17, 2024
1 parent be24047 commit 6f33550
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/workflows/public_data_sharing/mercury_prep_n_batch.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,25 @@ To help users collect all required metadata, we have created the following Excel

The `using_clearlabs_data` and `using_reads_dehosted` arguments change the default values for the `read1_column_name`, `assembly_fasta_column_name`, and `assembly_mean_coverage_column_name` metadata columns. The default values are shown in the table below in addition to what they are changed to depending on what arguments are used.

| Variable | Default Value | with `using_clearlabs_data` | with `using_reads_dehosted` | with both  `using_clearlabs_data` ***and*** `using_reads_dehosted` |
| Variable | Default Value | with `using_clearlabs_data` | with `using_reads_dehosted` | with both  `using_clearlabs_data` **_and_** `using_reads_dehosted` |
| --- | --- | --- | --- | --- |
| `read1_column_name` | `"read1_dehosted"` | `"clearlabs_fastq_gz"` | `"reads_dehosted"` | `"reads_dehosted"` |
| `assembly_fasta_column_name` | `"assembly_fasta"` | `"clearlabs_fasta"` | `"assembly_fasta"` | `"clearlabs_fasta"` |
| `assembly_mean_coverage_column_name` | `"assembly_mean_coverage"` | `"clearlabs_assembly_coverage"` | `"assembly_mean_coverage"` | `"clearlabs_assembly_coverage"` |

### Inputs

!!! tip "Use the sample table for the `terra_table_name` input"
Make sure your entry for `terra_table_name` is for the _sample_ table! While the root entity needs to be the set table, the input value for `terra_table_name` should be the sample table.

This workflow runs on the set-level.

| **Terra Task Name** | **Variable** | **Type** | **Description** | **Default Value** | **Terra Status** |
|---|---|---|---|---|---|
| mercury_prep_n_batch | **gcp_bucket_uri** | String | Google bucket where your SRA reads will be temporarily stored before transferring to SRA. Example: "gs://theiagen_sra_transfer" | | Required |
| mercury_prep_n_batch | **sample_names** | Array[String] | The samples you want to submit | | Required |
| mercury_prep_n_batch | **terra_project_name** | String | The name of your Terra project. You can find this information in the URL of the webpage of your Terra dashboard. For example, if your URL contains #workspaces/example/my_workspace/ then your project name is example | | Required |
| mercury_prep_n_batch | **terra_table_name** | String | The name of the Terra table where your samples can be found. Do not include the entity: prefix or the _id suffix, just the name of the table as listed in the sidebar on lefthand side of the Terra Data tab. | | Required |
| mercury_prep_n_batch | **terra_project_name** | String | The name of your Terra project. You can find this information in the URL of the webpage of your Terra dashboard. For example, if your URL contains `#workspaces/example/my_workspace/` then your project name is `example` | | Required |
| mercury_prep_n_batch | **terra_table_name** | String | The name of the Terra table where your **samples** can be found. Do not include the `entity:` prefix, the `_id` suffix, or the `_set_id` suffix, just the name of the sample-level data table as listed in the sidebar on lefthand side of the Terra Data tab. | | Required |
| mercury_prep_n_batch | **terra_workspace_name** | String | The name of your Terra workspace where your samples can be found. For example, if your URL contains #workspaces/example/my_workspace/ then your project name is my_workspace | | Required |
| 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 |
Expand Down
3 changes: 3 additions & 0 deletions tasks/utilities/submission/task_mercury.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ task mercury {
volatile: true
}
command <<<
#set -euo pipefail to avoid silent failure
set -euo pipefail

python3 /mercury/mercury/mercury.py -v | tee VERSION

python3 /mercury/mercury/mercury.py \
Expand Down

0 comments on commit 6f33550

Please sign in to comment.