comparison 0.5.0/modules/sourmash/sketch/main.nf @ 0:97cd2f532efe

planemo upload
author kkonganti
date Mon, 31 Mar 2025 14:50:40 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:97cd2f532efe
1 process SOURMASH_SKETCH {
2 tag "$meta.id"
3 label 'process_nano'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}sourmash${params.fs}4.6.1" : null)
6 conda (params.enable_conda ? "conda-forge::python bioconda::sourmash=4.6.1" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/sourmash:4.6.1--hdfd78af_0':
9 'quay.io/biocontainers/sourmash:4.6.1--hdfd78af_0' }"
10
11 input:
12 tuple val(meta), path(sequence)
13 val singleton
14 val merge
15 val db_or_query
16
17 output:
18 tuple val(meta), path("*.{query,db}.sig"), emit: signatures
19 path "versions.yml" , emit: versions
20
21 when:
22 task.ext.when == null || task.ext.when
23
24 script:
25 // required defaults for the tool to run, but can be overridden
26 def args = task.ext.args ?: ''
27 def prefix = task.ext.prefix ?: "${meta.id}"
28 def merge_sig = merge ? "--merge ${meta.id}" : ''
29 def singleton = singleton ? '--singleton' : ''
30 """
31 sourmash sketch \\
32 $args \\
33 $merge_sig \\
34 $singleton \\
35 --output "${prefix}.${db_or_query}.sig" \\
36 $sequence
37
38 cat <<-END_VERSIONS > versions.yml
39 "${task.process}":
40 sourmash: \$(echo \$(sourmash --version 2>&1) | sed 's/^sourmash //' )
41 END_VERSIONS
42 """
43 }