ms2rescore.rescoring

Rescore PSMs with ristretto.

ristretto is a lean, dependency-light (numpy/scikit-learn/pandas only) reimplementation of the Percolator/Käll 2007 semi-supervised rescoring algorithm, purpose-built to serve MS²Rescore. It takes a plain pandas.DataFrame in and returns a RescoreResult of plain DataFrames out.

ms2rescore.rescoring.rescore(psm_list, config, output_file_root)

Rescore PSMs with ristretto and write the new scores, q-values, and PEPs back to psm_list.

Always scores every candidate rank with ristretto’s semi-supervised model (multi_rank_rescoring=True), then runs the actual competition/FDR/PEP step separately via _trim_and_evaluate(), trimming to max_psm_rank_output PSMs per spectrum.

Returns:

The (possibly filtered) PSMList with updated scores, and the competition/FDR result.

Return type:

tuple[PSMList, RescoreResult]

Parameters: