Repository navigation
feat: default fragment:min_ion_index=2 in FragmentIndex (skip b1/b2/y1/y2) - #9094
Conversation
Match Sage's default behavior of excluding the four shortest fragment ions (b1, b2, y1, y2) from the fragment index. These low-index ions are often noisy and unreliable, and skipping them: - Improves PSM count at 1% FDR (DDA HeLa: 4339 → 4374, +35) - Reduces wall time (59s → 48s, -11s) - Reduces memory usage (4283 MB → 3984 MB, -300 MB) Also expose fragment:min_ion_index parameter through PeptideSearchEngineFIAlgorithm so it can be set by TOPP tools. Update tests that depend on full ion counts to set min_ion_index=0 explicitly (lightweight_fragment_count, multi_mod_per_site, fixed_plus_variable_mods, querySpectrum, tolerance). Update Sage DDA test to use -min_ion_index 2 (matching new FI default). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
@timosachsenberg Please consider adding the following names to the Timo Sachsenberg Here's a patch that does this: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChanged fragment-indexing behavior and defaults: the in-code filter now excludes ions with index <= configured Changes
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/ANALYSIS/ID/FragmentIndex.cpp`:
- Line 1089: The help string passed to
defaults_.setValue("fragment:min_ion_index", ...) is inconsistent with the
implementation (which skips ions with index <= min_ion_index_); update the
wording so it accurately states the threshold semantics—e.g., "Ions with index
less than or equal to this value are not added to the fragment index (use 0 to
include all ions; 2 skips b1/b2/y1/y2)." Mention the exact symbol
defaults_.setValue("fragment:min_ion_index", ...) and the variable
min_ion_index_ so the change is made at the correct location.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cf20f429-8a8a-4453-ad85-68dd5b528cdf
📒 Files selected for processing (4)
src/openms/source/ANALYSIS/ID/FragmentIndex.cppsrc/openms/source/ANALYSIS/ID/PeptideSearchEngineFIAlgorithm.cppsrc/tests/class_tests/openms/source/FragmentIndex_test.cppsrc/tests/topp/CMakeLists.txt
The previous wording "Minimum ion index to consider" and "Ions below this index" was inconsistent with the actual implementation, which skips ions with index ≤ min_ion_index_ (note: less-than-OR-EQUAL, not strictly below). With min_ion_index=2, b1 and b2 are both skipped (min ion considered is actually 3, not 2). Update help string in both FragmentIndex.cpp and PeptideSearchEngineFIAlgorithm.cpp, plus the inline comment that incorrectly said "<" instead of "<=". Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add missing entries for changes since last sync: - PeptideDataBaseSearchFI: BREAKING default fragment:min_ion_index=2 (#9094) - PyOpenMS: Fix AASequence.__str__() and copy constructor dispatch (#9098) - Build: minimum Boost version bumped to 1.81 (#9095) Co-authored-by: Copilot <[email protected]>
Add missing entries for commits since last sync (2026-04-06): - Boost minimum version raised to 1.81 (#9095) - FragmentIndex default min_ion_index=2, skipping b1/b2/y1/y2 (#9094) - FragmentIndex faster build with bitmask/SoA/SIMD (#9088) - AASequence copy constructor fix in pyOpenMS bindings (#9098) Co-authored-by: Copilot <[email protected]>
Add missing entries for commits since last sync (2026-04-06): - Boost minimum version raised to 1.81 (#9095) - FragmentIndex default min_ion_index=2, skipping b1/b2/y1/y2 (#9094) - FragmentIndex faster build with bitmask/SoA/SIMD (#9088) - AASequence copy constructor fix in pyOpenMS bindings (#9098) Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Add missing entries for changes since last sync: - PeptideDataBaseSearchFI: BREAKING default fragment:min_ion_index=2 (#9094) - PyOpenMS: Fix AASequence.__str__() and copy constructor dispatch (#9098) - Build: minimum Boost version bumped to 1.81 (#9095) Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]>
Summary
Change the default value of
fragment:min_ion_indexfrom 0 to 2 in the FragmentIndex / PeptideDataBaseSearchFI search engine. This matches Sage's default behavior of excluding the four shortest fragment ions (b1, b2, y1, y2) which are often noisy and unreliable.Motivation
Low-index fragment ions (b1, b2, y1, y2) tend to:
Removing them improves both speed and identification rate.
Benchmark
DDA TimsTOF HeLa + Human SwissProt (with decoys), Trypsin/P, 2 missed cleavages, Oxidation(M) + Acetyl(Protein N-term) variable:
min_ion_index=0(previous default)min_ion_index=2(new default)Changes
FragmentIndex.cpp: change default from 0 to 2PeptideSearchEngineFIAlgorithm.cpp: exposefragment:min_ion_indexparameter and set default 2FragmentIndex_test.cpp: update tests that depend on full ion counts to setmin_ion_index=0explicitly (lightweight_fragment_count,multi_mod_per_site,fixed_plus_variable_mods,querySpectrum,tolerance)tests/topp/CMakeLists.txt: update Sage DDA benchmark to use-min_ion_index 2(matching new FI default for fair comparison)Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit