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