Mercurial > repos > kkonganti > hfp_nowayout
comparison 0.5.0/modules/krona/ktimporttext/main.nf @ 0:97cd2f532efe
planemo upload
author | kkonganti |
---|---|
date | Mon, 31 Mar 2025 14:50:40 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:97cd2f532efe |
---|---|
1 process KRONA_KTIMPORTTEXT { | |
2 tag "$meta.id" | |
3 label 'process_nano' | |
4 | |
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}krona${params.fs}2.8.1" : null) | |
6 conda (params.enable_conda ? "conda-forge::curl bioconda::krona=2.8.1" : null) | |
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
8 'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1': | |
9 'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }" | |
10 | |
11 input: | |
12 tuple val(meta), path(report) | |
13 | |
14 output: | |
15 tuple val(meta), path ('*.html'), emit: html | |
16 path "versions.yml" , emit: versions | |
17 | |
18 when: | |
19 task.ext.when == null || task.ext.when | |
20 | |
21 script: | |
22 def args = task.ext.args ?: '' | |
23 def prefix = task.ext.prefix ?: "${meta.id}" | |
24 def krona_suffix = params.krona_res_suffix ?: '.krona.tsv' | |
25 def reports = report.collect { | |
26 it = it.toString() + ',' + it.toString().replaceAll(/(.*)${krona_suffix}$/, /$1/) | |
27 }.sort().join(' ') | |
28 """ | |
29 ktImportText \\ | |
30 $args \\ | |
31 -o ${prefix}.html \\ | |
32 $reports | |
33 | |
34 cat <<-END_VERSIONS > versions.yml | |
35 "${task.process}": | |
36 krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g') | |
37 END_VERSIONS | |
38 """ | |
39 } |