Natural-abundance and tracer-purity correction of an isotopologue distribution, version 2.0.2
isotopologue-correction@2.0.2: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.
What this page can and cannot show
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.
Level: Cross-checked here; source not read; after Moseley 2010 Eqs. 1, 4, 7, Lawson–Hanson 1974, not read; rests on Moseley's text without images, SciPy nnls docs. Reference kind: our own exact-arithmetic script and a hand-worked case.
Sources not read, why, and what was read in each one's place:
- Source: 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, equation 5, table 1; not read: 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. Read in its place: Moseley HNB. BMC Bioinformatics 2010;11:139, full text as Europe PMC serves it (JATS XML of PMC2848236), section Results, Derivation of the analytical solution: the text around Equations 1 to 7, and Table 1 with its footnotes, version of record, full text; the display equations are images (bmcM2, M3, M5, M6) that the XML references and does not carry; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person.
- Source: Lawson CL, Hanson RJ. Solving Least Squares Problems. Englewood Cliffs: Prentice-Hall; 1974. Chapter 23, the NNLS algorithm, section chapter 23; not read: 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. Read in its place: 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]), section nnls, docstring and references, the installed 1.18.1 wheel's source file; software documentation, read, not the source of any number; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person.
- Source: 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, equation 1, 3; not read: 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). Read in its place: Ruling of this project: 11 November 2026, section "ms_isotopologue_correction". Not yet published; its effect is stated on this page. A choice this project made, not a value from the literature.
Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.
Every version of this method · Every method · What the levels mean
Version 2.0.2
Level: Cross-checked here; source not read; after Moseley 2010 Eqs. 1, 4, 7, Lawson–Hanson 1974, not read; rests on Moseley's text without images, SciPy nnls docs. Reference kind: our own exact-arithmetic script and a hand-worked case. isotopologue-correction@2.0.2
Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.
Verification statement: after Moseley 2010 Eqs. 1, 4, 7 and Lawson–Hanson 1974, not read; rests on Moseley's text without its equation images (Europe PMC) and SciPy 1.18.1 nnls documentation, 24 Nov 2026. Matches an exact-rational script and scipy's nnls on the method's own matrix, Moseley 2010 Table 1 at its printed figures, exact round trips under both resolution limits, a second implementation by a separate agent of the same model family (55 cases), and IsoCor 2.2.4 (an independent matrix and an L-BFGS-B fit, on the same IUPAC 2009 compositions) on 54 cases: every nominal matrix entry within relative 1e-9, every tracer-resolved matrix up to IsoCor's common factor, every fraction and fractional contribution within 1e-6, but one near-zero case where IsoCor returns NaN. Moseley's Equations 1, 4 and 7 (images) and Lawson and Hanson 1974 not read. Two resolution limits only, no resolving-power model; single tracer. Research arithmetic.
The corrected isotopologue distribution of a labelled metabolite from its measured one: a correction matrix from the ion's full formula, tracer purity and natural composition at a stated resolution limit, solved by non-negative least squares; with the fractional contribution and the residual.
- How results are reported: Doubles with + − × ÷ only in a fixed order; the matrix from the table's decimal fractions; fractions, fractional contribution and residual norm unrounded; a KKT tolerance of ten times the larger matrix dimension times 2^-52 on the gradient, which also decides whether the constraint holds an index. Every argument's input checks (invalid-input: its number, unit and range, argument by argument) come before any refusal, NEGATIVE_INTENSITY included.
- Uncertainty: No uncertainty of the corrected fractions is given; the residual norm describes the fit only.
- Iterates: active-set, at most 168 iterations
- Computes through this project's own routines: reads the metabolite and derivative formulas; the domain's refusals are added in stored reference values
- Reference, as its record states it: an exact-rational script with exact non-negative least squares, with scipy's nnls run beside it; IsoCor 2.2.4 on 54 cases
- Level confirmed by this project's ruling of 25 November 2026
What this page can and cannot show
What was checked
55 cases in 1 file, linked by this exact version.
Run through the tool at build against our own exact-arithmetic script and a hand-worked case: 44 agree within the tolerance the file states, 11 refuse as the case expects, 0 differ, 0 were not run.
- File 1, 55 cases
- Where the expected values came from: our own exact-arithmetic script and a hand-worked case
- Recorded on: 2026-11-14
- Reference: second implementation (Python 3.13), 2026-11-14; licence BSD-3-Clause
- Tolerance as the file states it: 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
Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.
What was 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. 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.
Definition or model
A closed form: the result follows from the inputs by the equations alone.
Equations
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
| Symbol | Meaning and unit |
|---|---|
| C_ij | predicted fraction at M+i of an ion with j labelled tracer atoms |
| n | tracer-element atoms in the metabolite part |
| purity | tracerPurity, the heavy fraction at each labelled position |
| y_i | measured intensity at M+i over the sum of the measured intensities |
| x_j | non-negative least-squares weight of j labelled atoms |
| t | the generating variable of a distribution by mass-number shift |
| s | the tracer's heavy isotope's shift from its monoisotope (one for 13C, 15N and 2H) |
| d | tracer-element atoms in the derivative (derivativeTracerAtoms) |
| m | measured 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_e | atoms of element e in the ion, metabolite part and derivative |
Source: 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, equation 5, table 1; not read: 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. Read in its place: Moseley HNB. BMC Bioinformatics 2010;11:139, full text as Europe PMC serves it (JATS XML of PMC2848236), section Results, Derivation of the analytical solution: the text around Equations 1 to 7, and Table 1 with its footnotes, version of record, full text; the display equations are images (bmcM2, M3, M5, M6) that the XML references and does not carry; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person. Free to read (CC BY 2.0 (BMC open access, as the PMC record states)), checked 2026-11-11. No erratum found (searched web search: the title with erratum or correction), 2026-11-11.
Equation 2
a labelled position is heavy with probability purity and light otherwise
shifts count from each element's monoisotope
columns are not renormalised
| Symbol | Meaning and unit |
|---|---|
| C_ij | predicted fraction at M+i of an ion with j labelled tracer atoms |
| n | tracer-element atoms in the metabolite part |
| purity | tracerPurity, the heavy fraction at each labelled position |
| y_i | measured intensity at M+i over the sum of the measured intensities |
| x_j | non-negative least-squares weight of j labelled atoms |
Ruling of this project: 11 November 2026, section "Addendum, 11 November 2026: how the correction matrix is built (answers to the builder)". Not yet published; its effect is stated on this page. A choice this project made, not a value from the literature.
Equation 3
x = argmin |C x - y| subject to x >= 0
corrected fraction_j = x_j / sum(x)
| Symbol | Meaning and unit |
|---|---|
| C_ij | predicted fraction at M+i of an ion with j labelled tracer atoms |
| n | tracer-element atoms in the metabolite part |
| purity | tracerPurity, the heavy fraction at each labelled position |
| y_i | measured intensity at M+i over the sum of the measured intensities |
| x_j | non-negative least-squares weight of j labelled atoms |
Source: Lawson CL, Hanson RJ. Solving Least Squares Problems. Englewood Cliffs: Prentice-Hall; 1974. Chapter 23, the NNLS algorithm, section chapter 23; not read: 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. Read in its place: 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]), section nnls, docstring and references, the installed 1.18.1 wheel's source file; software documentation, read, not the source of any number; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person. To buy, checked 2026-11-11. No erratum found (searched none: a monograph), 2026-11-11.
Equation 4
FC = sum over i of i x fraction_i / n
| Symbol | Meaning and unit |
|---|---|
| C_ij | predicted fraction at M+i of an ion with j labelled tracer atoms |
| n | tracer-element atoms in the metabolite part |
| purity | tracerPurity, the heavy fraction at each labelled position |
| y_i | measured intensity at M+i over the sum of the measured intensities |
| x_j | non-negative least-squares weight of j labelled atoms |
| FC | fractional contribution |
Source: 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, equation 1, 3; not read: 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). Read in its place: Ruling of this project: 11 November 2026, section "ms_isotopologue_correction". Not yet published; its effect is stated on this page. A choice this project made, not a value from the literature. Free to read (NIH author manuscript on PMC (public access; reuse terms not read)), checked 2026-11-11. No erratum found (searched web search: the title with erratum or correction), 2026-11-11.
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
| Symbol | Meaning and unit |
|---|---|
| C_ij | predicted fraction at M+i of an ion with j labelled tracer atoms |
| n | tracer-element atoms in the metabolite part |
| purity | tracerPurity, the heavy fraction at each labelled position |
| y_i | measured intensity at M+i over the sum of the measured intensities |
| x_j | non-negative least-squares weight of j labelled atoms |
Ruling of this project: 11 November 2026, section "2. Reasoning". Not yet published; its effect is stated on this page. A choice this project made, not a value from the literature.
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.
Constants
| Constant | Value and unit | Source | Date read |
|---|---|---|---|
| IUPAC 2009 representative isotopic compositions (as NIST serves them), or the caller's stated composition (N_e) | a table of values, part of the method | 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, table Isotopic Composition column, every element | 2026-11-10 |
| the natural range stated in the reply (CIAAW 2024 ranges) | a table of values, part of the method | CIAAW (IUPAC Commission on Isotopic Abundances and Atomic Weights), Isotopic Compositions of the Elements, table Representative isotopic composition, every element | 2026-11-10 |
| 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) (monoisotope) | a table of values, part of the method | 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, table Isotopic Composition column, every element | 2026-11-10 |
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
- c00 = 0.97871449, from metaboliteFormula, tracer; by equation 1.
- c10 = 0.02117102, from metaboliteFormula, tracer; by equation 1.
- c11 = 0.9893, from metaboliteFormula, tracer, tracerPurity; by equation 1.
- c20 = 0.00011449, from metaboliteFormula, tracer; by equation 1.
- x0 = 0.5, from measuredIsotopologues[0].intensity, c00; by equation 3; gives correctedDistribution[0].fraction.
- x1 = 0, from measuredIsotopologues[1].intensity, x0, c10, c11; by equation 3; gives correctedDistribution[1].fraction.
- x2 = 0.5, from measuredIsotopologues[2].intensity, x0, c20; by equation 3; gives correctedDistribution[2].fraction.
- 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.5correctedDistribution[1].fraction= 0correctedDistribution[2].fraction= 0.5fractionalContribution= 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.
Who worked this case: not recorded.
What it refuses, and its input ranges
NEGATIVE_INTENSITY: a measured intensity below zero Next: Give intensities that are zero or greater.CHARGED_FORMULA: a formula has a charge written in it Next: Write the metabolite part and the derivative as neutral formulas.FORMULA_UNREADABLE: a symbol that is no element, an empty formula, a zero count, a parse error Next: Correct the formula: element symbols with their counts and brackets closed.ELEMENT_NOT_IN_TABLE: 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) Next: No change of input makes this computable on these data.MONOISOTOPE_NOT_FIXED: under the nominal limit, an element whose most abundant isotope can change within CIAAW 2024 (lead), not stated by the caller Next: State the element's isotopic composition for the material measured.COMPOSITION_DOES_NOT_SUM_TO_ONE: a stated composition whose fractions do not sum to one Next: Give fractions for each element that sum to one.COMPOSITION_FOR_ABSENT_ELEMENT: a stated composition for an element the ion lacks Next: State compositions only for elements in the metabolite part or the derivative.NUCLIDE_NOT_IN_TABLE: a stated isotope AME2020 does not tabulate Next: State only isotopes that AME2020 tabulates.ISOTOPE_BELOW_MONOISOTOPE: under 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 Next: Use the tracer-resolved limit if the instrument resolves the tracer element, or state that element's composition for the material measured.TRACER_ELEMENT_ABSENT: the metabolite part has no atom of the tracer element Next: Check the tracer and the metabolite formula; the derivative's atoms are not labelled.TOO_MANY_TRACER_ATOMS: a metabolite part with more than fifty-five atoms of the tracer element (the largest reply then stays well under the reply cap) Next: No change of input makes this computable on these data; correct larger molecules with a local tool.TOO_FEW_ISOTOPOLOGUES: fewer measured isotopologues than one more than the tracer-element atoms of the metabolite part Next: Give every isotopologue from the unlabelled one to the fully labelled one, zeros included.ALL_ZERO: every measured intensity is zero Next: Give the measured intensities.NON_CONTIGUOUS_MASS_SHIFTS(invalid input): the measured mass shifts are not contiguous from the unlabelled ion in order
Input ranges: measuredIsotopologues[*].intensity: at least 0; outside it, refused (NEGATIVE_INTENSITY).
Flags and notes a reply may carry
A note a reply may carry:
NONNEGATIVITY_ACTIVE: The non-negativity constraint held at least one corrected fraction at zero; heldAtZero marks each, and the residual is then above zero.
Changes
2026-11-25-isotopologue-correction@2.0.2-1
2026-11-25 · isotopologue-correction@2.0.2 · Corrections to our methods
- What was wrong: A number written before the metabolite or derivative formula was read as a multiplier, so the natural-abundance correction ran on a formula many times too large. Alanine with a derivative written 13C6H15Si gave an unlabelled fraction of 1 for 0.7 on the same measured distribution.
- Affected: ms_isotopologue_correction at isotopologue-correction 2.0.1 and earlier, only where the metabolite or derivative formula starts with a digit. Every other output is unchanged.
- What changed: In 2.0.2, through formula-mass 1.3.0, a formula starting with a digit is now refused (FORMULA_UNREADABLE); every other output is unchanged, and every pinned output hash is the same.
- How it was found: A review of the formula reader's grammar on 24 November 2026 found that no rule or test documented a number at the start of a formula, while the shared reader (formula-mass) applied the adduct multiplier to the first part as well; the scientific review ruled the same day that such a formula is refused. A sweep of the tools' worked examples with 13 written before each formula argument, before and after the fix, found which tools computed on it.
- Cases added: None in the fixtures: no published case starts a formula with a digit, and every pinned output hash is unchanged. The refusal is covered by the formula reader's hand cases and unit tests; the widened sweep records each tool's reply before and after.
Tools that use it
Cite this version
Natural-abundance and tracer-purity correction of an isotopologue distribution. Drybench; isotopologue-correction@2.0.2; https://www.drybench.com/methods/m/isotopologue-correction/2.0.2 (accessed [date]).