Skip to content

refine: drop Pass-2 PSMs that an isotope mis-pick explains better (land #101 on main) - #102

Merged
ypriverol merged 1 commit into
mainfrom
fix/refine-isotope-guard-to-main
Oct 5, 2026
Merged

ypriverol merged 1 commit into
mainfrom
fix/refine-isotope-guard-to-main

Conversation

@ypriverol

@ypriverol ypriverol commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

#101 was stacked on #100's branch and merged there after #100 had already merged, so the guard never reached main. This is the same commit cherry-picked onto main, with no changes.

Description and measurements: #101. On Astral, accepted deamidations at the isotope mis-pick position fall from 4,869 to 43, and --refine goes from +21% to +8% PSMs over a no-refine control.

Summary by CodeRabbit

  • Bug Fixes
    • Pass-2 refinement results now exclude peptide-spectrum matches where variable modifications resemble isotope shifts and replacing them with isotope steps would produce a closer precursor mass match. This can reduce misleading matches in refinement results.

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-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 16a9c428-5ce4-4448-a394-56d7dd341ea0
📥 Commits

Reviewing files that changed from the base of the PR and between 72ee0a5 and fb4d804.

📒 Files selected for processing (1)
  • crates/search/src/refinement.rs
 _________________________________________
< Make it work, make it right, make it 🥕. >
 -----------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant