nf-core_modules/modules/nanoplot/main.nf
Harshil Patel e751e5040a
Bump software versions for viralrecon modules (#1198)
* Bump software versions for viralrecon modules

* Remove custom params.save_unaligned from bowtie2_align

* Unify samtools modules and error if input and output names are the same

* Fix ALL the tests
2022-01-07 17:52:39 +00:00

34 lines
1.1 KiB
Text

process NANOPLOT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? 'bioconda::nanoplot=1.39.0' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/nanoplot:1.39.0--pyhdfd78af_0' :
'quay.io/biocontainers/nanoplot:1.39.0--pyhdfd78af_0' }"
input:
tuple val(meta), path(ontfile)
output:
tuple val(meta), path("*.html"), emit: html
tuple val(meta), path("*.png") , emit: png
tuple val(meta), path("*.txt") , emit: txt
tuple val(meta), path("*.log") , emit: log
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
def input_file = ("$ontfile".endsWith(".fastq.gz")) ? "--fastq ${ontfile}" :
("$ontfile".endsWith(".txt")) ? "--summary ${ontfile}" : ''
"""
NanoPlot \\
$args \\
-t $task.cpus \\
$input_file
cat <<-END_VERSIONS > versions.yml
"${task.process}":
nanoplot: \$(echo \$(NanoPlot --version 2>&1) | sed 's/^.*NanoPlot //; s/ .*\$//')
END_VERSIONS
"""
}