Skip to content
/ madic Public

MAtrix-Dependent Interference Correction for targeted mass spectrometry data

License

Notifications You must be signed in to change notification settings

dcroote/madic

Repository files navigation

madic: MAtrix-Dependent Interference Correction

madic is a Python package for detecting and correcting interference in targeted mass spectrometry data using Pandas data structures.

travis build status appveyor build stats coverage

Purpose

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.

static/overview.png

Documentation and Tutorial

See Read the Docs for documentation and the Jupyter Notebook tutorial for a visual walk-through of interference correction.

Installation

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

Usage

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.

Data Preparation

  1. You will need to download the following Skyline report file to export data from Skyline with the correct formatting:
  2. Load the report file into Skyline using the following steps:
    • File --> Export --> Report --> Edit list --> Import
  3. Two reports need to be exported:
    1. Sample data - this report should originate from a Skyline document that contains samples to be analyzed
    2. Reference data - this report should originate from a Skyline document that contains only standards or QC samples that provide reference transition ratios.

Program execution

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.)

Testing

Uses pytest. To test madic, run python setup.py test in the source directory.

Development

Please submit issues to the issue tracker.

Pull requests welcome!

License

BSD 3-Clause License

About

MAtrix-Dependent Interference Correction for targeted mass spectrometry data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages