Rust core for MS²Rescore and MS²PIP, exposed as a Python package via PyO3.
Provides fast, parallelized implementations of spectrum reading, fragment ion annotation, MS2PIP feature extraction, and MS2 scoring features used during PSM rescoring.
pip install ms2rescore-rs| Function | Description |
|---|---|
get_precursor_info(path) |
Read precursor metadata from mzML, MGF, or Bruker raw files |
get_ms2_spectra(path) |
Read MS2 spectra from mzML, MGF, or Bruker raw files |
annotate_ms2_spectra(spectra, proformas, ...) |
Match observed peaks to theoretical fragment ions |
score_ms2_spectra(spectra, seq_lens, ...) |
Compute per-series matched-ion scoring features |
ms2pip_compute_features(proformas, ...) |
Compute 139 MS2PIP XGBoost feature vectors per cleavage site |
ms2pip_compute_theoretical_mz(proformas, ...) |
Compute theoretical fragment m/z arrays |
ms2pip_extract_targets(spectra, intensities, ...) |
Extract observed intensity targets for model training |
Supported input formats: mzML, mzMLb, MGF, Thermo RAW, Bruker TDF/TIMS.
ProForma 2.0 notation is used throughout for peptide sequences and modifications.
- mzcore (formerly rustyms) — ProForma parsing, theoretical fragment generation, and mass calculations
- mzdata — mzML, mzMLb, MGF, and Thermo RAW file reading
- timsrust — Bruker TDF/TIMS file reading
Requires Rust and maturin.
uv run maturin develop