Repository navigation
MaRaClusterAdapter: pass the precursor tolerance unit on to MaRaCluster - #10263
Conversation
MaRaCluster takes the unit as the suffix of -p ("20.0ppm", "0.05Da") and
reads a value without one as ppm. The adapter appended the index of the
chosen unit (0 for ppm, 1 for Da) as a digit instead. So the default
20 ppm reached MaRaCluster as '-p 20.00', which is right by accident, and
-precursor_tolerance 0.05 -precursor_tolerance_units Da as '-p 0.051',
i.e. 0.051 ppm. A tolerance in Da was never applied: on the adapter's
test inputs, 0.05 Da gives 1946 consensus spectra, the 0.051 ppm it ran
with 2242.
The value now carries the unit's name. The option's description,
"tolerance_mass_units 0=ppm, 1=Da", described the old mapping; it now
reads "Unit of 'precursor_tolerance'." as in other tools, also in the
two test INIs.
TOPP_MaRaClusterAdapter_3 runs the adapter with 0.05 Da at debug level
4, where it logs the MaRaCluster command line, and checks that the line
contains '-p 0.05Da'.
Checked by building MaRaClusterAdapter against the 2026-09-24 nightly
package (its headers and libOpenMS_CLI) and running the MaRaClusterAdapter
tests as third_party_tests.cmake defines them. With MaRaCluster 0.05.0
and the current references, and with 1.04.1 and the references
regenerated in #10259, tests 1 and 2 still pass and
TOPP_MaRaClusterAdapter_3 passes; with the nightly's unfixed adapter,
TOPP_MaRaClusterAdapter_3 fails.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NgnkdZCjwS6LE8cufGTDJU
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughMaRaClusterAdapter now passes precursor tolerances with their unit suffix, such as ChangesMaRaCluster tolerance units
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change is intended to preserve the requested tolerance unit when invoking MaRaCluster, and the added test checks the Da form. No actionable merge-blocking risk is evident from the supplied context. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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 2 functions across 1 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit checks the suffix with care, Comment |
Description
-precursor_tolerance_units Dahad no effect: MaRaCluster always got the tolerance in ppm.MaRaCluster takes the unit as the suffix of
-p(20.0ppm,0.05Da) and reads a value without one as ppm. The adapter mapped the unit to an index (ppm→ 0,Da→ 1) and appended that index as a digit instead:-p 20.00, which is right by accident;-precursor_tolerance 0.05 -precursor_tolerance_units Dareached it as-p 0.051, i.e. 0.051 ppm.On the adapter's test inputs (3,374 spectra), 0.05 Da gives 1,946 consensus spectra; the 0.051 ppm it actually ran with gives 2,242.
Changes:
MaRaClusterAdapter.cpp: the-pvalue now carries the unit's name (0.05Da,20.0ppm).tolerance_mass_units 0=ppm, 1=Da, described the old mapping. It now readsUnit of 'precursor_tolerance'., as in other tools, also in the two test INIs.TOPP_MaRaClusterAdapter_3: runs the adapter with 0.05 Da at-debug 4, where it logs the MaRaCluster command line, and requires-p 0.05Dain the output.Verification (no full OpenMS build here): I built this
MaRaClusterAdapter.cppagainst the 2026-09-24 nightly package (its headers andlibOpenMS_CLI) and ran the MaRaClusterAdapter tests asthird_party_tests.cmakedefines them:TOPP_MaRaClusterAdapter_1/_2and their comparisons still pass, andTOPP_MaRaClusterAdapter_3passes;TOPP_MaRaClusterAdapter_3fails ("Required regular expression not found").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.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NgnkdZCjwS6LE8cufGTDJU
Generated by Claude Code
Summary by CodeRabbit