MS²PIP: MS² Peak Intensity Prediction
Project description
MS²PIP: MS² Peak Intensity Prediction - Fast and accurate peptide fragmention spectrum prediction for multiple fragmentation methods, instruments and labeling techniques.
Introduction
MS²PIP is a tool to predict MS² peak intensities from peptide sequences. The result is a predicted peptide fragmentation spectrum that accurately resembles its observed equivalent. These predictions can be used to validate peptide identifications, generate proteome-wide spectral libraries, or to select discriminative transitions for targeted proteomics. MS²PIP employs the XGBoost machine learning algorithm and is written in Python.
You can install MS²PIP on your machine by following the installation instructions below. For a more user-friendly experience, go to the MS²PIP web server. There, you can easily upload a list of peptide sequences, after which the corresponding predicted MS² spectra can be downloaded in multiple file formats. The web server can also be contacted through the RESTful API.
To generate a predicted spectral library starting from a FASTA file, we developed a pipeline called fasta2speclib. Usage of this pipeline is described on the fasta2speclib wiki page. Fasta2speclib was developed in collaboration with the ProGenTomics group for the MS²PIP for DIA project.
To improve the sensitivity of your peptide identification pipeline with MS²PIP predictions, check out MS²ReScore.
If you use MS²PIP for your research, please cite the following articles:
- Gabriels, R., Martens, L., & Degroeve, S. (2019). Updated MS²PIP web server delivers fast and accurate MS² peak intensity prediction for multiple fragmentation methods, instruments and labeling techniques. Nucleic Acids Research doi:10.1093/nar/gkz299
- Degroeve, S., Maddelein, D., & Martens, L. (2015). MS²PIP prediction server: compute and visualize MS² peak intensity predictions for CID and HCD fragmentation. Nucleic Acids Research, 43(W1), W326–W330. doi:10.1093/nar/gkv542
- Degroeve, S., & Martens, L. (2013). MS²PIP: a tool for MS/MS peak intensity prediction. Bioinformatics (Oxford, England), 29(24), 3199–203. doi:10.1093/bioinformatics/btt544
Please also take note of and mention the MS²PIP-version you used.
Installation
Pip package
With Python 3.6 or higher, run:
pip install ms2pip
We recommend using a venv or conda virtual environment.
Conda package
Install with activated bioconda and conda-forge channels:
conda install -c defaults -c bioconda -c conda-forge ms2pip
Docker container
First check the latest version tag on biocontainers/ms2pip/tags. Then pull and run the container with
docker container run -v <working-directory>:/data -w /data quay.io/biocontainers/ms2pip:<tag> ms2pip <ms2pip-arguments>
where <working-directory>
is the absolute path to the directory with your MS²PIP input files, <tag>
is the container version tag, and <ms2pip-arguments>
are the ms2pip command line options (see Command line interface).
For development
Clone this repository and use pip to install an editable version:
pip install --editable .
Usage
Fast prediction of large amounts of peptide spectra
MS²PIP comes with pre-trained models for a variety of fragmentation methods and modifications. These models can easily be applied by configuring MS²PIP in the config file and providing a list of peptides in the form of a PEPREC file. Optionally, MS²PIP predictions can be compared to spectra in an MGF file.
Command line interface
To predict a large amount of peptide spectra, use ms2pip
:
usage: ms2pip [-h] -c CONFIG_FILE [-s MGF_FILE] [-w FEATURE_VECTOR_OUTPUT]
[-r] [-x] [-m] [-t] [-n NUM_CPU] [--sqldb-uri SQLDB_URI]
<PEPREC file>
positional arguments:
<PEPREC file> list of peptides
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-file CONFIG_FILE
config file
-s MGF_FILE, --spectrum-file MGF_FILE
.mgf MS2 spectrum file (optional)
-w FEATURE_VECTOR_OUTPUT, --vector-file FEATURE_VECTOR_OUTPUT
write feature vectors to FILE.{pkl,h5} (optional)
-r, --retention-time add retention time predictions (requires DeepLC python
package)
-x, --correlations calculate correlations (if MGF is given)
-m, --match-spectra match peptides to spectra based on predicted spectra
(if MGF is given)
-t, --tableau create Tableau Reader file
-n NUM_CPU, --num-cpu NUM_CPU
number of CPUs to use (default: all available)
--sqldb-uri SQLDB_URI
use sql database of observed spectra instead of MGF
files
Input files
Config file
Several MS²PIP options need to be set in this config file.
model=X
where X is one of the currently supported MS²PIP models (see Specialized prediction models).frag_error=X
where is X is the fragmentation spectrum mass tolerance in Da (only relevant if an MGF file is passed).out=X
where X is a comma-separated list of a selection of the currently supported output file formats:csv
,mgf
,msp
,spectronaut
, orbibliospec
(SSL/MS2, also for Skyline). For example:out=csv,msp
.ptm=X,Y,opt,Z
for every peptide modification where:X
is the PTM name and needs to match the names that are used in the PEPREC file). If the--retention_time
option is used, PTM names must match the PSI-MOD/Unimod names embedded in DeepLC (see DeepLC documentation).Y
is the mass shift in Da associated with the PTM.Z
is the one-letter code of the amino acid AA that is modified by the PTM. For N- and C-terminal modifications,Z
should beN-term
orC-term
, respectively.
PEPREC file
To apply the pre-trained models you need to pass only a <PEPREC file>
to
MS²PIP. This file contains the peptide sequences for which you want to predict
peak intensities. The file is space separated and contains at least the
following four columns:
spec_id
: unique id (string) for the peptide/spectrum. This must match the TITLE field in the corresponding MGF file, if given.modifications
: Amino acid modifications for the given peptide. Every modification is listed aslocation|name
, separated by a pipe (|
) between the location, the name, and other modifications.location
is an integer counted starting at1
for the first AA.0
is reserved for N-terminal modifications,-1
for C-terminal modifications.name
has to correspond to a modification listed in the Config file. Unmodified peptides are marked with a hyphen (-
).peptide
: the unmodified amino acid sequence.charge
: precursor charge state as an integer (without+
).
Peptides must be strictly longer than 2 and shorter than 100 amino acids and cannot contain the following amino acid one-letter codes: B, J, O, U, X or Z. Peptides not fulfilling these requirements will be filtered out and will not be reported in the output.
In the conversion_tools folder, we provide a host of Python scripts to convert common search engine output files to a PEPREC file.
To start from a FASTA file, see fasta2speclib.
MGF file (optional)
Optionally, an MGF file with measured spectra can be passed to MS²PIP. In this
case, MS²PIP will calculate correlations between the measured and predicted
peak intensities. Make sure that the PEPREC spec_id
matches the mgf TITLE
field. Spectra present in the MGF file, but missing in the PEPREC file (and
vice versa) will be skipped.
Examples
Suppose the config file contains the following lines
model=HCD
frag_error=0.02
out=csv,mgf,msp
ptm=Carbamidomethyl,57.02146,opt,C
ptm=Acetyl,42.010565,opt,N-term
ptm=Glyloss,-58.005479,opt,C-term
then the PEPREC file could look like this:
spec_id modifications peptide charge
peptide1 - ACDEK 2
peptide2 2|Carbamidomethyl ACDEFGR 3
peptide3 0|Acetyl|2|Carbamidomethyl ACDEFGHIK 2
In this example, peptide3
is N-terminally acetylated and carries a
carbamidomethyl on its second amino acid.
The corresponding (optional) MGF file can contain the following spectrum:
BEGIN IONS
TITLE=peptide1
PEPMASS=283.11849750978325
CHARGE=2+
72.04434967 0.00419513
147.11276245 0.17418982
175.05354309 0.03652963
...
END IONS
Output
The predictions are saved in the output file(s) specified in the
config file. Note that the normalization of intensities depends
on the output file format. In the CSV file output, intensities are
log2-transformed. To "unlog" the intensities, use the following formula:
intensity = (2 ** log2_intensity) - 0.001
.
Predict and plot a single peptide spectrum
With ms2pip-single-prediction
a single peptide spectrum can be predicted with MS²PIP
and plotted with spectrum_utils. For instance,
ms2pip-single-prediction "PGAQANPYSR" "-" 3 --model TMT
results in:
Run ms2pip-single-prediction --help
for more details.
Specialized prediction models
MS²PIP contains multiple specialized prediction models, fit for peptide spectra with different properties. These properties include fragmentation method, instrument, labeling techniques and modifications. As all of these properties can influence fragmentation patterns, it is important to match the MS²PIP model to the properties of your experimental dataset.
Currently the following models are supported in MS²PIP: HCD
, CID
, iTRAQ
,
iTRAQphospho
, TMT
, TTOF5600
, HCDch2
and CIDch2
. The last two "ch2"
models also include predictions for doubly charged fragment ions (b++ and y++),
next to the predictions for singly charged b- and y-ions.
MS² acquisition information and peptide properties of the models' training datasets
Model | Fragmentation method | MS² mass analyzer | Peptide properties |
---|---|---|---|
HCD | HCD | Orbitrap | Tryptic digest |
CID | CID | Linear ion trap | Tryptic digest |
iTRAQ | HCD | Orbitrap | Tryptic digest, iTRAQ-labeled |
iTRAQphospho | HCD | Orbitrap | Tryptic digest, iTRAQ-labeled, enriched for phosphorylation |
TMT | HCD | Orbitrap | Tryptic digest, TMT-labeled |
TTOF5600 | CID | Quadrupole Time-of-Flight | Tryptic digest |
HCDch2 | HCD | Orbitrap | Tryptic digest |
CIDch2 | CID | Linear ion trap | Tryptic digest |
Models, version numbers, and the train and test datasets used to create each model
Model | Current version | Train-test dataset (unique peptides) | Evaluation dataset (unique peptides) | Median Pearson correlation on evaluation dataset |
---|---|---|---|---|
HCD | v20190107 | MassIVE-KB (1 623 712) | PXD008034 (35 269) | 0.903786 |
CID | v20190107 | NIST CID Human (340 356) | NIST CID Yeast (92 609) | 0.904947 |
iTRAQ | v20190107 | NIST iTRAQ (704 041) | PXD001189 (41 502) | 0.905870 |
iTRAQphospho | v20190107 | NIST iTRAQ phospho (183 383) | PXD001189 (9 088) | 0.843898 |
TMT | v20190107 | Peng Lab TMT Spectral Library (1 185 547) | PXD009495 (36 137) | 0.950460 |
TTOF5600 | v20190107 | PXD000954 (215 713) | PXD001587 (15 111) | 0.746823 |
HCDch2 | v20190107 | MassIVE-KB (1 623 712) | PXD008034 (35 269) | 0.903786 (+) and 0.644162 (++) |
CIDch2 | v20190107 | NIST CID Human (340 356) | NIST CID Yeast (92 609) | 0.904947 (+) and 0.813342 (++) |
To train custom MS²PIP models, please refer to Training new MS²PIP models on our Wiki pages.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file ms2pip-3.7.0.tar.gz
.
File metadata
- Download URL: ms2pip-3.7.0.tar.gz
- Upload date:
- Size: 12.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f38219432da6b0799bf1fc099f9c44877d5b41ffb33633081c6e1e3d92b1a6a |
|
MD5 | ce8a1f1ebbad0c958b8c078c9542f0a5 |
|
BLAKE2b-256 | d18dab3e33d5f78103296092085eed19fa97ce69cee1d9cdcabd588dde62436d |
File details
Details for the file ms2pip-3.7.0-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2562641523ea23dcc781da2a2e181d6d6a4d3f9f958ea2164ff18bf300eec60 |
|
MD5 | 919ccec3e0ed3e76e705e17d4f635f0e |
|
BLAKE2b-256 | 08af78af2faa8fbd3b1a15a7c6e5e4bcc91eae4ea59d6f11b111af690a1469f7 |
File details
Details for the file ms2pip-3.7.0-cp39-cp39-manylinux1_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp39-cp39-manylinux1_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8edce35e044b5e3b2359e46856a1cabe859da1169409fbe146cbe73210857fd |
|
MD5 | b8de08dc2c9c51087bd5b527de6c1c68 |
|
BLAKE2b-256 | cf8be50039677177dbdb2ae9d7c3fef3234e0339465e3d91d73a9b0a5da5531e |
File details
Details for the file ms2pip-3.7.0-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7c415423c1d8aabbbe5c1eb73484fd4d4497b9ec4e6bb2939704552ca848bb6 |
|
MD5 | d5161ea2ba70e8af62a0f523f1b58227 |
|
BLAKE2b-256 | cc31c46b6344e2b876a226e278a2f9ad17186d08299e1ef03cf1a95d8ab32273 |
File details
Details for the file ms2pip-3.7.0-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8edb9824e6e0390e3041358723f37bb65ba9875d8048d28dd7da4ddd8873017c |
|
MD5 | 9eee82ba5cf2cbe8e954a9f6963b348c |
|
BLAKE2b-256 | 253d632dd6fe7e5810e75295ea6dcf2987b01373e22ea992397007f9c79e0967 |
File details
Details for the file ms2pip-3.7.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 35.3 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb73cb7d23440381dc276646647eaaa56cd88bf63cc2abd3807b4ff8559de1df |
|
MD5 | 2b6edf07b47052aa904539b870fca0f1 |
|
BLAKE2b-256 | 2f834a73cb928f0e36004c220fe3b594e8f237ddf9b00ad05ebdd80614148bd4 |
File details
Details for the file ms2pip-3.7.0-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef671f5248dddeec910ceaf722e7e6e5df39fa0a73951a34be9741a69eda524 |
|
MD5 | 7c6a627ff9273e2421af55830aac2b0a |
|
BLAKE2b-256 | 1fdb933e389bcee5c8540bcd05822c37fbc1068b769f87407a3c30547d2010e4 |
File details
Details for the file ms2pip-3.7.0-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81fd1ada83a4175412e43f2afce061aa0bcc6889f5b81d3ef4cb800c5f0f565 |
|
MD5 | a258b0a50dea3cd9210d57f583c01b91 |
|
BLAKE2b-256 | 47714a5b4ad435c20074af73f6ff47c9f7719d53d3c4fea18ef6907a956d2817 |
File details
Details for the file ms2pip-3.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 35.3 MB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38b8d0d6208938430370cf59ea807a93c80d16fa8688be00714021b094488b18 |
|
MD5 | 7fbde5bfaac41085e6a0b0c52e698765 |
|
BLAKE2b-256 | 0993a11c08c798d0ab52d1a8d3359506bca7a424b0413520cf24c7928a520bdb |
File details
Details for the file ms2pip-3.7.0-cp36-cp36m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 656f32ab7651ff9e308074eda03f315cd312debeb89eaa35fa3863ab0bfdd714 |
|
MD5 | 302a7fab879b381aa79c1dd5d67a33d2 |
|
BLAKE2b-256 | 7a5ae025db3fb444c3a780c988bc855e96cf34a24dd7f0e80f81e47018313142 |
File details
Details for the file ms2pip-3.7.0-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 34.6 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 332bd4b1dcbb00e91dffc390d052846b961e3e3f7bd6abefe03460b8f46673a6 |
|
MD5 | 37515ad805e562a7c1c958d67ec564ee |
|
BLAKE2b-256 | 088273502397eb0a8f7d599fe45a128f2e0c60a69229d5471141bde19c81cdf8 |
File details
Details for the file ms2pip-3.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ms2pip-3.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 35.3 MB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64a5b7d82002760bd32c28700a426fcad731389d06a87ebec32396ff8e7af3f2 |
|
MD5 | eb282f0707994989418880bd9c32424c |
|
BLAKE2b-256 | 98770c9e90bd4cd96eaf6d229ad7df5406d49b92578dae5a04906f88fe683d8b |