Skip to content

feat(ProSE): Orbitrap-aware isotope defaults + isotope_error Percolator feature - #9188

Merged
timosachsenberg merged 1 commit into
developfrom
feat/prose-isotope-notches
Apr 20, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
feat/prose-isotope-notches

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Apr 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two small, independent improvements inspired by MetaMorpheus / MSFragger defaults:

  • Default isotope-error range changed from [-1, +1] → [0, +2]. Orbitrap/QExactive/tims monoisotopic peak picking fails predominantly upward; symmetric ranges waste a query slot on the rare downward mispick. Same number of FI queries per spectrum, better coverage of the real failure mode.
  • isotope_error is now a Percolator feature. The metavalue was already set on every PSM but was missing from extra_features. Lets the SVM/ML rescorer discount PSMs that only matched at non-zero iso offsets — free FDR gain.
  • Drive-by cleanup: two string literals converted to Constants::UserParam::ISOTOPE_ERROR.

Test plan

  • Class tests: FragmentIndex_test, ProSEAlgorithm_test — pass
  • TOPP tests: all 18 TOPP_ProSE_* (including the three long DDA integration tests) — pass
  • Reference idXML fixtures updated for the new extra_features string only; top PSM identities unchanged (all reference top hits were already at iso=0).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Adjusted default precursor isotope error search bounds (0 to 2) for improved alignment with industry standards.
    • Standardized isotope error handling and added isotope error to Percolator feature output for enhanced MS/MS result analysis.

…or feature

Two small improvements inspired by MetaMorpheus / MSFragger defaults:

1. Default precursor isotope error range changed from [-1, +1] to [0, +2].
   Orbitrap/QExactive/tims monoisotopic peak picking fails predominantly
   upward — symmetric ranges waste a query slot on the rare downward
   mispick. Same number of FI queries per spectrum, better coverage of
   the real failure mode.

2. isotope_error is now exposed as a Percolator feature. The metavalue
   was already set on every PSM but was missing from extra_features.
   Lets the SVM/ML rescorer discount PSMs that only matched at non-zero
   iso offsets. Free FDR gain.

Also switched two string literals to Constants::UserParam::ISOTOPE_ERROR
for consistency.

Test fixtures updated for the new extra_features string; top PSMs in the
reference data were all at iso=0, so PSM identities are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR adjusts isotope error handling by shifting default precursor isotope error bounds in FragmentIndex from [-1, 1] to [0, 2], and standardizes isotope_error as a Percolator feature in ProSEAlgorithm by replacing hardcoded strings with constants and extending the feature list accordingly.

Changes

Cohort / File(s) Summary
Fragment Index Isotope Error Defaults
src/openms/source/ANALYSIS/ID/FragmentIndex.cpp
Adjusted default precursor isotope error bounds from [-1, 1] to [0, 2]; updated parameter descriptions to reflect asymmetric range for upward misassignment handling.
ProSE Algorithm Isotope Error Standardization
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Replaced hardcoded "isotope_error" strings with Constants::UserParam::ISOTOPE_ERROR; extended Percolator extra_features list to always include isotope_error.
Test Output Parameter Updates
src/tests/topp/ProSE_1_out.idXML, src/tests/topp/ProSE_2_out.idXML, src/tests/topp/ProSE_4_out.idXML
Updated extra_features parameter values to include isotope_error in searchParameters.

Possibly related PRs

Suggested reviewers

  • jpfeuffer

Poem

Hops of joy for isotope care, 🐰
Constants replace strings everywhere,
From [-1, 1] to [0, 2] we shift,
Percolator's features get a lift,
Standardized bounds, a cleaner affair! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures both main changes: adjusting isotope-error defaults for Orbitrap instruments and adding isotope_error as a Percolator feature.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prose-isotope-notches

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp (1)

176-178: ⚠️ Potential issue | 🟠 Major

Align ProSEAlgorithm’s isotope defaults with FragmentIndex.

Line 177 and Line 178 still register [-1, +1]. Since ProSE passes getParameters() into FragmentIndex, these defaults override the new FragmentIndex constructor defaults and the ProSE tool will not actually default to [0, +2].

🐛 Proposed fix
-    // Precursor isotope error handling
-    defaults_.setValue("precursor:isotope_error_min", -1, "Minimum allowed precursor isotope error");
-    defaults_.setValue("precursor:isotope_error_max", 1, "Maximum allowed precursor isotope error");
+    // Default iso range [0, +2]: Orbitrap/QExactive/tims monoisotopic peak picking
+    // fails predominantly upward.
+    defaults_.setValue("precursor:isotope_error_min", 0, "Minimum allowed precursor isotope error");
+    defaults_.setValue("precursor:isotope_error_max", 2, "Maximum allowed precursor isotope error");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp` around lines 176 - 178,
ProSEAlgorithm still sets precursor:isotope_error_min/max to [-1, +1], which
overrides FragmentIndex defaults; change the defaults in ProSEAlgorithm (the
calls to defaults_.setValue("precursor:isotope_error_min", ...) and
defaults_.setValue("precursor:isotope_error_max", ...)) to 0 and 2 respectively
so that when ProSE passes getParameters() into FragmentIndex the effective
default range becomes [0, +2] consistent with FragmentIndex's intended defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Around line 176-178: ProSEAlgorithm still sets precursor:isotope_error_min/max
to [-1, +1], which overrides FragmentIndex defaults; change the defaults in
ProSEAlgorithm (the calls to defaults_.setValue("precursor:isotope_error_min",
...) and defaults_.setValue("precursor:isotope_error_max", ...)) to 0 and 2
respectively so that when ProSE passes getParameters() into FragmentIndex the
effective default range becomes [0, +2] consistent with FragmentIndex's intended
defaults.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6deccec-424f-465f-8872-2022782e1f50

📥 Commits

Reviewing files that changed from the base of the PR and between 930ad49 and 6830bdf.

📒 Files selected for processing (5)
  • src/openms/source/ANALYSIS/ID/FragmentIndex.cpp
  • src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
  • src/tests/topp/ProSE_1_out.idXML
  • src/tests/topp/ProSE_2_out.idXML
  • src/tests/topp/ProSE_4_out.idXML

@timosachsenberg
timosachsenberg merged commit a2d85fc into develop Apr 20, 2026
45 checks passed
@timosachsenberg
timosachsenberg deleted the feat/prose-isotope-notches branch April 20, 2026 06:43
timosachsenberg pushed a commit that referenced this pull request Apr 21, 2026
Add missing changelog entries for PRs merged after 2026-04-19 sync:
- #9186: MascotGenericFile SEQ= field support (read/write)
- #9188: ProSE Orbitrap-aware isotope defaults [0,+2] + isotope_error Percolator feature
- #9191: ProSE SNES mother-peptide indexing for non-specific searches

Co-authored-by: GitHub Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
timosachsenberg pushed a commit that referenced this pull request Apr 23, 2026
Restore ProSE/FragmentIndex/File entries dropped by the FeatureFinderCentroided
reorganization commit (#9159) and add new entries for commits merged after the
last sync:

- #9188: ProSE BREAKING: default isotope error range changed to [0,+2]
- #9191: ProSE SNES mother-peptide indexing for non-specific searches
- #9195: ProSE fix: defer PSM FDR when Percolator enabled; valid .pin output
- #9203: FragmentIndex: fixed bucket_size 4096 for tighter candidate lists
- #9204: ProSE: resolve PercolatorAdapter via findSiblingTOPPExecutable
- #9205: ProSE: per-file output isolation + dangling decoy ref crash fix
- #9207: File::rename: cross-device fallback (copy+remove on EXDEV)

Co-authored-by: GitHub Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
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