Add options to make samtools more flexible

This commit is contained in:
Anders Goncalves da Silva 2021-02-12 11:50:33 -08:00
parent 8b3c16a518
commit bfc13d3379
No known key found for this signature in database
GPG key ID: 9DAECD8B113C8AFE

View file

@ -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 \\