1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-15 03:23:09 +00:00
taxprofiler/modules/nf-core/metaphlan3/mergemetaphlantables/main.nf
2022-12-23 17:23:05 +01:00

33 lines
940 B
Text
Generated

process METAPHLAN3_MERGEMETAPHLANTABLES {
label 'process_single'
conda "bioconda::metaphlan=3.0.12"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/metaphlan:3.0.12--pyhb7b1952_0' :
'quay.io/biocontainers/metaphlan:3.0.12--pyhb7b1952_0' }"
input:
tuple val(meta), path(profiles)
output:
tuple val(meta), path("${prefix}.txt") , emit: txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
merge_metaphlan_tables.py \\
$args \\
-o ${prefix}.txt \\
${profiles}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
metaphlan3: \$(metaphlan --version 2>&1 | awk '{print \$3}')
END_VERSIONS
"""
}