Skip to content

Commit

Permalink
update pipeline fails, runtime and documentation for kit names
Browse files Browse the repository at this point in the history
  • Loading branch information
fraser-combe committed Nov 7, 2024
1 parent b5636ec commit 39f4765
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
15 changes: 15 additions & 0 deletions docs/workflows/standalone/dorado_basecalling.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ Automatic Detection: When set to sup, hac, or fast, Dorado will automatically se
- `[email protected]`
- `[email protected]`

??? Info "Supported Kit Names"

Ensure you use an accepted kit name in the `kit_name` parameter. The following kit names are supported in Dorado:

```
EXP-NBD103, EXP-NBD104, EXP-NBD114, EXP-NBD114-24, EXP-NBD196, EXP-PBC001, EXP-PBC096,
SQK-16S024, SQK-16S114-24, SQK-LWB001, SQK-MLK111-96-XL, SQK-MLK114-96-XL, SQK-NBD111-24,
SQK-NBD111-96, SQK-NBD114-24, SQK-NBD114-96, SQK-PBK004, SQK-PCB109, SQK-PCB110, SQK-PCB111-24,
SQK-PCB114-24, SQK-RAB201, SQK-RAB204, SQK-RBK001, SQK-RBK004, SQK-RBK110-96, SQK-RBK111-24,
SQK-RBK111-96, SQK-RBK114-24, SQK-RBK114-96, SQK-RLB001, SQK-RPB004, SQK-RPB114-24,
TWIST-16-UDI, TWIST-96A-UDI, VSK-PTC001, VSK-VMK001, VSK-VMK004, VSK-VPS001
```

Select from these options to avoid input errors.

### Inputs

| **Terra Task Name** | **Variable** | **Type** | **Description** | **Default Value** | **Terra Status** |
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ nav:
- Zip_Column_Content: workflows/data_export/zip_column_content.md
- Standalone:
- Cauris_CladeTyper: workflows/standalone/cauris_cladetyper.md
- Dorado_Bsecalling: workflows/standalone/dorado_basecalling.md
- Dorado_Basecalling: workflows/standalone/dorado_basecalling.md
- GAMBIT_Query: workflows/standalone/gambit_query.md
- Kraken2: workflows/standalone/kraken2.md
- NCBI-AMRFinderPlus: workflows/standalone/ncbi_amrfinderplus.md
Expand Down
4 changes: 3 additions & 1 deletion tasks/basecalling/task_dorado_basecall.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ task basecall {
}

command <<<
set -e
set -euo pipefail

# Create output directory for SAM files
sam_output="output/sam/"
Expand Down Expand Up @@ -48,4 +48,6 @@ task basecall {
disk: disk_size + " GB"
gpuCount: 1
gpuType: "nvidia-tesla-t4" }
preemptible: 0
maxRetries: 1
}
6 changes: 4 additions & 2 deletions tasks/basecalling/task_dorado_demux.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ task dorado_demux {
String fastq_file_name
Int cpu = 4
Int memory = 16
Int disk_size = 50
Int disk_size = 100
String docker = "us-docker.pkg.dev/general-theiagen/staphb/dorado:0.8.0"
}

command <<<
set -e
set -euo pipefail

echo "### Starting Dorado demux ###"
date
Expand Down Expand Up @@ -90,5 +90,7 @@ task dorado_demux {
cpu: cpu
memory: "~{memory} GB"
disks: "local-disk ~{disk_size} SSD"
preemptible: 0
maxRetries: 1
}
}
6 changes: 3 additions & 3 deletions tasks/basecalling/task_samtools_convert.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task samtools_convert {
}

command <<<
set -e
set -euo pipefail

bam_output="output/bam/"
mkdir -p $bam_output
Expand All @@ -20,7 +20,7 @@ task samtools_convert {
bam_file="${bam_output}/${base_name}.bam"

echo "Converting SAM to BAM: $sam_file -> $bam_file"
samtools view -bS "$sam_file" > "$bam_file" || { echo "ERROR: samtools failed to convert $sam_file to BAM" >&2; exit 1; }
samtools view -@ ~{cpu} -bS "$sam_file" > "$bam_file" || { echo "ERROR: samtools failed to convert $sam_file to BAM" >&2; exit 1; }

echo "Conversion successful: $bam_file"
done
Expand All @@ -36,6 +36,6 @@ task samtools_convert {
docker: docker
cpu: cpu
memory: "~{memory} GB"
disks: "local-disk ~{disk_size} HDD"
disks: "local-disk ~{disk_size} SSD"
}
}
22 changes: 22 additions & 0 deletions workflows/utilities/data_import/wf_update_srr_metadata.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version 1.0

import "../../../tasks/utilities/data_handling/task_fetch_srr_metadata.wdl" as srr_task

workflow wf_retrieve_srr {
meta {
description: "This workflow retrieves the Sequence Read Archive (SRA) accession (SRR) associated with a given sample accession. It uses the fastq-dl tool to fetch metadata from SRA and outputs the SRR accession that can be used for downstream analysis."
}
input {
String sample_accession
String retrieve_srr_docker = "us-docker.pkg.dev/general-theiagen/biocontainers/fastq-dl:2.0.4--pyhdfd78af_0"
}

call srr_task.fetch_srr_metadata {
input:
sample_accession = sample_accession,
docker = retrieve_srr_docker
}
output {
String srr_accession = fetch_srr_metadata.srr_accession
}
}

0 comments on commit 39f4765

Please sign in to comment.