2022-09-09 11:57:06 +00:00
|
|
|
process METAPHLAN3_MERGEMETAPHLANTABLES {
|
|
|
|
label 'process_single'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? 'bioconda::metaphlan=3.0.12' : null)
|
|
|
|
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:
|
2022-09-15 10:29:54 +00:00
|
|
|
tuple val(meta), path(profiles)
|
2022-09-09 11:57:06 +00:00
|
|
|
|
|
|
|
output:
|
2022-09-15 10:29:54 +00:00
|
|
|
tuple val(meta), path("${prefix}.txt") , emit: txt
|
2022-09-09 11:57:06 +00:00
|
|
|
path "versions.yml" , emit: versions
|
|
|
|
|
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
|
|
|
script:
|
|
|
|
def args = task.ext.args ?: ''
|
2022-09-15 10:29:54 +00:00
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
2022-09-09 11:57:06 +00:00
|
|
|
"""
|
|
|
|
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
|
|
|
|
"""
|
|
|
|
}
|