comparison 0.2.0/modules/mlst/main.nf @ 11:a5f31c44f8c9

planemo upload
author kkonganti
date Mon, 15 Jul 2024 16:11:44 -0400
parents
children
comparison
equal deleted inserted replaced
10:ddf7a172bf30 11:a5f31c44f8c9
1 process MLST {
2 tag "$meta.id"
3 label 'process_micro'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mlst${params.fs}2.23.0" : null)
6 conda (params.enable_conda ? "conda-forge::perl bioconda::mlst=2.23.0" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/mlst:2.23.0--hdfd78af_1' :
9 'quay.io/biocontainers/mlst:2.23.0--hdfd78af_1' }"
10
11 input:
12 tuple val(meta), path(fasta), path(datadir)
13
14 output:
15 tuple val(meta), path("*.tsv"), emit: tsv
16 path "versions.yml" , emit: versions
17
18 when:
19 (task.ext.when == null || task.ext.when) && fasta.size() > 0
20
21 script:
22 def args = task.ext.args ?: ''
23 def taskid = (task.index ?: '')
24 def prefix = (meta.id ?: 'MLST' + taskid.toString())
25 def label = (params.mlst_label ? "--label '${prefix}'" : '')
26 args += (datadir ? " --datadir '.' " : '')
27 """
28 mlst \\
29 --threads $task.cpus \\
30 $label \\
31 $args \\
32 $fasta > ${prefix}.tsv
33
34 cat <<-END_VERSIONS > versions.yml
35 "${task.process}":
36 mlst: \$( echo \$(mlst --version 2>&1) | sed 's/mlst //' )
37 END_VERSIONS
38 """
39
40 }