From a5a6973fcf161d0449b216c166ba232c6c55bcbb Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Sat, 21 May 2022 08:33:49 +0200 Subject: [PATCH] picard: make reference sequence optional --- modules/picard/collecthsmetrics/main.nf | 2 +- modules/picard/collectmultiplemetrics/main.nf | 3 ++- modules/picard/collectwgsmetrics/main.nf | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 317aff4b..06b6b8f3 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -24,7 +24,7 @@ process PICARD_COLLECTHSMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta ? "-R $fasta" : "" + def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3 if (!task.memory) { diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index a653b549..3c3152df 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -22,6 +22,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3 if (!task.memory) { log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -35,7 +36,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ - --REFERENCE_SEQUENCE $fasta + $reference cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index e6dd49e9..13446fcf 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -21,6 +21,7 @@ process PICARD_COLLECTWGSMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3 if (!task.memory) { log.info '[Picard CollectWgsMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -34,7 +35,7 @@ process PICARD_COLLECTWGSMETRICS { $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ - --REFERENCE_SEQUENCE $fasta + $reference cat <<-END_VERSIONS > versions.yml