Repository navigation
refine: drop Pass-2 PSMs that an isotope mis-pick explains better - #101
Conversation
Deamidation (+0.984 Da) sits 19 mDa from one precursor isotope step (+1.003 Da). When an unmodified peptide's precursor is picked on its M+1 peak, the deamidated candidate fits the precursor within tolerance, and decoys cannot model the artefact. On Astral, 61% of accepted deamidations sat at the mis-pick position. A Pass-2 PSM is now dropped when replacing its isotope-like variable mods (within 50 mDa of 1-2 isotope steps) by whole isotope steps gives a smaller precursor error. The rule reads only the precursor mass, so it applies to targets and decoys alike. The [REFINE] log line reports how many were dropped.
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…) (#102) Deamidation (+0.984 Da) sits 19 mDa from one precursor isotope step (+1.003 Da). When an unmodified peptide's precursor is picked on its M+1 peak, the deamidated candidate fits the precursor within tolerance, and decoys cannot model the artefact. On Astral, 61% of accepted deamidations sat at the mis-pick position. A Pass-2 PSM is now dropped when replacing its isotope-like variable mods (within 50 mDa of 1-2 isotope steps) by whole isotope steps gives a smaller precursor error. The rule reads only the precursor mass, so it applies to targets and decoys alike. The [REFINE] log line reports how many were dropped.
Stacked on #100 (paired Pass-2 decoys); merge that first.
Problem
Deamidation (+0.984016 Da) is 19 mDa away from one precursor isotope step (+1.003355 Da). When an unmodified peptide's precursor is picked on its M+1 peak, the deamidated form of the same peptide fits the precursor within tolerance. Decoys cannot model that artefact, so Percolator accepts it. On Astral with #100 applied, 8,042 deamidated PSMs pass at 1%:
Fix
A Pass-2 PSM is dropped when replacing its isotope-like variable mods by whole isotope steps gives a smaller precursor error. "Isotope-like" means a mod within 50 mDa of ±1–2 isotope steps. In the default tier that is deamidation only. Oxidation, acetyl and pyro-Glu are unaffected, and unit tests check both cases. The rule reads only the precursor mass, so it applies to targets and decoys alike. The
[REFINE]log line reports how many PSMs it dropped.Measured (Astral HYE, Percolator 3.7.1, PSMs at 1% q, seeds 1 / 2 / 3)
--refine--refine, #100--refine, #100 + this PRAccepted deamidations (seed 1), by precursor residual after removing whole isotope steps:
117,970 Pass-2 winners are dropped. Pass-2 target and decoy rows stay balanced (327,488 / 328,442).
Net effect:
--refinenow adds about +3,400 PSMs (+8%) over the no-refine control, down from an apparent +20,000 on main. About 10% of near-zero deamidations are also lost: a true deamidation with a −10 mDa precursor error is indistinguishable by mass from a mis-pick. That is the cost of a mass-only rule.Still open
--refine, Pass 1 is about 500 PSMs below the no-refine control (40,864 vs 41,437), so Pass-2 rows still displace some correct unmodified PSMs.