A 10-codon reference gene is translated with the standard genetic code. The peptide's monoisotopic mass is the sum of residue masses plus one water, and a mass spectrometer measures the mass-to-charge ratio of the ion with z extra protons:
M = sum(residue_i) + 18.010565 Da
m/z = (M + z * 1.007276) / z
error_ppm = (m/z_obs - m/z_ref) / m/z_ref * 1e6
match if |error_ppm| <= tolerance
The database search compares each observed precursor with the reference peptide. A point mutation changes one residue and so shifts M by the difference of the two residue masses; if that shift is larger than the tolerance the peptide is flagged novel, otherwise the variant hides inside the match window. A stop codon truncates the peptide.
- Instrument noise adds a Gaussian error to every measured m/z, so even the unmutated peptide scatters around the reference.
- Charge z divides the mass shift in m/z, but the ppm error stays about the same.
- Hidden variants. Leu to Ile has exactly zero shift; Gln to Lys shifts by only 0.036 Da (about 27 ppm here), so a wide window misses it. Real pipelines use fragment (MS/MS) ions to resolve these.
Honest simplifications: a 10-residue toy gene, one precursor per scan, no fragmentation, no isotopes beyond monoisotopic, no modifications, no false-discovery control. Educational only, not a diagnostic tool. Real proteogenomics builds a custom protein database from sequencing data and searches thousands of spectra.
Independent checks (residue masses vs elemental formulas, m/z round trip, genetic code, ppm arithmetic):