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