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