Skip to content

Commit 20585c7

Browse files
authored
Merge branch 'main' into refactor-parse-spectra
2 parents 41ea6c8 + f8cab91 commit 20585c7

34 files changed

+501
-464
lines changed

.github/workflows/publish.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install package and dependencies
5555
run: |
5656
python -m pip install --upgrade pip
57-
pip install --only-binary :all: . pyinstaller
57+
pip install --only-binary :all: .[ionmob] pyinstaller
5858
5959
- name: Install Inno Setup
6060
uses: crazy-max/ghaction-chocolatey@v3
@@ -83,3 +83,43 @@ jobs:
8383
tag: ${{ github.ref }}
8484
file_glob: true
8585
file: dist/*.exe
86+
87+
docker-image:
88+
runs-on: ubuntu-latest
89+
permissions:
90+
packages: write
91+
contents: read
92+
attestations: write
93+
id-token: write
94+
steps:
95+
- name: Check out the repo
96+
uses: actions/checkout@v4
97+
98+
- name: Log in to the Container registry
99+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
100+
with:
101+
registry: ghcr.io
102+
username: ${{ github.actor }}
103+
password: ${{ secrets.GITHUB_TOKEN }}
104+
105+
- name: Extract metadata (tags, labels) for Docker
106+
id: meta
107+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
108+
with:
109+
images: ghcr.io/${{ github.repository }}
110+
111+
- name: Build and push Docker images
112+
id: push
113+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
114+
with:
115+
context: .
116+
push: true
117+
tags: ${{ steps.meta.outputs.tags }}
118+
labels: ${{ steps.meta.outputs.labels }}
119+
120+
- name: Generate artifact attestation
121+
uses: actions/attest-build-provenance@v1
122+
with:
123+
subject-name: ghcr.io/${{ github.repository }}
124+
subject-digest: ${{ steps.push.outputs.digest }}
125+
push-to-registry: true

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11"]
15+
python-version: ["3.9", "3.10", "3.11"]
1616
steps:
1717
- uses: actions/checkout@v4
1818

@@ -55,7 +55,7 @@ jobs:
5555
- name: Install package and dependencies
5656
run: |
5757
python -m pip install --upgrade pip
58-
pip install --only-binary :all: . pyinstaller
58+
pip install --only-binary :all: .[ionmob] pyinstaller
5959
6060
- name: Install Inno Setup
6161
uses: crazy-max/ghaction-chocolatey@v1

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010

1111
Modular and user-friendly platform for AI-assisted rescoring of peptide identifications
1212

13-
> ⚠️ Note: This is the documentation for the fully redeveloped version 3.0 of MS²Rescore. While
14-
> MS²Rescore 3.0 has been drastically improved over the previous version, you might run into some
15-
> unforeseen issues. Please report any issues you encounter on the [issue tracker][issues] or post
16-
> your questions on the [GitHub Discussions][discussions] forum.
17-
1813
## About MS²Rescore
1914

2015
MS²Rescore performs ultra-sensitive peptide identification rescoring with LC-MS predictors such as
@@ -52,8 +47,7 @@ timsTOF fragmentation and IM2Deep for ion mobility separation. Bruker .d and min
5247
files are directly supported through the [timsrust](https://github.com/MannLabs/timsrust) library.
5348

5449
Checkout our [preprint](https://doi.org/10.1101/2024.05.29.596400) for more information and the
55-
[TIMS²Rescore documentation](https://ms2rescore.readthedocs.io/en/stable/userguide/tims2rescore)
56-
to get started.
50+
[TIMS²Rescore documentation][tims2rescore] to get started.
5751

5852
## Citing
5953

@@ -104,15 +98,16 @@ make a [pull request][pr]!
10498
[issues]: https://github.com/compomics/ms2rescore/issues/
10599
[discussions]: https://github.com/compomics/ms2rescore/discussions/
106100
[pr]: https://github.com/compomics/ms2rescore/pulls/
107-
[desktop]: https://ms2rescore.readthedocs.io/gui.html
101+
[desktop]: https://ms2rescore.readthedocs.io/en/stable/gui/
108102
[desktop-installer]: https://github.com/compomics/ms2rescore/releases/latest
109-
[cli]: https://ms2rescore.readthedocs.io/cli/cli.html
110-
[python-package]: https://ms2rescore.readthedocs.io/api/ms2rescore.html
111-
[docker]: https://ms2rescore.readthedocs.io/installation.html#docker-container
103+
[cli]: https://ms2rescore.readthedocs.io/en/stable/cli/
104+
[python-package]: https://ms2rescore.readthedocs.io/en/stable/api/ms2rescore/
105+
[docker]: https://ms2rescore.readthedocs.io/en/stable/installation#docker-container
112106
[publication-branch]: https://github.com/compomics/ms2rescore/tree/pub
113107
[ms2pip]: https://github.com/compomics/ms2pip
114108
[deeplc]: https://github.com/compomics/deeplc
115109
[percolator]: https://github.com/percolator/percolator/
116110
[mokapot]: https://mokapot.readthedocs.io/
117111
[psm_utils]: https://github.com/compomics/psm_utils
118112
[file-formats]: https://psm-utils.readthedocs.io/en/stable/#supported-file-formats
113+
[tims2rescore]: https://ms2rescore.readthedocs.io/en/stable/userguide/tims2Rescore
-56.2 KB
Loading

docs/source/config_schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
- **One of**
6868
- *string*
6969
- *null*
70+
- **`write_flashlfq`** *(boolean)*: Write results to a FlashLFQ-compatible file. Default: `false`.
7071
- **`write_report`** *(boolean)*: Write an HTML report with various QC metrics and charts. Default: `false`.
7172
- **`profile`** *(boolean)*: Write a txt report using cProfile for profiling. Default: `false`.
7273
## Definitions
@@ -93,7 +94,6 @@
9394
- **`train_fdr`** *(number)*: FDR threshold for training Mokapot. Minimum: `0`. Maximum: `1`. Default: `0.01`.
9495
- **`write_weights`** *(boolean)*: Write Mokapot weights to a text file. Default: `false`.
9596
- **`write_txt`** *(boolean)*: Write Mokapot results to a text file. Default: `false`.
96-
- **`write_flashlfq`** *(boolean)*: Write Mokapot results to a FlashLFQ-compatible file. Default: `false`.
9797
- <a id="definitions/percolator"></a>**`percolator`** *(object)*: Percolator rescoring engine configuration. Can contain additional properties. Refer to *[#/definitions/rescoring_engine](#definitions/rescoring_engine)*.
9898
- **`init-weights`**: Weights file for scoring function. Default: `false`.
9999
- **One of**

docs/source/tutorials/in-depth-python-api.ipynb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
"# Using the Python API "
88
]
99
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"This tutorial shows how to use the MS²Rescore Python API for each step of the rescoring process\n",
15+
"individually. This is useful if you want to customize rescoring for your own Python\n",
16+
"workflow or if you want to understand how MS²Rescore works.\n",
17+
"\n",
18+
"Note that the full MS²Rescore workflow is also available from Python with the single function call\n",
19+
"`ms2rescore.rescore()`."
20+
]
21+
},
1022
{
1123
"cell_type": "code",
1224
"execution_count": 1,
@@ -37342,7 +37354,7 @@
3734237354
"from pyteomics.mgf import read as read_mgf\n",
3734337355
"\n",
3734437356
"for spectrum in read_mgf(\"../../../examples/mgf/20161213_NGHF_DBJ_SA_Exp3A_HeLa_1ug_7min_15000_02.mgf\"):\n",
37345-
" print(spectrum[\"params\"][\"title\"])\n",
37357+
" print(spectrum[\"params\"][\"title\"]) # noqa T201\n",
3734637358
" break"
3734737359
]
3734837360
},
@@ -37362,7 +37374,7 @@
3736237374
"source": [
3736337375
"import re\n",
3736437376
"spectrum_id = re.match(r\".*scan=(\\d+)$\", spectrum[\"params\"][\"title\"]).group(1)\n",
37365-
"print(spectrum_id)"
37377+
"print(spectrum_id) # noqa T201"
3736637378
]
3736737379
},
3736837380
{
@@ -38120,7 +38132,6 @@
3812038132
"metadata": {},
3812138133
"outputs": [],
3812238134
"source": [
38123-
"import plotly.express as px\n",
3812438135
"from ms2rescore.report.charts import (\n",
3812538136
" calculate_feature_qvalues,\n",
3812638137
" feature_ecdf_auc_bar,\n",

docs/source/userguide/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ expression pattern that extracts the decoy status from the protein name:
244244

245245
.. code-block:: json
246246
247-
"decoy_pattern": "DECOY_"
247+
"id_decoy_pattern": "DECOY_"
248248
249249
.. tab:: TOML
250250

251251
.. code-block:: toml
252252
253-
decoy_pattern = "DECOY_"
253+
id_decoy_pattern = "DECOY_"
254254
255255
256256
Multi-rank rescoring

examples/msgfplus-ms2rescore.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
},
88
"log_level": "debug",
99
"processes": 16,
10-
"feature_generators": {
11-
"basic": {}
12-
},
1310
"rescoring_engine": {
1411
"mokapot": {
1512
"fasta_file": "examples/proteins/uniprot-proteome-human-contaminants.fasta",

examples/msgfplus-ms2rescore.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,7 @@ psm_reader_kwargs = { "score_column" = "PSMScore" }
55
log_level = "debug"
66
processes = 16
77

8-
# [ms2rescore.modification_mapping]
9-
10-
# [ms2rescore.fixed_modifications]
11-
12-
[ms2rescore.feature_generators.basic]
13-
# No options, but setting heading enables feature generator
14-
15-
# [ms2rescore.feature_generators.ms2pip]
16-
# model = "HCD"
17-
# ms2_tolerance = 0.02
18-
19-
# [ms2rescore.feature_generators.deeplc]
20-
# deeplc_retrain = false
21-
22-
# [ms2rescore.feature_generators.maxquant]
23-
# No options, but setting heading enables feature generator
24-
258
[ms2rescore.rescoring_engine.mokapot]
269
fasta_file = "examples/proteins/uniprot-proteome-human-contaminants.fasta"
2710
write_weights = true
2811
write_txt = true
29-
# write_flashlfq = true

ms2rescore.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ project = "ms2rescore"
1616
bundle_name = "ms2rescore"
1717
bundle_identifier = f"{bundle_name}.{__version__}"
1818

19+
extra_requirements = {"ionmob"}
20+
1921
# Requirements config
2022
skip_requirements_regex = r"^(?:.*\..*)"
2123

@@ -28,6 +30,7 @@ requirements = {
2830
if "; extra ==" not in req # Exclude optional dependencies
2931
}
3032
requirements.update([project, "xgboost"])
33+
requirements.update(extra_requirements)
3134

3235
hidden_imports = set()
3336
datas = []

0 commit comments

Comments
 (0)