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