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

version 3.1 #37

Merged
merged 19 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d72160c
Bug fix, was not importing sys and using it in mods.py
glormph Nov 5, 2024
f69dd0b
Started on sage in DDA workflow, runs through percolator now
glormph Jan 28, 2025
0ae7818
Sage now working throughout
glormph Jan 30, 2025
197f1d4
Add msgf/sage to param schema so they end up in report
glormph Jan 31, 2025
5f14dc9
Adapt tests to sage/msgf - runs fine locally
glormph Jan 31, 2025
36e5b89
Fix tims scan nr issue (percolator needs integers, psmtable/mzmllooku…
glormph Jan 31, 2025
0f6006e
Lower sage memory for testing (github)
glormph Jan 31, 2025
4f77a1e
4GB mem wasnt enough for sage tests
glormph Jan 31, 2025
3a055f7
Luciphor should crash pipeline if it crashes, not go through pipe/gre…
glormph Jan 31, 2025
c28e1e5
Volcano plots back, had prev messed up the existence checker for those
glormph Jan 31, 2025
a3ae693
Also output PCA for sets, even if DEqMS / groups have been used
glormph Jan 31, 2025
1de5c7a
New palette for isobaric plots
glormph Jan 31, 2025
3f423a1
Crash early with message when not all sets are in the total proteome …
glormph Jan 31, 2025
f1bee20
Remove channels feature, to remove channels which are empty instead o…
glormph Jan 31, 2025
91c4421
Upgrade msstitch to get extra column for msgfperco: explainedioncurre…
glormph Feb 3, 2025
4fec297
Error when remove_channels has an incorrect set name specified
glormph Feb 3, 2025
e9858ce
Small cleanup/fix
glormph Feb 3, 2025
f7160f3
Add tables of PSM stats to report overview part
glormph Feb 3, 2025
6f5abe9
Changelog, version bump, doc update
glormph Feb 3, 2025
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
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ jobs:
create-container:
uses: ./.github/workflows/container.yml

run-all-tests:
run-all-tests-sage:
needs: create-container
env:
SEARCH: sage
uses: ./.github/workflows/tests_all.yml

run-all-tests-msgf:
needs: create-container
env:
SEARCH: msgf
uses: ./.github/workflows/tests_all.yml

create-release:
runs-on: ubuntu-latest
needs: run-all-tests
needs: [run-all-tests-sage, run-all-tests-msgf]
steps:
- uses: ncipollo/release-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/single_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run single test
run: bash run_tests.sh tmt16_fast
run: bash run_tests.sh sage tmt16_fast
12 changes: 6 additions & 6 deletions .github/workflows/tests_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh tmt16
run: bash run_tests.sh $SEARCH tmt16

test-tmt18:
runs-on: ubuntu-latest
Expand All @@ -27,7 +27,7 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh tmt18
run: bash run_tests.sh $SEARCH tmt18

test-labelfree:
runs-on: ubuntu-latest
Expand All @@ -39,7 +39,7 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh labelfree
run: bash run_tests.sh $SEARCH labelfree

test-lf_phos:
runs-on: ubuntu-latest
Expand All @@ -51,7 +51,7 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh labelfree_phos
run: bash run_tests.sh $SEARCH labelfree_phos

test-tims:
runs-on: ubuntu-latest
Expand All @@ -63,7 +63,7 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh tims
run: bash run_tests.sh $SEARCH tims

test-mixed-tmt:
runs-on: ubuntu-latest
Expand All @@ -75,4 +75,4 @@ jobs:
uses: nf-core/setup-nextflow@v2

- name: Run tests
run: bash run_tests.sh tmt16_18
run: bash run_tests.sh $SEARCH tmt16_18
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# lehtiolab/ddamsproteomics: Changelog

## Version 3.1 [2025-02-03]
- Search engine choice of Sage / MSGF
- QC plots changes in colors, max PSM use in isobaric step, PCA for sets even when sample groups
- Tables for PSM results in report
- Possible to remove (e.g. empty) channel for specific set
- Fixed volcano plots
- Error early on incorrect totalproteome / remove channel set names
- Output ExplainedIonCurrentRatio in MSGF PSM table (msstitch to 3.17)
- OpenMS to 3.2, MSGFPlus to 2024.03.26, Percolator to 3.6.5


## Version 3.0 [2024-09-19]
- Rewrote in DSL2
- QC report with plotly
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
- run pipeline:

```
nextflow run lehtiolab/ddamsproteomics --input /path/to/input_definition.txt --tdb /path/to/proteins.fa --mods 'oxidation;carbamidomethylation' -profile standard,docker
nextflow run lehtiolab/ddamsproteomics --input /path/to/input_definition.txt --sage --tdb /path/to/proteins.fa --mods 'oxidation;carbamidomethylation' -profile standard,docker
```

Or for two sample sets of isobaric data you can:

```
nextflow run lehtiolab/ddamsproteomics --input /path/to/input_definition.txt --tdb /path/to/proteins.fa --mods 'oxidation;carbamidomethylation --isobaric 'setA:tmt10plex:126 setB:tmt10plex:127N'
nextflow run lehtiolab/ddamsproteomics --input /path/to/input_definition.txt --sage --tdb /path/to/proteins.fa --mods 'oxidation;carbamidomethylation --isobaric 'setA:tmt10plex:126 setB:tmt10plex:127N'
```

For more elaborate examples covering fractionation, PTMs, and more, the lehtiolab/ddamsproteomics pipeline comes with documentation about the pipeline, found in the `docs/` directory:
For more elaborate examples covering fractionation, MSGF+, PTMs, and more, the lehtiolab/ddamsproteomics pipeline comes with documentation about the pipeline, found in the `docs/` directory:

- [Running the pipeline](docs/usage.md)
- [Output and how to interpret the results](docs/output.md)
Expand Down
76 changes: 73 additions & 3 deletions assets/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ <h4 class="subtitle is-4">
{% if ptmtables.summary %}
<li id="ptmqctab"> <a> PTMs </a> </li>
{% endif %}
{% if expplots.pca %}
{% if expplots.pcagroup %}
<li id="deqctab"><a>Expression</a> </li>
{% endif %}
{% if expplots.pcaset %}
<li id="pcatab"><a>PCA</a> </li>
{% endif %}
<li id="rundatatab"><a>Run data</a></li>
</ul>
</div>
Expand Down Expand Up @@ -95,6 +98,52 @@ <h5 class="title is-5">{{ ftitle }}</h5>
{% endfor %}
</div>

<h4 class="title is-4">PSMs</h4>
<div class="columns">
<div class="column">
<h5 class="title is-5">IDs</h5>
<table class="table is-striped is-narrow is-hoverable is-size-7">
<thead>
<th>Sample/plate</th>
<th>Scans</th>
<th>PSMs</th>
<th>% ID</th>
</thead>
<tbody>
{% for plate, scans, psms, pc in psmtables.ids %}
<tr>
<td> {{ plate }} </td>
<td> {{ scans }} </td>
<td> {{ psms }} </td>
<td> {{ pc }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="column">
<h5 class="title is-5">Missed cleavages</h5>
<table class="table is-striped is-narrow is-hoverable is-size-7">
<thead>
<th>Sample/plate</th>
<th># missed cleavages</th>
<th># PSMs</th>
<th>% PSMs</th>
</thead>
<tbody>
{% for plate, mc, psms, pc in psmtables.miscleav %}
<tr>
<td> {{ plate }} </td>
<td> {{ mc }} </td>
<td> {{ psms }} </td>
<td> {{ pc }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>

{% if ptmtables.summary %}
<h4 class="title is-4">PTMs</h4>
<div class="columns">
Expand Down Expand Up @@ -360,7 +409,7 @@ <h5 class="title is-5">{{ ftitle }}</h5>
</div>
{% endif %}

{% if expplots.pca %}
{% if expplots.pcagroup %}
<div id="deqcpage" class="mt-5 container">
{% for plotname, plottitle in expplotnames %}
<h4 class="title is-4">{{ plottitle }}</h4>
Expand Down Expand Up @@ -397,6 +446,24 @@ <h5 class="title is-5">{{ ftitle }}</h5>
</div>
{% endif %}

{% if expplots.pcaset %}
<div id="pcapage" class="mt-5 container">
{% for plotname, plottitle in pcaplotnames %}
<h4 class="title is-4">{{ plottitle }}</h4>
<div class="columns">
{% for fname, ftitle in featnames %}
{% if expplots[plotname][fname] %}
<div class="column">
<h5 class="title is-5">{{ ftitle }}</h5>
{{ expplots[plotname][fname] }}
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
{% endif %}

<script type="text/javascript">
let tabs = [
['results', document.getElementById('resultstab'), document.getElementById('resultspage')],
Expand All @@ -406,9 +473,12 @@ <h5 class="title is-5">{{ ftitle }}</h5>
{% if ptmtables.summary %}
['ptmqc', document.getElementById('ptmqctab'), document.getElementById('ptmqcpage')],
{% endif %}
{% if expplots.pca %}
{% if expplots.pcagroup %}
['deqc', document.getElementById('deqctab'), document.getElementById('deqcpage')],
{% endif %}
{% if expplots.pcaset %}
['pca', document.getElementById('pcatab'), document.getElementById('pcapage')],
{% endif %}
];
tabs.forEach(t => {
t[1].addEventListener('click', e => toggleTab(t[0]));
Expand Down
46 changes: 46 additions & 0 deletions assets/sage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"database": {
"bucket_size": 8192,
"enzyme": {
"missed_cleavages": 2,
"min_len": 7,
"max_len": 50,
"cleave_at": "KR",
"restrict": "P",
"c_terminal": true
},
"fragment_min_mz": 200.0,
"fragment_max_mz": 2000.0,
"peptide_min_mass": 500.0,
"peptide_max_mass": 5000.0,
"ion_kinds": ["a", "b", "y"],
"min_ion_index": 2,
"static_mods": {
"C": 57.0215
},
"variable_mods": {
"M": [15.9949]
},
"max_variable_mods": 2,
"decoy_tag": "decoy_",
"generate_decoys": false
},
"precursor_tol": {
"ppm": [-10, 10]
},
"fragment_tol": {
"ppm": [-20, 20]
},
"precursor_charge": [2, 6],
"isotope_errors": [ -1, 2 ],
"deisotope": false,
"chimera": false,
"wide_window": false,
"predict_rt": false,
"min_peaks": 7,
"max_peaks": 150,
"min_matched_peaks": 3,
"max_fragment_charge": 2,
"report_psms": 1,
"output_directory": "./"
}
21 changes: 14 additions & 7 deletions bin/create_modfile.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
#!/usr/bin/env python3

import sys
import json
from mods import Mods


def main():
nummods = sys.argv[1]
modlibfile = sys.argv[2]
passed_mods = sys.argv[3].split(';')
search_engine = sys.argv[3]
passed_mods = sys.argv[4].split(';')
fixedmods = {}
varmods = []
# Parse modifications passed
msgfmods = Mods()
msgfmods.parse_msgf_modfile(modlibfile, passed_mods)
with open('mods.txt', 'w') as fp:
fp.write('NumMods={}'.format(nummods))
for modline in msgfmods.get_msgf_modlines():
fp.write(f'\n{modline}')
parsemods = Mods()
parsemods.parse_msgf_modfile(modlibfile, passed_mods)
modfn = 'mods.txt'
if search_engine == 'msgf':
with open(modfn, 'w') as fp:
fp.write('NumMods={}'.format(nummods))
for modline in parsemods.get_msgf_modlines():
fp.write(f'\n{modline}')
elif search_engine == 'sage':
with open(modfn, 'w') as fp:
json.dump(parsemods.get_sage_mods(), fp)


if __name__ == '__main__':
Expand Down
Loading