comparison 0.1.0/modules/mash/sketch/main.nf @ 0:c8597e9e1a97

"planemo upload"
author kkonganti
date Mon, 27 Nov 2023 12:37:44 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c8597e9e1a97
1 process MASH_SKETCH {
2 tag "${meta.id}"
3 label 'process_micro'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mash${params.fs}2.3" : null)
6 conda (params.enable_conda ? "conda-forge::capnproto conda-forge::gsl bioconda::mash=2.3" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1':
9 'quay.io/biocontainers/mash:2.3--he348c14_1' }"
10
11 input:
12 tuple val(meta), path(query)
13
14 output:
15 tuple val(meta), path("*.msh") , emit: sketch
16 tuple val(meta), path("*_mash_sketch.status"), emit: stats
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 def queries = (query ? query.collect().join('\\n') : null)
26 sleep(Math.round(params.genomes_chunk.toInteger()) as int * 100)
27 """
28 echo -e "$queries" > sketch_these.txt
29
30 mash \\
31 sketch \\
32 -p $task.cpus \\
33 -o "msh.${task.index}.k${params.mashsketch_k}.${params.mashsketch_s}h.${prefix}" \\
34 $args \\
35 -l sketch_these.txt \\
36 2> ${prefix}_${task.index}_mash_sketch.status
37
38 cat <<-END_VERSIONS > versions.yml
39 "${task.process}":
40 mash: \$( mash --version )
41 bash: \$( bash --version 2>&1 | sed '1!d; s/^.*version //; s/ (.*\$//' )
42 END_VERSIONS
43 """
44 }