Repository navigation
(osw,percolator): Add Percolator based scoring for OSW results - #9695
Conversation
|
@singjc The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-07-01 05:00:54.555427918 +0000
+++ AUTHORS.new 2026-07-01 05:01:00.037089365 +0000
@@ -113,6 +113,7 @@
- Sandro Andreotti
- Santhil
- Simon Gene Gottlieb
+ - singjc
- Steffen Sass
- Stephan Aiche
- Sven Nahnsen |
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThis PR adds ChangesOpenSwathPercolatorScoring feature
Possibly related PRs
Suggested reviewers: Poem
🚥 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/openms/include/OpenMS/ANALYSIS/OPENSWATH/OpenSwathPercolatorScoring.h`:
- Line 21: Remove the public String alias from OpenSwathPercolatorScoring.h and
rely on the existing OpenMS String type instead of introducing a new
std::string-based alias. Update any uses in OpenSwathPercolatorScoring or
related symbols to refer to the canonical OpenMS::String definition so the
header no longer creates a conflicting declaration.
In `@src/openms/source/ANALYSIS/OPENSWATH/OpenSwathPercolatorScoring.cpp`:
- Around line 1043-1051: The directory-input validation in
OpenSwathPercolatorScoring should reject archive-shaped targets even when the
output path does not yet exist. Update the checks around the directory OSWPQ
branch and prepareParquetWorkspace_() so that a directory input only accepts a
true directory destination, not a path ending in .zip or similar
archive/container extension. Use the existing input_path/output_path validation
logic in OpenSwathPercolatorScoring.cpp to enforce the directory-to-directory
contract before workspace creation.
- Around line 1081-1164: The SCORE_* rewrite is not atomic because `DROP TABLE
IF EXISTS` and `CREATE TABLE` run before `BEGIN TRANSACTION`, so a later failure
in the `insert_stmt` loop can leave the old score table destroyed and the new
one incomplete. Move the full table replacement flow in the
OpenSwathPercolatorScoring write path into a single transaction in this method:
start the transaction before executing `create_sql`, keep the existing inserts
inside it, and only commit with `END TRANSACTION` after all rows are written
successfully. If anything fails, ensure the transaction is rolled back so
`SCORE_MS2`/`SCORE_TRANSITION` is never left partially rewritten.
In `@src/openms/source/APPLICATIONS/ToolHandler.cpp`:
- Around line 147-149: The tools_map entries in ToolHandler::registerTools are
not in alphabetical order, specifically OpenSwathPercolatorScoring is placed
before OpenSwathMzMLFileCacher even though M should come before P. Reorder the
affected insertions in the tool registration block so the OpenSwath* entries
follow alphabetical order consistently with the surrounding entries and the
file’s convention.
In `@src/tests/class_tests/openms/source/OpenSwathPercolatorScoring_test.cpp`:
- Around line 167-244: The boolean checks in OpenSwathPercolatorScoring_test
should use the dedicated truthiness assertions instead of equality comparisons.
Update the TEST_EQUAL(<expr>, true) cases in this test to TEST_TRUE(<expr>) and
any false checks to TEST_FALSE(<expr>), keeping the same expressions and
coverage around scorer.score, querySqliteInt64_, and checkParquetFeatureColumns_
so the assertions match the project’s test style.
🪄 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: 248e92e4-cb83-401a-bef1-da4ad8a11487
📒 Files selected for processing (12)
doc/doxygen/public/TOPP.doxygensrc/openms/include/OpenMS/ANALYSIS/OPENSWATH/OpenSwathPercolatorScoring.hsrc/openms/include/OpenMS/ANALYSIS/OPENSWATH/sources.cmakesrc/openms/source/ANALYSIS/OPENSWATH/OpenSwathPercolatorScoring.cppsrc/openms/source/ANALYSIS/OPENSWATH/sources.cmakesrc/openms/source/APPLICATIONS/ToolHandler.cppsrc/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/executables.cmakesrc/tests/class_tests/openms/source/OpenSwathPercolatorScoring_test.cppsrc/tests/topp/CMakeLists.txtsrc/topp/OpenSwathPercolatorScoring.cppsrc/topp/executables.cmake
|
Nice! |
…XIPMParquetFile Doxygen - OpenSwathPercolatorScoring (added in #9695) had no Python binding, unlike sibling OSW classes (OpenSwathOSWWriter, Percolator); expose the class, its Level enum, and ScoreSummary struct following the existing Percolator binding pattern (def_DefaultParamHandler, nested types scoped under the class handle). - XIPMParquetFile.h (added in #9684) had only a one-line class @brief and no per-member documentation; bring it in line with the XICParquetFile.h / XIMParquetFile.h sibling readers added in the same PR wave. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Po25Mh5kdPa6b8AFn5hagb
Description
This pull request introduces the
OpenSwathPercolatorScoringclass and associated test and build system updates to support Percolator-based scoring of OpenSWATH results. The main goal is to enable in-process Percolator scoring for OpenSwath results, to eventually deprecate/archive PyProphet, since most of PyProphet has be transferred directly into OpenMS now..Performance Comparison to PyProphet
Test file:
20200505_Evosep_200SPD_SG06-16_MLHeLa_200ng_py8_S3-A1_1_2737.mzML(PXD017703)Percolator's score distribution closely matches PyProphets SVM (Sklearn) score distribution.
Fairly similar performance in number of precursor IDs at 1% comparing PyProphet's SVM to Percolator.
Of overlapping precursors, most are assigned the same peak-group feature
New Feature: Percolator Scoring Integration
OpenSwathPercolatorScoringclass, which provides rescoring of OpenSWATH OSW and OSWPQ results using Percolator. This includes support for multiple scoring levels (MS1, MS2, MS1MS2, and transition), and handles both SQLite and Parquet input/output formats. (OpenSwathPercolatorScoring.h, [1] [2]OpenSwathPercolatorScoringas a TOPP tool and documented it in the Doxygen manual and tool handler map. (TOPP.doxygen,ToolHandler.cpp, [1] [2]Build System and Source Integration
OpenSwathPercolatorScoringto the OpenMS build system, including CMake source lists for both header and implementation files, and ensured correct linking for tests. (sources.cmake, [1] [2] [3] [4]Testing
OpenSwathPercolatorScoring_test.cpp) covering all supported scoring levels, input formats, and error cases. The test verifies correct output, error handling, and integration with SQLite and Parquet backends. (OpenSwathPercolatorScoring_test.cpp, src/tests/class_tests/openms/source/OpenSwathPercolatorScoring_test.cppR1-R248).oswand.oswpqinput/output cases. (CMakeLists.txt, [1] [2]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
New Features
Bug Fixes
Tests
Documentation