Skip to content

Commit

Permalink
Merge pull request #37 from lehtiolab/dev
Browse files Browse the repository at this point in the history
version 3.1
  • Loading branch information
glormph authored Feb 3, 2025
2 parents 44dc69f + 6f5abe9 commit 0e07cb7
Show file tree
Hide file tree
Showing 37 changed files with 872 additions and 232 deletions.
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

0 comments on commit 0e07cb7

Please sign in to comment.