nf-core_modules/modules/krona/ktimporttext/main.nf
JIANHONG OU cdefbec669
add kimporttext module (#1560)
* add kimporttext module

* fix the Prettier error.

* fix the Prettier error.

* fix the test.yml

* fix the test.yml

* Update modules/krona/ktimporttext/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/krona/ktimporttext/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/krona/ktimporttext/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/krona/ktimporttext/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/krona/ktimporttext/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* update the test files;
simplify the main script of krona/ktimporttext.

* update the test file url for krona ktimporttext

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
2022-04-28 08:16:26 -04:00

34 lines
990 B
Text

process KRONA_KTIMPORTTEXT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::krona=2.8.1" : null)
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
"""
}