annotate 0.4.0/modules/centrifuge/process/main.nf @ 104:17890124001d

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