Skip to content

Natural-abundance correction of a labelled isotopologue distribution

ms_isotopologue_correction

Corrects a labelled metabolite's measured isotopologue fractions and gives its fractional contribution.

Runs
On the server
Level
Its source was not read. Its calculation agreed with a separately written implementation on recorded cases, edges and refusals included, and with the outside program the note names, or the note says none exists. Both implementations were written from the same documents, so a misreading they share would not be caught. Cross-checked here; source not read
Ask your assistant

What it is

Returns a labelled metabolite's corrected isotopologue fractions and fractional contribution from its measured ones. Use when a 13C, 15N or 2H tracing experiment's mass isotopologues need natural abundance and tracer impurity removed. Not for one tracer with another (dual label), flux estimation or isobaric reporters; for the uncorrected pattern of a formula, use `ms_isotope_pattern`. Refuses a metabolite without the tracer element, too few isotopologues, negative or all-zero intensities, and iron or selenium under the nominal limit.

Field: Analytical chemistry.

What it does

You give

  • metaboliteFormula (required): The metabolite part of the measured ion as a neutral formula (its tracer-element count is n), derivative excluded. Leading and trailing white space is removed before the pattern is checked.
  • tracer (required): The tracer isotope.
  • tracerPurity (required): Fraction of the tracer's heavy isotope at each labelled position. Must be above 0 and at most 1.
  • isotopologueResolution (required): Which resolution limit the measurement is at.
  • measuredIsotopologues (required): The measured isotopologues in order from M+0, contiguous, at least n + 1 of them.
  • composition (required): Stated compositions; an empty list to use the IUPAC 2009 table for every element.

and 1 more, listed below

No request is recorded for this tool.

Limits

  • Research arithmetic: each number follows from the formula, sequence or values you give, by the method and any constants named on the tool, and describes those inputs rather than the sample or instrument they came from.
  • It is not an identification, a validated quantification or a check of an instrument, and it is not for diagnosis or treatment decisions.
  • Single tracer (13C, 15N or 2H); natural composition assumed for the unlabelled material, IUPAC 2009 as NIST serves it or stated; the ion's own formula, fragment and derivative included; two resolution limits only, nominal and tracer-resolved, and partly resolved data fit neither; under the nominal limit, elements with an isotope lighter than their most abundant one (iron, selenium) are refused; non-negative least squares; no flux estimation, no isobaric reporter correction, and no hydrogen-exchange or isotope-effect correction for 2H.
  • Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.

It will not answer when

  • a measured intensity below zero.
  • a formula has a charge written in it.
  • a symbol that is no element, an empty formula, a zero count, a parse error.
  • an element of the metabolite or the derivative has no representative composition, in either resolution mode (MS-F15: under tracer-resolved, too, though only the tracer enters the matrix).
Every input, with its units7 inputs
  • metaboliteFormula (required): The metabolite part of the measured ion as a neutral formula (its tracer-element count is n), derivative excluded. Leading and trailing white space is removed before the pattern is checked.
  • tracer (required): The tracer isotope.
  • tracerPurity (required): Fraction of the tracer's heavy isotope at each labelled position. Must be above 0 and at most 1.
  • isotopologueResolution (required): Which resolution limit the measurement is at.
  • measuredIsotopologues (required): The measured isotopologues in order from M+0, contiguous, at least n + 1 of them.
  • composition (required): Stated compositions; an empty list to use the IUPAC 2009 table for every element.
  • derivativeFormula: The derivative part of the measured ion (TBDMS, TMS and the like) as a neutral formula; natural abundance only. Leading and trailing white space is removed before the pattern is checked. Optional.
Every refusal, with its code14 refusals
CodeWhen
NEGATIVE_INTENSITYa measured intensity below zero.
CHARGED_FORMULAa formula has a charge written in it.
FORMULA_UNREADABLEa symbol that is no element, an empty formula, a zero count, a parse error.
ELEMENT_NOT_IN_TABLEan element of the metabolite or the derivative has no representative composition, in either resolution mode (MS-F15: under tracer-resolved, too, though only the tracer enters the matrix).
MONOISOTOPE_NOT_FIXEDunder the nominal limit, an element whose most abundant isotope can change within CIAAW 2024 (lead), not stated by the caller.
COMPOSITION_DOES_NOT_SUM_TO_ONEa stated composition whose fractions do not sum to one.
COMPOSITION_FOR_ABSENT_ELEMENTa stated composition for an element the ion lacks.
NUCLIDE_NOT_IN_TABLEa stated isotope AME2020 does not tabulate.
ISOTOPE_BELOW_MONOISOTOPEunder the nominal limit, an element in the ion with a stable isotope lighter than its most abundant one, such as iron or selenium, so lines fall below the unlabelled ion.
TRACER_ELEMENT_ABSENTthe metabolite part has no atom of the tracer element.
TOO_MANY_TRACER_ATOMSa metabolite part with more than fifty-five atoms of the tracer element (the largest reply then stays well under the reply cap).
TOO_FEW_ISOTOPOLOGUESfewer measured isotopologues than one more than the tracer-element atoms of the metabolite part.
ALL_ZEROevery measured intensity is zero.
NON_CONTIGUOUS_MASS_SHIFTSthe measured mass shifts are not contiguous from the unlabelled ion in order.

The calculation

The method's equations, constants and worked example.

Natural-abundance and tracer-purity correction of an isotopologue distributionisotopologue-correction@2.0.2

Equation 1

column j of C = [purity t^s + (1 - purity)]^j x N_T(t)^(n - j + d) x prod over the other elements of N_e(t)^(count_e) under nominal only (tracer-resolved leaves the other elements out), truncated at t^(m - 1)

C_ij is the coefficient of t^i

SymbolMeaning
C_ijpredicted fraction at M+i of an ion with j labelled tracer atoms
ntracer-element atoms in the metabolite part
puritytracerPurity, the heavy fraction at each labelled position
y_imeasured intensity at M+i over the sum of the measured intensities
x_jnon-negative least-squares weight of j labelled atoms
tthe generating variable of a distribution by mass-number shift
sthe tracer's heavy isotope's shift from its monoisotope (one for 13C, 15N and 2H)
dtracer-element atoms in the derivative (derivativeTracerAtoms)
mmeasured isotopologues, M+0 to M+(m - 1)
N_T(t), N_e(t)one atom's distribution: the sum of each isotope's fraction times t to its shift from the element's monoisotope
count_eatoms of element e in the ion, metabolite part and derivative

Source 1.

Equation 2

a labelled position is heavy with probability purity and light otherwise

shifts count from each element's monoisotope

columns are not renormalised

SymbolMeaning
C_ijpredicted fraction at M+i of an ion with j labelled tracer atoms
ntracer-element atoms in the metabolite part
puritytracerPurity, the heavy fraction at each labelled position
y_imeasured intensity at M+i over the sum of the measured intensities
x_jnon-negative least-squares weight of j labelled atoms

Source not recorded.

Equation 3

x = argmin |C x - y| subject to x >= 0

corrected fraction_j = x_j / sum(x)

SymbolMeaning
C_ijpredicted fraction at M+i of an ion with j labelled tracer atoms
ntracer-element atoms in the metabolite part
puritytracerPurity, the heavy fraction at each labelled position
y_imeasured intensity at M+i over the sum of the measured intensities
x_jnon-negative least-squares weight of j labelled atoms

Source 3.

Equation 4

FC = sum over i of i x fraction_i / n

SymbolMeaning
C_ijpredicted fraction at M+i of an ion with j labelled tracer atoms
ntracer-element atoms in the metabolite part
puritytracerPurity, the heavy fraction at each labelled position
y_imeasured intensity at M+i over the sum of the measured intensities
x_jnon-negative least-squares weight of j labelled atoms
FCfractional contribution

Source 5.

Equation 5

residualNorm = sqrt(sum over i of (sum over j of C_ij x_j - y_i)^2) on the normalised intensities

x by Lawson and Hanson's active set from the empty passive set, adding the index of the largest gradient above tau, solving the passive set by Gaussian elimination with partial pivoting on the normal equations

an index is held at zero when x_j = 0 and its gradient is below -tau

printed matrix entries are the doubles the engine forms

SymbolMeaning
C_ijpredicted fraction at M+i of an ion with j labelled tracer atoms
ntracer-element atoms in the metabolite part
puritytracerPurity, the heavy fraction at each labelled position
y_imeasured intensity at M+i over the sum of the measured intensities
x_jnon-negative least-squares weight of j labelled atoms

Source not recorded.

ConstantValueFrom
IUPAC 2009 representative isotopic compositions (as NIST serves them), or the caller's stated composition N_ea table of values, part of the methodSource 6
the natural range stated in the reply CIAAW 2024 rangesa table of values, part of the methodSource 7
each element's most abundant isotope: the argmax of its IUPAC 2009 representative composition, kept only where it keeps its lead across the CIAAW 2024 ranges (lead fails) monoisotopea table of values, part of the methodSource 6

Conventions

  • CORRECTION_NNLS = non-negative least squares: Fixed by the method; not an argument. The measured intensities are normalised to a sum of one, the corrected weights found by non-negative least squares and normalised to a sum of one; negative values are never flattened and renormalised as Moseley does.

A definition, not a model: the equation states what the quantity means. A different convention gives a different number.

Worked example

Worked example: one case of isotopologue-correction@2.0.2, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

Inputs

  • metaboliteFormula = C2
  • tracer = 13C
  • tracerPurity = 1
  • isotopologueResolution = tracer-resolved
  • measuredIsotopologues[0].massShift = 0
  • measuredIsotopologues[0].intensity = 0.489357245
  • measuredIsotopologues[1].massShift = 1
  • measuredIsotopologues[1].intensity = 0.01058551
  • measuredIsotopologues[2].massShift = 2
  • measuredIsotopologues[2].intensity = 0.500057245

Steps

  1. c00 = 0.97871449, from metaboliteFormula, tracer; by equation 1.
  2. c10 = 0.02117102, from metaboliteFormula, tracer; by equation 1.
  3. c11 = 0.9893, from metaboliteFormula, tracer, tracerPurity; by equation 1.
  4. c20 = 0.00011449, from metaboliteFormula, tracer; by equation 1.
  5. x0 = 0.5, from measuredIsotopologues[0].intensity, c00; by equation 3; gives correctedDistribution[0].fraction.
  6. x1 = 0, from measuredIsotopologues[1].intensity, x0, c10, c11; by equation 3; gives correctedDistribution[1].fraction.
  7. x2 = 0.5, from measuredIsotopologues[2].intensity, x0, c20; by equation 3; gives correctedDistribution[2].fraction.
  8. fc = 0.5, from x0, x1, x2; by equation 4; gives fractionalContribution.

The working, as the case writes it:

columns (q^2, 2pq, p^2), (0, q, p), (0, 0, 1), p = 0.0107, q = 0.9893

x0 = 0.489357245/0.97871449 = 0.5

x1 = (0.01058551 - 0.5 x 0.02117102)/0.9893 = 0

x2 = 0.500057245 - 0.5 x 0.00011449 = 0.5

FC = (0 + 2 x 0.5)/2 = 0.5

residual zero (worked by hand by the raising builder, 14 November 2026)

Answer

correctedDistribution[0].fraction = 0.5

correctedDistribution[1].fraction = 0

correctedDistribution[2].fraction = 0.5

fractionalContribution = 0.5

Where these values came from: our own exact-arithmetic script and a hand-worked case; the second implementation's run(arguments).

At build the tool returned this answer within the tolerance the file states: Fractions, fractional contribution, residual norm, matrix entries and ranges within absolute 1e-12 (the engine works in doubles); counts, flags, texts, statuses and codes exact.

Sources

  1. Moseley HNB. BMC Bioinformatics 2010;11:139, full text as Europe PMC serves it (JATS XML of PMC2848236)

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: section Results, Derivation of the analytical solution: the text around Equations 1 to 7, and Table 1 with its footnotes.

    Read in full, 24 November 2026
  2. SciPy 1.18.1, stored reference values (nnls: argmin_x ||Ax − b||_2^2 for x ≥ 0, after Lawson and Hanson's algorithm, its ref. [1])

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: section nnls, docstring and references.

    Read in full, 24 November 2026
  3. Coursey JS, Schwab DJ, Tsai JJ, Dragoset RA. Atomic Weights and Isotopic Compositions (NIST), whose compositions are Berglund M, Wieser ME, Isotopic compositions of the elements 2009, Pure Appl Chem 2011;83:397-410, as NIST states

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: table Isotopic Composition column, every element.

    Read in full, 10 November 2026
  4. CIAAW (IUPAC Commission on Isotopic Abundances and Atomic Weights), Isotopic Compositions of the Elements

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: table Representative isotopic composition, every element.

    Read in full, 10 November 2026

Cited, not read

  1. Moseley HNB. Correcting for the effects of natural abundance in stable isotope resolved metabolomics experiments involving ultra-high resolution mass spectrometry. BMC Bioinformatics 2010;11:139

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: equation 5, table 1.

    its display equations are images: the full text was read and hashed on 24 November 2026 (Europe PMC's XML), but the equation images and Additional file 1 (the equations in Word) answered HTML at Europe PMC, BMC served a client challenge and PMC a reCAPTCHA page; Equations 1, 4 and 7 are therefore not read

    Not read; source 2 read in its place
  2. Lawson CL, Hanson RJ. Solving Least Squares Problems. Englewood Cliffs: Prentice-Hall; 1974. Chapter 23, the NNLS algorithm

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: section chapter 23.

    a book not held (no open copy found, 24 November 2026); the algorithm is written from this project's ruling, and SciPy's nnls documentation, read, states the problem it solves and cites the book

    Not read; source 4 read in its place
  3. Buescher JM, Antoniewicz MR, Boros LG, et al. A roadmap for interpreting 13C metabolite labeling patterns from cells. Curr Opin Biotechnol 2015;34:189-201

    Used for: Natural-abundance and tracer-purity correction of an isotopologue distribution. At: equation 1, 3.

    read in an earlier context without a file hash; on 24 November 2026 PMC answered a reCAPTCHA page and Europe PMC's full-text service an error (the author manuscript is not in its open-access set)

    Not read

How it is checked

Level

Cross-checked here; source not read.

Checked against

Our own exact-arithmetic script and a hand-worked case.

Cases

No case set is linked to this version.

Not checked

AccuCor 0.3.1 was not run; IsoCor 2.2.4 was, without stated compositions or derivatives, and IsoCor returns NaN on one near-zero case; Berglund and Wieser 2011 Table 1 is not read; Su 2017 eq. 6, Buescher 2015 eqs 1 and 3 and Millard 2012 were read by this session without a file hash, and Moseley 2010 by Drybench; Lawson and Hanson 1974 is not read; no tool-level input is known to reach the iteration limit, which answers the kit's NO_CONVERGENCE asking for the call to be reported (Drybench's one-cap contract); one session wrote the script and the engine.

What was not checked, in fullfrom the method records
  • AccuCor 0.3.1 was not run; IsoCor 2.2.4 was, without stated compositions or derivatives, and IsoCor returns NaN on one near-zero case; Berglund and Wieser 2011 Table 1 is not read; Su 2017 eq.
  • 6, Buescher 2015 eqs 1 and 3 and Millard 2012 were read by this session without a file hash, and Moseley 2010 by Drybench; Lawson and Hanson 1974 is not read; no tool-level input is known to reach the iteration limit, which answers the kit's NO_CONVERGENCE asking for the call to be reported (Drybench's one-cap contract); one session wrote the script and the engine.
  • A formula starting with a digit (13C6H15Si as the derivative) is refused FORMULA_UNREADABLE since 2.0.2, through formula-mass 1.3.0, with no case in this method's fixtures; the refusal is covered by stored reference values and unit tests only.
What this project's records still lack1 thing
  • The source's location for each equation for isotopologue-correction@2.0.2.
Changes to its methods1 change