comparison 0.4.2/modules/centrifuge/process/main.nf @ 130:04f6ac8ca13c

planemo upload
author kkonganti
date Wed, 03 Jul 2024 15:16:39 -0400
parents 52045ea4679d
children
comparison
equal deleted inserted replaced
129:1bb0dacefa6d 130:04f6ac8ca13c
1 process CENTRIFUGE_PROCESS {
2 tag "$meta.id"
3 label 'process_low'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
6 conda (params.enable_conda ? "conda-forge::python=3.9 conda-forge::pandas conda-forge::biopython" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/mulled-v2-d91be2208450c41a5198d8660b6d9a5b60613b3a:d9847b41af5ef58746c86d7114cd010650f3d9a2-0' :
9 'quay.io/biocontainers/mulled-v2-d91be2208450c41a5198d8660b6d9a5b60613b3a:d9847b41af5ef58746c86d7114cd010650f3d9a2-0' }"
10
11 input:
12 tuple val(meta), path(centrifuge_report), path(centrifuge_output)
13
14 output:
15 tuple val(meta), path('*.process-centrifuge-bug-ids.txt'), emit: extracted
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 """
25 process_centrifuge_output.py \\
26 -r $centrifuge_report \\
27 -o $centrifuge_output \\
28 -b '${params.centrifuge_extract_bug}' \\
29 -t ${prefix}.process-centrifuge-bug-ids.txt
30
31 cat <<-END_VERSIONS > versions.yml
32 "${task.process}":
33 python: \$( python --version | sed 's/Python //g' )
34 biopython: \$( python -c 'import Bio as bio; print(bio.__version__)' )
35 numpy: \$( python -c 'import numpy as np; print(np.__version__)' )
36 pandas: \$( python -c 'import pandas as pd; print(pd.__version__)' )
37 END_VERSIONS
38 """
39 }