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

TIMS²Rescore #142

Merged
merged 129 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
50aff5e
parsing from spectrum id
ArthurDeclercq Nov 22, 2023
dcfcc00
change regex function used
ArthurDeclercq Dec 5, 2023
25aa0ea
fix unboundLocalError
ArthurDeclercq Dec 8, 2023
0e2b192
add regex patterns for im and rt parsing from spectrum id
ArthurDeclercq Jan 2, 2024
b45007f
im2deep
rodvrees Jan 9, 2024
112860c
add debug statement for im, rt parsing
ArthurDeclercq Jan 10, 2024
0330096
Merge remote-tracking branch 'origin/timsRescore' into timsRescore
rodvrees Jan 10, 2024
f6c9564
models + debug
rodvrees Jan 10, 2024
7585d51
fix
rodvrees Jan 10, 2024
a0f792f
add models
rodvrees Jan 10, 2024
b4660fd
fixes in im2deep.py
rodvrees Jan 11, 2024
1a18a42
fixes in im2deep.py
rodvrees Jan 11, 2024
b93df98
im2deep implementation
rodvrees Jan 11, 2024
8749ddf
remove peprec implementation deeplc
ArthurDeclercq Jan 11, 2024
782c7a0
CCS shift calculation fix
rodvrees Jan 12, 2024
7604153
models + plot
rodvrees Jan 12, 2024
b2d65eb
add inverse reduced ion mobility key to mzml parsing
ArthurDeclercq Jan 16, 2024
aa9cde0
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 16, 2024
230753c
remove print statements
ArthurDeclercq Jan 16, 2024
d9f9feb
updated inverse reduced ion mobility
ArthurDeclercq Jan 17, 2024
6ccb429
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 17, 2024
00d6704
add unused argument
ArthurDeclercq Jan 17, 2024
50a01e9
skip ms1 scans in mzml
ArthurDeclercq Jan 17, 2024
2645378
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 17, 2024
a99b492
IM2Deep plot correct labels
rodvrees Jan 22, 2024
1f6e973
calibrate per charge option
rodvrees Jan 26, 2024
301d632
Merge branch 'timsRescore' of github.com:rodvrees/ms2rescore into tim…
rodvrees Jan 26, 2024
dd8bd18
new models and reference
rodvrees Jan 29, 2024
ad0f3d7
correct format reference
rodvrees Jan 29, 2024
3a5b1ab
fix model name in IM2Deep
rodvrees Jan 29, 2024
4a5ff63
change deeplc calibration
ArthurDeclercq Jan 31, 2024
3b4899a
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 31, 2024
f773c90
typo
ArthurDeclercq Jan 31, 2024
fd09f88
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 31, 2024
16abf78
remove automatically putting deeplc on false
ArthurDeclercq Jan 31, 2024
012e9d0
change use of reference dataset
ArthurDeclercq Jan 31, 2024
d07c3b6
Merge branch 'timsRescore' of https://github.com/rodvrees/ms2rescore …
ArthurDeclercq Jan 31, 2024
13155e6
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 31, 2024
aea9d9f
IM2Deep calibrate correctly
rodvrees Jan 31, 2024
52d0761
Merge branch 'timsRescore' of github.com:rodvrees/ms2rescore into tim…
rodvrees Jan 31, 2024
de04bdd
bug fix
ArthurDeclercq Jan 31, 2024
167deb7
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 31, 2024
f9cca43
bugfix
ArthurDeclercq Jan 31, 2024
337d81a
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Jan 31, 2024
f3bdb26
changes in deeplc calibration
ArthurDeclercq Feb 1, 2024
ff34fc2
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Feb 1, 2024
d8340f5
remove print statements
ArthurDeclercq Feb 1, 2024
f5ec8e5
Merge branch 'compomics:timsRescore' into timsRescore
ArthurDeclercq Feb 1, 2024
65f134c
Implement IM2Deep package
rodvrees Feb 2, 2024
e1f0ddf
Merge branch 'timsRescore' of github.com:rodvrees/ms2rescore into tim…
rodvrees Feb 2, 2024
a9fc45f
GUI changes im2deep
ArthurDeclercq Feb 5, 2024
fa97517
add im2deep to pyproject
ArthurDeclercq Feb 5, 2024
a4fd01a
change dockerfile
ArthurDeclercq Feb 5, 2024
721cd08
optimise spectrum parsing
ArthurDeclercq Feb 5, 2024
ceed348
update toml file
ArthurDeclercq Feb 6, 2024
fcd393c
added debug logging
ArthurDeclercq Feb 6, 2024
3fc994f
requested changes
ArthurDeclercq Feb 15, 2024
42debd8
change numpy version upper limit
ArthurDeclercq Feb 15, 2024
c0713ed
fix bug
ArthurDeclercq Feb 15, 2024
fcf579d
Use newer setup-python action; revert numpy upper limit
RalfG Feb 15, 2024
48fae0e
Fix numpy version for py311
RalfG Feb 17, 2024
9063a84
Update pyproject.toml
RalfG Feb 18, 2024
7ede2f8
requested changes
ArthurDeclercq Feb 20, 2024
b2a126a
Update ms2rescore/feature_generators/im2deep.py
RalfG Feb 21, 2024
667822e
Add IM2Deep feature generator (#121)
ArthurDeclercq Feb 21, 2024
ee36b09
Merge branch 'timsRescore' of https://github.com/compomics/ms2rescore…
RalfG Feb 22, 2024
e5b7b87
Remove unused code; import im2ccs from im2deep package; use im2ccs ve…
RalfG Feb 22, 2024
82e7789
Remove unused code and imports; Replace pandas apply with vectorized …
RalfG Feb 22, 2024
d158a86
Formatting
RalfG Feb 22, 2024
a4f198a
Fix config descriptions for psm_id_im_pattern and psm_id_rt_pattern
RalfG Feb 22, 2024
86363ee
Check with Ruff on test (also disallow print statements)
RalfG Feb 28, 2024
1e8cbfc
Merge branch 'main' of https://github.com/compomics/ms2rescore into t…
RalfG Mar 25, 2024
9e1528d
Tweaks in inferring spectrum path for Bruker raw .d directories (hand…
RalfG Mar 28, 2024
3a8b361
MS2PIPFeatureGenerator: Ensure spectrum path is string (temp fix for …
RalfG Mar 28, 2024
65d4e2e
set peptide as column for set instead of index to see overlap
ArthurDeclercq Mar 29, 2024
17a4e12
Add file support for Bruker miniTDF
RalfG Apr 5, 2024
86ba7b6
Merge branch 'main' of https://github.com/compomics/ms2rescore into t…
RalfG Apr 8, 2024
43334de
Merge branch 'main' of https://github.com/compomics/ms2rescore into p…
ArthurDeclercq Apr 9, 2024
901c27e
Add new tims2rescore entrypoint with tims-specific config defaults; u…
RalfG Apr 9, 2024
fe8f301
Fix bug in parsing spectrum path if config `spectrum_path` is None
RalfG Apr 9, 2024
088e24a
Fix bug that always set `im_required` to True, even if no IM fgens we…
RalfG Apr 9, 2024
a8a609b
Raise exception if missing precursor info was not found in PSM and sp…
RalfG Apr 9, 2024
88e1cd3
Add maxquant fgen to timsrescore_default config
RalfG Apr 9, 2024
eb43eb2
Update dockerfile to use Python 3.11
RalfG Apr 9, 2024
126c255
Version bump
RalfG Apr 9, 2024
e873e73
fix percolator issue with report
ArthurDeclercq Apr 9, 2024
dec5950
ionmob fix
ArthurDeclercq Apr 9, 2024
09fbbfb
set logging of numba
ArthurDeclercq Apr 9, 2024
5c821c9
Merge branch 'timsRescore' of https://github.com/compomics/ms2rescore…
ArthurDeclercq Apr 9, 2024
fad30de
Merge branch 'main' of https://github.com/compomics/ms2rescore into t…
RalfG Apr 9, 2024
cc93d51
Merge branch 'timsRescore' of https://github.com/compomics/ms2rescore…
ArthurDeclercq Apr 9, 2024
6efddff
remove unused import
ArthurDeclercq Apr 9, 2024
d1c6388
add default random num generator seed
ArthurDeclercq Apr 10, 2024
1e11b4b
changes to report
ArthurDeclercq Apr 10, 2024
b144d5f
fix _fill_missing_precursor_info check
ArthurDeclercq Apr 10, 2024
1999039
Apply suggestions from code review :recycle:
ArthurDeclercq Apr 10, 2024
162f719
fixed Ralfs suggestions
ArthurDeclercq Apr 10, 2024
2c55cc2
Merge pull request #144 from compomics/peptide-num-fix
ArthurDeclercq Apr 10, 2024
21195c4
update verison number
ArthurDeclercq Apr 10, 2024
eea9500
add ms2rescore profiler
ArthurDeclercq Apr 12, 2024
144610b
removed unused import
ArthurDeclercq Apr 14, 2024
2bb0607
Slightly simplify cProfile sections
RalfG Apr 17, 2024
b65dc6e
Mokapot: Add peptide-level score, q-value, and PEP to PSM list after …
RalfG Apr 17, 2024
9fc2d61
Remove unused import
RalfG Apr 17, 2024
bc9532c
Version bump
RalfG Apr 17, 2024
bc51050
Mokapot: Also consider run for merging peptide level info
RalfG Apr 17, 2024
dcb5515
Mokapot: Fix merging peptide level info if run is None
RalfG Apr 18, 2024
9a0514e
Report: Move some loggings from info to debug
RalfG Apr 18, 2024
9409d68
Version bump
RalfG Apr 18, 2024
5d804ea
peptide level bug fix
ArthurDeclercq Apr 19, 2024
37ba9db
Version bump
RalfG Apr 25, 2024
2a947ee
Upgrade to psm_utils v0.9, which now uses Pydantic v2
RalfG May 2, 2024
3047f28
Added:
RalfG Jul 4, 2024
02f775b
Split removing invalid AAs from reading PSM files step. Now also work…
RalfG Jul 4, 2024
54f0fe5
Upgrade to Pyteomics 4.7.2 (contains caching of resolved modifications)
RalfG Jul 4, 2024
d483615
Relax numpy version requirement
RalfG Jul 4, 2024
6b46fda
Explicitly add scikit-learn 1.5.1 to dependencies
RalfG Jul 4, 2024
a0b9ce4
Version bump
RalfG Jul 4, 2024
bc6c314
Add options `max_psm_rank_input` and `max_psm_rank_output` to control…
RalfG Jul 8, 2024
1f0915c
Version bump
RalfG Jul 8, 2024
7744391
only install binary distributions
paretje Jul 8, 2024
e3f723d
Explicitly pass scores to 'assign_confidence' to avoid 'no psms under…
RalfG Jul 9, 2024
ee381e8
Version bump
RalfG Jul 9, 2024
684c874
Docs: More documentation on input files and rescoring engine configur…
RalfG Jul 9, 2024
9acaf0b
Apply only-binary fix also in publish workflow (see commit 7744391)
RalfG Jul 9, 2024
d7935e5
tims2rescore documentation
ArthurDeclercq Jul 10, 2024
794ac45
updated tims2rescore docs
ArthurDeclercq Jul 12, 2024
0d2fb2e
changes in default config
ArthurDeclercq Jul 12, 2024
77e7c1b
minor bugfixes
ArthurDeclercq Jul 15, 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
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -29,7 +29,7 @@ jobs:

- name: Test built package
run: |
pip install dist/ms2rescore-*.whl
pip install --only-binary :all: dist/ms2rescore-*.whl
# pytest
ms2rescore --help

Expand All @@ -47,14 +47,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install package and dependencies
run: |
python -m pip install --upgrade pip
pip install . pyinstaller
pip install --only-binary :all: . pyinstaller

- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v3
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install ruff

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run Ruff
run: ruff check --output-format=github .

- name: Build and install ms2rescore package
run: |
pip install .[dev]
pip install --only-binary :all: .[dev]

- name: Test with pytest
run: |
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM ubuntu:focal
FROM python:3.11

# ARG DEBIAN_FRONTEND=noninteractive

LABEL name="ms2rescore"

ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ms2rescore
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ms2rescore

ADD pyproject.toml /ms2rescore/pyproject.toml
ADD LICENSE /ms2rescore/LICENSE
Expand All @@ -11,8 +13,7 @@ ADD MANIFEST.in /ms2rescore/MANIFEST.in
ADD ms2rescore /ms2rescore/ms2rescore

RUN apt-get update \
&& apt-get install --no-install-recommends -y python3-pip procps libglib2.0-0 libsm6 libxrender1 libxext6 \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install ms2rescore/
&& apt install -y procps \
&& pip install /ms2rescore --only-binary :all:

ENTRYPOINT [""]
15 changes: 15 additions & 0 deletions docs/source/config_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- **`deeplc`**: Refer to *[#/definitions/deeplc](#definitions/deeplc)*.
- **`maxquant`**: Refer to *[#/definitions/maxquant](#definitions/maxquant)*.
- **`ionmob`**: Refer to *[#/definitions/ionmob](#definitions/ionmob)*.
- **`im2deep`**: Refer to *[#/definitions/im2deep](#definitions/im2deep)*.
- **`rescoring_engine`** *(object)*: Rescoring engine to use and its configuration. Leave empty to skip rescoring and write features to file. Default: `{"mokapot": {}}`.
- **`.*`**: Refer to *[#/definitions/rescoring_engine](#definitions/rescoring_engine)*.
- **`percolator`**: Refer to *[#/definitions/percolator](#definitions/percolator)*.
Expand Down Expand Up @@ -47,7 +48,17 @@
- **One of**
- *string*
- *null*
- **`psm_id_rt_pattern`**: Regex pattern to extract retention time from PSM identifier. Requires at least one capturing group. Default: `null`.
- **One of**
- *string*
- *null*
- **`psm_id_im_pattern`**: Regex pattern to extract ion mobility from PSM identifier. Requires at least one capturing group. Default: `null`.
- **One of**
- *string*
- *null*
- **`lower_score_is_better`** *(boolean)*: Bool indicating if lower score is better. Default: `false`.
- **`max_psm_rank_input`** *(number)*: Maximum rank of PSMs to use as input for rescoring. Minimum: `1`. Default: `10`.
- **`max_psm_rank_output`** *(number)*: Maximum rank of PSMs to return after rescoring, before final FDR calculation. Minimum: `1`. Default: `1`.
- **`modification_mapping`** *(object)*: Mapping of modification labels to each replacement label. Default: `{}`.
- **`fixed_modifications`** *(object)*: Mapping of amino acids with fixed modifications to the modification name. Can contain additional properties. Default: `{}`.
- **`processes`** *(number)*: Number of parallel processes to use; -1 for all available. Minimum: `-1`. Default: `-1`.
Expand All @@ -57,6 +68,7 @@
- *string*
- *null*
- **`write_report`** *(boolean)*: Write an HTML report with various QC metrics and charts. Default: `false`.
- **`profile`** *(boolean)*: Write a txt report using cProfile for profiling. Default: `false`.
## Definitions

- <a id="definitions/feature_generator"></a>**`feature_generator`** *(object)*: Feature generator configuration. Can contain additional properties.
Expand All @@ -75,7 +87,10 @@
- **`ionmob_model`** *(string)*: Path to Ionmob model directory. Default: `"GRUPredictor"`.
- **`reference_dataset`** *(string)*: Path to Ionmob reference dataset file. Default: `"Meier_unimod.parquet"`.
- **`tokenizer`** *(string)*: Path to tokenizer json file. Default: `"tokenizer.json"`.
- <a id="definitions/im2deep"></a>**`im2deep`** *(object)*: Ion mobility feature generator configuration using IM2Deep. Can contain additional properties. Refer to *[#/definitions/feature_generator](#definitions/feature_generator)*.
- **`reference_dataset`** *(string)*: Path to IM2Deep reference dataset file. Default: `"Meier_unimod.parquet"`.
- <a id="definitions/mokapot"></a>**`mokapot`** *(object)*: Mokapot rescoring engine configuration. Additional properties are passed to the Mokapot brew function. Can contain additional properties. Refer to *[#/definitions/rescoring_engine](#definitions/rescoring_engine)*.
- **`train_fdr`** *(number)*: FDR threshold for training Mokapot. Minimum: `0`. Maximum: `1`. Default: `0.01`.
- **`write_weights`** *(boolean)*: Write Mokapot weights to a text file. Default: `false`.
- **`write_txt`** *(boolean)*: Write Mokapot results to a text file. Default: `false`.
- **`write_flashlfq`** *(boolean)*: Write Mokapot results to a FlashLFQ-compatible file. Default: `false`.
Expand Down
59 changes: 59 additions & 0 deletions docs/source/userguide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,65 @@ expression pattern that extracts the decoy status from the protein name:
decoy_pattern = "DECOY_"


Multi-rank rescoring
====================

Some search engines, such as MaxQuant, report multiple candidate PSMs for the same spectrum.
MS²Rescore can rescore multiple candidate PSMs per spectrum. This allows for lower-ranking
candidate PSMs to become the top-ranked PSM after rescoring. This behavior can be controlled with
the ``max_psm_rank_input`` option.

To ensure a correct FDR control after rescoring, MS²Rescore filters out lower-ranking PSMs before
final FDR calculation and writing the output files. To allow for lower-ranking PSMs to be included
in the final output - for instance, to consider chimeric spectra - the ``max_psm_rank_output``
option can be used.

For example, to rescore the top 5 PSMs per spectrum and output the best PSM after rescoring,
the following configuration can be used:

.. tab:: JSON

.. code-block:: json

"max_psm_rank_input": 5
"max_psm_rank_output": 1

.. tab:: TOML

.. code-block:: toml

max_psm_rank_input = 5
max_psm_rank_output = 1


Configuring rescoring engines
=============================

MS²Rescore supports multiple rescoring engines, such as Mokapot and Percolator. The rescoring
engine can be selected and configured with the ``rescoring_engine`` option. For example, to use
Mokapot with a custom train_fdr of 0.1%, the following configuration can be used:

.. tab:: JSON

.. code-block:: json

"rescoring_engine": {
"mokapot": {
"train_fdr": 0.001
}

.. tab:: TOML

.. code-block:: toml

[ms2rescore.rescoring_engine.mokapot]
train_fdr = 0.001


All options for the rescoring engines can be found in the :ref:`ms2rescore.rescoring_engines`
section.



All configuration options
=========================
Expand Down
26 changes: 17 additions & 9 deletions docs/source/userguide/input-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,31 @@ Input files
PSM file(s)
===========

The peptide-spectrum match (PSM) file is generally the output from a proteomics search engine.
This file serves as the main input to MS²Rescore. One or multiple PSM files can be provided at
once. Note that merging PSMs from different MS runs could have an impact on the correctness of
the FDR control.
The **peptide-spectrum match (PSM) file** is generally the output from a proteomics search engine.
This file serves as the main input to MS²Rescore.

Various PSM file types are supported. The type can be specified with the ``psm_file_type`` option.
Check the list of :py:mod:`psm_utils` tags in the
:external+psm_utils:ref:`supported file formats <supported file formats>` section. Depending on the
file extension, the file type can also be inferred from the file name. In that case,
``psm_file_type`` option can be set to ``infer``.
The PSM file should contain **all putative identifications** made by the search engine, including
both target and decoy PSMs. Ensure that the search engine was configured to include decoy entries
in the search database and was operated with **target-decoy competition** enabled (i.e.,
considering both target and decoy sequences simultaneously during the search).

.. attention::
As a general rule, MS²Rescore always needs access to **all target and decoy PSMs, without any
FDR-filtering**. For some search engines, this means that the FDR-filter should be disabled or
set to 100%.


One or multiple PSM files can be provided at once. Note that merging PSMs from different MS runs
could have an impact on the correctness of the FDR control. Combining multiple PSM files should
generally only be done for LC-fractionated mass spectrometry runs.

Various PSM file types are supported. The type can be specified with the ``psm_file_type`` option.
Check the list of :py:mod:`psm_utils` tags in the
:external+psm_utils:ref:`supported file formats <supported file formats>` section. Depending on the
file extension, the file type can also be inferred from the file name. In that case,
``psm_file_type`` option can be set to ``infer``.


Spectrum file(s)
================

Expand Down
4 changes: 2 additions & 2 deletions docs/source/userguide/output-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Rescoring engine files:
| ``<prefix>.<mokapot/percolator>.weights.txt`` | Feature weights, showing feature usage in the rescoring run |
+-------------------------------------------------------------+-------------------------------------------------------------+

If no rescoring engine is selected (or if Percolator was selected), the following files will also
be written:
If no rescoring engine is selected, if Percolator was selected, or in DEBUG mode, the following
files will also be written:

+-------------------------------------------------------------+-----------------------------------------------------------+
| File | Description |
Expand Down
61 changes: 61 additions & 0 deletions docs/source/userguide/tims2Rescore.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. _timsrescore:

TIMS²Rescore User Guide
=======================

Introduction
------------

The `TIMS²Rescore` tool is a DDA-PASEF adapted version of `ms2rescore` that allows users to perform rescoring of peptide-spectrum matches (PSMs) acquired on Bruker instruments. This guide provides an overview of how to use `timsrescore` in `ms2rescore` effectively.

Installation
------------

Before using `timsrescore`, ensure that you have `ms2rescore` installed on your system. You can install `ms2rescore` using the following command:

.. code-block:: bash

pip install ms2rescore

Usage
-----

To use `timsrescore`, follow these steps:

1. Prepare your input files:
- Ensure that you have the necessary input files, including the PSM file spectrum files
- Make sure that the PSM file format from a supported search engine or a standard format like .mzid(:external+psm_utils:ref:`supported file formats <supported file formats>`).
- Spectrum files can directly be given as .d or minitdf files from Bruker instruments or first converted to .mzML format.

2. Run `timsrescore`:
- Open a terminal or command prompt.
- Navigate to the directory where your input files are located.
- Execute the following command:

.. code-block:: bash

timsrescore -p <path_to_psm_file> -s <path_to_spectrum_file> -o <path_to_output_file>

Replace `<path_to_psm_file>`, `<path_to_tims_file>`, and `<path_to_output_file>` with the actual paths to your input and output files.
_NOTE_ By default timsTOF specific models will be used for predictions. Optionally you can further configure settings through a configuration file. For more information on configuring `timsrescore`, refer to the :doc:`configuration` tab in the user guide.

3. Review the results:
- Once the `timsrescore` process completes, you will find the rescoring results in the specified output file or if not specified in the same directory as the input files
- If you want a detailed overview of the performance, you can either give the set `write_report` to `True` in the configuration file, use the `--write_report` option in the command line or run the following command:

.. code-block:: bash

ms2rescore-report <output_prefix>

Replace `<output_prefix>` with the actual output prefix of the result files to the output file.

Additional Options
------------------

`ms2rescore` provides additional options to customize the `timsrescore` process. You can explore these options by running the following command:

.. code-block:: bash

timsrescore --help


2 changes: 1 addition & 1 deletion ms2rescore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""MS²Rescore: Sensitive PSM rescoring with predicted MS² peak intensities and RTs."""

__version__ = "3.0.3"
__version__ = "3.1.0-dev9"

from warnings import filterwarnings

Expand Down
Loading
Loading