Mercurial > repos > kkonganti > cfsan_centriflaken
comparison 0.4.2/modules/kraken2/extract_contigs/main.nf @ 105:52045ea4679d
"planemo upload"
author | kkonganti |
---|---|
date | Thu, 27 Jun 2024 14:17:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
104:17890124001d | 105:52045ea4679d |
---|---|
1 process KRAKEN2_EXTRACT_CONTIGS { | |
2 tag "$meta.id" | |
3 label 'process_nano' | |
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(assembly), path(kraken2_output) | |
13 val kraken2_extract_bug | |
14 | |
15 output: | |
16 tuple val(meta), path('*assembly_filtered_contigs.fasta'), emit: asm_filtered_contigs | |
17 path "versions.yml" , emit: versions | |
18 | |
19 when: | |
20 task.ext.when == null || task.ext.when | |
21 | |
22 script: | |
23 def args = task.ext.args ?: '' | |
24 def prefix = task.ext.prefix ?: "${meta.id}" | |
25 """ | |
26 extract_assembled_filtered_contigs.py \\ | |
27 -i $assembly \\ | |
28 -o ${prefix}.assembly_filtered_contigs.fasta \\ | |
29 -k $kraken2_output \\ | |
30 -b '$kraken2_extract_bug' | |
31 | |
32 cat <<-END_VERSIONS > versions.yml | |
33 "${task.process}": | |
34 python: \$( python --version | sed 's/Python //g' ) | |
35 biopython: \$( python -c 'import Bio as bio; print(bio.__version__)' ) | |
36 numpy: \$( python -c 'import numpy as np; print(np.__version__)' ) | |
37 pandas: \$( python -c 'import pandas as pd; print(pd.__version__)' ) | |
38 END_VERSIONS | |
39 """ | |
40 } |