|
0
|
1 process SEQSERO2 {
|
|
|
2 tag "$meta.id"
|
|
|
3 label 'process_low'
|
|
|
4
|
|
|
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}seqsero2${params.fs}1.2.1" : null)
|
|
|
6 conda (params.enable_conda ? "bioconda::seqsero2=1.2.1" : null)
|
|
|
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
8 'https://depot.galaxyproject.org/singularity/seqsero2:1.2.1--py_0' :
|
|
|
9 'quay.io/biocontainers/seqsero2:1.2.1--py_0' }"
|
|
|
10
|
|
|
11 input:
|
|
|
12 tuple val(meta), path(reads_or_asm)
|
|
|
13
|
|
|
14 output:
|
|
|
15 path("${meta.id}${params.fs}*")
|
|
|
16 tuple val(meta), path("${meta.id}${params.fs}*_result.tsv"), emit: serotyped
|
|
|
17 path "versions.yml" , emit: versions
|
|
|
18
|
|
|
19 when:
|
|
|
20 (task.ext.when == null || task.ext.when) && reads_or_asm.size() > 0
|
|
|
21
|
|
|
22 script:
|
|
|
23 def args = task.ext.args ?: ''
|
|
|
24 def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
25 """
|
|
|
26 SeqSero2_package.py \\
|
|
|
27 $args \\
|
|
|
28 -d $prefix \\
|
|
|
29 -n $prefix \\
|
|
|
30 -p $task.cpus \\
|
|
|
31 -i $reads_or_asm
|
|
|
32
|
|
|
33 mv ${prefix}${params.fs}SeqSero_log.txt ${prefix}${params.fs}${prefix}.SeqSero_log.txt
|
|
|
34 mv ${prefix}${params.fs}SeqSero_result.txt ${prefix}${params.fs}${prefix}.SeqSero_result.txt
|
|
|
35 mv ${prefix}${params.fs}SeqSero_result.tsv ${prefix}${params.fs}${prefix}.SeqSero_result.tsv
|
|
|
36
|
|
|
37 cat <<-END_VERSIONS > versions.yml
|
|
|
38 "${task.process}":
|
|
|
39 seqsero2: \$( echo \$( SeqSero2_package.py --version 2>&1) | sed 's/^.*SeqSero2_package.py //' )
|
|
|
40 END_VERSIONS
|
|
|
41 """
|
|
|
42 } |