|
0
|
1 process TOP_UNIQUE_SEROVARS {
|
|
|
2 tag "$meta.id"
|
|
|
3 label "process_pico"
|
|
|
4 maxForks 5
|
|
|
5
|
|
|
6 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
|
|
|
7 conda (params.enable_conda ? "conda-forge::python=3.10.4" : null)
|
|
|
8 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
9 'https://depot.galaxyproject.org/singularity/python:3.10.4' :
|
|
|
10 'quay.io/biocontainers/python:3.10.4' }"
|
|
|
11
|
|
|
12 input:
|
|
|
13 tuple val(meta), path(mash_screen_res)
|
|
|
14
|
|
|
15 output:
|
|
|
16 tuple val(meta), path('*_UNIQUE_HITS.txt') , emit: tsv, optional: true
|
|
|
17 tuple val(meta), path('*_UNIQUE_HITS_POPUP.txt'), emit: popup, optional: true
|
|
|
18 tuple val(meta), path('*_UNIQUE_HITS_ACCS.txt') , emit: accessions, optional: true
|
|
|
19 tuple val(meta), path('*_UNIQUE_HITS.fna.gz') , emit: genomes_fasta, optional: true
|
|
|
20 path'*FAILED.txt' , emit: failed, optional: true
|
|
|
21 path 'versions.yml' , emit: versions
|
|
|
22
|
|
|
23 when:
|
|
|
24 task.ext.when == null || task.ext.when
|
|
|
25
|
|
|
26 script:
|
|
|
27 def args = task.ext.args ?: ''
|
|
|
28 def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
29 args += (mash_screen_res ? " -m ${mash_screen_res}" : '')
|
|
|
30 args += (prefix ? " -op ${prefix}" : '')
|
|
|
31 """
|
|
|
32 get_top_unique_mash_hit_genomes.py \\
|
|
|
33 $args
|
|
|
34
|
|
|
35 cat <<-END_VERSIONS > versions.yml
|
|
|
36 "${task.process}":
|
|
|
37 python: \$( python --version | sed 's/Python //g' )
|
|
|
38 datasets: \$( datasets --version | sed 's/datasets version: //g' )
|
|
|
39 dataformat: \$( dataformat version )
|
|
|
40 END_VERSIONS
|
|
|
41 """
|
|
|
42
|
|
|
43 } |