nf-core_modules/modules/quast/main.nf
Mahesh Binzer-Panchal d473a247d2
Replace remaining task.ext.suffix with task.ext.prefix (#1117)
* Replace remaining task.ext.suffix with task.ext.prefix
2021-12-07 15:00:43 +01:00

42 lines
1.1 KiB
Text

process QUAST {
label 'process_medium'
conda (params.enable_conda ? 'bioconda::quast=5.0.2' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/quast:5.0.2--py37pl526hb5aa323_2' :
'quay.io/biocontainers/quast:5.0.2--py37pl526hb5aa323_2' }"
input:
path consensus
path fasta
path gff
val use_fasta
val use_gff
output:
path "${prefix}" , emit: results
path '*.tsv' , emit: tsv
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: 'quast'
def features = use_gff ? "--features $gff" : ''
def reference = use_fasta ? "-r $fasta" : ''
"""
quast.py \\
--output-dir $prefix \\
$reference \\
$features \\
--threads $task.cpus \\
$args \\
${consensus.join(' ')}
ln -s ${prefix}/report.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
quast: \$(quast.py --version 2>&1 | sed 's/^.*QUAST v//; s/ .*\$//')
END_VERSIONS
"""
}