annotate 0.3.0/modules/centrifuge/process/main.nf @ 97:8d7f482c64de

"planemo upload"
author kkonganti
date Fri, 29 Jul 2022 11:11:07 -0400
parents 295c2597a475
children
rev   line source
kkonganti@92 1 process CENTRIFUGE_PROCESS {
kkonganti@92 2 tag "$meta.id"
kkonganti@92 3 label 'process_low'
kkonganti@92 4
kkonganti@92 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
kkonganti@92 6 conda (params.enable_conda ? "conda-forge::python=3.9 conda-forge::pandas conda-forge::biopython" : null)
kkonganti@92 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@92 8 'mulled-v2-d91be2208450c41a5198d8660b6d9a5b60613b3a:d9847b41af5ef58746c86d7114cd010650f3d9a2-0' :
kkonganti@92 9 'quay.io/biocontainers/mulled-v2-d91be2208450c41a5198d8660b6d9a5b60613b3a:d9847b41af5ef58746c86d7114cd010650f3d9a2-0' }"
kkonganti@92 10
kkonganti@92 11 input:
kkonganti@92 12 tuple val(meta), path(centrifuge_report), path(centrifuge_output)
kkonganti@92 13
kkonganti@92 14 output:
kkonganti@92 15 tuple val(meta), path('*.process-centrifuge-bug-ids.txt'), emit: extracted
kkonganti@92 16 path "versions.yml" , emit: versions
kkonganti@92 17
kkonganti@92 18 when:
kkonganti@92 19 task.ext.when == null || task.ext.when
kkonganti@92 20
kkonganti@92 21 script:
kkonganti@92 22 def args = task.ext.args ?: ''
kkonganti@92 23 def prefix = task.ext.prefix ?: "${meta.id}"
kkonganti@92 24 """
kkonganti@92 25 process_centrifuge_output.py \\
kkonganti@92 26 -r $centrifuge_report \\
kkonganti@92 27 -o $centrifuge_output \\
kkonganti@92 28 -b '${params.centrifuge_extract_bug}' \\
kkonganti@92 29 -t ${prefix}.process-centrifuge-bug-ids.txt
kkonganti@92 30
kkonganti@92 31 cat <<-END_VERSIONS > versions.yml
kkonganti@92 32 "${task.process}":
kkonganti@92 33 python: \$( python --version | sed 's/Python //g' )
kkonganti@92 34 biopython: \$( python -c 'import Bio as bio; print(bio.__version__)' )
kkonganti@92 35 numpy: \$( python -c 'import numpy as np; print(np.__version__)' )
kkonganti@92 36 pandas: \$( python -c 'import pandas as pd; print(pd.__version__)' )
kkonganti@92 37 END_VERSIONS
kkonganti@92 38 """
kkonganti@92 39 }