Skip to content

Commit 6f40cdd

Browse files
authored
Merge branch 'main' into feature/gzip
2 parents d91a02c + 50002a9 commit 6f40cdd

24 files changed

+422
-435
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
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

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ timsTOF fragmentation and IM2Deep for ion mobility separation. Bruker .d and min
4747
files are directly supported through the [timsrust](https://github.com/MannLabs/timsrust) library.
4848

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

5352
## Citing
5453

@@ -99,15 +98,16 @@ make a [pull request][pr]!
9998
[issues]: https://github.com/compomics/ms2rescore/issues/
10099
[discussions]: https://github.com/compomics/ms2rescore/discussions/
101100
[pr]: https://github.com/compomics/ms2rescore/pulls/
102-
[desktop]: https://ms2rescore.readthedocs.io/gui.html
101+
[desktop]: https://ms2rescore.readthedocs.io/en/stable/gui/
103102
[desktop-installer]: https://github.com/compomics/ms2rescore/releases/latest
104-
[cli]: https://ms2rescore.readthedocs.io/cli/cli.html
105-
[python-package]: https://ms2rescore.readthedocs.io/api/ms2rescore.html
106-
[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
107106
[publication-branch]: https://github.com/compomics/ms2rescore/tree/pub
108107
[ms2pip]: https://github.com/compomics/ms2pip
109108
[deeplc]: https://github.com/compomics/deeplc
110109
[percolator]: https://github.com/percolator/percolator/
111110
[mokapot]: https://mokapot.readthedocs.io/
112111
[psm_utils]: https://github.com/compomics/psm_utils
113112
[file-formats]: https://psm-utils.readthedocs.io/en/stable/#supported-file-formats
113+
[tims2rescore]: https://ms2rescore.readthedocs.io/en/stable/userguide/tims2Rescore

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/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/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""MS²Rescore: Sensitive PSM rescoring with predicted MS² peak intensities and RTs."""
22

3-
__version__ = "3.1.1"
3+
__version__ = "3.1.2"
44

55
from warnings import filterwarnings
66

ms2rescore/core.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,16 @@ def rescore(configuration: Dict, psm_list: Optional[PSMList] = None) -> None:
163163
logger.info(f"Writing output to {output_file_root}.psms.tsv...")
164164
psm_utils.io.write_file(psm_list, output_file_root + ".psms.tsv", filetype="tsv")
165165

166+
if config["write_flashlfq"]:
167+
logger.info(f"Writing output to {output_file_root}.flashlfq.tsv...")
168+
psm_utils.io.write_file(
169+
psm_list,
170+
output_file_root + ".flashlfq.tsv",
171+
filetype="flashlfq",
172+
fdr_threshold=0.01,
173+
only_target=True, # TODO: Make FDR threshold configurable
174+
)
175+
166176
# Write report
167177
if config["write_report"]:
168178
try:

ms2rescore/feature_generators/deeplc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def add_features(self, psm_list: PSMList) -> None:
139139

140140
# Disable wild logging to stdout by Tensorflow, unless in debug mode
141141
with contextlib.redirect_stdout(
142-
open(os.devnull, "w")
142+
open(os.devnull, "w", encoding="utf-8")
143143
) if not self._verbose else contextlib.nullcontext():
144144
# Make new PSM list for this run (chain PSMs per spectrum to flat list)
145145
psm_list_run = PSMList(psm_list=list(chain.from_iterable(psms.values())))

0 commit comments

Comments
 (0)