Mercurial > repos > galaxytrakr > hfp_centriflaken_awsbatch
comparison 0.4.2/modules/spades/assemble/main.nf @ 0:082e0091e813 draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Fri, 29 May 2026 13:27:47 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:082e0091e813 |
|---|---|
| 1 process SPADES_ASSEMBLE { | |
| 2 tag "$meta.id" | |
| 3 label 'process_higher' | |
| 4 | |
| 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}spades${params.fs}3.15.3" : null) | |
| 6 conda (params.enable_conda ? 'bioconda::spades=3.15.3' : null) | |
| 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 8 'https://depot.galaxyproject.org/singularity/spades:3.15.3--h95f258a_0' : | |
| 9 'quay.io/biocontainers/spades:3.15.3--h95f258a_0' }" | |
| 10 | |
| 11 input: | |
| 12 tuple val(meta), path(illumina), path(pacbio), path(nanopore) | |
| 13 | |
| 14 output: | |
| 15 path "${meta.id}${params.fs}*" | |
| 16 tuple val(meta), path("${meta.id}${params.fs}scaffolds.fasta"), emit: assembly, optional: true | |
| 17 tuple val(meta), path("${meta.id}${params.fs}spades.log") , emit: log | |
| 18 path "versions.yml" , emit: versions | |
| 19 | |
| 20 when: | |
| 21 task.ext.when == null || task.ext.when | |
| 22 | |
| 23 script: | |
| 24 def args = task.ext.args ?: '' | |
| 25 def prefix = task.ext.prefix ?: "${meta.id}" | |
| 26 def maxmem = task.memory ? "--memory ${task.memory.toGiga()}" : "" | |
| 27 def illumina_reads = illumina ? ( meta.single_end ? "-s $illumina" : "-1 ${illumina[0]} -2 ${illumina[1]}" ) : "" | |
| 28 def pacbio_reads = !(pacbio.simpleName ==~ 'dummy_file.*') ? "--pacbio $pacbio" : "" | |
| 29 def nanopore_reads = !(nanopore.simpleName ==~ 'dummy_file.*') ? "--nanopore $nanopore" : "" | |
| 30 def custom_hmms = params.spades_hmm ? "--custom-hmms ${params.spades_hmm}" : "" | |
| 31 """ | |
| 32 spades.py \\ | |
| 33 $args \\ | |
| 34 --threads $task.cpus \\ | |
| 35 $maxmem \\ | |
| 36 $custom_hmms \\ | |
| 37 $illumina_reads \\ | |
| 38 $pacbio_reads \\ | |
| 39 $nanopore_reads \\ | |
| 40 -o ${prefix} | |
| 41 | |
| 42 cat <<-END_VERSIONS > versions.yml | |
| 43 "${task.process}": | |
| 44 spades: \$(spades.py --version 2>&1 | sed 's/^.*SPAdes genome assembler v//; s/ .*\$//') | |
| 45 END_VERSIONS | |
| 46 """ | |
| 47 } |
