2022-06-30 16:33:11 +00:00
|
|
|
process KRONA_KTIMPORTTAXONOMY {
|
|
|
|
tag "${meta.id}"
|
2022-10-05 10:24:18 +00:00
|
|
|
label 'process_single'
|
2022-06-30 16:33:11 +00:00
|
|
|
|
|
|
|
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
|
|
|
|
conda (params.enable_conda ? "bioconda::krona=2.8" : null)
|
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/krona:2.8--pl5262hdfd78af_2' :
|
|
|
|
'quay.io/biocontainers/krona:2.8--pl5262hdfd78af_2' }"
|
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(report)
|
2022-07-01 15:21:19 +00:00
|
|
|
path taxonomy, stageAs: 'taxonomy.tab'
|
2022-06-30 16:33:11 +00:00
|
|
|
|
|
|
|
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}"
|
|
|
|
def VERSION = '2.8' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
|
|
|
"""
|
2022-07-01 15:21:19 +00:00
|
|
|
TAXONOMY=\$(find -L . -name '*.tab' -exec dirname {} \\;)
|
|
|
|
echo \$TAXONOMY
|
|
|
|
|
2022-06-30 16:33:11 +00:00
|
|
|
ktImportTaxonomy \\
|
|
|
|
$args \\
|
|
|
|
-o ${prefix}.html \\
|
2022-07-01 15:21:19 +00:00
|
|
|
-tax \$TAXONOMY/ \\
|
2022-06-30 16:33:11 +00:00
|
|
|
$report
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
|
|
|
krona: $VERSION
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
2022-07-01 15:21:19 +00:00
|
|
|
}
|