Lecture notes on Algorithmic Mass Spectrometry

Many years ago, I (Sebastian) started writing a textbook on the algorithmics (and, to a lesser extent, statistics and machine learning) behind computational mass spectrometry. Unfortunately, I never found the time to finish it. Consequently, I decided to release it “into the wild” in 2019. Since then, I could not find a co-author who would help me finish it. So, in 2026, I finally decided that the time is right for an LLM to help me. So, starting with version 0.9.0, Claude from Anthropic will help me finish the text. In the first iteration (0.9.0) this is only for spell checking, grammar, etc.. The upcoming version 0.9.1 will also contain fact-checking. With version 0.9.2 I will start closing the holes and todos in the book. What can possibly go wrong… 🙂

If you find any errors in the manuscript, please send me an email and I am happy to correct them! (For the chapters and sections marked “work in progress”, these are obviously incomplete, so no need for an email there.) If you want to contribute, even better!

  • version 0.9.1 (Oct 29, 2026) — a fact check and a domain review, again with help from Claude; text by Claude that I did not check myself is marked “Claude says” in the margin:
    • every chapter reviewed from the point of view of a domain expert; all recurrences and algorithms tested against brute force, which uncovered and fixed errors in several of them (peptide de novo sequencing, decompositions via the extended residue table, fragmentation trees, exact p-values)
    • all chapters checked against the cited papers and sources: corrections of historical facts, numbers and descriptions of methods in every chapter, for example the history of electrospray ionization and of FDR estimation, how early SEQUEST scored spectra, and the mass of 15N
    • atomic masses now consistently use AME2020
    • new text on GDB-20, on deep learning for peptide de novo sequencing, and on collision energies for peptides
    • bibliography entries and links checked and corrected
  • version 0.9.0 (Oct 23, 2026) — the first version prepared with help from Claude, see the preface. No new sections yet, but a thorough clean-up:
    • all chapters copy-edited: more than 1,000 corrections of grammar, spelling, punctuation and word choice, now consistently in American English; all chapter quotations checked against their sources; 13 new glossary entries
    • all calculations in the worked examples recomputed by script; corrections of proofs, formulas and indices in almost every chapter, for example the proof of the lower bound for decomposing isotope patterns, the running time for computing fragmentation trees, and the HIV example in the ML chapter
    • two bugs fixed in the recalibration algorithm (tie handling, points with identical mass)
    • isotope abundances updated to IUPAC values, all sucrose examples recomputed
    • new text on “guilt by association” methods for identifying metabolites
  • version 0.8.4 (Apr 29, 2022) is still not the major update I wanted to do, but loads of smaller changes and corrections, particularly for the ML section
  • version 0.8.3 (Sep 05, 2019) fixes tons of smaller stuff, plus changes suggested by Magnus Palmblad on isotope patterns, thanks a lot!
  • version 0.8.2 (Apr 13, 2019) fixes more typos — similar to those found by Hannes — throughout the text
  • version 0.8.1 (Apr 12, 2019) includes corrections by Hannes Röst, thanks a lot!
  • version 0.8.0 (Apr 2, 2019) — Winter is coming! No, wait… Lecture time is coming! Before that, the “last release” while I still have time. I have added the ILP for fragmentation tree computation, plus many things here and there. The largest ToDo remaining is the chapter on database searching. Again: Please, send me corrections. So far, none.
  • version 0.7.0 of the textbook (Mar 20, 2019) — I have mostly “finished” the chapters on p-values and decoy databases; I hope that someone who knows more about statistics than I do, can tell me where I erred.
  • version 0.6.0 of the textbook (Feb 27, 2019)

A Jupyter notebook with code solving and visualizing the exercises can be found here.