From bdf222649d04fc2748d5247e02aa7fd7a1646a70 Mon Sep 17 00:00:00 2001 From: SusiJo Date: Fri, 20 May 2022 13:25:57 +0200 Subject: [PATCH] remove unnecessary if statement --- modules/cnvkit/batch/main.nf | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/cnvkit/batch/main.nf b/modules/cnvkit/batch/main.nf index c3a4ba32..66cfe8b2 100644 --- a/modules/cnvkit/batch/main.nf +++ b/modules/cnvkit/batch/main.nf @@ -27,7 +27,7 @@ process CNVKIT_BATCH { script: def args = task.ext.args ?: '' - // execute samtools only when cram files are input, cnvkit runs natively on bam but is prohibitively slow + // execute samtools only when cram files are input, cnvkit runs natively on bam but is prohibitively slow // input pair is assumed to have same extension if both exist def is_cram = tumor.Extension == "cram" ? true : false def tumor_out = is_cram ? tumor.BaseName + ".bam" : "${tumor}" @@ -35,7 +35,8 @@ process CNVKIT_BATCH { def normal_exists = normal ? true: false // tumor_only mode does not need fasta & target // instead it requires a pre-computed reference.cnn which is built from fasta & target - def (normal_out, normal_args, fasta_args, target_args) = ["", "", "", ""] + def (normal_out, normal_args, fasta_args) = ["", "", ""] + def target_args = targets ? "--targets $targets" : "" def reference_args = reference ? "--reference $reference" : "" if (normal_exists){ @@ -45,13 +46,6 @@ process CNVKIT_BATCH { fasta_args = fasta ? "--fasta $fasta" : "" } - if (args.contains("--method wgs") || args.contains("-m wgs")) { - target_args = targets ? "--targets $targets" : "" - } - else { - target_args = "--targets $targets" - } - """ if $is_cram; then samtools view -T $fasta $tumor -@ $task.cpus -o $tumor_out