Skip to content

[FIX] FeatureOverlapFilter: mark removed features by address, not unique id - #10501

Merged
timosachsenberg merged 4 commits into
OpenMS:developfrom
okohlbacher:claude/faims-merge-uid0-20261010
Oct 11, 2026
Merged

timosachsenberg merged 4 commits into
OpenMS:developfrom
okohlbacher:claude/faims-merge-uid0-20261010

Conversation

@okohlbacher

@okohlbacher okohlbacher commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

filter() recorded removals by getUniqueId(); mergeFAIMSFeatures runs on features without ids (all 0, as in FeatureFinderCentroided), so one merge removed every FAIMS feature (0 features out).
Fix: record removed features by pointer and compact by position.
New FeatureOverlapFilter_test section (3 FAIMS features with id 0, one cross-CV pair) expects 2 features; it gets 0 without the fix.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed feature filtering and FAIMS merging so features without unique IDs are handled independently, rather than being removed together. Merging now retains the expected merged feature and other unaffected features.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b3a4257-ee84-4f0b-ad69-0c6cb9ad961f

📥 Commits

Reviewing files that changed from the base of the PR and between 91ba9e7 and dd9bb8a.


📒 Files selected for processing (3)
  • CHANGELOG
  • src/openms/source/PROCESSING/FEATURE/FeatureOverlapFilter.cpp
  • src/tests/class_tests/openms/source/FeatureOverlapFilter_test.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

FeatureOverlapFilter::filter now tracks removed features by object address instead of unique ID. This preserves distinct features with unset or duplicate IDs. A test covers FAIMS merging before unique IDs are assigned.

Changes

Feature overlap filtering

Layer / File(s) Summary
Track removals by feature instance
src/openms/source/PROCESSING/FEATURE/FeatureOverlapFilter.cpp, src/tests/class_tests/openms/source/FeatureOverlapFilter_test.cpp, CHANGELOG
The filter marks features for removal by address and compacts the feature map while preserving unmarked features. The test checks that two nearby features with unset IDs merge and a distant feature remains. The changelog records the fix.

Suggested reviewers: timosachsenberg


Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to dd9bb

The change addresses FAIMS features with unset IDs, and no merge-blocking issue is evident from the supplied review. Normal test checks remain appropriate.

Pre-merge checks | Passed 4 | Failed 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: tracking removed features by address instead of unique ID.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · 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

A rabbit checks each feature’s place,
And marks just one by its own address.
Two nearby signals join as one,
A distant feature stays undone.
The changelog notes the fix in place.

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

@timosachsenberg timosachsenberg 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.

Fix works but I wonder if the error was having no unique Id in the first place…

@okohlbacher

Copy link
Copy Markdown
Contributor Author

Thanks. Yes: FeatureFinderCentroided (and the other finders) never assign unique ids, so every feature has id 0 and one merge removed all of them. Making the finders assign ids would be a larger, separate change; filter() should not depend on ids being set, so this fixes the filter itself. Also merged develop (CHANGELOG conflict only).

@timosachsenberg

Copy link
Copy Markdown
Contributor

I agree that this is a different issue. Looks good to me

@timosachsenberg
timosachsenberg merged commit 7f30dda into OpenMS:develop Oct 11, 2026
11 of 12 checks passed
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.

2 participants