From bfc13d337969cc42da11bc3bf44d2244a804d582 Mon Sep 17 00:00:00 2001 From: Anders Goncalves da Silva Date: Fri, 12 Feb 2021 11:50:33 -0800 Subject: [PATCH] Add options to make samtools more flexible --- software/ivar/consensus/main.nf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/software/ivar/consensus/main.nf b/software/ivar/consensus/main.nf index b30e8c8b..eba6276d 100644 --- a/software/ivar/consensus/main.nf +++ b/software/ivar/consensus/main.nf @@ -31,11 +31,20 @@ process IVAR_CONSENSUS { script: def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : "" + def save_mpileup = options.save_mpileup ? "tee ${prefix}.mpileup |" : "" + def min_bq = options.min_bq ? "-Q ${options.min_bq}" : "-Q 0" + def max_depth = options.max_depth ? "-d ${options.max_depth}" : "-d 0" + def count_orphans = options.count_orphans ? "-A" : "" + def disable_baq = options.disable_baq ? "-B" : "" + def output_all_bases = options.output_all_bases ? "-aa" : "" """ samtools mpileup \\ - --fasta-ref $fasta - -aa -A -d 0 -Q 0 \\ + --fasta-ref $fasta \\ + $output_all_bases \\ + $count_orphans \\ + $disable_baq \\ + $max_depth \\ + $min_bq \\ $options.args2 \\ $bam | \\ $save_mpileup \\