Mercurial > repos > galaxytrakr > hfp_bettercallsal_konda
comparison 1.0.0/modules/filtlong/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 FILTLONG { | |
| 2 tag "$meta.id" | |
| 3 label 'process_micro' | |
| 4 | |
| 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}filtlong${params.fs}0.2.1" : null) | |
| 6 conda (params.enable_conda ? "conda-forge::gcc bioconda::filtlong=0.2.1" : null) | |
| 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 8 'https://depot.galaxyproject.org/singularity/filtlong:0.2.1--h9a82719_0' : | |
| 9 'quay.io/biocontainers/filtlong:0.2.1--h9a82719_0' }" | |
| 10 | |
| 11 input: | |
| 12 tuple val(meta), path(shortreads), path(longreads) | |
| 13 | |
| 14 output: | |
| 15 tuple val(meta), path("*.filtlong.fastq.gz"), emit: filtered_reads | |
| 16 tuple val(meta), path("*.filtlong.log") , emit: log | |
| 17 path "versions.yml" , emit: versions | |
| 18 | |
| 19 when: | |
| 20 task.ext.when == null || task.ext.when | |
| 21 | |
| 22 script: | |
| 23 def args = task.ext.args ?: '' | |
| 24 def prefix = task.ext.prefix ?: "${meta.id}" | |
| 25 def short_reads = !shortreads ? "" : meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}" | |
| 26 if ("$longreads" == "${prefix}.filtlong.fastq.gz") error "Longread FASTQ input and output names are the same, set prefix in module configuration to disambiguate!" | |
| 27 """ | |
| 28 filtlong \\ | |
| 29 $short_reads \\ | |
| 30 $args \\ | |
| 31 $longreads \\ | |
| 32 2> >(tee ${prefix}.filtlong.log >&2) \\ | |
| 33 | gzip -n > ${prefix}.filtlong.fastq.gz | |
| 34 | |
| 35 cat <<-END_VERSIONS > versions.yml | |
| 36 "${task.process}": | |
| 37 filtlong: \$( filtlong --version | sed -e "s/Filtlong v//g" ) | |
| 38 END_VERSIONS | |
| 39 """ | |
| 40 } |
