-
Notifications
You must be signed in to change notification settings - Fork 1k
New module: parsesdrf/convert #11514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jonasscheid
wants to merge
6
commits into
nf-core:master
Choose a base branch
from
jonasscheid:sdrfpipelines-parsesdrf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7dae41a
feat(sdrfpipelines/parsesdrf): add module to convert SDRF files via s…
jonasscheid e4b453d
refactor(sdrfpipelines/convertmhcquant): rename from parsesdrf, lock …
jonasscheid b7fed3f
fix(sdrfpipelines/convertmhcquant): restore versions emit name and al…
jonasscheid 11bff32
refactor(parsesdrf/convert): generalize to all parse_sdrf convert-* s…
jonasscheid 4984cdd
Merge branch 'master' into sdrfpipelines-parsesdrf
jonasscheid 1ab83ba
fix(parsesdrf/convert): resolve CI failures, default module_args per-…
jonasscheid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| 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 | ||
| """ | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
54
modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
76
modules/nf-core/sdrfpipelines/parsesdrf/tests/main.nf.test.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
5
modules/nf-core/sdrfpipelines/parsesdrf/tests/nextflow.config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please pass convert-mhcquant as params.module_args |
||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 ?