Skip to content

feat(PSMFeatureExtractor): register andes search engine Percolator features - #9643

Merged
timosachsenberg merged 1 commit into
OpenMS:developfrom
ypriverol:feat/register-andes-percolator-features
Jun 21, 2026
Merged

timosachsenberg merged 1 commit into
OpenMS:developfrom
ypriverol:feat/register-andes-percolator-features

Conversation

@ypriverol

@ypriverol ypriverol commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

PSMFeatureExtractor only collects engine-specific Percolator features for engines it internally registers (Comet, MS-GF+, X!Tandem, Mascot, MSFragger). PSMs whose search_engine is andes fell through to the abort path / generic-only features, which can't separate target from decoy on realistic databases.

andes is a Rust DDA search engine that writes OpenMS-compatible .idparquet. It annotates each PSM with its own numeric features as MetaValues prefixed with andes: (e.g. andes:RankScore, andes:RawScore, andes:DeltaRankScore, andes:TailorScore, andes:NumMatchedMainIons, andes:RichIonLLR, …).

This PR adds PercolatorFeatureSetHelper::addANDESFeatures(), mirroring the existing per-engine handlers. It collects all numeric (double/int) MetaValues whose name starts with andes: and registers them as Percolator features — keeping the andes side the single source of truth for its feature set rather than hard-coding the (currently ~47) names in OpenMS. It is wired into the PSMFeatureExtractor engine dispatch on search_engine == "andes" (the exact lowercase string andes emits).

andes emits the same feature set on every PSM, so the union collected here is present on all hits (satisfies PercolatorInfile's per-hit feature-completeness requirement).

Changes

  • PercolatorFeatureSetHelper::addANDESFeatures() (+ header declaration/doc).
  • PSMFeatureExtractor engine dispatch + tool docu line.
  • Self-contained unit test in PercolatorFeatureSetHelper_test.cpp (in-memory, no new test-data file).
  • CHANGELOG entry.

No behavior change for any existing engine.

Checklist

  • Mirrors the existing per-engine add*Features pattern.
  • Unit test added.
  • CHANGELOG updated.
  • clang-format / CI checks (validated by CI).

Summary by CodeRabbit

  • New Features
    • ANDES search engine is now fully supported with automatic extraction and registration of engine-specific Percolator features
    • MSFragger search engine is now supported

…atures

PSMFeatureExtractor previously only collected engine-specific Percolator
features for engines it internally registers (Comet, MS-GF+, X!Tandem,
Mascot, MSFragger). A search whose search_engine is "andes" fell through
to the abort path / generic-only features.

andes (a Rust DDA search engine that writes OpenMS-compatible .idparquet)
annotates each PSM with its own numeric features as MetaValues prefixed
with "andes:" (e.g. andes:RankScore, andes:RawScore, andes:DeltaRankScore,
andes:TailorScore, andes:NumMatchedMainIons, andes:RichIonLLR, ...).

Add PercolatorFeatureSetHelper::addANDESFeatures(), mirroring the existing
per-engine handlers, which collects ALL numeric (double/int) MetaValues whose
name starts with "andes:" and registers them as Percolator features. This
keeps the andes side the single source of truth for its feature set rather
than hard-coding the (currently 47) feature names in OpenMS. Wire it into the
PSMFeatureExtractor engine dispatch on search_engine == "andes" (the exact
lowercase string andes emits), update the tool docu, add a self-contained
unit test, and add a CHANGELOG entry.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cba7484-e81f-4dbd-8bd7-a37beebd05c6

📥 Commits

Reviewing files that changed from the base of the PR and between f001f12 and 3792276.

📒 Files selected for processing (5)
  • CHANGELOG
  • src/openms/include/OpenMS/ANALYSIS/ID/PercolatorFeatureSetHelper.h
  • src/openms/source/ANALYSIS/ID/PercolatorFeatureSetHelper.cpp
  • src/tests/class_tests/openms/source/PercolatorFeatureSetHelper_test.cpp
  • src/topp/PSMFeatureExtractor.cpp

📝 Walkthrough

Walkthrough

Adds PercolatorFeatureSetHelper::addANDESFeatures, a static method that scans andes:-prefixed numeric MetaValues on peptide hits and registers them as Percolator features. PSMFeatureExtractor's search-engine dispatch gains an explicit "andes" branch that calls this method. A corresponding unit test and changelog entry are included.

Changes

ANDES Percolator Feature Extraction

Layer / File(s) Summary
addANDESFeatures declaration and implementation
src/openms/include/OpenMS/ANALYSIS/ID/PercolatorFeatureSetHelper.h, src/openms/source/ANALYSIS/ID/PercolatorFeatureSetHelper.cpp
Declares addANDESFeatures in the public API and implements it: iterates all peptide hits, deduplicates andes:-prefixed meta keys whose DataValue type is DOUBLE_VALUE or INT_VALUE using a std::set, and appends them to feature_set. Adds #include <set> to the translation unit.
PSMFeatureExtractor dispatch, tests, and changelog
src/topp/PSMFeatureExtractor.cpp, src/tests/class_tests/openms/source/PercolatorFeatureSetHelper_test.cpp, CHANGELOG
Extends the search-engine dispatch to call addANDESFeatures for the "andes" engine and updates the Doxygen comment listing supported engines. The unit test constructs a peptide hit with mixed-type andes: MetaValues and a non-ANDES key, then asserts exactly three numeric features are collected and the non-numeric and non-ANDES keys are excluded. Changelog records the new behavior.

🐇 A new engine joins the Percolator parade,
With andes: prefixes now unafraid—
Numeric MetaValues, plucked from the hit,
Deduplicated neatly, every bit!
The rabbit hops happy, the feature set's right. 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. 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 accurately summarizes the main change: adding andes search engine Percolator feature registration to PSMFeatureExtractor.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@ypriverol

Copy link
Copy Markdown
Contributor Author

CI note: the only failing job (build-and-test ubuntu-24.04, clang++ 18) failed solely on StopWatch_test (#31, a wall-clock timing test) — unrelated to this change and flaky under CI load. All feature-relevant tests passed on that same job (PSMFeatureExtractor_1/2/3, PercolatorAdapter_*, PercolatorInfile_test, PercolatorFeatureSetHelper unit test), and the macOS-clang, g++, and Windows builds are all green. A re-run of the failed job should clear it (I don't have rerun permissions on the repo). Happy to address any review feedback.

Copy link
Copy Markdown
Contributor

CI failure note: The single failing test (StopWatch_test, Ubuntu 24.04 / clang++ 18) is unrelated to this PR's changes (which only touch PercolatorFeatureSetHelper and PSMFeatureExtractor).

The failure is a flaky timing assertion at line 169:

TEST_EQUAL(s.getSystemTime() <= s_nostop.getSystemTime(), true)
// got: system time 0.01 s < some reference — comparison returned false

This is a pre-existing intermittent failure caused by OS scheduler jitter on the CI runner. The PR itself is clean — all 2,669 other tests passed.


Generated by Claude Code

@timosachsenberg
timosachsenberg merged commit 0464c20 into OpenMS:develop Jun 21, 2026
40 of 41 checks passed
timosachsenberg added a commit that referenced this pull request Jun 24, 2026
…9650, #9651 (#9652)

- Add PR reference (#9650) to the error-message improvement entry (was issue #9636 only)
- Add PR reference (#9642) to ProSE end-of-search report entry
- Add PR reference (#9643) to PSMFeatureExtractor andes support entry
- Add PR reference (#9649) to UniPEFF new-tool entry
- Add Build System entry for #9648: Boost.Spirit → charconv, 30-40% faster build
- Add Build System entry for #9651: missing <thread> header fix for clang 21+


Claude-Session: https://claude.ai/code/session_01DdyZmN6J65umScGRherQ9W

Co-authored-by: Claude <[email protected]>
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