Mercurial > repos > galaxytrakr > hfp_bettercallsal_konda
comparison 1.0.0/modules/sourmash/gather/main.nf @ 0:0a8dda29956e draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Thu, 28 May 2026 20:41:10 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:0a8dda29956e |
|---|---|
| 1 process SOURMASH_GATHER { | |
| 2 tag "$meta.id" | |
| 3 label 'process_micro' | |
| 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(signature), path(database) | |
| 13 val save_unassigned | |
| 14 val save_matches_sig | |
| 15 val save_prefetch | |
| 16 val save_prefetch_csv | |
| 17 | |
| 18 output: | |
| 19 tuple val(meta), path("*.csv.gz") , emit: result , optional: true | |
| 20 tuple val(meta), path("*_scaffolded_genomic.fna.gz"), emit: genomes_fasta, optional: true | |
| 21 tuple val(meta), path("*_unassigned.sig.zip") , emit: unassigned , optional: true | |
| 22 tuple val(meta), path("*_matches.sig.zip") , emit: matches , optional: true | |
| 23 tuple val(meta), path("*_prefetch.sig.zip") , emit: prefetch , optional: true | |
| 24 tuple val(meta), path("*_prefetch.csv.gz") , emit: prefetchcsv , optional: true | |
| 25 path "*FAILED.txt" , emit: failed , optional: true | |
| 26 path "versions.yml" , emit: versions | |
| 27 | |
| 28 when: | |
| 29 task.ext.when == null || task.ext.when | |
| 30 | |
| 31 script: | |
| 32 def args = task.ext.args ?: '' | |
| 33 def args2 = task.ext.args2 ?: '' | |
| 34 def prefix = task.ext.prefix ?: "${meta.id}" | |
| 35 def unassigned = save_unassigned ? "--output-unassigned ${prefix}_unassigned.sig.zip" : '' | |
| 36 def matches = save_matches_sig ? "--save-matches ${prefix}_matches.sig.zip" : '' | |
| 37 def prefetch = save_prefetch ? "--save-prefetch ${prefix}_prefetch.sig.zip" : '' | |
| 38 def prefetchcsv = save_prefetch_csv ? "--save-prefetch-csv ${prefix}_prefetch.csv.gz" : '' | |
| 39 def gd = params.tuspy_gd ? "-gd ${params.tuspy_gd}" : '' | |
| 40 | |
| 41 """ | |
| 42 sourmash gather \\ | |
| 43 $args \\ | |
| 44 --output ${prefix}.csv.gz \\ | |
| 45 ${unassigned} \\ | |
| 46 ${matches} \\ | |
| 47 ${prefetch} \\ | |
| 48 ${prefetchcsv} \\ | |
| 49 ${signature} \\ | |
| 50 ${database} | |
| 51 | |
| 52 sourmash_filter_hits.py \\ | |
| 53 $args2 \\ | |
| 54 -csv ${prefix}.csv.gz | |
| 55 | |
| 56 gen_otf_genome.py \\ | |
| 57 $gd \\ | |
| 58 -op ${prefix} \\ | |
| 59 -txt ${prefix}_template_hits.txt | |
| 60 | |
| 61 cat <<-END_VERSIONS > versions.yml | |
| 62 "${task.process}": | |
| 63 sourmash: \$(echo \$(sourmash --version 2>&1) | sed 's/^sourmash //' ) | |
| 64 python: \$( python --version | sed 's/Python //g' ) | |
| 65 END_VERSIONS | |
| 66 """ | |
| 67 } |
