1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-15 10:33:08 +00:00
taxprofiler/modules/nf-core/megan/rma2info/main.nf

39 lines
1.1 KiB
Text
Raw Normal View History

2022-04-13 09:49:35 +00:00
process MEGAN_RMA2INFO {
tag "$meta.id"
2022-10-05 10:24:18 +00:00
label 'process_single'
2022-04-13 09:49:35 +00:00
conda "bioconda::megan=6.21.7"
2022-04-13 09:49:35 +00:00
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/megan:6.21.7--h9ee0642_0':
'quay.io/biocontainers/megan:6.21.7--h9ee0642_0' }"
input:
tuple val(meta), path(rma6)
val(megan_summary)
output:
tuple val(meta), path("*.txt.gz") , emit: txt
tuple val(meta), path("*.megan"), optional: true, emit: megan_summary
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def summary = megan_summary ? "-es ${prefix}.megan" : ""
"""
rma2info \\
-i ${rma6} \\
-o ${prefix}.txt.gz \\
${summary} \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
megan: \$(echo \$(rma2info 2>&1) | grep version | sed 's/.*version //g;s/, built.*//g')
END_VERSIONS
"""
}