comparison 0.5.0/modules/mash/sketch/main.nf @ 1:365849f031fd

"planemo upload"
author kkonganti
date Mon, 05 Jun 2023 18:48:51 -0400
parents
children
comparison
equal deleted inserted replaced
0:a4b1ee4b68b1 1:365849f031fd
1 process MASH_SKETCH {
2 tag "mash sketch"
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 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), path(genomes_dir)
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(' '))
26 sleep(Math.round(params.genomes_chunk.toInteger()) as int * 600)
27 """
28 mash \\
29 sketch \\
30 -p $task.cpus \\
31 -o "msh.k${params.mashsketch_k}.${params.mashsketch_s}h.${prefix}" \\
32 $args \\
33 $queries \\
34 2> ${prefix}_mash_sketch.status
35
36 cat <<-END_VERSIONS > versions.yml
37 "${task.process}":
38 mash: \$( mash --version )
39 END_VERSIONS
40 """
41 }