1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-24 16:29:54 +00:00
taxprofiler/modules/nf-core/krona/ktimporttext/main.nf

35 lines
962 B
Text
Raw Normal View History

2022-06-14 13:27:42 +00:00
process KRONA_KTIMPORTTEXT {
tag "$meta.id"
2022-10-05 10:24:18 +00:00
label 'process_single'
2022-06-14 13:27:42 +00:00
conda "bioconda::krona=2.8.1"
2022-06-14 13:27:42 +00:00
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1':
'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }"
input:
tuple val(meta), path(report)
output:
tuple val(meta), path ('*.html'), emit: html
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}"
"""
ktImportText \\
$args \\
-o ${prefix}.html \\
$report
cat <<-END_VERSIONS > versions.yml
"${task.process}":
krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g')
END_VERSIONS
"""
}