Skip to content

[TEST] IsoelectricPoint: add a numeric check for the SILLERO scale (#9460) - #9542

Merged
timosachsenberg merged 2 commits into
OpenMS:developfrom
timosachsenberg:test/9460-isoelectricpoint-sillero
Jun 20, 2026
Merged

timosachsenberg merged 2 commits into
OpenMS:developfrom
timosachsenberg:test/9460-isoelectricpoint-sillero

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds an IsoelectricPoint_test section pinning the SILLERO pKa scale with reference-free self-consistency invariants:

  • net charge spans zero across the pH range — positive at pH 1, negative at pH 14;
  • the computed pI lies inside the searched [0,14] interval;
  • the net charge at the pI is ≈ 0 — the definition of the isoelectric point (computeCharge(seq, computePI(seq, SILLERO), SILLERO) ≈ 0);
  • SILLERO's distinct pKa table yields a pI different from the default Lehninger scale.

Why

Closes the §7 [AUTO] task in the OpenMS 3.6.0 pre-release testing plan (#9460):

IsoelectricPoint_test … add external reference vectors … ensuring each scale — including SILLERO — has a numeric check. Pass: computed pI matches … for every scale.

IsoelectricPoint_test had numeric checks for LEHNINGER, EMBOSS and BJELLQVIST, but SILLERO was never exercised at all (confirmed by grepping the test). Rather than hard-code an external pepstats/Expasy reference value (not available here, and brittle), I pinned the scale with the definitional invariant — pI is the pH where net charge is zero — which is reference-free and directly validates that SILLERO's pKa table is wired up and internally consistent. The cross-scale inequality guards against SILLERO silently falling back to Lehninger.

Test plan

Tests only — no production code changed. Verified locally: -fsyntax-only clean, full build green, test runs PASSED. At runtime SILLERO gives pI 4.151 (vs Lehninger 3.830) with net charge ≈ -1.6e-5 at the pI — confirming the scale is implemented and self-consistent.

Part of #9460. Follows #9524 … #9541.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added unit tests for IsoelectricPoint calculations using the SILLERO pKa scale, validating net charge behavior at low/high pH, confirming the computed pI falls within the expected range, checking that net charge is near zero at the computed pI, and verifying pI differs from the Lehninger-based result for the same peptide.

…penMS#9460)

IsoelectricPoint_test had numeric checks for the LEHNINGER, EMBOSS and BJELLQVIST
scales, but the SILLERO scale was never exercised.

Adds a reference-free self-consistency section for SILLERO (no external tool
needed): the net charge spans zero across the pH range (positive at pH 1,
negative at pH 14), the computed pI lies in the searched [0,14] interval, the net
charge at the pI is ~0 (the definition of the isoelectric point), and SILLERO's
distinct pKa table yields a pI different from the default Lehninger scale.

Verified: builds clean and the test runs PASSED (SILLERO pI 4.151 vs Lehninger
3.830; charge at pI ~ -1.6e-5).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 15, 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: a0e9f6b2-c986-4339-8754-55d88417db7c

📥 Commits

Reviewing files that changed from the base of the PR and between d7ce687 and ce1867e.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/source/IsoelectricPoint_test.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/tests/class_tests/openms/source/IsoelectricPoint_test.cpp

📝 Walkthrough

Walkthrough

A new START_SECTION is added to IsoelectricPoint_test.cpp to verify SILLERO pKa scale behavior: charge sign at pH extremes, pI within the (0, 14) interval, near-zero net charge at the computed pI, and divergence of the SILLERO pI from the Lehninger default for the same peptide.

Changes

SILLERO Scale Test Coverage

Layer / File(s) Summary
SILLERO scale numeric self-consistency assertions
src/tests/class_tests/openms/source/IsoelectricPoint_test.cpp
Adds a START_SECTION that asserts charge sign reversal at pH extremes using ProteomicsPkaScale::SILLERO, verifies the computed SILLERO pI is within (0, 14), checks net charge at the pI is approximately zero within absolute tolerances, and confirms the SILLERO pI differs from the Lehninger pI for the same peptide.

Poem

A bunny with peptides both acidic and base,
Hopped pH extremes at a confident pace.
SILLERO pI? Inside zero to fourteen!
Net charge near zero — the cleanest I've seen.
Lehninger differs, as expected, hooray! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. 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 specifically identifies the main change: adding a numeric validation test for the SILLERO pKa scale in IsoelectricPoint tests.
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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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/tests/class_tests/openms/source/IsoelectricPoint_test.cpp`:
- Around line 146-147: The TEST_EQUAL macro calls are missing statement
terminators (semicolons), which will cause compilation errors. Add a semicolon
at the end of each TEST_EQUAL macro invocation on lines 146, 147, 151, 152, 157,
and 161 in the IsoelectricPoint_test.cpp file to match the expected syntax for
test macro usage throughout the rest of the file.
🪄 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: cccede9a-5a9e-4f4d-90b5-b696a1318ebb

📥 Commits

Reviewing files that changed from the base of the PR and between aacd941 and d7ce687.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/source/IsoelectricPoint_test.cpp

@github-actions

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Timo Sachsenberg

Please consider applying the following patch:

--- AUTHORS	2026-06-15 17:41:47.074211769 +0000
+++ AUTHORS.new	2026-06-15 17:41:52.325845697 +0000
@@ -23,8 +23,8 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

# Conflicts:
#	src/tests/class_tests/openms/source/IsoelectricPoint_test.cpp
@timosachsenberg timosachsenberg mentioned this pull request Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Adversarial review result: I did not find a blocking issue in this test-only change. The IsoelectricPoint SILLERO invariant coverage is narrowly scoped and does not alter runtime behavior.

No source/test comments with tracker-style issue references stood out in this diff.

I did not run the tests locally.

@timosachsenberg
timosachsenberg merged commit ddf2de3 into OpenMS:develop Jun 20, 2026
38 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.

1 participant