Use features calculated from comparing experimental spectra with predicted spectra (see MS2PIP) to rescore peptide identifications using Percolator.

:warning: This branch of the repository allows you to reproduce the results shown in the MS²ReScore article. For more information, please refer to the wiki page. An up-to-date version of MS²ReScore can be found in the dev branch.

If you use MS²ReScore for your research, please cite the following article:

C Silva, A.S., Bouwmeester, R., Martens, L., Degroeve, S. (2019). Accurate peptide fragmentation predictions allow data driven approaches to replace and improve upon proteomics search engine scoring functions. Bioinformatics.


  • Python 3

    • numpy
    • pandas
    • scikit-learn
    • scipy
  • Percolator (to run the file generated by this pipeline)


Clone this repository. This includes the submodule MS2PIP. To include this submodule, you must clone this repository using the --recurse-submodules flag:

git clone --recurse-submodules git://

Go into the folder ms2pip_c and run the bash script For more details, please refer to the ms2pip_c repository.


To run the entire pipeline from the beginning, you need a spectrum file in the MGF format and a peptide list in the PEPREC format. The file should have an additional column, Label, where target PSMs have a value of 1 and decoys of -1, and Protein, with the protein identifiers the PSM is associated with (this is optional for the execution of the pipeline, but likely important for posterior analysis).

Run the pipeline as follows:

python <mgf file> <peprec file> <config file>
  • <mgf file> is the spectrum file
  • <peprec file> is the peptide list file
  • <config file> is json with configurations for MS2PIP. A reference file that can be adapted is included in this repository.

An example configuration file is included (config.json). The modifications in the <PEPREC file> should match the modification names in config.json. This file already includes several modifications, but more can be added by following the same structure.


Several intermediate files are created when the entire pipeline is ran. Their names are all built based on the <PEPREC file> name and are stored in that file’s folder. They are the following:

  • <mgf file>_pred_and_emp.csv is one of the outputs of MS2PIP that includes the predicted and empirical intensity for each peak;
  • <mgf file>_all_features.csv includes all the spectral features that were calculated;
  • <mgf file>.pin is a Percolator INput file that includes the calculated features.

Percolator can be ran on this file by typing:

percolator <pin file>

For more details regarding how to run Percolator please refer to its wiki pages.