diff --git a/modules/nf-core/metaspace/converter/main.nf b/modules/nf-core/metaspace/converter/main.nf index 59304c2c409e..ed36a04846e0 100644 --- a/modules/nf-core/metaspace/converter/main.nf +++ b/modules/nf-core/metaspace/converter/main.nf @@ -17,7 +17,7 @@ process METASPACE_CONVERTER { output: path("AnnData_${ds_id}.h5ad") , emit: adata_object path("SpatialData_${ds_id}.zarr"), emit: sdata_object - path("versions.yml") , emit: versions + path("versions.yml") , emit: versions, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/metaspace/converter/meta.yml b/modules/nf-core/metaspace/converter/meta.yml index 0676c2d07236..3c99c0195132 100644 --- a/modules/nf-core/metaspace/converter/meta.yml +++ b/modules/nf-core/metaspace/converter/meta.yml @@ -19,7 +19,8 @@ tools: input: - ds_id: type: string - description: METASPACE dataset identifier to retrieve and convert to AnnData and SpatialData formats. + description: METASPACE dataset identifier to retrieve and convert to AnnData + and SpatialData formats. - database_name_: type: string description: Name of the metabolite annotation database to use (e.g., HMDB) @@ -28,7 +29,8 @@ input: description: Version of the annotation database to use (e.g., v4) - fdr_: type: string - description: False Discovery Rate threshold for filtering metabolite annotations. + description: False Discovery Rate threshold for filtering metabolite + annotations. pattern: "^(0(\\.[0-9]+)?|1(\\.0+)?)$" - use_tic_: type: string @@ -57,7 +59,15 @@ output: description: File containing software versions pattern: "versions.yml" ontologies: - - edam: http://edamontology.org/format_3750 + - edam: http://edamontology.org/format_3750 # YAML +topics: + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@bisho2122" maintainers: diff --git a/modules/nf-core/metaspace/converter/tests/main.nf.test b/modules/nf-core/metaspace/converter/tests/main.nf.test index 8749931464c6..17be14237567 100644 --- a/modules/nf-core/metaspace/converter/tests/main.nf.test +++ b/modules/nf-core/metaspace/converter/tests/main.nf.test @@ -55,7 +55,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/metaspace/converter/tests/main.nf.test.snap b/modules/nf-core/metaspace/converter/tests/main.nf.test.snap index e4858f443d30..a973c0d90f1f 100644 --- a/modules/nf-core/metaspace/converter/tests/main.nf.test.snap +++ b/modules/nf-core/metaspace/converter/tests/main.nf.test.snap @@ -2,15 +2,6 @@ "metaspace_converter - stub": { "content": [ { - "0": [ - "AnnData_2022-08-05_17h28m56s.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "1": [ - "SpatialData_2022-08-05_17h28m56s.zarr:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "2": [ - "versions.yml:md5,4451269b2937114efdd8f7e221598701" - ], "adata_object": [ "AnnData_2022-08-05_17h28m56s.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e" ], @@ -22,26 +13,26 @@ ] } ], - "timestamp": "2025-03-27T16:29:42.150424618", + "timestamp": "2026-07-06T14:13:29.191028124", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.5", + "nextflow": "26.04.3" } }, "metaspace_converter_test": { "content": [ [ - "AnnData_2022-08-05_17h28m56s.h5ad:md5,a6036323aa5451f55a6c3bca4eb65853" + "AnnData_2022-08-05_17h28m56s.h5ad:md5,68da810daf425d58d0ca32d53c01fbd1" ], - "zmetadata:md5,42c7001eb2356c9d643527d141a25b3f", + "zmetadata:md5,838a1c70924eed6b0286e15baee95337", [ "versions.yml:md5,4451269b2937114efdd8f7e221598701" ] ], - "timestamp": "2026-02-23T11:11:31.706371897", + "timestamp": "2026-07-06T14:16:07.135232143", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.3" } } } \ No newline at end of file diff --git a/modules/nf-core/metaspace/download/main.nf b/modules/nf-core/metaspace/download/main.nf index f2421fe88d22..99ddeb0b6f0b 100644 --- a/modules/nf-core/metaspace/download/main.nf +++ b/modules/nf-core/metaspace/download/main.nf @@ -10,9 +10,9 @@ process METASPACE_DOWNLOAD { tuple val(dataset_id), val(database), val(version) output: - path "${dataset_id}_*.csv", optional: true, emit: results - stdout emit: log // check meta.yml for see how to use! - path 'versions.yml' , emit: versions + path "${dataset_id}_*.csv", emit: results, optional: true + stdout emit: log + path "versions.yml" , emit: versions, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/metaspace/download/meta.yml b/modules/nf-core/metaspace/download/meta.yml index 7969aa1f213d..3221fb3fe50c 100644 --- a/modules/nf-core/metaspace/download/meta.yml +++ b/modules/nf-core/metaspace/download/meta.yml @@ -1,8 +1,8 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "metaspace_download" -description: A module to download dataset results from the METASPACE platform and - save them as CSV files, using a containerized Python script. Inputs are provided - via a CSV file or a list of datasets, with results saved to a specified output directory. +description: A module to download dataset results from the METASPACE platform + and save them as CSV files, using a containerized Python script. Inputs are + provided via a CSV file or a list of datasets, with results saved to a + specified output directory. keywords: - metaspace - metabolite annotation @@ -10,11 +10,13 @@ keywords: - csv tools: - metaspace2020: - description: Python package providing programmatic access to the METASPACE platform + description: Python package providing programmatic access to the METASPACE + platform homepage: https://metaspace2020.readthedocs.io documentation: https://metaspace2020.readthedocs.io tool_dev_url: https://github.com/metaspace2020/metaspace/tree/master/metaspace/python-client - licence: ["Apache-2.0 license"] + licence: + - "Apache-2.0 license" identifier: "" input: - - dataset_id: @@ -47,10 +49,9 @@ output: Filename format is '{dataset_id}_*.csv'. pattern: "*.csv" ontologies: - - edam: "http://edamontology.org/format_3752:latest" # CSV format - edam: http://edamontology.org/format_3752 # CSV log: - - "emit:": + - "emit: log": type: string description: | The standard output (stdout) of the script, containing log messages. @@ -68,12 +69,17 @@ output: versions: - versions.yml: type: file - description: | - YAML file containing the versions of the tools used in the pipeline. - This file is automatically generated by the pipeline and should not be modified. + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +topics: + versions: + - versions.yml: + type: file + description: File containing software versions pattern: "versions.yml" ontologies: - - edam: "http://edamontology.org/format_3475" # YAML format - edam: http://edamontology.org/format_3750 # YAML authors: - "@Dewey-Wang" diff --git a/modules/nf-core/metaspace/download/tests/main.nf.test b/modules/nf-core/metaspace/download/tests/main.nf.test index 2eac74655047..0816f55bce8a 100644 --- a/modules/nf-core/metaspace/download/tests/main.nf.test +++ b/modules/nf-core/metaspace/download/tests/main.nf.test @@ -14,7 +14,7 @@ nextflow_process { when { process { """ - input[0] = Channel.from([ + input[0] = channel.from([ ['2022-08-05_17h28m56s', 'KEGG', null], ['2022-08-05_17h28m56s', null, null] ]) @@ -25,7 +25,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -34,7 +34,7 @@ nextflow_process { when { process { """ - input[0] = Channel.from([ + input[0] = channel.from([ ['2022-08-05_17h28m56s', 'KEGG', null], ['2022-08-05_17h28m56s', null, null], [null, 'KEGG', null] // Missing dataset_id @@ -65,7 +65,7 @@ nextflow_process { when { process { """ - input[0] = Channel.from([ + input[0] = channel.from([ ['2022-08-05_17h28m56s', 'KEGG', null], ['2022-08-05_17h28m56s', null, null] ]) @@ -75,7 +75,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/metaspace/download/tests/main.nf.test.snap b/modules/nf-core/metaspace/download/tests/main.nf.test.snap index b394da34cc03..4b9101c71972 100644 --- a/modules/nf-core/metaspace/download/tests/main.nf.test.snap +++ b/modules/nf-core/metaspace/download/tests/main.nf.test.snap @@ -3,34 +3,22 @@ "content": [ " raise ValueError(\"Error: input csv or datasets contains an entry with missing dataset_id.\")" ], + "timestamp": "2025-03-27T23:59:56.527423", "meta": { "nf-test": "0.9.2", "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T23:59:56.527423" + } }, "metaspace/download - datasets": { "content": [ { - "0": [ - "2022-08-05_17h28m56s_KEGG_v1.csv:md5,44a3760625f0e2f9aeee5639bd973d9b", - "2022-08-05_17h28m56s_all_databases.csv:md5,93496262735b9f316f82c843c773a944" - ], - "1": [ - "Processing dataset_id: 2022-08-05_17h28m56s, database: KEGG, version: None\nFetching dataset: 2022-08-05_17h28m56s\nAvailable databases and versions:\n - HMDB-cotton v4\n - LipidMaps 2017-12-12\n - KEGG v1\n - BraChemDB 2018-01\nProcessing database: KEGG, version: v1\n\u2705 2022-08-05_17h28m56s with KEGG database are saved to 2022-08-05_17h28m56s_KEGG_v1.csv\nversions.yml file has been generated.\n", - "Processing dataset_id: 2022-08-05_17h28m56s, database: None, version: None\nFetching dataset: 2022-08-05_17h28m56s\nAvailable databases and versions:\n - HMDB-cotton v4\n - LipidMaps 2017-12-12\n - KEGG v1\n - BraChemDB 2018-01\nProcessing database: HMDB-cotton, version: v4\nProcessing database: LipidMaps, version: 2017-12-12\nProcessing database: KEGG, version: v1\nProcessing database: BraChemDB, version: 2018-01\n\u2705 2022-08-05_17h28m56s with all database are saved to 2022-08-05_17h28m56s_all_databases.csv\nversions.yml file has been generated.\n" - ], - "2": [ - "versions.yml:md5,194f18da1ce360bf7f6ba4afe4964a89", - "versions.yml:md5,194f18da1ce360bf7f6ba4afe4964a89" - ], "log": [ "Processing dataset_id: 2022-08-05_17h28m56s, database: KEGG, version: None\nFetching dataset: 2022-08-05_17h28m56s\nAvailable databases and versions:\n - HMDB-cotton v4\n - LipidMaps 2017-12-12\n - KEGG v1\n - BraChemDB 2018-01\nProcessing database: KEGG, version: v1\n\u2705 2022-08-05_17h28m56s with KEGG database are saved to 2022-08-05_17h28m56s_KEGG_v1.csv\nversions.yml file has been generated.\n", "Processing dataset_id: 2022-08-05_17h28m56s, database: None, version: None\nFetching dataset: 2022-08-05_17h28m56s\nAvailable databases and versions:\n - HMDB-cotton v4\n - LipidMaps 2017-12-12\n - KEGG v1\n - BraChemDB 2018-01\nProcessing database: HMDB-cotton, version: v4\nProcessing database: LipidMaps, version: 2017-12-12\nProcessing database: KEGG, version: v1\nProcessing database: BraChemDB, version: 2018-01\n\u2705 2022-08-05_17h28m56s with all database are saved to 2022-08-05_17h28m56s_all_databases.csv\nversions.yml file has been generated.\n" ], "results": [ - "2022-08-05_17h28m56s_KEGG_v1.csv:md5,44a3760625f0e2f9aeee5639bd973d9b", - "2022-08-05_17h28m56s_all_databases.csv:md5,93496262735b9f316f82c843c773a944" + "2022-08-05_17h28m56s_KEGG_v1.csv:md5,fa5b95e299a02e79cc16bf3d1c9564bf", + "2022-08-05_17h28m56s_all_databases.csv:md5,4ccd94e8285efaf286ca0b2a8e9f261e" ], "versions": [ "versions.yml:md5,194f18da1ce360bf7f6ba4afe4964a89", @@ -38,27 +26,15 @@ ] } ], + "timestamp": "2026-07-06T14:13:41.36299967", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-05T14:05:56.321679" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "metaspace/download - stub": { "content": [ { - "0": [ - "2022-08-05_17h28m56s_KEGG_all_versions.csv:md5,d41d8cd98f00b204e9800998ecf8427e", - "2022-08-05_17h28m56s_all_databases.csv:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "1": [ - "", - "" - ], - "2": [ - "versions.yml:md5,83b3435f6de10ae175f191530d4389dd", - "versions.yml:md5,83b3435f6de10ae175f191530d4389dd" - ], "log": [ "", "" @@ -73,10 +49,10 @@ ] } ], + "timestamp": "2026-07-06T14:14:02.823842826", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-04-05T14:15:24.315874" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } } } \ No newline at end of file