Repository navigation
feat(PIPECHO): isotope-distribution MBR feature (envelope correlation) - #9676
Conversation
f04bb33 to
515d372
Compare
577f6f3 to
63010bb
Compare
…, SVM-only) Adds the acceptor-observed vs donor-theoretical isotope-envelope Pearson as an SVM predictor. ProteomicsLFQ extracts 3 isotopes on the pip_echo path (the default 2 give a degenerate Pearson) and snapshots the observed envelope into a pipecho_obs_envelope meta before the feature-meta strip; RunStatistics correlates it against the donor peptide's theoretical envelope (CoarseIsotopePatternGenerator), mapped to [0,1]. The feature is identity-coupled (compares the acceptor signal to the DONOR's theoretical pattern), so a coincidental same-m/z match scores lower. Its univariate target/decoy AUC on PXD016921 is only 0.543 -- OpenMS PIP-ECHO has no raw-MS1 access and cannot re-extract the envelope at the candidate identity/RT the way FlashLFQ does, and two peptides within 10 ppm have similar pre-extracted envelopes -- but it contributes meaningfully in the multivariate SVM. Effect on the PXD016921 single-cell benchmark (fdr=0.05, on top of the mass fix headline -- peptides quantified in all 7 runs (consensus size 7) rise 114 -> 167 (+46%) with fewer singletons (sz1 10969 -> 10730), i.e. materially completer cross-run quantification, while the empty Blank stays clean. n_isotopes=3 (not 5) is deliberate: more isotopes perturb FFID's extraction and cost direct quant. Co-Authored-By: Claude Opus 4.8 <[email protected]>
63010bb to
531d43b
Compare
📝 WalkthroughWalkthroughPIP-ECHO now captures observed isotope envelopes, computes an isotope-agreement score during run statistics, stores it in ChangesPIP-ECHO isotope scoring pipeline
Sequence Diagram(s)sequenceDiagram
participant ProteomicsLFQ
participant Feature
participant RunStatistics
participant Score
participant TransferFDRModel
ProteomicsLFQ->>Feature: store pipecho_obs_envelope metadata
RunStatistics->>Feature: read pipecho_obs_envelope via feature_obs_envelope
RunStatistics->>Score: set isotope_score
TransferFDRModel->>Score: encode isotope_score predictor
Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Util.h (1)
42-49: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the required
@brieftag to this header doc block.The new declaration is documented, but it does not match the header-format rule used in this repo. As per coding guidelines,
**/*.h: Add Doxygen documentation with@brieftag (required), followed by blank line and details.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Util.h` around lines 42 - 49, The Doxygen block for feature_obs_envelope in Util.h is missing the required `@brief` tag. Update the header comment to follow the repo’s h-file documentation format by adding an `@brief` summary at the start, then a blank line, then the existing detailed description of the feature’s observed isotope envelope and pipecho_obs_envelope metadata.Source: Coding guidelines
src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/RunStatistics.h (1)
66-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the required
@brieftag to this header doc block.This new declaration is documented, but not in the header format required by the repo. As per coding guidelines,
**/*.h: Add Doxygen documentation with@brieftag (required), followed by blank line and details.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/RunStatistics.h` around lines 66 - 72, The Doxygen block for calc_isotope_score in RunStatistics.h is missing the required `@brief` tag. Update the existing header comment so it starts with a concise `@brief` summary, then keep a blank line before the detailed description, matching the repo’s header documentation style and the surrounding declarations in RunStatistics.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/RunStatistics.h`:
- Around line 66-72: The Doxygen block for calc_isotope_score in RunStatistics.h
is missing the required `@brief` tag. Update the existing header comment so it
starts with a concise `@brief` summary, then keep a blank line before the detailed
description, matching the repo’s header documentation style and the surrounding
declarations in RunStatistics.
In `@src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Util.h`:
- Around line 42-49: The Doxygen block for feature_obs_envelope in Util.h is
missing the required `@brief` tag. Update the header comment to follow the repo’s
h-file documentation format by adding an `@brief` summary at the start, then a
blank line, then the existing detailed description of the feature’s observed
isotope envelope and pipecho_obs_envelope metadata.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1a0490f2-fcd4-4d50-a212-969746c68afa
📒 Files selected for processing (7)
src/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/RunStatistics.cppsrc/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/RunStatistics.hsrc/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Score.hsrc/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/TransferFDRModel.cppsrc/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Util.cppsrc/openms/source/ANALYSIS/MAPMATCHING/PIPECHO/Util.hsrc/topp/ProteomicsLFQ.cpp
|
Nice. How much runtime does this all add? |
|
not too much. calculation are mostly already done by feature finder ID |
…O fixes) (#9677) Documents two PIP-ECHO improvements merged on 2026-06-27: - #9674: revive dead mass_error feature and drop raw/inverted RT from mbr_score - #9676: isotope-distribution envelope correlation as a new SVM-only MBR feature Claude-Session: https://claude.ai/code/session_01GRoRx9TnjaBjfuBWT8umia Co-authored-by: Claude <[email protected]>
What
Adds the isotope-distribution similarity MBR feature to PIP-ECHO — one of the two
features the OpenMS port dropped from FlashLFQ's 5-feature classifier (issue #9655).
For each candidate (donor, acceptor) transfer it computes the Pearson correlation between
the acceptor's observed isotope envelope and the donor peptide's theoretical envelope
(
CoarseIsotopePatternGenerator), mapped to[0,1], and feeds it to the transfer-FDR SVM.It is identity-coupled (acceptor signal vs the donor's theoretical pattern), so a
coincidental same-m/z match scores lower.
Mechanics:
pip_echopath (the default 2 give adegenerate Pearson) and snapshots the observed envelope into a
pipecho_obs_envelopemetabefore the feature-meta strip (whitelisted, like the mass fix's
masserror_ppm).RunStatistics::calc_isotope_scoredoes the correlation; added as an SVM-only predictor(not the
mbr_scoregeomean).Results (PXD016921 single-cell,
PipEcho:fdr=0.05, on top of #9674)The right metric is cross-run completeness (consensus size = how many of the 7 runs a
peptide is quantified in), not distinct-peptide count — transfers fill out existing groups
(total consensus ~19,400 constant), reducing missing values. All rows at ~5% realized FDR
with a clean Blank.
Attribution (measured via the n_iso=3 mass-only control): the isotope feature itself
contributes +483 transfers (+36%) and +43 of the +53 sz7 gain (~81%).
n_isotopes=3alone is only a minor positive (sz7 114→124) and — unlike
n_isotopes=5, which hurtsmass-only (1280→1103) — carries no extraction penalty. So the completeness win is genuinely
the feature, and
n_isotopes=3is the sweet spot.Honest scope / caveats
in the SVM). OpenMS PIP-ECHO has no raw-MS1 access (
group()takes pre-extractedFeatureMaps), so it cannot re-extract the envelope at the candidate identity/RT the wayFlashLFQ does to make isotope/scan strong; two peptides within 10 ppm have similar
pre-extracted envelopes. The win is real but bounded by that architecture.
points_across_baseline/FWHM is identity-independent (redundant with intensity) and wouldneed the same raw re-extraction.
mbr_score(its raw/inverted form was fixed in fix(PIPECHO): revive dead mass-error feature and drop raw/inverted RT from mbr_score #9674); calibrating itis a monotonic transform that cannot change its ~0.49 AUC.
Tests:
PipEchoAlgorithm_testandPipEchoAlgorithm_realistic_testpass; theextract:n_isotopeschange is confined to thepip_echopath, so the default linker pathand its
TOPP_ProteomicsLFQ_*references are untouched.Closes part of #9655 (isotope feature); the remaining items (scan count via raw
re-extraction, faithful RT) are scoped in that issue.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes