Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/nf-core/metaspace/converter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions modules/nf-core/metaspace/converter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/metaspace/converter/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
25 changes: 8 additions & 17 deletions modules/nf-core/metaspace/converter/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand All @@ -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"
}
}
}
6 changes: 3 additions & 3 deletions modules/nf-core/metaspace/download/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 18 additions & 12 deletions modules/nf-core/metaspace/download/meta.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# 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
- data-download
- 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:
Expand Down Expand Up @@ -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.
Expand All @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-core/metaspace/download/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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]
])
Expand All @@ -25,7 +25,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand All @@ -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
Expand Down Expand Up @@ -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]
])
Expand All @@ -75,7 +75,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
48 changes: 12 additions & 36 deletions modules/nf-core/metaspace/download/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,38 @@
"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",
"versions.yml:md5,194f18da1ce360bf7f6ba4afe4964a89"
]
}
],
"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": [
"",
""
Expand All @@ -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"
}
}
}
Loading