Skip to content

[FIX] Update preconditions for matrix dimensions in MRMScoring - #10055

Merged
timosachsenberg merged 1 commit into
OpenMS:developfrom
singjc:fix/100050_osw_single_transition
Sep 4, 2026
Merged

timosachsenberg merged 1 commit into
OpenMS:developfrom
singjc:fix/100050_osw_single_transition

Conversation

@singjc

@singjc singjc commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Addresses #10050

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

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.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Summary by CodeRabbit

  • Bug Fixes

    • Single-transition data is now supported when calculating cross-correlation and mutual-information scores.
    • Scoring results for 1×1 transition matrices are produced correctly, including weighted and unweighted calculations.
  • Tests

    • Added coverage for single-transition cross-correlation and mutual-information scoring scenarios.

@coderabbitai

coderabbitai Bot commented Sep 3, 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: Team

Run ID: c8acb88f-13b6-4e9e-87a1-6d698abcbff1

📥 Commits

Reviewing files that changed from the base of the PR and between 25b3b04 and 1a3cbd3.

📒 Files selected for processing (2)
  • src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cpp
  • src/tests/class_tests/openms/source/MRMScoring_test.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Single-transition scoring support

Layer / File(s) Summary
Allow 1x1 scoring matrices
src/openms/source/ANALYSIS/OPENSWATH/MRMScoring.cpp
XCorr coelution, XCorr shape, MI, and weighted scoring checks now accept matrices with at least one row.
Validate single-transition scores
src/tests/class_tests/openms/source/MRMScoring_test.cpp
Tests verify 1x1 XCorr scores and MI scores for unweighted and weighted functions.

Poem

A rabbit found one transition bright
Scores hopped through a matrix tight
XCorr shaped the trail
MI carried the scale
One row made the tests take flight

Merge Risk: ⚪ Minimal · up to 1a3cb

Single-transition MRM scoring now accepts 1x1 XCorr and MI matrices, with tests covering the expected score outputs. No current merge-blocking risk remains.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating matrix-dimension preconditions in MRMScoring. It is related to the implementation and tests.
  • Fix all pre-merge checks with AI
✨ 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.

@timosachsenberg

Copy link
Copy Markdown
Contributor

Thanks 🙏

@timosachsenberg
timosachsenberg merged commit 38dd234 into OpenMS:develop Sep 4, 2026
35 checks passed
timosachsenberg added a commit that referenced this pull request Sep 5, 2026
…coring single-transition fixes (#10065)

Two recently merged fixes landed without their own CHANGELOG entry:
- #10057 (fixes #10049) - Percolator::train()/rescore() called Normalizer::getNormalizer()
  themselves even though SetHandler::normalizeFeatures() already does so via its
  out-parameter, tripping the vendored Normalizer's "Multiple instantiations" assert in
  Debug builds.
- #10055 (fixes #10050) - MRMScoring's cross-correlation/mutual-information scoring
  functions required a matrix of at least 2x2, rejecting single-transition compounds.


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

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.

OpenSwath: single-transition peak groups score as perfectly coeluting (and abort in Debug)

2 participants