From 7dae41a2783158a5ce53ebeaf88fb8a36f7a4da7 Mon Sep 17 00:00:00 2001 From: jonasscheid Date: Mon, 4 May 2026 09:50:44 +0000 Subject: [PATCH 1/5] feat(sdrfpipelines/parsesdrf): add module to convert SDRF files via sdrf-pipelines Co-Authored-By: Claude Opus 4.7 --- .../sdrfpipelines/parsesdrf/environment.yml | 7 ++ .../nf-core/sdrfpipelines/parsesdrf/main.nf | 33 ++++++++ .../nf-core/sdrfpipelines/parsesdrf/meta.yml | 77 +++++++++++++++++++ .../parsesdrf/tests/main.nf.test | 54 +++++++++++++ .../parsesdrf/tests/main.nf.test.snap | 76 ++++++++++++++++++ .../parsesdrf/tests/nextflow.config | 5 ++ 6 files changed, 252 insertions(+) create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/environment.yml create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/main.nf create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/meta.yml create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap create mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/environment.yml b/modules/nf-core/sdrfpipelines/parsesdrf/environment.yml new file mode 100644 index 000000000000..09ffc762c5a9 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::sdrf-pipelines=0.1.3" diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/main.nf b/modules/nf-core/sdrfpipelines/parsesdrf/main.nf new file mode 100644 index 000000000000..fd2f435f49c3 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/main.nf @@ -0,0 +1,33 @@ +process SDRFPIPELINES_PARSESDRF { + tag "${sdrf.baseName}" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': + 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" + + input: + path sdrf + + output: + path "samplesheet.tsv" , emit: samplesheet + path "search_presets.tsv", emit: search_presets + tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions, emit: versions_sdrfpipelines + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + parse_sdrf $args \\ + -s ${sdrf} + """ + + stub: + """ + touch samplesheet.tsv + touch search_presets.tsv + """ +} diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml b/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml new file mode 100644 index 000000000000..aa27a1e1f039 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml @@ -0,0 +1,77 @@ +name: "sdrfpipelines_parsesdrf" +description: | + Parse and convert an SDRF (Sample and Data Relationship Format) file into + pipeline-specific samplesheet/configuration files using the sdrf-pipelines + `parse_sdrf` CLI. The conversion subcommand (e.g. `convert-mhcquant`, + `convert-openms`) and its output flags are supplied via `task.ext.args`. +keywords: + - sdrf + - samplesheet + - proteomics + - immunopeptidomics + - metadata +tools: + - "sdrf-pipelines": + description: "A set of tools to validate and convert SDRF files for proteomics + pipelines." + homepage: "https://github.com/bigbio/sdrf-pipelines" + documentation: "https://github.com/bigbio/sdrf-pipelines" + tool_dev_url: "https://github.com/bigbio/sdrf-pipelines" + doi: "10.1021/acs.jproteome.1c00505" + licence: + - "Apache-2.0" + identifier: "biotools:sdrf-pipelines" +input: + - sdrf: + type: file + description: SDRF file describing the experimental design and sample + metadata. + pattern: "*.{tsv,sdrf.tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 +output: + samplesheet: + - "samplesheet.tsv": + type: file + description: | + Samplesheet derived from the SDRF file. The exact contents depend on + the conversion subcommand passed via `ext.args` (e.g. mhcquant-style + samplesheet when `convert-mhcquant` is used). + pattern: "samplesheet.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + search_presets: + - "search_presets.tsv": + type: file + description: | + Search parameter presets derived from the SDRF file (one row per + unique search configuration). Produced by subcommands that emit a + presets file, e.g. `convert-mhcquant`. + pattern: "search_presets.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + versions_sdrfpipelines: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@jonasscheid" +maintainers: + - "@jonasscheid" diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test b/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test new file mode 100644 index 000000000000..ca840ef09fa8 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test @@ -0,0 +1,54 @@ +nextflow_process { + + name "Test Process SDRFPIPELINES_PARSESDRF" + script "../main.nf" + process "SDRFPIPELINES_PARSESDRF" + + tag "modules" + tag "modules_nfcore" + tag "sdrfpipelines" + tag "sdrfpipelines/parsesdrf" + + config "./nextflow.config" + + test("sdrf - mhcquant - PXD009752") { + + when { + process { + """ + input[0] = file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - mhcquant - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap b/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap new file mode 100644 index 000000000000..9c301c798679 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap @@ -0,0 +1,76 @@ +{ + "sdrf - mhcquant - PXD009752 - stub": { + "content": [ + { + "0": [ + "samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "2": [ + [ + "SDRFPIPELINES_PARSESDRF", + "sdrf-pipelines", + "0.1.3" + ] + ], + "samplesheet": [ + "samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "search_presets": [ + "search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "versions_sdrfpipelines": [ + [ + "SDRFPIPELINES_PARSESDRF", + "sdrf-pipelines", + "0.1.3" + ] + ] + } + ], + "timestamp": "2026-05-04T09:45:05.072262669", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - mhcquant - PXD009752": { + "content": [ + { + "0": [ + "samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" + ], + "1": [ + "search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ], + "2": [ + [ + "SDRFPIPELINES_PARSESDRF", + "sdrf-pipelines", + "0.1.3" + ] + ], + "samplesheet": [ + "samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" + ], + "search_presets": [ + "search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ], + "versions_sdrfpipelines": [ + [ + "SDRFPIPELINES_PARSESDRF", + "sdrf-pipelines", + "0.1.3" + ] + ] + } + ], + "timestamp": "2026-05-04T09:44:47.41878644", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config b/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config new file mode 100644 index 000000000000..399f5f5e46cb --- /dev/null +++ b/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: "SDRFPIPELINES_PARSESDRF" { + ext.args = "convert-mhcquant -os samplesheet.tsv -op search_presets.tsv" + } +} From e4b453df51e7c54d17aff4760e956207b0c3ed6c Mon Sep 17 00:00:00 2001 From: jonasscheid Date: Mon, 4 May 2026 13:39:22 +0000 Subject: [PATCH 2/5] refactor(sdrfpipelines/convertmhcquant): rename from parsesdrf, lock to convert-mhcquant subcommand, add meta map and prefix-based outputs Co-Authored-By: Claude Opus 4.7 --- .../environment.yml | 0 .../sdrfpipelines/convertmhcquant/main.nf | 38 +++++++ .../sdrfpipelines/convertmhcquant/meta.yml | 76 +++++++++++++ .../tests/main.nf.test | 18 ++-- .../convertmhcquant/tests/main.nf.test.snap | 102 ++++++++++++++++++ .../nf-core/sdrfpipelines/parsesdrf/main.nf | 33 ------ .../nf-core/sdrfpipelines/parsesdrf/meta.yml | 77 ------------- .../parsesdrf/tests/main.nf.test.snap | 76 ------------- .../parsesdrf/tests/nextflow.config | 5 - 9 files changed, 227 insertions(+), 198 deletions(-) rename modules/nf-core/sdrfpipelines/{parsesdrf => convertmhcquant}/environment.yml (100%) create mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/main.nf create mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml rename modules/nf-core/sdrfpipelines/{parsesdrf => convertmhcquant}/tests/main.nf.test (56%) create mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap delete mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/main.nf delete mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/meta.yml delete mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap delete mode 100644 modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/environment.yml b/modules/nf-core/sdrfpipelines/convertmhcquant/environment.yml similarity index 100% rename from modules/nf-core/sdrfpipelines/parsesdrf/environment.yml rename to modules/nf-core/sdrfpipelines/convertmhcquant/environment.yml diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf b/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf new file mode 100644 index 000000000000..8a4e0e00e6af --- /dev/null +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf @@ -0,0 +1,38 @@ +process SDRFPIPELINES_CONVERTMHCQUANT { + tag "${meta.id}" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': + 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" + + input: + tuple val(meta), path(sdrf) + + output: + tuple val(meta), path("${prefix}_samplesheet.tsv") , emit: samplesheet + tuple val(meta), path("${prefix}_search_presets.tsv"), emit: search_presets + tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + parse_sdrf convert-mhcquant \\ + $args \\ + -s ${sdrf} \\ + -os ${prefix}_samplesheet.tsv \\ + -op ${prefix}_search_presets.tsv + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_samplesheet.tsv + touch ${prefix}_search_presets.tsv + """ +} diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml b/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml new file mode 100644 index 000000000000..a79c82a56334 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml @@ -0,0 +1,76 @@ +name: "sdrfpipelines_convertmhcquant" +description: | + Convert an SDRF (Sample and Data Relationship Format) file into an + mhcquant-style samplesheet and a matching search-presets table using the + `parse_sdrf convert-mhcquant` subcommand from the sdrf-pipelines package. +keywords: + - sdrf + - samplesheet + - proteomics + - immunopeptidomics + - mhcquant + - metadata +tools: + - "sdrf-pipelines": + description: "A set of tools to validate and convert SDRF files for proteomics + pipelines." + homepage: "https://github.com/bigbio/sdrf-pipelines" + documentation: "https://github.com/bigbio/sdrf-pipelines" + tool_dev_url: "https://github.com/bigbio/sdrf-pipelines" + doi: "10.1021/acs.jproteome.1c00505" + licence: + - "Apache-2.0" + identifier: "biotools:sdrf-pipelines" +input: + - - meta: + type: map + description: | + Groovy Map containing sample/run information + e.g. `[ id:'PXD009752' ]` + - sdrf: + type: file + description: SDRF file describing the experimental design and sample + metadata. + pattern: "*.{tsv,sdrf.tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 +output: + samplesheet: + - - meta: + type: map + description: | + Groovy Map containing sample/run information + - "*.samplesheet.tsv": + type: file + description: mhcquant-style samplesheet derived from the SDRF file. + pattern: "*.samplesheet.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + search_presets: + - - meta: + type: map + description: | + Groovy Map containing sample/run information + - "*.search_presets.tsv": + type: file + description: | + Search parameter presets derived from the SDRF file (one row per + unique search configuration). + pattern: "*.search_presets.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@jonasscheid" +maintainers: + - "@jonasscheid" diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test similarity index 56% rename from modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test rename to modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test index ca840ef09fa8..dd926454eca9 100644 --- a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test @@ -1,22 +1,23 @@ nextflow_process { - name "Test Process SDRFPIPELINES_PARSESDRF" + name "Test Process SDRFPIPELINES_CONVERTMHCQUANT" script "../main.nf" - process "SDRFPIPELINES_PARSESDRF" + process "SDRFPIPELINES_CONVERTMHCQUANT" tag "modules" tag "modules_nfcore" tag "sdrfpipelines" - tag "sdrfpipelines/parsesdrf" - - config "./nextflow.config" + tag "sdrfpipelines/convertmhcquant" test("sdrf - mhcquant - PXD009752") { when { process { """ - input[0] = file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] """ } } @@ -37,7 +38,10 @@ nextflow_process { when { process { """ - input[0] = file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] """ } } diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap new file mode 100644 index 000000000000..b168d129eac8 --- /dev/null +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap @@ -0,0 +1,102 @@ +{ + "sdrf - mhcquant - PXD009752 - stub": { + "content": [ + { + "0": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + "SDRFPIPELINES_CONVERTMHCQUANT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "samplesheet": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "search_presets": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "timestamp": "2026-05-04T12:49:27.740779457", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - mhcquant - PXD009752": { + "content": [ + { + "0": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" + ] + ], + "1": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ] + ], + "2": [ + [ + "SDRFPIPELINES_CONVERTMHCQUANT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "samplesheet": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" + ] + ], + "search_presets": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ] + ] + } + ], + "timestamp": "2026-05-04T12:49:15.063065684", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/main.nf b/modules/nf-core/sdrfpipelines/parsesdrf/main.nf deleted file mode 100644 index fd2f435f49c3..000000000000 --- a/modules/nf-core/sdrfpipelines/parsesdrf/main.nf +++ /dev/null @@ -1,33 +0,0 @@ -process SDRFPIPELINES_PARSESDRF { - tag "${sdrf.baseName}" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': - 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" - - input: - path sdrf - - output: - path "samplesheet.tsv" , emit: samplesheet - path "search_presets.tsv", emit: search_presets - tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions, emit: versions_sdrfpipelines - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - parse_sdrf $args \\ - -s ${sdrf} - """ - - stub: - """ - touch samplesheet.tsv - touch search_presets.tsv - """ -} diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml b/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml deleted file mode 100644 index aa27a1e1f039..000000000000 --- a/modules/nf-core/sdrfpipelines/parsesdrf/meta.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: "sdrfpipelines_parsesdrf" -description: | - Parse and convert an SDRF (Sample and Data Relationship Format) file into - pipeline-specific samplesheet/configuration files using the sdrf-pipelines - `parse_sdrf` CLI. The conversion subcommand (e.g. `convert-mhcquant`, - `convert-openms`) and its output flags are supplied via `task.ext.args`. -keywords: - - sdrf - - samplesheet - - proteomics - - immunopeptidomics - - metadata -tools: - - "sdrf-pipelines": - description: "A set of tools to validate and convert SDRF files for proteomics - pipelines." - homepage: "https://github.com/bigbio/sdrf-pipelines" - documentation: "https://github.com/bigbio/sdrf-pipelines" - tool_dev_url: "https://github.com/bigbio/sdrf-pipelines" - doi: "10.1021/acs.jproteome.1c00505" - licence: - - "Apache-2.0" - identifier: "biotools:sdrf-pipelines" -input: - - sdrf: - type: file - description: SDRF file describing the experimental design and sample - metadata. - pattern: "*.{tsv,sdrf.tsv}" - ontologies: - - edam: http://edamontology.org/format_3475 -output: - samplesheet: - - "samplesheet.tsv": - type: file - description: | - Samplesheet derived from the SDRF file. The exact contents depend on - the conversion subcommand passed via `ext.args` (e.g. mhcquant-style - samplesheet when `convert-mhcquant` is used). - pattern: "samplesheet.tsv" - ontologies: - - edam: http://edamontology.org/format_3475 - search_presets: - - "search_presets.tsv": - type: file - description: | - Search parameter presets derived from the SDRF file (one row per - unique search configuration). Produced by subcommands that emit a - presets file, e.g. `convert-mhcquant`. - pattern: "search_presets.tsv" - ontologies: - - edam: http://edamontology.org/format_3475 - versions_sdrfpipelines: - - - "${task.process}": - type: string - description: The name of the process - - "sdrf-pipelines": - type: string - description: The name of the tool - - "parse_sdrf --version | cut -d ' ' -f 2": - type: eval - description: The expression to obtain the version of the tool -topics: - versions: - - - "${task.process}": - type: string - description: The name of the process - - "sdrf-pipelines": - type: string - description: The name of the tool - - "parse_sdrf --version | cut -d ' ' -f 2": - type: eval - description: The expression to obtain the version of the tool -authors: - - "@jonasscheid" -maintainers: - - "@jonasscheid" diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap b/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap deleted file mode 100644 index 9c301c798679..000000000000 --- a/modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap +++ /dev/null @@ -1,76 +0,0 @@ -{ - "sdrf - mhcquant - PXD009752 - stub": { - "content": [ - { - "0": [ - "samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "1": [ - "search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "2": [ - [ - "SDRFPIPELINES_PARSESDRF", - "sdrf-pipelines", - "0.1.3" - ] - ], - "samplesheet": [ - "samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "search_presets": [ - "search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "versions_sdrfpipelines": [ - [ - "SDRFPIPELINES_PARSESDRF", - "sdrf-pipelines", - "0.1.3" - ] - ] - } - ], - "timestamp": "2026-05-04T09:45:05.072262669", - "meta": { - "nf-test": "0.9.5", - "nextflow": "25.10.4" - } - }, - "sdrf - mhcquant - PXD009752": { - "content": [ - { - "0": [ - "samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" - ], - "1": [ - "search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" - ], - "2": [ - [ - "SDRFPIPELINES_PARSESDRF", - "sdrf-pipelines", - "0.1.3" - ] - ], - "samplesheet": [ - "samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" - ], - "search_presets": [ - "search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" - ], - "versions_sdrfpipelines": [ - [ - "SDRFPIPELINES_PARSESDRF", - "sdrf-pipelines", - "0.1.3" - ] - ] - } - ], - "timestamp": "2026-05-04T09:44:47.41878644", - "meta": { - "nf-test": "0.9.5", - "nextflow": "25.10.4" - } - } -} \ No newline at end of file diff --git a/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config b/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config deleted file mode 100644 index 399f5f5e46cb..000000000000 --- a/modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: "SDRFPIPELINES_PARSESDRF" { - ext.args = "convert-mhcquant -os samplesheet.tsv -op search_presets.tsv" - } -} From b7fed3fd69bd8d8bf45b0cbefa5609fdcca394c9 Mon Sep 17 00:00:00 2001 From: jonasscheid Date: Mon, 4 May 2026 13:50:44 +0000 Subject: [PATCH 3/5] fix(sdrfpipelines/convertmhcquant): restore versions emit name and align meta.yml output patterns with main.nf prefix Co-Authored-By: Claude Opus 4.7 --- .../sdrfpipelines/convertmhcquant/main.nf | 2 +- .../sdrfpipelines/convertmhcquant/meta.yml | 18 ++++++++++++++---- .../convertmhcquant/tests/main.nf.test.snap | 18 ++++++++++++++++-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf b/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf index 8a4e0e00e6af..e90574867893 100644 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf @@ -13,7 +13,7 @@ process SDRFPIPELINES_CONVERTMHCQUANT { output: tuple val(meta), path("${prefix}_samplesheet.tsv") , emit: samplesheet tuple val(meta), path("${prefix}_search_presets.tsv"), emit: search_presets - tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions + tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions, emit: versions_sdrfpipelines when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml b/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml index a79c82a56334..b48bac94b6ae 100644 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml @@ -40,10 +40,10 @@ output: type: map description: | Groovy Map containing sample/run information - - "*.samplesheet.tsv": + - "${prefix}_samplesheet.tsv": type: file description: mhcquant-style samplesheet derived from the SDRF file. - pattern: "*.samplesheet.tsv" + pattern: "*_samplesheet.tsv" ontologies: - edam: http://edamontology.org/format_3475 search_presets: @@ -51,14 +51,24 @@ output: type: map description: | Groovy Map containing sample/run information - - "*.search_presets.tsv": + - "${prefix}_search_presets.tsv": type: file description: | Search parameter presets derived from the SDRF file (one row per unique search configuration). - pattern: "*.search_presets.tsv" + pattern: "*_search_presets.tsv" ontologies: - edam: http://edamontology.org/format_3475 + versions_sdrfpipelines: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool topics: versions: - - "${task.process}": diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap index b168d129eac8..9721d1fffb46 100644 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap +++ b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap @@ -40,10 +40,17 @@ }, "PXD009752_search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "versions_sdrfpipelines": [ + [ + "SDRFPIPELINES_CONVERTMHCQUANT", + "sdrf-pipelines", + "0.1.3" + ] ] } ], - "timestamp": "2026-05-04T12:49:27.740779457", + "timestamp": "2026-05-04T13:50:20.421641471", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -90,10 +97,17 @@ }, "PXD009752_search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" ] + ], + "versions_sdrfpipelines": [ + [ + "SDRFPIPELINES_CONVERTMHCQUANT", + "sdrf-pipelines", + "0.1.3" + ] ] } ], - "timestamp": "2026-05-04T12:49:15.063065684", + "timestamp": "2026-05-04T13:50:04.580173251", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" From 11bff328520737d99490d3049a2e8273161c3ae9 Mon Sep 17 00:00:00 2001 From: jonasscheid Date: Fri, 8 May 2026 10:15:03 +0000 Subject: [PATCH 4/5] refactor(parsesdrf/convert): generalize to all parse_sdrf convert-* subcommands with per-format output tuples --- .../convert}/environment.yml | 0 modules/nf-core/parsesdrf/convert/main.nf | 86 ++ modules/nf-core/parsesdrf/convert/meta.yml | 158 ++++ .../parsesdrf/convert/tests/main.nf.test | 304 +++++++ .../parsesdrf/convert/tests/main.nf.test.snap | 790 ++++++++++++++++++ .../parsesdrf/convert/tests/nextflow.config | 5 + .../sdrfpipelines/convertmhcquant/main.nf | 38 - .../sdrfpipelines/convertmhcquant/meta.yml | 86 -- .../convertmhcquant/tests/main.nf.test | 58 -- .../convertmhcquant/tests/main.nf.test.snap | 116 --- 10 files changed, 1343 insertions(+), 298 deletions(-) rename modules/nf-core/{sdrfpipelines/convertmhcquant => parsesdrf/convert}/environment.yml (100%) create mode 100644 modules/nf-core/parsesdrf/convert/main.nf create mode 100644 modules/nf-core/parsesdrf/convert/meta.yml create mode 100644 modules/nf-core/parsesdrf/convert/tests/main.nf.test create mode 100644 modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap create mode 100644 modules/nf-core/parsesdrf/convert/tests/nextflow.config delete mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/main.nf delete mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml delete mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test delete mode 100644 modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/environment.yml b/modules/nf-core/parsesdrf/convert/environment.yml similarity index 100% rename from modules/nf-core/sdrfpipelines/convertmhcquant/environment.yml rename to modules/nf-core/parsesdrf/convert/environment.yml diff --git a/modules/nf-core/parsesdrf/convert/main.nf b/modules/nf-core/parsesdrf/convert/main.nf new file mode 100644 index 000000000000..b7a029886093 --- /dev/null +++ b/modules/nf-core/parsesdrf/convert/main.nf @@ -0,0 +1,86 @@ +process PARSESDRF_CONVERT { + tag "${meta.id}" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': + 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" + + input: + tuple val(meta), path(sdrf) + val format + + output: + tuple val(meta), path("${prefix}_samplesheet.tsv"), + path("${prefix}_presets.tsv"), emit: mhcquant, optional: true + tuple val(meta), path("${prefix}_samplesheet.tsv"), + path("${prefix}_experimental_design.tsv"), emit: openms, optional: true + tuple val(meta), path("${prefix}.xml"), + path("${prefix}_design.txt"), emit: maxquant, optional: true + tuple val(meta), path("${prefix}.csv"), emit: msstats, optional: true + tuple val(meta), path("${prefix}_design.csv"), + path("${prefix}_comparisons.csv"), emit: normalyzerde, optional: true + tuple val(meta), path("${prefix}.cfg"), + path("${prefix}_design.tsv"), emit: diann, optional: true + tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def output_args = '' + def post = '' + + if (format == 'mhcquant') { + output_args = "-os ${prefix}_samplesheet.tsv -op ${prefix}_presets.tsv" + } else if (format == 'openms') { + // convert-openms writes openms.tsv + (optionally) experimental_design.tsv + post = "mv openms.tsv ${prefix}_samplesheet.tsv ; [ -f experimental_design.tsv ] && mv experimental_design.tsv ${prefix}_experimental_design.tsv || true" + } else if (format == 'maxquant') { + // --fastafilepath and --raw_folder must be supplied via task.ext.args + output_args = "-o1 ${prefix}.xml -o2 ${prefix}_design.txt" + } else if (format == 'msstats') { + output_args = "-o ${prefix}.csv" + } else if (format == 'normalyzerde') { + output_args = "-o ${prefix}_design.csv -oc ${prefix}_comparisons.csv" + } else if (format == 'diann') { + // convert-diann writes diann_config.cfg + diann_design.tsv with fixed names + post = "mv diann_config.cfg ${prefix}.cfg && mv diann_design.tsv ${prefix}_design.tsv" + } else { + error "PARSESDRF_CONVERT: unsupported format '${format}' (expected one of: mhcquant, openms, maxquant, msstats, normalyzerde, diann)" + } + + """ + parse_sdrf convert-${format} \\ + -s ${sdrf} \\ + ${output_args} \\ + ${args} + ${post} + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + def stub_files + if (format == 'mhcquant') { + stub_files = ["${prefix}_samplesheet.tsv", "${prefix}_presets.tsv"] + } else if (format == 'openms') { + stub_files = ["${prefix}_samplesheet.tsv", "${prefix}_experimental_design.tsv"] + } else if (format == 'maxquant') { + stub_files = ["${prefix}.xml", "${prefix}_design.txt"] + } else if (format == 'msstats') { + stub_files = ["${prefix}.csv"] + } else if (format == 'normalyzerde') { + stub_files = ["${prefix}_design.csv", "${prefix}_comparisons.csv"] + } else if (format == 'diann') { + stub_files = ["${prefix}.cfg", "${prefix}_design.tsv"] + } else { + error "PARSESDRF_CONVERT: unsupported format '${format}'" + } + def touches = stub_files.collect { f -> "touch ${f}" }.join('\n ') + """ + ${touches} + """ +} diff --git a/modules/nf-core/parsesdrf/convert/meta.yml b/modules/nf-core/parsesdrf/convert/meta.yml new file mode 100644 index 000000000000..b28c9cef1e18 --- /dev/null +++ b/modules/nf-core/parsesdrf/convert/meta.yml @@ -0,0 +1,158 @@ +name: "parsesdrf_convert" +description: | + Convert an SDRF (Sample and Data Relationship Format) file into a + pipeline-specific samplesheet/configuration using the `parse_sdrf + convert-` subcommands of the sdrf-pipelines package. The chosen + `format` selects the subcommand; the module owns the output filenames and + emits one tuple per supported format (mhcquant, openms, maxquant, msstats, + normalyzerde, diann). +keywords: + - sdrf + - sdrf-pipelines + - samplesheet + - proteomics + - immunopeptidomics + - mhcquant + - openms + - maxquant + - msstats + - normalyzerde + - diann + - metadata +tools: + - "sdrf-pipelines": + description: "A set of tools to validate and convert SDRF files for proteomics + pipelines." + homepage: "https://github.com/bigbio/sdrf-pipelines" + documentation: "https://github.com/bigbio/sdrf-pipelines" + tool_dev_url: "https://github.com/bigbio/sdrf-pipelines" + doi: "10.1021/acs.jproteome.1c00505" + licence: + - "Apache-2.0" + identifier: "biotools:sdrf-pipelines" +input: + - - meta: + type: map + description: | + Groovy Map containing sample/run information + e.g. `[ id:'PXD009752' ]` + - sdrf: + type: file + description: SDRF file describing the experimental design and sample metadata. + pattern: "*.{tsv,sdrf.tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 + - format: + type: string + description: | + Target converter. One of: `mhcquant`, `openms`, `maxquant`, + `msstats`, `normalyzerde`, `diann`. Selects the + `parse_sdrf convert-` subcommand. For `maxquant`, the + required `--fastafilepath` and `--raw_folder` arguments must be + passed via `task.ext.args`. +output: + mhcquant: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}_samplesheet.tsv": + type: file + description: MHCquant samplesheet TSV (`-os`). + pattern: "*_samplesheet.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + - "${prefix}_presets.tsv": + type: file + description: MHCquant search-preset TSV (`-op`). + pattern: "*_presets.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + openms: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}_samplesheet.tsv": + type: file + description: OpenMS samplesheet TSV (renamed from `openms.tsv`). + pattern: "*_samplesheet.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + - "${prefix}_experimental_design.tsv": + type: file + description: OpenMS experimental design TSV. + pattern: "*_experimental_design.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + maxquant: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}.xml": + type: file + description: MaxQuant `mqpar.xml` (`-o1`). Requires `aux=[fasta, raw_folder]`. + pattern: "*.xml" + ontologies: + - edam: http://edamontology.org/format_2332 + - "${prefix}_design.txt": + type: file + description: MaxQuant experimental design TXT (`-o2`). + pattern: "*_design.txt" + ontologies: + - edam: http://edamontology.org/format_3475 + msstats: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}.csv": + type: file + description: MSstats annotation CSV (`-o`). + pattern: "*.csv" + ontologies: + - edam: http://edamontology.org/format_3752 + normalyzerde: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}_design.csv": + type: file + description: NormalyzerDE design CSV (`-o`). + pattern: "*_design.csv" + ontologies: + - edam: http://edamontology.org/format_3752 + - "${prefix}_comparisons.csv": + type: file + description: NormalyzerDE comparisons CSV (`-oc`). + pattern: "*_comparisons.csv" + ontologies: + - edam: http://edamontology.org/format_3752 + diann: + - - meta: + type: map + description: Groovy Map containing sample/run information + - "${prefix}.cfg": + type: file + description: DIA-NN config (renamed from `diann_config.cfg`). + pattern: "*.cfg" + ontologies: + - edam: http://edamontology.org/format_2330 + - "${prefix}_design.tsv": + type: file + description: DIA-NN experimental design TSV (renamed from `diann_design.tsv`). + pattern: "*_design.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@jonasscheid" +maintainers: + - "@jonasscheid" diff --git a/modules/nf-core/parsesdrf/convert/tests/main.nf.test b/modules/nf-core/parsesdrf/convert/tests/main.nf.test new file mode 100644 index 000000000000..58ba548ad9f0 --- /dev/null +++ b/modules/nf-core/parsesdrf/convert/tests/main.nf.test @@ -0,0 +1,304 @@ +nextflow_process { + + name "Test Process PARSESDRF_CONVERT" + script "../main.nf" + process "PARSESDRF_CONVERT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "parsesdrf" + tag "parsesdrf/convert" + + test("sdrf - mhcquant - PXD009752") { + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'mhcquant' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - openms - PXD009752") { + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'openms' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - maxquant - PXD009752") { + + when { + params { + module_args = '-f PXD009752.sdrf.tsv -r .' + } + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'maxquant' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - msstats - PXD009752") { + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'msstats' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - normalyzerde - PXD009752") { + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'normalyzerde' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - diann - PXD009752") { + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'diann' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - mhcquant - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'mhcquant' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - openms - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'openms' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - maxquant - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'maxquant' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - msstats - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'msstats' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - normalyzerde - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'normalyzerde' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sdrf - diann - PXD009752 - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'PXD009752' ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) + ] + input[1] = 'diann' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap b/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap new file mode 100644 index 000000000000..942149f54fac --- /dev/null +++ b/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap @@ -0,0 +1,790 @@ +{ + "sdrf - maxquant - PXD009752": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.xml:md5,f15307d785e2d1bae2ef5bee64eb3dc9", + "PXD009752_design.txt:md5,ecf10e81663869db3eb6facb0b36c6be" + ] + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.xml:md5,f15307d785e2d1bae2ef5bee64eb3dc9", + "PXD009752_design.txt:md5,ecf10e81663869db3eb6facb0b36c6be" + ] + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:15:43.983820004", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - diann - PXD009752 - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.cfg:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_design.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.cfg:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_design.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:18:07.39061084", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - mhcquant - PXD009752 - stub": { + "content": [ + { + "0": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:16:49.855246623", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - normalyzerde - PXD009752": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_design.csv:md5,7a59adfe619191555051105b9c1feacc", + "PXD009752_comparisons.csv:md5,81051bcc2cf1bedf378224b0a93e2877" + ] + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_design.csv:md5,7a59adfe619191555051105b9c1feacc", + "PXD009752_comparisons.csv:md5,81051bcc2cf1bedf378224b0a93e2877" + ] + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:16:20.649816925", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - msstats - PXD009752 - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:17:35.150484383", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - diann - PXD009752": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.cfg:md5,bf4bc46a652861a436efeb22e0d1b746", + "PXD009752_design.tsv:md5,6e4348aeaecaf5d05521f5d67d1df9aa" + ] + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.cfg:md5,bf4bc46a652861a436efeb22e0d1b746", + "PXD009752_design.tsv:md5,6e4348aeaecaf5d05521f5d67d1df9aa" + ] + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:16:37.037403166", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - normalyzerde - PXD009752 - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_design.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_comparisons.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_design.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_comparisons.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:17:50.26275322", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - openms - PXD009752": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,9216c3ad7db89fedede8f65fdb27c3fc", + "PXD009752_experimental_design.tsv:md5,86dc1f997ac2eb733ef4b3082063f5cf" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,9216c3ad7db89fedede8f65fdb27c3fc", + "PXD009752_experimental_design.tsv:md5,86dc1f997ac2eb733ef4b3082063f5cf" + ] + ] + } + ], + "timestamp": "2026-05-08T09:15:30.001707263", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - openms - PXD009752 - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_experimental_design.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_experimental_design.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "timestamp": "2026-05-08T09:17:02.157412684", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - maxquant - PXD009752 - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.xml:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_design.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.xml:md5,d41d8cd98f00b204e9800998ecf8427e", + "PXD009752_design.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "mhcquant": [ + + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:17:18.48777967", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - msstats - PXD009752": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.csv:md5,0619e7ce6d4b44534825e86b24534e4a" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + + ], + "msstats": [ + [ + { + "id": "PXD009752" + }, + "PXD009752.csv:md5,0619e7ce6d4b44534825e86b24534e4a" + ] + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:16:01.615691842", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sdrf - mhcquant - PXD009752": { + "content": [ + { + "0": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8", + "PXD009752_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.3" + ] + ], + "diann": [ + + ], + "maxquant": [ + + ], + "mhcquant": [ + [ + { + "id": "PXD009752" + }, + "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8", + "PXD009752_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" + ] + ], + "msstats": [ + + ], + "normalyzerde": [ + + ], + "openms": [ + + ] + } + ], + "timestamp": "2026-05-08T09:15:14.951921875", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/parsesdrf/convert/tests/nextflow.config b/modules/nf-core/parsesdrf/convert/tests/nextflow.config new file mode 100644 index 000000000000..a03f1bd5a5c3 --- /dev/null +++ b/modules/nf-core/parsesdrf/convert/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'PARSESDRF_CONVERT' { + ext.args = { params.module_args ?: '' } + } +} diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf b/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf deleted file mode 100644 index e90574867893..000000000000 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/main.nf +++ /dev/null @@ -1,38 +0,0 @@ -process SDRFPIPELINES_CONVERTMHCQUANT { - tag "${meta.id}" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': - 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" - - input: - tuple val(meta), path(sdrf) - - output: - tuple val(meta), path("${prefix}_samplesheet.tsv") , emit: samplesheet - tuple val(meta), path("${prefix}_search_presets.tsv"), emit: search_presets - tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions, emit: versions_sdrfpipelines - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - parse_sdrf convert-mhcquant \\ - $args \\ - -s ${sdrf} \\ - -os ${prefix}_samplesheet.tsv \\ - -op ${prefix}_search_presets.tsv - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}_samplesheet.tsv - touch ${prefix}_search_presets.tsv - """ -} diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml b/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml deleted file mode 100644 index b48bac94b6ae..000000000000 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/meta.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: "sdrfpipelines_convertmhcquant" -description: | - Convert an SDRF (Sample and Data Relationship Format) file into an - mhcquant-style samplesheet and a matching search-presets table using the - `parse_sdrf convert-mhcquant` subcommand from the sdrf-pipelines package. -keywords: - - sdrf - - samplesheet - - proteomics - - immunopeptidomics - - mhcquant - - metadata -tools: - - "sdrf-pipelines": - description: "A set of tools to validate and convert SDRF files for proteomics - pipelines." - homepage: "https://github.com/bigbio/sdrf-pipelines" - documentation: "https://github.com/bigbio/sdrf-pipelines" - tool_dev_url: "https://github.com/bigbio/sdrf-pipelines" - doi: "10.1021/acs.jproteome.1c00505" - licence: - - "Apache-2.0" - identifier: "biotools:sdrf-pipelines" -input: - - - meta: - type: map - description: | - Groovy Map containing sample/run information - e.g. `[ id:'PXD009752' ]` - - sdrf: - type: file - description: SDRF file describing the experimental design and sample - metadata. - pattern: "*.{tsv,sdrf.tsv}" - ontologies: - - edam: http://edamontology.org/format_3475 -output: - samplesheet: - - - meta: - type: map - description: | - Groovy Map containing sample/run information - - "${prefix}_samplesheet.tsv": - type: file - description: mhcquant-style samplesheet derived from the SDRF file. - pattern: "*_samplesheet.tsv" - ontologies: - - edam: http://edamontology.org/format_3475 - search_presets: - - - meta: - type: map - description: | - Groovy Map containing sample/run information - - "${prefix}_search_presets.tsv": - type: file - description: | - Search parameter presets derived from the SDRF file (one row per - unique search configuration). - pattern: "*_search_presets.tsv" - ontologies: - - edam: http://edamontology.org/format_3475 - versions_sdrfpipelines: - - - "${task.process}": - type: string - description: The name of the process - - "sdrf-pipelines": - type: string - description: The name of the tool - - "parse_sdrf --version | cut -d ' ' -f 2": - type: eval - description: The expression to obtain the version of the tool -topics: - versions: - - - "${task.process}": - type: string - description: The name of the process - - "sdrf-pipelines": - type: string - description: The name of the tool - - "parse_sdrf --version | cut -d ' ' -f 2": - type: eval - description: The expression to obtain the version of the tool -authors: - - "@jonasscheid" -maintainers: - - "@jonasscheid" diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test deleted file mode 100644 index dd926454eca9..000000000000 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test +++ /dev/null @@ -1,58 +0,0 @@ -nextflow_process { - - name "Test Process SDRFPIPELINES_CONVERTMHCQUANT" - script "../main.nf" - process "SDRFPIPELINES_CONVERTMHCQUANT" - - tag "modules" - tag "modules_nfcore" - tag "sdrfpipelines" - tag "sdrfpipelines/convertmhcquant" - - test("sdrf - mhcquant - PXD009752") { - - when { - process { - """ - input[0] = [ - [ id: 'PXD009752' ], - file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sdrf - mhcquant - PXD009752 - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id: 'PXD009752' ], - file('https://raw.githubusercontent.com/nf-core/test-datasets/mhcquant/testdata/PXD009752.sdrf.tsv', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap b/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap deleted file mode 100644 index 9721d1fffb46..000000000000 --- a/modules/nf-core/sdrfpipelines/convertmhcquant/tests/main.nf.test.snap +++ /dev/null @@ -1,116 +0,0 @@ -{ - "sdrf - mhcquant - PXD009752 - stub": { - "content": [ - { - "0": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - "SDRFPIPELINES_CONVERTMHCQUANT", - "sdrf-pipelines", - "0.1.3" - ] - ], - "samplesheet": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "search_presets": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_search_presets.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions_sdrfpipelines": [ - [ - "SDRFPIPELINES_CONVERTMHCQUANT", - "sdrf-pipelines", - "0.1.3" - ] - ] - } - ], - "timestamp": "2026-05-04T13:50:20.421641471", - "meta": { - "nf-test": "0.9.5", - "nextflow": "25.10.4" - } - }, - "sdrf - mhcquant - PXD009752": { - "content": [ - { - "0": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" - ] - ], - "1": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" - ] - ], - "2": [ - [ - "SDRFPIPELINES_CONVERTMHCQUANT", - "sdrf-pipelines", - "0.1.3" - ] - ], - "samplesheet": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_samplesheet.tsv:md5,4d7d2f1ca8d3def75b05ae8c01c481d8" - ] - ], - "search_presets": [ - [ - { - "id": "PXD009752" - }, - "PXD009752_search_presets.tsv:md5,3ba3b5c24f71025bfc1799ea87cd0a12" - ] - ], - "versions_sdrfpipelines": [ - [ - "SDRFPIPELINES_CONVERTMHCQUANT", - "sdrf-pipelines", - "0.1.3" - ] - ] - } - ], - "timestamp": "2026-05-04T13:50:04.580173251", - "meta": { - "nf-test": "0.9.5", - "nextflow": "25.10.4" - } - } -} \ No newline at end of file From 1ab83bafd5780da9c8e72216993d587c59efe6f2 Mon Sep 17 00:00:00 2001 From: jonasscheid Date: Fri, 8 May 2026 14:20:40 +0000 Subject: [PATCH 5/5] fix(parsesdrf/convert): resolve CI failures, default module_args per-test, emit versions topic, bump sdrf-pipelines 0.1.3->0.1.4 Co-Authored-By: Claude Opus 4.7 --- .../nf-core/parsesdrf/convert/environment.yml | 2 +- modules/nf-core/parsesdrf/convert/main.nf | 23 ++- modules/nf-core/parsesdrf/convert/meta.yml | 10 ++ .../parsesdrf/convert/tests/main.nf.test | 33 +++++ .../parsesdrf/convert/tests/main.nf.test.snap | 136 ++++++++++++++---- .../parsesdrf/convert/tests/nextflow.config | 2 +- 6 files changed, 164 insertions(+), 42 deletions(-) diff --git a/modules/nf-core/parsesdrf/convert/environment.yml b/modules/nf-core/parsesdrf/convert/environment.yml index 09ffc762c5a9..1cdf974745a5 100644 --- a/modules/nf-core/parsesdrf/convert/environment.yml +++ b/modules/nf-core/parsesdrf/convert/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - "bioconda::sdrf-pipelines=0.1.3" + - "bioconda::sdrf-pipelines=0.1.4" diff --git a/modules/nf-core/parsesdrf/convert/main.nf b/modules/nf-core/parsesdrf/convert/main.nf index b7a029886093..d3329218a1f8 100644 --- a/modules/nf-core/parsesdrf/convert/main.nf +++ b/modules/nf-core/parsesdrf/convert/main.nf @@ -4,26 +4,21 @@ process PARSESDRF_CONVERT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.3--pyhdfd78af_0': - 'quay.io/biocontainers/sdrf-pipelines:0.1.3--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/sdrf-pipelines:0.1.4--pyhdfd78af_0': + 'quay.io/biocontainers/sdrf-pipelines:0.1.4--pyhdfd78af_0' }" input: tuple val(meta), path(sdrf) val format output: - tuple val(meta), path("${prefix}_samplesheet.tsv"), - path("${prefix}_presets.tsv"), emit: mhcquant, optional: true - tuple val(meta), path("${prefix}_samplesheet.tsv"), - path("${prefix}_experimental_design.tsv"), emit: openms, optional: true - tuple val(meta), path("${prefix}.xml"), - path("${prefix}_design.txt"), emit: maxquant, optional: true - tuple val(meta), path("${prefix}.csv"), emit: msstats, optional: true - tuple val(meta), path("${prefix}_design.csv"), - path("${prefix}_comparisons.csv"), emit: normalyzerde, optional: true - tuple val(meta), path("${prefix}.cfg"), - path("${prefix}_design.tsv"), emit: diann, optional: true - tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions + tuple val(meta), path("${prefix}_samplesheet.tsv"), path("${prefix}_presets.tsv"), emit: mhcquant, optional: true + tuple val(meta), path("${prefix}_samplesheet.tsv"), path("${prefix}_experimental_design.tsv"), emit: openms, optional: true + tuple val(meta), path("${prefix}.xml"), path("${prefix}_design.txt"), emit: maxquant, optional: true + tuple val(meta), path("${prefix}.csv"), emit: msstats, optional: true + tuple val(meta), path("${prefix}_design.csv"), path("${prefix}_comparisons.csv"), emit: normalyzerde, optional: true + tuple val(meta), path("${prefix}.cfg"), path("${prefix}_design.tsv"), emit: diann, optional: true + tuple val("${task.process}"), val('sdrf-pipelines'), eval("parse_sdrf --version | cut -d ' ' -f 2"), topic: versions, emit: versions_sdrfpipelines when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/parsesdrf/convert/meta.yml b/modules/nf-core/parsesdrf/convert/meta.yml index b28c9cef1e18..7a4c2e2dbe33 100644 --- a/modules/nf-core/parsesdrf/convert/meta.yml +++ b/modules/nf-core/parsesdrf/convert/meta.yml @@ -141,6 +141,16 @@ output: pattern: "*_design.tsv" ontologies: - edam: http://edamontology.org/format_3475 + versions_sdrfpipelines: + - - "${task.process}": + type: string + description: The name of the process + - "sdrf-pipelines": + type: string + description: The name of the tool + - "parse_sdrf --version | cut -d ' ' -f 2": + type: eval + description: The expression to obtain the version of the tool topics: versions: - - "${task.process}": diff --git a/modules/nf-core/parsesdrf/convert/tests/main.nf.test b/modules/nf-core/parsesdrf/convert/tests/main.nf.test index 58ba548ad9f0..b7a51fa0420f 100644 --- a/modules/nf-core/parsesdrf/convert/tests/main.nf.test +++ b/modules/nf-core/parsesdrf/convert/tests/main.nf.test @@ -13,6 +13,9 @@ nextflow_process { test("sdrf - mhcquant - PXD009752") { when { + params { + module_args = '' + } process { """ input[0] = [ @@ -36,6 +39,9 @@ nextflow_process { test("sdrf - openms - PXD009752") { when { + params { + module_args = '' + } process { """ input[0] = [ @@ -85,6 +91,9 @@ nextflow_process { test("sdrf - msstats - PXD009752") { when { + params { + module_args = '' + } process { """ input[0] = [ @@ -108,6 +117,9 @@ nextflow_process { test("sdrf - normalyzerde - PXD009752") { when { + params { + module_args = '' + } process { """ input[0] = [ @@ -131,6 +143,9 @@ nextflow_process { test("sdrf - diann - PXD009752") { when { + params { + module_args = '' + } process { """ input[0] = [ @@ -156,6 +171,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ @@ -181,6 +199,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ @@ -206,6 +227,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ @@ -231,6 +255,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ @@ -256,6 +283,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ @@ -281,6 +311,9 @@ nextflow_process { options "-stub" when { + params { + module_args = '' + } process { """ input[0] = [ diff --git a/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap b/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap index 942149f54fac..ffd291c9d898 100644 --- a/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap +++ b/modules/nf-core/parsesdrf/convert/tests/main.nf.test.snap @@ -13,7 +13,7 @@ { "id": "PXD009752" }, - "PXD009752.xml:md5,f15307d785e2d1bae2ef5bee64eb3dc9", + "PXD009752.xml:md5,ee3a10d622512141d5d6ae436b0f7e73", "PXD009752_design.txt:md5,ecf10e81663869db3eb6facb0b36c6be" ] ], @@ -30,7 +30,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -41,7 +41,7 @@ { "id": "PXD009752" }, - "PXD009752.xml:md5,f15307d785e2d1bae2ef5bee64eb3dc9", + "PXD009752.xml:md5,ee3a10d622512141d5d6ae436b0f7e73", "PXD009752_design.txt:md5,ecf10e81663869db3eb6facb0b36c6be" ] ], @@ -56,10 +56,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:15:43.983820004", + "timestamp": "2026-05-08T13:59:16.790788273", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -96,7 +103,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -122,10 +129,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:18:07.39061084", + "timestamp": "2026-05-08T14:01:49.460372258", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -162,7 +176,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -188,10 +202,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:16:49.855246623", + "timestamp": "2026-05-08T14:00:37.542772217", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -228,7 +249,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -254,10 +275,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:16:20.649816925", + "timestamp": "2026-05-08T13:59:52.106015133", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -293,7 +321,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -318,10 +346,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:17:35.150484383", + "timestamp": "2026-05-08T14:01:23.496048333", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -358,7 +393,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -384,10 +419,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:16:37.037403166", + "timestamp": "2026-05-08T14:00:14.00436251", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -424,7 +466,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -450,10 +492,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:17:50.26275322", + "timestamp": "2026-05-08T14:01:36.889994981", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -490,7 +539,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -516,10 +565,17 @@ "PXD009752_samplesheet.tsv:md5,9216c3ad7db89fedede8f65fdb27c3fc", "PXD009752_experimental_design.tsv:md5,86dc1f997ac2eb733ef4b3082063f5cf" ] + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:15:30.001707263", + "timestamp": "2026-05-08T13:58:57.723903315", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -556,7 +612,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -582,10 +638,17 @@ "PXD009752_samplesheet.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", "PXD009752_experimental_design.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:17:02.157412684", + "timestamp": "2026-05-08T14:00:56.986489703", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -622,7 +685,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -648,10 +711,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:17:18.48777967", + "timestamp": "2026-05-08T14:01:10.645922747", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -687,7 +757,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -712,10 +782,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:16:01.615691842", + "timestamp": "2026-05-08T13:59:36.44255072", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -752,7 +829,7 @@ [ "PARSESDRF_CONVERT", "sdrf-pipelines", - "0.1.3" + "0.1.4" ] ], "diann": [ @@ -778,10 +855,17 @@ ], "openms": [ + ], + "versions_sdrfpipelines": [ + [ + "PARSESDRF_CONVERT", + "sdrf-pipelines", + "0.1.4" + ] ] } ], - "timestamp": "2026-05-08T09:15:14.951921875", + "timestamp": "2026-05-08T13:58:43.293259632", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/nf-core/parsesdrf/convert/tests/nextflow.config b/modules/nf-core/parsesdrf/convert/tests/nextflow.config index a03f1bd5a5c3..16c6a16e114c 100644 --- a/modules/nf-core/parsesdrf/convert/tests/nextflow.config +++ b/modules/nf-core/parsesdrf/convert/tests/nextflow.config @@ -1,5 +1,5 @@ process { withName: 'PARSESDRF_CONVERT' { - ext.args = { params.module_args ?: '' } + ext.args = params.module_args } }