v4.0.0
Added
- New rescoring engine: ristretto, a lean, dependency-light (numpy/scikit-learn/pandas only) reimplementation of the Percolator/Käll semi-supervised algorithm, purpose-built for MS²Rescore.
- New
rescoringconfiguration option:train_fdrandmodel("svm", default, or"lda", faster but less powerful). - New top-level
report_fdrconfiguration option: FDR threshold used for console-logged identification counts, the HTML report's stats/charts, and FlashLFQ output filtering. Previously hardcoded at 1% throughout. - Automatic inference of search-engine score direction (higher-is-better vs. lower-is-better) via spectrum-competed target-decoy evaluation, replacing the user-set
lower_score_is_betteroption. Grouped by run, so multi-file input sharing native spectrum/scan IDs across runs doesn't corrupt the inferred direction. - Rescoring result tables (
<prefix>.psms.tsv,.peptidoforms.tsv,.peptides.tsv,.proteins.tsv,.weights.tsv) are now always written as plain TSV. ms2rescore-reportCLI: new--fdroption to regenerate a report at a different FDR threshold without rerunning rescoring.- New MS2 feature generator using Rust-based
ms2rescore_rsfor direct spectrum feature extraction (intensity ratios, matched ion counts/percentages, hyperscore). - New basic features:
theoretical_mass,experimental_mass,mass_error,pep_len. annotate_spectra(): annotates all PSM spectra once before feature generators run, eliminating redundant per-generator spectrum parsing.- Top-level configuration options
fragmentation_model,tolerance_value, andtolerance_modeto control centralized fragment ion annotation (defaults:cidhcd,0.02 Da). - Mumble integration (optional, beta): a new PSM generator for exploring alternative peptide identifications via candidate mass-shift modifications (
pip install ms2rescore[mumble]). - Intermediate file output on feature-generation or rescoring errors, enabling recovery by rerunning with a modified configuration instead of restarting from scratch.
- Feature generators are intelligently skipped when all their features are already present in the input PSM file (e.g., on a recovery run).
- Standalone HTML report regeneration from a PSM TSV file alone -- no config or log file required; before/after comparisons are reconstructed from the PSM list's provenance data.
ParseSpectrumErrorexception for spectrum-parsing failures.
Changed
- MS2 and MS2PIP feature calculation migrated to Rust via
ms2rescore_rs(~5x speed-up). - Spectrum files are parsed and annotated once, up front, and shared across all feature generators.
- DeepLC upgraded to its v4 API: dataset-wide processing with per-run calibration or finetuning. New multitask model leads to much improved performance, even without finetuning.
- IM2Deep upgraded to its v2 API (
im2deep>=2.0.1): dataset-wide processing with per-run CCS calibration using reference peptides. - Basic feature generator uses fixed charge encoding (charges 1-6) instead of a dynamic per-dataset range.
- HTML report generation (in-run and standalone) reconstructs before/after rescoring comparisons from the main PSM list's provenance data, rather than relying on separately persisted result tables.
- Report/identification-overlap comparisons key on
(run, spectrum_id)instead of barespectrum_id, so multiple input files reusing the same native spectrum IDs no longer collide. - Multi-run PSM lists are disambiguated during rescoring/competition via a run identifier, instead of relying on spectrum ID alone.
max_psm_rank_output > 1now applies consistently across the main output, rescoring tables, and report: multiple ranked PSMs per spectrum, with q-values/PEPs computed per-row rather than through full spectrum competition. Intended for surfacing ambiguous candidates (e.g. from Mumble), not a statistically rigorous FDR-controlled count.- Main PSM list output renamed
<prefix>.psms.tsv→<prefix>.tsv; the crash-recovery intermediate file renamed the same way (<prefix>.intermediate.tsv). - Dependencies upgraded:
deeplc>=4.0.0,im2deep>=2.0.1,ms2pip>=4.2.0,ms2rescore_rs>=0.5.0. Addedpyarrow. - numpy 2.0 compatibility.
- Python 3.11 or newer is now required.
Removed
- [BREAKING] Mokapot rescoring engine and dependency removed.
- [BREAKING] Percolator CLI integration removed (the separate engine that shelled out to a locally-installed
percolatorbinary). ristretto is now the only rescoring engine. - [BREAKING] MaxQuant feature generator removed; functionality consolidated into the MS2 feature generator.
- [BREAKING] ionmob feature generator removed; replaced by IM2Deep v2.
- [BREAKING]
rescoring_engineconfiguration option removed (mokapot/Percolator-specific:fasta_file,write_weights,write_txt,protein_kwargs), replaced byrescoring. - [BREAKING] Top-level
fasta_fileconfiguration option and FASTA-based protein inference removed (mokapot-specific). Does not affect Mumble's separatepsm_generator.mumble.fasta_fileoption, which is unrelated and unchanged. - [BREAKING]
lower_score_is_betterconfiguration option removed; score direction is always auto-inferred now, with no configuration-level override. - [BREAKING]
write_rescoring_tablesconfiguration option removed -- rescoring tables are unconditionally written. - [BREAKING] PIN (Percolator) file output removed; the main PSM list TSV already carries all rescoring features.
- [BREAKING] Ability to skip rescoring via configuration removed; rescoring always runs.
- [BREAKING]
ms2_tolerance,spectrum_path, andspectrum_id_patternparameters removed fromMS2PIPFeatureGenerator. Fragment mass tolerance is set globally viatolerance_value/tolerance_mode. - [BREAKING]
spectrum_path,spectrum_id_pattern,mass_mode, andprocessesparameters removed fromMS2FeatureGenerator. Spectra are provided via centralizedannotate_spectra(). - [BREAKING]
ms2rescore.utils(public Python API) renamed and split into two internal modules,ms2rescore._utilsandms2rescore._ristretto_utils-- neither is part of the public API. deeplcretrainerdependency removed (functionality merged into DeepLC v4).tomlidependency removed (only required for Python <3.11).
Fixed
processes=-1(ms2rescore default) passed to DeepLCnum_threads, which requires a positive integer orNone.- Q-value NaN check in
parse_psms.pyfailed whenqvaluearray containedNonevalues. BrokenExecutornot caught during mokapot rescoring, producing unclear crashes on worker failure.- GUI runs never wrote an HTML log file, unlike CLI runs.
- Out-of-memory errors from multiprocessing during spectrum parsing.
Full Changelog: v3.2.1...v4.0.0