Repository navigation
[FIX] OpenNuXL: don't delete fragment ions as false first isotopes when deisotoping MS2 spectra - #10949
Conversation
…en deisotoping MS2 spectra OpenNuXL deisotopes MS2 spectra with start_intensity_check = 2, so the step from the monoisotopic to the first isotopic peak had no intensity check. A fragment ion one isotope spacing above a weaker, unrelated peak was taken as that peak's first isotope, merged into it and removed, and could then never be annotated or scored. For peptide fragments below about 1800 Da the monoisotopic peak is the most intense one, so such a pattern is impossible. NuXLDeisotoper::deisotopeAndSingleCharge gets first_isotope_check_max_mass (default 0: off). Below that neutral monoisotopic mass, the first isotopic peak must not be more intense than the monoisotopic peak. OpenNuXL sets 1500 Da. Measured on two RNA-protein UV cross-linking datasets with manually annotated sites (E. coli S30, HEK293), same search settings with and without the fix: - a/b/y ions (>= 1 % of the base peak) of annotated PSMs removed as isotopes: 7.2 % -> 5.6 % of the nucleotide-shifted and 3.8 % -> 2.3 % of the unshifted ions - OpenNuXL's own 1 % XL FDR, before Percolator: S30 1841 -> 1916 PSMs, HEK 2743 -> 2914 - after Percolator: S30 4891 -> 4890 PSMs, HEK 7699 -> 7665 - site accuracy against the manual annotation: S30 0.942 -> 0.939, HEK 0.821 -> 0.826 (neither significant) - the lysine marker ion at m/z 178.098 is annotated again (S30 PSMs with a manual K site: 46/85 -> 57/86) Checking the first isotope at every mass (start_intensity_check = 1, as SimpleSearchEngine and ProSE do) was also tested and is worse on HEK: 2685 PSMs before Percolator, 7632 after, site accuracy 0.800. For heavy fragments the first isotope can be the strongest peak, so their patterns are then rejected and they get no charge assigned. Test references: score values and fragment annotations change in the OpenNuXL TOPP test outputs; FDQKIIDK moves its site from K8 to K4, and a few lower-ranked hits change. Lines that differ only by floating-point rounding (< 1e-9 relative) keep their old values.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
OpenNuXL deisotopes each MS2 spectrum before scoring and annotating it. It does this with
start_intensity_check = 2, so there is no intensity check between the monoisotopic and the first isotopic peak. When a fragment ion sits one isotope spacing (1.0034 / z) above a weaker, unrelated peak, it is taken as that peak's first isotope, merged into it and removed. After that it can't be annotated or scored. For peptide fragments below about 1800 Da the monoisotopic peak is always the most intense one, so this assignment is impossible.Found while reviewing site localization (#10936): in S30 spectrum 29492 (
YAVSVATR+ U), b3+U′ at m/z 446.2039 (3.8 % of the base peak) was removed as the "isotope" of a 2.1 % peak at 445.2006.Change
NuXLDeisotoper::deisotopeAndSingleChargegetsfirst_isotope_check_max_mass(default 0: off). Below that neutral monoisotopic mass, the first isotopic peak must not be more intense than the monoisotopic peak, whateverstart_intensity_checkis.Measured effect
Two RNA–protein UV cross-linking datasets with manually annotated sites (E. coli S30: 397 annotated PSMs; HEK293: 207), searched with the same settings with and without the fix:
fragments), S30 / HEKSo the fix recovers ions and helps OpenNuXL's own score, but after Percolator, identifications and localization change only within noise. With
NuXL:localization loss_aware(#10948) S30 accuracy goes from 0.949 to 0.957 (3 fixed, 0 broken; this includes the spectrum above), and HEK is unchanged.Alternative tested
Checking the first isotope at every mass (
start_intensity_check = 1, as SimpleSearchEngine and ProSE do) is a one-line change, but it is worse on HEK: 2685 PSMs before Percolator, 7632 after, andfragmentsaccuracy 0.800 (−0.021 against this PR, 95 % CI −0.044 to −0.005). For heavy fragments the first isotope can be the strongest peak. Their patterns are then rejected, so they get no charge assigned.Test references
The 9 OpenNuXL TOPP reference files change in score values and fragment annotations. FDQKIIDK moves its site from K8 to K4, and a few lower-ranked hits change. Lines that differ only by floating-point rounding (< 1e-9 relative) keep their old values, so the diff shows only real changes. All 70 NuXL tests pass locally.
Summary by CodeRabbit
New Features
Tests