From 8f705829f8922b840a0190b05042a7898cde9765 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Wed, 5 Feb 2020 16:53:50 -0500 Subject: [PATCH 1/2] add fastq_to_bam wdl task and workflow add fastq_to_bam wdl task and workflow to call read_utils.py::fastq_to_bam --- pipes/WDL/workflows/fastq_to_bam.wdl | 5 ++++ .../WDL/workflows/tasks/tasks_read_utils.wdl | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 pipes/WDL/workflows/fastq_to_bam.wdl diff --git a/pipes/WDL/workflows/fastq_to_bam.wdl b/pipes/WDL/workflows/fastq_to_bam.wdl new file mode 100644 index 000000000..c628761df --- /dev/null +++ b/pipes/WDL/workflows/fastq_to_bam.wdl @@ -0,0 +1,5 @@ +import "tasks_read_utils.wdl" as read_utils + +workflow paired_fastqs_to_bam { + call read_utils.fastq_to_bam +} diff --git a/pipes/WDL/workflows/tasks/tasks_read_utils.wdl b/pipes/WDL/workflows/tasks/tasks_read_utils.wdl index 90f39d8f0..13dd953fd 100644 --- a/pipes/WDL/workflows/tasks/tasks_read_utils.wdl +++ b/pipes/WDL/workflows/tasks/tasks_read_utils.wdl @@ -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 + } +} From 85b9faa035feb9b2a61ad0f9df93a24c71cab41e Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Fri, 20 Mar 2020 12:52:09 -0400 Subject: [PATCH 2/2] uncomment header param --- pipes/WDL/workflows/tasks/tasks_read_utils.wdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipes/WDL/workflows/tasks/tasks_read_utils.wdl b/pipes/WDL/workflows/tasks/tasks_read_utils.wdl index 13dd953fd..bc5276f07 100644 --- a/pipes/WDL/workflows/tasks/tasks_read_utils.wdl +++ b/pipes/WDL/workflows/tasks/tasks_read_utils.wdl @@ -40,7 +40,7 @@ task downsample_bams { task fastq_to_bam { File in_fastq1 File in_fastq2 - #File? header + 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") @@ -51,7 +51,7 @@ task fastq_to_bam { ${in_fastq2} \ ${sample_name}.bam \ ${'--sampleName=' + sample_name} \ - #${'--header ' + header} \ + ${'--header ' + header} \ --JVMmemory "1g" }