From 0addf15d3a5b27131fd79fc8d00405c703a0bf84 Mon Sep 17 00:00:00 2001 From: Huimin Lyu Date: Tue, 30 Jun 2026 11:08:09 -0400 Subject: [PATCH 1/4] Update presto filterseq module --- .../nf-core/presto/filterseq/environment.yml | 2 +- modules/nf-core/presto/filterseq/main.nf | 25 ++++++----- modules/nf-core/presto/filterseq/meta.yml | 42 +++++++++++++------ .../presto/filterseq/tests/main.nf.test | 25 +++-------- .../presto/filterseq/tests/main.nf.test.snap | 19 +++++---- 5 files changed, 59 insertions(+), 54 deletions(-) diff --git a/modules/nf-core/presto/filterseq/environment.yml b/modules/nf-core/presto/filterseq/environment.yml index 8f892e149aa9..2587fd0e3480 100644 --- a/modules/nf-core/presto/filterseq/environment.yml +++ b/modules/nf-core/presto/filterseq/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::presto=0.7.1 + - bioconda::presto=0.7.9 diff --git a/modules/nf-core/presto/filterseq/main.nf b/modules/nf-core/presto/filterseq/main.nf index ac0845b40884..bc9a793a288a 100644 --- a/modules/nf-core/presto/filterseq/main.nf +++ b/modules/nf-core/presto/filterseq/main.nf @@ -4,16 +4,16 @@ process PRESTO_FILTERSEQ { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/presto:0.7.1--pyhdfd78af_0': - 'quay.io/biocontainers/presto:0.7.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/presto:0.7.9--pyhdfd78af_0': + 'quay.io/biocontainers/presto:0.7.9--pyhdfd78af_0' }" input: tuple val(meta), path(reads) output: - tuple val(meta), path("*_quality-pass.fastq"), emit: reads + tuple val(meta), path("*_quality-pass.fastq.gz"), emit: reads path "*_command_log.txt" , emit: logs - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('presto'), eval('FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1'), emit: versions_presto, topic: versions path "*.tab" , emit: log_tab when: @@ -23,15 +23,16 @@ process PRESTO_FILTERSEQ { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def log_prefix = reads.baseName.replaceFirst(/\.f(ast)?q$/, '') """ FilterSeq.py quality \\ -s $reads \\ --outname ${prefix} \\ - --log ${reads.baseName}.log \\ + --log ${log_prefix}.log \\ --nproc ${task.cpus} \\ $args > ${prefix}_command_log.txt - ParseLog.py -l ${reads.baseName}.log $args2 -f ID QUALITY + ParseLog.py -l ${log_prefix}.log $args2 -f ID QUALITY cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -41,13 +42,11 @@ process PRESTO_FILTERSEQ { stub: def prefix = task.ext.prefix ?: "${meta.id}" + def log_prefix = reads.baseName.replaceFirst(/\.f(ast)?q$/, '') """ - touch ${prefix}_quality-pass.fastq ${prefix}_quality-pass.fastq \\ - ${prefix}_command_log.txt ${prefix}.log ${prefix}.tab - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - presto: \$( FilterSeq.py --version | awk -F' ' '{print \$2}' ) - END_VERSIONS + touch ${prefix}_quality-pass.fastq.gz \\ + ${prefix}_command_log.txt \\ + ${log_prefix}.log \\ + ${log_prefix}_table.tab """ } diff --git a/modules/nf-core/presto/filterseq/meta.yml b/modules/nf-core/presto/filterseq/meta.yml index 8a4e6e6865ad..b558844473cb 100644 --- a/modules/nf-core/presto/filterseq/meta.yml +++ b/modules/nf-core/presto/filterseq/meta.yml @@ -25,8 +25,8 @@ input: e.g. `[ id:'test', single_end:false ]` - reads: type: file - description: fastq file - pattern: "*.{fastq}" + description: compressed fastq file + pattern: "*.{fastq.gz}" ontologies: - edam: http://edamontology.org/format_1930 # FASTQ output: @@ -36,10 +36,10 @@ output: description: | Groovy Map containing sample information e.g. `[ id:'test', single_end:false ]` - - "*_quality-pass.fastq": + - "*_quality-pass.fastq.gz": type: file - description: filtered fastq file - pattern: "*.{fastq}" + description: filtered fastq.gz file + pattern: "*.{fastq.gz}" ontologies: - edam: http://edamontology.org/format_1930 # FASTQ logs: @@ -48,13 +48,16 @@ output: description: command logs pattern: "*.txt" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + versions_presto: + - ${task.process}: + type: string + description: The name of the process + - presto: + type: string + description: the name of the tool + - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: + type: eval + description: The expression to obtain the version of the tool log_tab: - "*.tab": type: file @@ -62,5 +65,20 @@ output: pattern: "*.tab" ontologies: - edam: http://edamontology.org/format_3475 # TSV +topics: + versions: + - ${task.process}: + type: string + description: The name of the process + - presto: + type: string + description: the name of the tool + - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: + type: eval + description: The expression to obtain the version of the tool + authors: - "@ggabernet" +maintainers: + - "@ggabernet" + - "@Vivian0105" \ No newline at end of file diff --git a/modules/nf-core/presto/filterseq/tests/main.nf.test b/modules/nf-core/presto/filterseq/tests/main.nf.test index 62ced75c389f..96ca8439248b 100644 --- a/modules/nf-core/presto/filterseq/tests/main.nf.test +++ b/modules/nf-core/presto/filterseq/tests/main.nf.test @@ -7,31 +7,18 @@ nextflow_process { tag "modules" tag "modules_nfcore" - tag "gunzip" tag "presto" tag "presto/filterseq" test("homo_sapiens - fastq") { - setup { - - run("GUNZIP") { - script "../../../gunzip/main.nf" - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_airrseq_umi_R1.fastq.gz', checkIfExists: true) - ] - """ - } - } - } - when { process { """ - input[0] = GUNZIP.out.gunzip + input[0] = [ + [ id:'test'], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_airrseq_umi_R1.fastq.gz', checkIfExists: true) + ] """ } } @@ -39,14 +26,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions, + { assert snapshot(process.out.versions_presto, process.out.reads, process.out.log_tab).match() }, { assert path(process.out.log_tab.get(0)).getText().contains("QUALITY") }, { assert path(process.out.logs.get(0)).getText().contains("PASS") } ) } - } - } diff --git a/modules/nf-core/presto/filterseq/tests/main.nf.test.snap b/modules/nf-core/presto/filterseq/tests/main.nf.test.snap index 8e6fef917755..17fdcf4d9a08 100644 --- a/modules/nf-core/presto/filterseq/tests/main.nf.test.snap +++ b/modules/nf-core/presto/filterseq/tests/main.nf.test.snap @@ -2,25 +2,28 @@ "homo_sapiens - fastq": { "content": [ [ - "versions.yml:md5,5f939545018a68e43b57c7dfc7ace1b8" + [ + "PRESTO_FILTERSEQ", + "presto", + "0.7.9" + ] ], [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test_quality-pass.fastq:md5,36979cf434408b9cb5e8dc50692e2842" + "test_quality-pass.fastq.gz:md5,ef29c77b26f2123a6db36bc1c9a40d7d" ] ], [ - "test_airrseq_umi_R1_table.tab:md5,3b3f6ff09d5fb8c01a25294e0522ec5f" + "test_airrseq_umi_R1_table.tab:md5,eefa8e36013b462cb9a37be2654d67eb" ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.3" + "nf-test": "0.9.3", + "nextflow": "26.04.4" }, - "timestamp": "2024-01-25T18:01:03.38558" + "timestamp": "2026-06-30T10:19:25.928932233" } } \ No newline at end of file From 5dfa206cfc9e929d72cb66bd0aa03efc08522afa Mon Sep 17 00:00:00 2001 From: Huimin Lyu Date: Tue, 30 Jun 2026 11:58:06 -0400 Subject: [PATCH 2/4] update meta.yml --- modules/nf-core/presto/filterseq/meta.yml | 50 +++++++++++------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/modules/nf-core/presto/filterseq/meta.yml b/modules/nf-core/presto/filterseq/meta.yml index b558844473cb..4fa154566d3e 100644 --- a/modules/nf-core/presto/filterseq/meta.yml +++ b/modules/nf-core/presto/filterseq/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "presto_filterseq" description: Filter reads by quality score. keywords: @@ -14,9 +13,9 @@ tools: documentation: "https://presto.readthedocs.io" tool_dev_url: "https://bitbucket.org/kleinstein/presto" doi: "10.1093/bioinformatics/btu138" - licence: ["AGPL v3"] + licence: + - "AGPL v3" identifier: biotools:presto-measure - input: - - meta: type: map @@ -28,7 +27,7 @@ input: description: compressed fastq file pattern: "*.{fastq.gz}" ontologies: - - edam: http://edamontology.org/format_1930 # FASTQ + - edam: http://edamontology.org/format_1930 output: reads: - - meta: @@ -41,7 +40,7 @@ output: description: filtered fastq.gz file pattern: "*.{fastq.gz}" ontologies: - - edam: http://edamontology.org/format_1930 # FASTQ + - edam: http://edamontology.org/format_1930 logs: - "*_command_log.txt": type: file @@ -49,36 +48,35 @@ output: pattern: "*.txt" ontologies: [] versions_presto: - - ${task.process}: - type: string - description: The name of the process - - presto: - type: string - description: the name of the tool - - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: - type: eval - description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - presto: + type: string + description: the name of the tool + - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: + type: eval + description: The expression to obtain the version of the tool log_tab: - "*.tab": type: file description: parsed log table pattern: "*.tab" ontologies: - - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_3475 topics: versions: - - ${task.process}: - type: string - description: The name of the process - - presto: - type: string - description: the name of the tool - - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: - type: eval - description: The expression to obtain the version of the tool - + - - ${task.process}: + type: string + description: The name of the process + - presto: + type: string + description: the name of the tool + - FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1: + type: eval + description: The expression to obtain the version of the tool authors: - "@ggabernet" maintainers: - "@ggabernet" - - "@Vivian0105" \ No newline at end of file + - "@Vivian0105" From bf23083fefa6a5f4794ed3dfd73d953b27084dee Mon Sep 17 00:00:00 2001 From: Huimin Lyu <46943187+Vivian0105@users.noreply.github.com> Date: Tue, 30 Jun 2026 13:10:37 -0400 Subject: [PATCH 3/4] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Hörtenhuber --- modules/nf-core/presto/filterseq/main.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/nf-core/presto/filterseq/main.nf b/modules/nf-core/presto/filterseq/main.nf index bc9a793a288a..17ddc71290ff 100644 --- a/modules/nf-core/presto/filterseq/main.nf +++ b/modules/nf-core/presto/filterseq/main.nf @@ -23,7 +23,7 @@ process PRESTO_FILTERSEQ { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def log_prefix = reads.baseName.replaceFirst(/\.f(ast)?q$/, '') + def log_prefix = reads.simpleName """ FilterSeq.py quality \\ -s $reads \\ @@ -38,7 +38,6 @@ process PRESTO_FILTERSEQ { "${task.process}": presto: \$( FilterSeq.py --version | awk -F' ' '{print \$2}' ) END_VERSIONS - """ stub: def prefix = task.ext.prefix ?: "${meta.id}" From 238f127d873e710a9301471ae90a24c91d569560 Mon Sep 17 00:00:00 2001 From: Huimin Lyu Date: Tue, 30 Jun 2026 13:48:26 -0400 Subject: [PATCH 4/4] Fix nf-core module lint --- modules/nf-core/presto/filterseq/main.nf | 6 +--- .../presto/filterseq/tests/main.nf.test | 6 ++-- .../presto/filterseq/tests/main.nf.test.snap | 31 ++++++++++++------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/modules/nf-core/presto/filterseq/main.nf b/modules/nf-core/presto/filterseq/main.nf index 17ddc71290ff..695b1d9e60d4 100644 --- a/modules/nf-core/presto/filterseq/main.nf +++ b/modules/nf-core/presto/filterseq/main.nf @@ -33,11 +33,7 @@ process PRESTO_FILTERSEQ { $args > ${prefix}_command_log.txt ParseLog.py -l ${log_prefix}.log $args2 -f ID QUALITY - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - presto: \$( FilterSeq.py --version | awk -F' ' '{print \$2}' ) - END_VERSIONS + """ stub: def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nf-core/presto/filterseq/tests/main.nf.test b/modules/nf-core/presto/filterseq/tests/main.nf.test index 96ca8439248b..bd9a4e182e21 100644 --- a/modules/nf-core/presto/filterseq/tests/main.nf.test +++ b/modules/nf-core/presto/filterseq/tests/main.nf.test @@ -26,9 +26,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions_presto, - process.out.reads, - process.out.log_tab).match() }, + { assert snapshot(process.out.versions_presto).match("test_snap_versions") }, + { assert snapshot(process.out.reads, + process.out.log_tab).match("test_snap_output") }, { assert path(process.out.log_tab.get(0)).getText().contains("QUALITY") }, { assert path(process.out.logs.get(0)).getText().contains("PASS") } ) diff --git a/modules/nf-core/presto/filterseq/tests/main.nf.test.snap b/modules/nf-core/presto/filterseq/tests/main.nf.test.snap index 17fdcf4d9a08..27fb1961c072 100644 --- a/modules/nf-core/presto/filterseq/tests/main.nf.test.snap +++ b/modules/nf-core/presto/filterseq/tests/main.nf.test.snap @@ -1,13 +1,6 @@ { - "homo_sapiens - fastq": { + "test_snap_output": { "content": [ - [ - [ - "PRESTO_FILTERSEQ", - "presto", - "0.7.9" - ] - ], [ [ { @@ -20,10 +13,26 @@ "test_airrseq_umi_R1_table.tab:md5,eefa8e36013b462cb9a37be2654d67eb" ] ], + "timestamp": "2026-06-30T13:44:26.505405459", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.4" + } + }, + "test_snap_versions": { + "content": [ + [ + [ + "PRESTO_FILTERSEQ", + "presto", + "0.7.9" + ] + ] + ], + "timestamp": "2026-06-30T13:44:26.4964953", "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.5", "nextflow": "26.04.4" - }, - "timestamp": "2026-06-30T10:19:25.928932233" + } } } \ No newline at end of file