Repository navigation
Fix charge-conflict continue in MapAlignmentAlgorithmKD::filterCCs_ - #10157
timosachsenberg merged 4 commits into
Conversation
The continue only escaped the inner charge-scanning loop, so a connected component with mixed charge states never actually got rejected: control fell through to the conflict check with passes still true. Break the inner loop on conflict and continue the outer loop explicitly so mixed-charge CCs are skipped. Fixes OpenMS#9050
|
Welcome @ManasBagul23 and thank you for your contribution to OpenMS! To help us better understand our userbase and contributors, we would appreciate if you could complete the survey at the link below. Completing this survey will help us get to your PR sooner. Thank you for your participation! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
ChangesMap alignment filtering
Suggested reviewers: Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The alignment filter now rejects incompatible nonzero charge components while retaining compatible and unknown-charge cases. No merge-blocking concern remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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. A rabbit checks the charges in a row Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Add the requested regression test for mixed-charge component exclusion.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes mixed-charge connected components being incorrectly retained during KD-tree map alignment.
Changes:
- Corrects charge-conflict control flow.
- Rejects components with multiple nonzero charge states.
Review note: A focused regression test is still needed to verify excluded components contribute no alignment points.
File summaries
| File | Description |
|---|---|
src/openms/source/ANALYSIS/MAPMATCHING/MapAlignmentAlgorithmKD.cpp |
Corrects mixed-charge component filtering. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (charge_conflict) | ||
| { | ||
| // reject CCs with mixed charge states | ||
| continue; |
There was a problem hiding this comment.
@ManasBagul23 True. If you have a good idea for a small regression test in the corresponding class test, it would be great.
There was a problem hiding this comment.
Thanks! Added a small regression test in MapAlignmentAlgorithmKD_test.cpp: it builds three connected components across two maps and checks that filterCCs_ drops only the one mixing charges 2 and 3, while keeping a same-charge component and one that pairs a known charge with an unknown charge (0). On the previous code all three pass the filter.
Builds three connected components across two maps and checks that only the one mixing charge states 2 and 3 is filtered out, while a component pairing a known charge with an unknown one (0) is kept. Before the fix all three passed, so mixed-charge components could feed alignment points into the LOWESS fit.
…10198) Routine check of recently merged PRs against the 3.6.0 CHANGELOG. Found five gaps: - #10162 and #10164 (TOPP-tool-framework split into OpenMS_CLI, and the layered installed CMake package) already had prose but no PR citation. - #10169 (zlib/bzip2/Eigen/SIMDe made private, consumer-visible header changes) likewise had prose but no citation. - #10167 (nightly Bioconda deploy using the nonexistent bioconda-utils --pkg-dir flag) had no changelog entry; folded into the existing Bioconda CI-fixes bullet. - #10157 (MapAlignmentAlgorithmKD::filterCCs_ failing to reject connected components with conflicting charge states, fixes #9050) and #10171 (StringUtils whitespace scanners overflowing to negative on inputs longer than INT_MAX) had no changelog entry at all. Claude-Session: https://claude.ai/code/session_01GprMUvPsGqXb3hJqcDmcYA Co-authored-by: Claude <[email protected]>
The continue only escaped the inner charge-scanning loop, so a connected component with mixed charge states never actually got rejected: control fell through to the conflict check with passes still true. Break the inner loop on conflict and continue the outer loop explicitly so mixed-charge CCs are skipped.
Fixes #9050
Description
Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit