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