Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose read_utils.py::fastq_to_bam in wdl task and workflow #1002

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pipes/WDL/workflows/fastq_to_bam.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "tasks_read_utils.wdl" as read_utils

workflow paired_fastqs_to_bam {
call read_utils.fastq_to_bam
}
29 changes: 29 additions & 0 deletions pipes/WDL/workflows/tasks/tasks_read_utils.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,33 @@ task downsample_bams {
}
}

task fastq_to_bam {
File in_fastq1
File in_fastq2
File? header

# also used for outfile name
String? sample_name = basename(basename(basename(basename(basename(basename(in_fastq1, ".1.fastq"),".1.fq"),".fastq"),".fq"),".fq1"),".fastq1")

command {
read_utils.py fastq_to_bam \
${in_fastq1} \
${in_fastq2} \
${sample_name}.bam \
${'--sampleName=' + sample_name} \
${'--header ' + header} \
--JVMmemory "1g"
}

output {
File out_bam = "${sample_name}.bam"
String viralngs_version = "viral-ngs_version_unknown"
}
runtime {
docker: "quay.io/broadinstitute/viral-ngs"
memory: "3 GB"
cpu: 2
dx_instance_type: "mem1_ssd1_v2_x4"
preemptible: 0
}
}