madic is a Python package for detecting and correcting interference in targeted mass spectrometry data using Pandas data structures.
Multiple reaction monitoring (MRM, also known as selected reaction monitoring / SRM) data acquired during targeted mass spectrometry experiments can suffer from complex interference patterns that hinder accurate quantification. This software identifies and corrects interference, as well increases the confidence of peptide calls according to three qualities of an ideal chromatogram: relative transition ratios similar to synthetic standards, co-elution of all individual target transitions with respective stable isotope labeled (SIL) transitions, and a distinguished peak relative to the background. Additionally, these criteria should be satisfied for all replicate injections of a given sample.
See our biorxiv preprint for an illustration of the challenges of matrix interference when detecting allergenic protein in commercial food products.
See the Jupyter Notebook tutorial for a visual walk-through of interference correction in action.
See Read the Docs for documentation and the Jupyter Notebook tutorial for a visual walk-through of interference correction.
madic depends on a functioning Python 2.7 or 3.5+ installation (I recommend installing Anaconda, which works on Windows, Linux, and macOS) and the following python packages: scipy, numpy, pandas, and matplotlib. For example:
conda create -n madic_env python=3.5 numpy scipy pandas matplotlib
Installing the current release using the pip python package manager:
pip install madic
Installing the development version (requires git):
pip install git+https://github.com/dcroote/madic.git#egg=madic
This tool is capable of processing SRM / MRM data from any instrument vendor so long as the raw data is capable of being loaded into Skyline version >= 4.1 (you can check the program version by going to Help --> About).
It is strongly preferred that injections contain stable isotope (also known as "heavy") labeled versions of all measured peptides. In the absence of these heavy peptides madic will fail to evaluate transition retention time variability and overall levels of confidence in the results may be somewhat compromised.
- You will need to download the following Skyline report file to export data from Skyline with the correct formatting:
- Load the report file into Skyline using the following steps:
- File --> Export --> Report --> Edit list --> Import
- Two reports need to be exported:
- Sample data - this report should originate from a Skyline document that contains samples to be analyzed
- Reference data - this report should originate from a Skyline document that contains only standards or QC samples that provide reference transition ratios.
MADIC can be used as a standalone python executable or be imported into an interactive jupyter notebook for visualization (see Tutorial section below).
Command line usage:
madic.py [options] csv ref_csv delimiter delimiter_pos
delimiter
and delimiter_pos
are necessary to identify samples from within replicate injection names. For example, _
(an underscore) for the delimiter
and 1
for the delimiter_pos
would correctly identify the two samples (sampleA and sampleB) from injections with the following names:
- Study1_sampleA_injection1
- Study1_sampleA_injection2
- Study1_sampleB_injection1
- Study1_sampleB_injection2
(Remember Python uses zero-based indexing, so after splitting each replicate name into an array of three elements using the underscore, the second element is referred to as delimiter_pos
one.)
Uses pytest
. To test madic, run python setup.py test
in the source directory.
Please submit issues to the issue tracker.
Pull requests welcome!