Skip to content
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

sageproteomics/sage #5677

Merged
merged 23 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5be2748
sage prototype
dgemperline-lilly May 22, 2024
db28bf6
prettier fix
dgemperline-lilly May 22, 2024
e024183
Merge branch 'nf-core:master' into sageproteomics/sage
dgemperline-lilly May 22, 2024
9feb0f7
fixed trailing whitespace
dgemperline-lilly May 22, 2024
406b318
Merge branch 'master' into sageproteomics/sage
kokul-atx May 22, 2024
642ec78
Update modules/nf-core/sageproteomics/sage/main.nf
dgemperline-lilly May 22, 2024
20c1896
resolved comments
dgemperline-lilly May 23, 2024
7638eca
Merge branch 'master' into sageproteomics/sage
dgemperline-lilly May 23, 2024
acc27cb
Merge branch 'master' into sageproteomics/sage
dgemperline-lilly May 23, 2024
1e5fe53
Merge branch 'master' into sageproteomics/sage
dgemperline-lilly Jun 11, 2024
f9cd372
Merge branch 'master' into sageproteomics/sage
FloWuenne Jun 12, 2024
6979440
Update modules/nf-core/sageproteomics/sage/meta.yml
dgemperline-lilly Jun 13, 2024
005b6a0
Update modules/nf-core/sageproteomics/sage/meta.yml
dgemperline-lilly Jun 13, 2024
bd744fc
Update modules/nf-core/sageproteomics/sage/meta.yml
dgemperline-lilly Jun 13, 2024
def4db0
Update modules/nf-core/sageproteomics/sage/meta.yml
dgemperline-lilly Jun 13, 2024
b078dad
Update modules/nf-core/sageproteomics/sage/meta.yml
dgemperline-lilly Jun 13, 2024
a8aa68d
updated author information
dgemperline-lilly Jun 13, 2024
e67f5fa
Merge branch 'master' into sageproteomics/sage
dgemperline-lilly Jun 13, 2024
ac05255
Merge branch 'master' into sageproteomics/sage
FloWuenne Jun 13, 2024
2caf43e
Delete modules/nf-core/sageproteomics/sage/tests/config-cli.json
FloWuenne Jun 13, 2024
323ca61
Update modules/nf-core/sageproteomics/sage/tests/main.nf.test
dgemperline-lilly Jun 13, 2024
6d82c16
Update modules/nf-core/sageproteomics/sage/tests/main.nf.test
dgemperline-lilly Jun 13, 2024
f193afd
Merge branch 'master' into sageproteomics/sage
FloWuenne Jun 14, 2024
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
9 changes: 9 additions & 0 deletions modules/nf-core/sageproteomics/sage/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "sageproteomics_sage"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- "bioconda::sage-proteomics=0.14.7"
60 changes: 60 additions & 0 deletions modules/nf-core/sageproteomics/sage/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
process SAGEPROTEOMICS_SAGE {
tag "$meta.id"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/sage-proteomics:0.14.7--h031d066_0' :
'biocontainers/sage-proteomics:0.14.7--h031d066_0' }"

input:
tuple val(meta), path("*.mzML")
tuple val(meta2), path(fasta_proteome)
tuple val(meta3), path(base_config)

output:
tuple val(meta), path("results.sage.tsv"), emit: results_tsv
tuple val(meta), path("results.json"), emit: results_json
tuple val(meta), path("results.sage.pin"), emit: results_pin
path "versions.yml", emit: versions

//optional outs
tuple val(meta), path("tmt.tsv"), optional: true, emit: tmt_tsv
tuple val(meta), path("lfq.tsv"), optional: true, emit: lfq_tsv

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

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

"""
export RAYON_NUM_THREADS=$task.cpus

sage $base_config \\
--disable-telemetry-i-dont-want-to-improve-sage \\
--fasta $fasta_proteome \\
--write-pin \\
*.mzML

cat <<-END_VERSIONS > versions.yml
"${task.process}":
sageproteomics: \$(sage --version |& sed '1!d ; s/sage //')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch results.json
touch results.sage.tsv
touch results.sage.pin

cat <<-END_VERSIONS > versions.yml
"${task.process}":
sageproteomics: \$(sage --version |& sed '1!d ; s/sage //')
END_VERSIONS
"""
}
81 changes: 81 additions & 0 deletions modules/nf-core/sageproteomics/sage/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "sageproteomics_sage"
description: sage is a search software for proteomics data
keywords:
- proteomics
- sage
- mass spectrometry
tools:
- "sageproteomics":
description: "Proteomics searching so fast it feels like magic."
homepage: "https://lazear.github.io/sage/"
documentation: "https://lazear.github.io/sage/"
tool_dev_url: "https://github.com/lazear/sage"
doi: "10.1021/acs.jproteome.3c00486"
licence: ["MIT"]

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1']`
- '"*.mzML"':
type: file
description: mzML open source mass spectrometry raw data format
pattern: "*.{mzML, mzML.gz}"
- meta2:
type: map
description: |
Groovy Map containing information about fasta_proteome
e.g. `[ id:'sample1']`
- fasta_proteome:
dgemperline-lilly marked this conversation as resolved.
Show resolved Hide resolved
type: file
description: proteome database in fasta format
pattern: "*.{fasta, fasta.gz}"
- meta3:
type: map
description: |
Groovy Map containing information about base_config
e.g. `[ id:'sample1']`
- base_config:
dgemperline-lilly marked this conversation as resolved.
Show resolved Hide resolved
type: file
description: sage configuration json
pattern: "*.{json}"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1']`
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- results_tsv:
type: file
description: tsv output results
pattern: "results.sage.tsv"
- results_json:
type: file
description: json output results
pattern: "results.json"
- results_pin:
type: file
description: pin format output results
pattern: "results.sage.pin"
- tmt_tsv:
type: file
description: tandem mass tag quantification
pattern: "tmt.tsv"
- lfq_tsv:
type: file
description: label free quantification
pattern: "lfq.tsv"

authors:
- "@dgemperline-lilly"
maintainers:
- "@dgemperline-lilly"
69 changes: 69 additions & 0 deletions modules/nf-core/sageproteomics/sage/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
nextflow_process {

name "Test Process SAGEPROTEOMICS_SAGE"
script "../main.nf"
process "SAGEPROTEOMICS_SAGE"

tag "modules"
tag "modules_nfcore"
tag "sageproteomics"
tag "sageproteomics/sage"

test("sageproteomics - mzML") {
when {
process {
"""
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.test_data['proteomics']['msspectra']['profile_spectra'], checkIfExists: true)
])
input[1] = Channel.of([
[id:'test'], // meta2 map
file(params.test_data['proteomics']['database']['yeast_ups'], checkIfExists: true)
])
input[2] = Channel.of([
[id:'test'], // meta3 map
file(params.test_data['proteomics']['parameter']['sage_base_config'], checkIfExists: true)
])
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.results_pin, process.out.results_tsv, process.out.versions).match() }
)
}

}
test("sageproteomics - mzML.gz - stub") {
options "-stub"
when {
process {
"""
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.test_data['proteomics']['msspectra']['profile_spectra'], checkIfExists: true)
])
input[1] = Channel.of([
[id:'test'], // meta2 map
file(params.test_data['proteomics']['database']['yeast_ups'], checkIfExists: true)
])
input[2] = Channel.of([
[id:'test'], // meta3 map
file(params.test_data['proteomics']['parameter']['sage_base_config'], checkIfExists: true)
])
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
107 changes: 107 additions & 0 deletions modules/nf-core/sageproteomics/sage/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"sageproteomics - mzML.gz - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"results.sage.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "test"
},
"results.json:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
{
"id": "test"
},
"results.sage.pin:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"3": [
"versions.yml:md5,78b0fbed713c6d678cc08a0835a3abf2"
],
"4": [

],
"5": [

],
"lfq_tsv": [

],
"results_json": [
[
{
"id": "test"
},
"results.json:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"results_pin": [
[
{
"id": "test"
},
"results.sage.pin:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"results_tsv": [
[
{
"id": "test"
},
"results.sage.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"tmt_tsv": [

],
"versions": [
"versions.yml:md5,78b0fbed713c6d678cc08a0835a3abf2"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-05-22T16:25:31.663053"
},
"sageproteomics - mzML": {
"content": [
[
[
{
"id": "test"
},
"results.sage.pin:md5,c764acea503b516a59c21b94936c89eb"
]
],
[
[
{
"id": "test"
},
"results.sage.tsv:md5,175dbda915bff070c7129610b33436a6"
]
],
[
"versions.yml:md5,78b0fbed713c6d678cc08a0835a3abf2"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-05-22T17:21:17.741302"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/sageproteomics/sage/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sageproteomics/sage:
- "modules/nf-core/sageproteomics/sage/**"
Loading