Skip to content

Commit

Permalink
3992 new module openmspeakpickerhires (nf-core#4207)
Browse files Browse the repository at this point in the history
* add peakpickerhires module

* Add peackpicker module with tests

* prettier

* fix falsely moved folder

* Update meta.yml

* fix prettier on other modules

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml

* Update environment.yml
  • Loading branch information
jonasscheid authored Oct 25, 2023
1 parent ec622d8 commit 4e2cbac
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 0 deletions.
49 changes: 49 additions & 0 deletions modules/nf-core/openms/peakpickerhires/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
process OPENMS_PEAKPICKERHIRES {
tag "$meta.id"
label 'process_low'

conda "bioconda::openms=3.0.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/openms:3.0.0--h8964181_1' :
'biocontainers/openms:3.0.0--h8964181_1' }"

input:
tuple val(meta), path(mzml)

output:
tuple val(meta), path("*.mzML"), emit: mzml
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
PeakPickerHiRes \\
-in $mzml \\
-out ${prefix}.mzML \\
-threads $task.cpus \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}.mzML
cat <<-END_VERSIONS > versions.yml
"${task.process}":
openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
END_VERSIONS
"""
}
46 changes: 46 additions & 0 deletions modules/nf-core/openms/peakpickerhires/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "openms_peakpickerhires"
description: A tool for peak detection in high-resolution profile data (Orbitrap or FTICR)
keywords:
- peak picking
- mzml
- openms
- proteomics
tools:
- "openms":
description: "OpenMS is an open-source software C++ library for LC-MS data management and analyses"
homepage: "https://openms.de"
documentation: "https://openms.readthedocs.io/en/latest/index.html"
tool_dev_url: "https://github.com/OpenMS/OpenMS"
doi: "10.1038/nmeth.3959"
licence: "['BSD']"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- mzml:
type: file
description: Mass spectrometer output file in mzML format
pattern: "*.{mzML}"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- mzml:
type: file
description: Peak-picked mass spectrometer output file in mzML format
pattern: "*.{mzML}"

authors:
- "@jonasscheid"
maintainers:
- "@jonasscheid"
4 changes: 4 additions & 0 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2580,6 +2580,10 @@ openms/idmerger:
- modules/nf-core/openms/idmerger/**
- tests/modules/nf-core/openms/idmerger/**

openms/peakpickerhires:
- modules/nf-core/openms/peakpickerhires/**
- tests/modules/nf-core/openms/peakpickerhires/**

optitype:
- modules/nf-core/optitype/**
- tests/modules/nf-core/optitype/**
Expand Down
1 change: 1 addition & 0 deletions tests/config/test_data.config
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ params {
'msspectra' {
ups_file1 = "${params.test_data_base}/data/proteomics/msspectra/OVEMB150205_12.raw"
ups_file2 = "${params.test_data_base}/data/proteomics/msspectra/OVEMB150205_14.raw"
profile_spectra = "${params.test_data_base}/data/proteomics/msspectra/peakpicker_tutorial_1.mzML"
}
'database' {
yeast_ups = "${params.test_data_base}/data/proteomics/database/yeast_UPS.fasta"
Expand Down
15 changes: 15 additions & 0 deletions tests/modules/nf-core/openms/peakpickerhires/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { OPENMS_PEAKPICKERHIRES } from '../../../../../modules/nf-core/openms/peakpickerhires/main.nf'

workflow test_openms_peakpickerhires {

input = [
[ id:'test'], // meta map
file(params.test_data['proteomics']['msspectra']['profile_spectra'], checkIfExists: true)
]

OPENMS_PEAKPICKERHIRES ( input )
}
8 changes: 8 additions & 0 deletions tests/modules/nf-core/openms/peakpickerhires/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: PEAKPICKERHIRES {
ext.args = '-algorithm:ms_levels 2'
}
}
11 changes: 11 additions & 0 deletions tests/modules/nf-core/openms/peakpickerhires/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: openms peakpickerhires test_openms_peakpickerhires
command: nextflow run ./tests/modules/nf-core/openms/peakpickerhires -entry test_openms_peakpickerhires -c ./tests/config/nextflow.config
tags:
- openms/peakpickerhires
- openms
files:
- path: output/openms/test.mzML
# md5sums are not reproducible because PeakPickerHiRes saves the time of execution in the file
contains:
- '<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />'
- path: output/openms/versions.yml

0 comments on commit 4e2cbac

Please sign in to comment.