Repository navigation
[TEST] PercolatorInfile: validate getStandardFeatureSet / .pin header columns (#9460) - #9536
Conversation
… columns (OpenMS#9460) PercolatorInfile_test only covered load(); the .pin feature-set / header writer (getStandardFeatureSet, used to assemble the Percolator input header) was untested. Adds a section asserting the exact ordered feature set: - the three mandatory columns SpecId, Label, ScanNr - mass/length features (ExpMass, CalcMass, mass, peplen) - one "charge<c>" column per charge state in [min,max] (verified for 2..4 and the single-state 3..3 case) - enzyme / mass-delta features (enzN, enzC, enzInt, dm, absdm) and that the assembled header (features + Peptide + Proteins) begins with SpecId and ends with Peptide, Proteins -- the exact shape Percolator parses (OpenMS#9195). Verified: builds clean and the test runs PASSED. Co-Authored-By: Claude Opus 4.8 <[email protected]>
📝 WalkthroughWalkthroughA new ChangesPercolatorInfile getStandardFeatureSet test coverage
Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
src/tests/class_tests/openms/source/PercolatorInfile_test.cpp (1)
83-86: 💤 Low valueOptional: Remove redundant verification already covered by the loop.
The loop at lines 78-81 already verifies that
fs[0],fs[1], andfs[2]match the expected values "SpecId", "Label", and "ScanNr". These explicit checks are redundant.♻️ Proposed simplification
- // the three mandatory leading columns - TEST_STRING_EQUAL(fs[0], "SpecId") - TEST_STRING_EQUAL(fs[1], "Label") - TEST_STRING_EQUAL(fs[2], "ScanNr") - // a single charge state yields exactly one "charge3" column and no other charge column🤖 Prompt for 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. In `@src/tests/class_tests/openms/source/PercolatorInfile_test.cpp` around lines 83 - 86, The TEST_STRING_EQUAL assertions for fs[0], fs[1], and fs[2] at lines 83-86 are redundant because the loop at lines 78-81 already verifies these three mandatory leading columns match the expected values "SpecId", "Label", and "ScanNr". Remove these three redundant TEST_STRING_EQUAL calls to simplify the test and avoid duplicate verification of the same conditions.
🤖 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.
Nitpick comments:
In `@src/tests/class_tests/openms/source/PercolatorInfile_test.cpp`:
- Around line 83-86: The TEST_STRING_EQUAL assertions for fs[0], fs[1], and
fs[2] at lines 83-86 are redundant because the loop at lines 78-81 already
verifies these three mandatory leading columns match the expected values
"SpecId", "Label", and "ScanNr". Remove these three redundant TEST_STRING_EQUAL
calls to simplify the test and avoid duplicate verification of the same
conditions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9c861fae-66f6-48ac-8bfb-37d2bf026418
📒 Files selected for processing (1)
src/tests/class_tests/openms/source/PercolatorInfile_test.cpp
|
@timosachsenberg The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-15 16:37:56.562105403 +0000
+++ AUTHORS.new 2026-06-15 16:38:01.819824793 +0000
@@ -23,8 +23,8 @@
- Chirag Dave
- Chris Bauer
- Chris Bielow
- - Christie Mathews
- Christian Ehrlich
+ - Christie Mathews
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
What
Adds a
PercolatorInfile_testsection pinninggetStandardFeatureSet(min_charge, max_charge)— the source of the Percolator.pinheader columns. It asserts the exact, ordered feature set:SpecId,Label,ScanNr;ExpMass,CalcMass,mass,peplen;charge<c>column per charge state in[min,max]— verified for2..4(charge2,charge3,charge4) and the single-state3..3case (charge3only);enzN,enzC,enzInt,dm,absdm;and that the assembled header (
features + Peptide + Proteins) begins withSpecIdand ends withPeptide, Proteins— the exact shape Percolator parses.Why
Closes the SDK-free part of the §5 (ProSE / Percolator)
[AUTO]task in the OpenMS 3.6.0 pre-release testing plan (#9460):PercolatorInfile_testpreviously only coveredload(). The header writer (getStandardFeatureSet) — the contract the full-out_pinpath depends on — was untested. This pins it directly at the class level (no Percolator binary or search run needed). A full tool-level-out_pinround-trip remains a complementary, data-backed follow-up.Test plan
Tests only — no production code changed. Verified locally:
-fsyntax-onlyclean, full build green, test runs PASSED (exact column lists for charges2..4and3..3, and theSpecId … Peptide Proteinsheader bounds all match).Part of #9460. Follows #9524, #9525, #9526, #9528, #9530, #9531, #9532, #9533, #9534, #9535.
🤖 Generated with Claude Code
Summary by CodeRabbit