Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/environment.yml
Original file line number Diff line number Diff line change
@@ -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"
33 changes: 33 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/main.nf
Original file line number Diff line number Diff line change
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As both output are expected they should be hardcoded in the script block.
Could you also use prefix = meta.id ?

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
"""
}
77 changes: 77 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/meta.yml
Original file line number Diff line number Diff line change
@@ -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"
54 changes: 54 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -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() }
)
}

}

}
76 changes: 76 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: "SDRFPIPELINES_PARSESDRF" {
ext.args = "convert-mhcquant -os samplesheet.tsv -op search_presets.tsv"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pass convert-mhcquant as params.module_args

}
}
Loading