Christian C. Gruber1,2*, Wolfgang Kroutil3,4
- Innophore GmbH, Graz, Austria
- Institute of Molecular Bioscience, University of Graz, Austria
- Institute of Chemistry, University of Graz, Austria
- Field of Excellence BioHealth, BioTechMed Graz, NAWI Graz, University of Graz, Austria
*Corresponding author: christian.gruber@innophore.com
Isotope labeling is a fundamental technique in chemistry and biochemistry for investigating molecular structures, reaction mechanisms, and metabolic pathways. The accurate determination of isotope incorporation from mass spectrometry data requires deconvolution of overlapping isotope patterns—a non-trivial task when multiple labeled species are present. IsoPat provides a Python implementation of a least-squares deconvolution algorithm that determines the relative amounts of each isotope-labeled species from low-resolution mass spectrometry data. The package features minimal dependencies (NumPy only), a clean documented API, command-line interface for batch processing, and comprehensive tests for the core algorithm.
The deconvolution, step by step, on 3-octanone (C₈H₁₆O, M = 128). (a) The unlabeled compound spreads over three m/z channels through its natural isotope distribution. (b) Each column of the pattern matrix A places that envelope at the offset belonging to derivative dᵢ. (c) The least-squares fit reproduces the measured pattern. (d) The solution vector x gives the fraction of each species and the labeled compound ratio.
Regenerate this and the other manuscript figures with:
pip install isopat[figures]
python scripts/generate_figures.pypip install isopatfrom isopat import deconvolve
# Unlabeled compound pattern (M, M+1, M+2 from natural isotopes)
unlabeled = [100, 8.88, 0.37]
# Measured pattern after H/D exchange (mixture of d0-d4)
analyte = [10, 20, 40, 25, 5, 0.9, 0.04]
# Deconvolve to get relative amounts of each species
result = deconvolve(unlabeled, analyte, n_labels=4)
print(result)
# IsotopePattern(d0=10.9%, d1=20.8%, d2=41.6%, d3=23.4%, d4=3.3%, l.r.=89.1%, R²=0.9998)
# For ¹⁸O or tritium labeling (mass_shift=2)
result_18O = deconvolve(unlabeled, analyte, n_labels=4, mass_shift=2)# Single pattern deconvolution (H/D exchange, default mass_shift=1)
isopat deconvolve -u "100,8.88,0.37" -a "10,20,40,25,5,0.9,0.04" -n 4
# For ¹⁸O or tritium labeling (mass_shift=2)
isopat deconvolve -u "100,8.88,0.37" -a "10,20,40,25,5,0.9,0.04" -n 4 --mass-shift 2
# Batch processing
isopat batch -u reference.csv -a samples.csv -n 4 -o results.csvIsoPat solves an overdetermined linear system using least-squares optimization:
A·x = b
Where:
- A = Pattern matrix built from the unlabeled compound
- x = Relative amounts of each labeled species [d₀, d₁, ..., dₙ]
- b = Measured abundance pattern
The solution minimizes the error using the pseudoinverse:
x = (AᵀA)⁻¹Aᵀb
- Minimal dependencies: Only requires NumPy
- Multiple isotope schemes: H→D, ¹²C→¹³C, ¹⁶O→¹⁸O, etc.
- Batch processing: Efficiently process time-course data
- Quality metrics: R² values for fit assessment
- Flexible I/O: CSV, TSV, JSON support
Deconvolve a single mass spectrum pattern.
Parameters:
unlabeled: Reference pattern of unlabeled compoundanalyte: Measured pattern of labeled mixturen_labels: Maximum number of isotope labelsmass_shift: Mass difference per label (1 for D/¹³C, 2 for T/¹⁸O)
Returns: IsotopePattern with fractions, labeled_ratio, and R²
Process multiple patterns efficiently.
Calculate the labeled compound ratio: l.r. = Σ(d₁..dₙ) / Σ(d₀..dₙ)
The original IsoPat algorithm has been cited by leading journals including:
If you use IsoPat in your research, please cite:
@article{gruber2007isopat,
title={An algorithm for the deconvolution of mass spectroscopic patterns
in isotope labeling studies},
author={Gruber, Christian C and Oberdorfer, Gustav and Voss, Constance V
and Kremsner, Jennifer M and Kappe, C Oliver and Kroutil, Wolfgang},
journal={The Journal of Organic Chemistry},
volume={72},
number={15},
pages={5778--5783},
year={2007},
doi={10.1021/jo070831o}
}To cite the software itself, use the metadata in CITATION.cff.
Try IsoPat online without installation: HuggingFace Space
We acknowledge the original co-authors of the 2007 algorithm: Gustav Oberdorfer, Constance V. Voss, Jennifer M. Kremsner, and C. Oliver Kappe. The original work was supported by the Austrian Science Fund (FWF Project P18537-B03). The University of Graz and the Field of Excellence BioHealth of the University of Graz are acknowledged for financial support.
MIT License - see LICENSE for details.
