Skip to content

[FIX] ProSE/SimpleSearchEngine: don't abort on low-res data; gate deisotoping via Deisotoper::isToleranceSupported (#9619) - #9620

Merged
timosachsenberg merged 3 commits into
developfrom
fix/prose-lowres-deisotope-9619
Jun 18, 2026
Merged

timosachsenberg merged 3 commits into
developfrom
fix/prose-lowres-deisotope-9619

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes #9619.

OpenMS aborts (signal 6, uncaught Exception::IllegalArgument) when a fragment-index search engine is given a fragment tolerance appropriate for low-resolution (ion-trap CID) MS2 data. Deisotoper::deisotopeAndSingleCharge throws for a fragment tolerance > 100 ppm / 0.1 Da, and ProSE / SimpleSearchEngine call it inside an #pragma omp parallel for — an exception escaping a parallel region calls std::terminate(), after the fragment index has already been built.

Fix

Single source of truth. New static bool Deisotoper::isToleranceSupported(tol, ppm) exposes the deisotoper's own limit (non-throwing). Both deisotopeAndSingleCharge() precondition throws now use it, and external callers consult it instead of re-hardcoding 0.1 Da / 100 ppm.

ProSE. New fragment:deisotope parameter (auto | true | false, default auto), modelled on how data-driven engines gate single-charge deconvolution per instrument class (off for low-res). Resolved once in updateMembers_: false never deisotopes; auto deisotopes only for high-res tolerances and skips low-res (with a one-time warning) so the search runs; true always deisotopes and is rejected up front (ILLEGAL_PARAMETERS) on a low-res tolerance. preprocessSpectra_ now takes a plain bool and gates the Deisotoper call on isToleranceSupported(), so it is self-safe regardless of caller and no exception can escape the OpenMP region.

SimpleSearchEngine. The sibling SimpleSearchEngineAlgorithm::preprocessSpectra_ had the identical latent abort; it now gates its deisotope call on isToleranceSupported() too — low-res input skips deisotoping instead of aborting.

Behaviour

  • High-res runs unchanged — incl. the existing ProSE_1/2/4 TOPP tests (fragment tolerance 0.1 Da) and SimpleSearchEngine's normal ppm path.
  • Low-res CID runs complete (deisotoping skipped) instead of aborting.

Tests

  • Deisotoper_test: isToleranceSupported boundary values (ppm/Da).
  • ProSEAlgorithm_test: preprocessSpectra_ self-safety (never aborts out-of-range) + fragment:deisotope resolution / validation.

Verification (PRIDE PXD001819 UPS1_50amol_R1, low-res ion-trap CID)

  • ProSE default auto + 0.5 Da: warns, completes, writes a valid .pin (before: abort).
  • ProSE -Search:fragment:deisotope true + low-res: clean ILLEGAL_PARAMETERS (before: abort).
  • SimpleSearchEngine + 0.5 Da: warns, completes (82 MB idXML, 11 s), 0 aborts (before: abort).

Note

This generalizes the original per-tool fix after code review (the 0.1 Da / 100 ppm limit was duplicated, and the sibling SimpleSearchEngine retained the same latent abort). The other deisotopeAndSingleCharge callers (TargetedSpectraExtractor, OPXLSpectrumProcessingAlgorithms, SwathQC) are left unchanged but can now adopt Deisotoper::isToleranceSupported() to gate safely.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added configurable MS2 deisotoping mode (auto, enabled, disabled) to control whether deisotoping runs during preprocessing.
  • Bug Fixes

    • Improved handling of unsupported fragment tolerances: deisotoping is now safely skipped (with a warning) instead of failing during parallel preprocessing.
  • Tests

    • Added regression tests covering deisotoping mode behavior and preprocessing safety across supported and unsupported tolerance ranges.

timosachsenberg and others added 2 commits June 17, 2026 18:21
…ead of aborting (#9619)

preprocessSpectra_ called Deisotoper::deisotopeAndSingleCharge inside an
#pragma omp parallel for. The deisotoper throws for fragment tolerance
>0.1 Da / >100 ppm, so the exception escaped the parallel region and called
std::terminate() -- ProSE aborted (signal 6) on low-resolution (ion-trap CID)
data, after the fragment index had already been built.

Decide whether to deisotope once, before the OpenMP region: skip it (with a
one-time OPENMS_LOG_WARN) when the tolerance is out of range, so ProSE can
still search low-resolution spectra. High-res behaviour (<=0.1 Da / <=100 ppm)
is unchanged; existing ProSE_1/2/4 TOPP tests run at 0.1 Da and are unaffected.

Adds a ProSEAlgorithm_test regression section (preprocessSpectra_ at 0.5 Da /
150 ppm must not throw; 0.05 Da / 20 ppm still deisotope).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
… (fragment:deisotope)

Generalize the low-res deisotoping fix (#9619) into an explicit parameter,
modelled on data-driven engines' per-instrument deconvolution gating (e.g.
bigbio/andes apply_deconvolution, which is off for its low-res CID model):

  fragment:deisotope = auto (default) | true | false
    - auto:  deisotope only for high-res tolerances (<=0.1 Da / <=100 ppm),
             skip (with a warning) for low-res so the search still runs;
    - true:  always deisotope; rejected up front (ILLEGAL_PARAMETERS) when the
             fragment tolerance is low-res, instead of aborting mid-search;
    - false: never deisotope.

The decision is still made once, before the OpenMP region, and the Deisotoper
is only ever called with an in-range tolerance, so no exception can escape the
parallel region (the second defect in #9619).

Extends ProSEAlgorithm_test with deisotope-mode coverage and parameter validation.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@timosachsenberg timosachsenberg changed the title [FIX] ProSE: skip MS2 deisotoping for low-res fragment tolerance instead of aborting (#9619) [FIX] ProSE: make MS2 deisotoping an explicit instrument-aware option, fixing low-res abort (#9619) Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

ProSEAlgorithm and SimpleSearchEngineAlgorithm now safely gate MS2 deisotoping based on tolerance range support. A new Deisotoper::isToleranceSupported() predicate centralizes tolerance-range checks (≤100 ppm or ≤0.1 Da) previously inlined in deisotoping entry points. ProSEAlgorithm adds a fragment:deisotope parameter ("auto"/"true"/"false"), validates it fail-fast in updateMembers_(), and conditionally calls Deisotoper::deisotopeAndSingleCharge inside preprocessing's OpenMP region. SimpleSearchEngineAlgorithm defensively gates deisotoping with warnings. All call sites are updated and tested.

Changes

Safe, configurable MS2 deisotoping with tolerance-aware gating

Layer / File(s) Summary
Core Deisotoper tolerance-range predicate and refactoring
src/openms/include/OpenMS/PROCESSING/DEISOTOPING/Deisotoper.h, src/openms/source/PROCESSING/DEISOTOPING/Deisotoper.cpp, src/tests/class_tests/openms/source/Deisotoper_test.cpp
Adds Deisotoper::isToleranceSupported(fragment_tolerance, fragment_unit_ppm) static predicate defining the same resolution limits (≤100 ppm or ≤0.1 Da) enforced by deisotoping entry points. Refactors deisotopeWithAveragineModel and deisotopeAndSingleCharge to call the predicate instead of inlining checks. Adds boundary-value tests validating both ppm and Da modes.
ProSEAlgorithm fragment:deisotope parameter and fail-fast validation
src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h, src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Registers fragment:deisotope parameter with allowed values "auto", "true", "false". Adds deisotope_requested_ boolean member. In updateMembers_(), resolves the parameter into the boolean, checks tolerance support, throws InvalidParameter when deisotope=true exceeds limits, and logs a warning when deisotope=auto must skip due to unsupported tolerance.
ProSEAlgorithm conditional deisotoping in preprocessSpectra_
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Updates preprocessSpectra_ signature to accept deisotope_requested. Before the OpenMP loop, computes do_deisotope = deisotope_requested AND isToleranceSupported(). Guards Deisotoper::deisotopeAndSingleCharge inside the parallel loop with this flag, preventing exceptions from escaping.
ProSEAlgorithm call site integration and regression tests
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp, src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp
Updates all three preprocessSpectra_ call sites (chunked search, single-context in-memory, multi-file chunk-major) to pass deisotope_requested_. Exposes preprocessSpectra_ in test via using-declaration. Adds regression tests: one covering all mode/tolerance combinations for safe execution, another validating parameter defaults, InvalidParameter rejection for low-resolution deisotope=true, and valid configurations.
SimpleSearchEngineAlgorithm defensive tolerance check and conditional gating
src/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp
Precomputes do_deisotope using Deisotoper::isToleranceSupported() before the OpenMP loop. Wraps Deisotoper::deisotopeAndSingleCharge in a conditional, logs a warning when unsupported tolerances force skipping, and shares the flag across parallel threads to prevent race conditions and exception escape.

🐇 The tolerances grew wild, the deisotoper cried,
"My bounds are too tight!" as exceptions flew wide.
But now we check first, before flames take flight—
Auto warns gently, True fails fast and bright.
OpenMP's safe haven: no crashes tonight! ✨

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 64.29% 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 directly and accurately summarizes the main fix: preventing aborts on low-resolution data by gating deisotoping via a new tolerance check helper.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/prose-lowres-deisotope-9619

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp (1)

88-98: ⚠️ Potential issue | 🟠 Major

Reject negative fragment tolerances before the OpenMP path.

The new guard only checks the upper Deisotoper limit, so fragment:mass_tolerance = -1 is treated as in_range and can still be passed to Deisotoper::deisotopeAndSingleCharge inside the parallel loop. Add a non-negative minimum to the parameter and include the lower bound in both predicates.

Also fix the endl on line 378 to use \n instead (preferred in new logging code per coding guidelines).

Suggested fix
     defaults_.setValue("fragment:mass_tolerance", 10.0, "Fragment mass tolerance");
+    defaults_.setMinFloat("fragment:mass_tolerance", 0.0);
 
@@
       const bool unit_ppm = (fragment_mass_tolerance_unit_ == "ppm");
-      const bool in_range = (unit_ppm && fragment_mass_tolerance_ <= 100.0) || (!unit_ppm && fragment_mass_tolerance_ <= 0.1);
+      const bool in_range = fragment_mass_tolerance_ >= 0.0 &&
+        ((unit_ppm && fragment_mass_tolerance_ <= 100.0) || (!unit_ppm && fragment_mass_tolerance_ <= 0.1));
@@
     const bool tol_in_range =
-      (fragment_mass_tolerance_unit_ppm && fragment_mass_tolerance <= 100.0) ||
-      (!fragment_mass_tolerance_unit_ppm && fragment_mass_tolerance <= 0.1);
+      fragment_mass_tolerance >= 0.0 &&
+      ((fragment_mass_tolerance_unit_ppm && fragment_mass_tolerance <= 100.0) ||
+       (!fragment_mass_tolerance_unit_ppm && fragment_mass_tolerance <= 0.1));
@@
       OPENMS_LOG_WARN << "[ProSE] Fragment tolerance " << fragment_mass_tolerance
                       << (fragment_mass_tolerance_unit_ppm ? " ppm" : " Da")
                       << " exceeds the deisotoping limit (100 ppm / 0.1 Da); skipping MS2 "
-                      << "deisotoping (expected for low-resolution data)." << endl;
+                      << "deisotoping (expected for low-resolution data)." << "\n";
🤖 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/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp` around lines 88 - 98, The
fragment mass tolerance validation is missing a non-negative minimum bound
check, allowing negative values like -1 to be passed to the
Deisotoper::deisotopeAndSingleCharge function. Add a minimum bound validation to
the "fragment:mass_tolerance" parameter using defaults_.setMinFloat to ensure it
is non-negative, and update any predicates that check the tolerance range to
include this lower bound check alongside the existing upper bound check.
Additionally, locate and replace the endl on line 378 with \n to match the
preferred logging style in new code per coding guidelines.
🧹 Nitpick comments (1)
src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp (1)

1457-1470: ⚡ Quick win

Add an explicit invalid ppm case for deisotope=true validation.

This section validates the low-res rejection only for Da. Add a 150 ppm rejection assertion to lock both unit branches of the contract.

Suggested addition
   // deisotope=true with a low-resolution (Da > 0.1) tolerance is rejected up front,
   // rather than aborting later inside the search.
   Param p = algo.getParameters();
   p.setValue("fragment:deisotope", "true");
   p.setValue("fragment:mass_tolerance", 0.5);
   p.setValue("fragment:mass_tolerance_unit", "Da");
   TEST_EXCEPTION(Exception::InvalidParameter, algo.setParameters(p))
+
+  // deisotope=true with a low-resolution (ppm > 100) tolerance is also rejected.
+  p.setValue("fragment:mass_tolerance", 150.0);
+  p.setValue("fragment:mass_tolerance_unit", "ppm");
+  TEST_EXCEPTION(Exception::InvalidParameter, algo.setParameters(p))
🤖 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/ProSEAlgorithm_test.cpp` around lines
1457 - 1470, Add a test case after the existing low-resolution Da rejection test
(where fragment:mass_tolerance is 0.5) to validate the same deisotope=true
rejection behavior for ppm units. Create a new test block that sets
fragment:mass_tolerance to 150, fragment:mass_tolerance_unit to "ppm",
fragment:deisotope to "true", and verify that calling algo.setParameters(p) with
these parameters throws an Exception::InvalidParameter using TEST_EXCEPTION,
ensuring both unit branches (Da and ppm) of the deisotope validation contract
are tested.
🤖 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/ID/ProSEAlgorithm.h`:
- Around line 366-367: The preprocessSpectra_ method's documentation is
incomplete and misleading. Add a full Doxygen documentation block before this
method declaration that includes a detailed `@brief` description explaining that
deisotoping behavior is now controlled by the deisotope_mode parameter, followed
by `@param` documentation for each parameter (exp, fragment_mass_tolerance,
fragment_mass_tolerance_unit_ppm, and deisotope_mode) with clear descriptions of
what deisotope_mode controls and the valid mode values, and clarify how the
tolerance parameters are used in the filtering and decharging process.

In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Around line 375-378: The OPENMS_LOG_WARN statement logging the fragment
tolerance warning uses `endl` which causes an unnecessary flush of the output
stream on every call. Replace the `endl` at the end of the log statement with
`'\n'` to avoid the performance penalty of flushing. This change should be made
in the warning message that mentions "Fragment tolerance" and "deisotoping limit
(100 ppm / 0.1 Da)".

---

Outside diff comments:
In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Around line 88-98: The fragment mass tolerance validation is missing a
non-negative minimum bound check, allowing negative values like -1 to be passed
to the Deisotoper::deisotopeAndSingleCharge function. Add a minimum bound
validation to the "fragment:mass_tolerance" parameter using
defaults_.setMinFloat to ensure it is non-negative, and update any predicates
that check the tolerance range to include this lower bound check alongside the
existing upper bound check. Additionally, locate and replace the endl on line
378 with \n to match the preferred logging style in new code per coding
guidelines.

---

Nitpick comments:
In `@src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp`:
- Around line 1457-1470: Add a test case after the existing low-resolution Da
rejection test (where fragment:mass_tolerance is 0.5) to validate the same
deisotope=true rejection behavior for ppm units. Create a new test block that
sets fragment:mass_tolerance to 150, fragment:mass_tolerance_unit to "ppm",
fragment:deisotope to "true", and verify that calling algo.setParameters(p) with
these parameters throws an Exception::InvalidParameter using TEST_EXCEPTION,
ensuring both unit branches (Da and ppm) of the deisotope validation contract
are tested.
🪄 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: 0a271759-baa9-4eee-9057-54851f5931c5

📥 Commits

Reviewing files that changed from the base of the PR and between 763e907 and c5e97d4.

📒 Files selected for processing (3)
  • src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
  • src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
  • src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp

Comment on lines +366 to +367
/// @brief filter, deisotope, decharge spectra
static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm);
static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const std::string& deisotope_mode);

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document the new deisotoping mode parameter.

The header comment still says “filter, deisotope, decharge” unconditionally, but deisotope_mode now controls whether deisotoping happens. Please add a Doxygen block with the mode values and tolerance-gating behavior.

As per coding guidelines, headers should use Doxygen documentation with @brief, followed by details and parameter documentation.

Suggested documentation update
-    /// `@brief` filter, deisotope, decharge spectra
+    /**
+     * `@brief` Filter, optionally deisotope/decharge, and normalize spectra.
+     *
+     * `@param`[in,out] exp Spectra to preprocess in-place.
+     * `@param`[in] fragment_mass_tolerance Fragment mass tolerance value.
+     * `@param`[in] fragment_mass_tolerance_unit_ppm Whether the fragment tolerance is in ppm.
+     * `@param`[in] deisotope_mode MS2 deisotoping mode: "auto", "true", or "false".
+     */
     static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const std::string& deisotope_mode);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/// @brief filter, deisotope, decharge spectra
static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm);
static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const std::string& deisotope_mode);
/**
* `@brief` Filter, optionally deisotope/decharge, and normalize spectra.
*
* `@param`[in,out] exp Spectra to preprocess in-place.
* `@param`[in] fragment_mass_tolerance Fragment mass tolerance value.
* `@param`[in] fragment_mass_tolerance_unit_ppm Whether the fragment tolerance is in ppm.
* `@param`[in] deisotope_mode MS2 deisotoping mode: "auto", "true", or "false".
*/
static void preprocessSpectra_(PeakMap& exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const std::string& deisotope_mode);
🤖 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/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h` around lines 366 -
367, The preprocessSpectra_ method's documentation is incomplete and misleading.
Add a full Doxygen documentation block before this method declaration that
includes a detailed `@brief` description explaining that deisotoping behavior is
now controlled by the deisotope_mode parameter, followed by `@param` documentation
for each parameter (exp, fragment_mass_tolerance,
fragment_mass_tolerance_unit_ppm, and deisotope_mode) with clear descriptions of
what deisotope_mode controls and the valid mode values, and clarify how the
tolerance parameters are used in the filtering and decharging process.

Source: Coding guidelines

…rchEngine through it (#9619)

Addresses code review of the ProSE low-res deisotoping fix: the 100 ppm / 0.1 Da
Deisotoper tolerance limit was duplicated by value inside ProSE, and the same
latent abort (an exception escaping an OpenMP region calls std::terminate) still
existed in the sibling SimpleSearchEngineAlgorithm.

- Deisotoper::isToleranceSupported(tol, ppm): single, non-throwing source of truth
  for the limit; both deisotopeAndSingleCharge() precondition throws now use it.
- ProSEAlgorithm: resolve the fragment:deisotope decision ONCE in updateMembers_
  (fixes the per-file recompute and repeated warning on multi-file runs);
  preprocessSpectra_ now takes a plain bool and gates the Deisotoper call on
  isToleranceSupported(), so the static method is self-safe regardless of caller
  (no silent 'true' + out-of-range skip path).
- SimpleSearchEngineAlgorithm: gate its deisotope call on isToleranceSupported()
  so low-resolution input skips deisotoping instead of aborting.
- Tests: Deisotoper_test covers the isToleranceSupported boundaries;
  ProSEAlgorithm_test exercises the bool API + self-safety.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@timosachsenberg timosachsenberg changed the title [FIX] ProSE: make MS2 deisotoping an explicit instrument-aware option, fixing low-res abort (#9619) [FIX] ProSE/SimpleSearchEngine: don't abort on low-res data; gate deisotoping via Deisotoper::isToleranceSupported (#9619) Jun 18, 2026

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

🧹 Nitpick comments (1)
src/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp (1)

223-234: ⚡ Quick win

Prefer \n over endl for logging.

Line 233 uses endl instead of \n. As per coding guidelines, std::endl should be avoided for performance; prefer \n.

♻️ Proposed fix
     OPENMS_LOG_WARN << "[SimpleSearchEngine] Fragment tolerance " << fragment_mass_tolerance
                     << (fragment_mass_tolerance_unit_ppm ? " ppm" : " Da")
                     << " exceeds the deisotoping limit (100 ppm / 0.1 Da); skipping MS2 "
-                    << "deisotoping (expected for low-resolution data)." << endl;
+                    << "deisotoping (expected for low-resolution data).\n";
🤖 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/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp` around lines
223 - 234, The OPENMS_LOG_WARN logging statement in the Deisotoper tolerance
check uses endl instead of \n for the newline. Replace the endl at the end of
the OPENMS_LOG_WARN chain (after "deisotoping (expected for low-resolution
data).") with \n to follow the coding guideline of avoiding std::endl for
performance reasons.

Source: Coding guidelines

🤖 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/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp`:
- Around line 223-234: The OPENMS_LOG_WARN logging statement in the Deisotoper
tolerance check uses endl instead of \n for the newline. Replace the endl at the
end of the OPENMS_LOG_WARN chain (after "deisotoping (expected for
low-resolution data).") with \n to follow the coding guideline of avoiding
std::endl for performance reasons.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80b7f812-5c83-4277-9101-7fc825491d9e

📥 Commits

Reviewing files that changed from the base of the PR and between c5e97d4 and a3c3a11.

📒 Files selected for processing (7)
  • src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
  • src/openms/include/OpenMS/PROCESSING/DEISOTOPING/Deisotoper.h
  • src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
  • src/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp
  • src/openms/source/PROCESSING/DEISOTOPING/Deisotoper.cpp
  • src/tests/class_tests/openms/source/Deisotoper_test.cpp
  • src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp

Copy link
Copy Markdown
Contributor Author

Adversarial review result: no blocking behavioral issue found in this pass.

Required source cleanup before merge: the diff adds tracker references in source/test comments and test section names. Please remove those references and keep the source comments focused on the behavior/contract itself. I did not run the tests locally.

@timosachsenberg
timosachsenberg merged commit 78dcddb into develop Jun 18, 2026
41 checks passed
@timosachsenberg
timosachsenberg deleted the fix/prose-lowres-deisotope-9619 branch June 18, 2026 09:19
timosachsenberg added a commit that referenced this pull request Jun 19, 2026
Add entries for all substantive non-test PRs merged since the last
changelog update:

- #9623 ThermoRawFile full mzML metadata extraction + polarity fix
- #9602 New FileInfo library class usable from C++ and pyOpenMS
- #9521 IMAGING multi-region support (add missing PR reference)
- #9620 Deisotoper::isToleranceSupported + ProSE/SSE crash fix on low-res data
- #9610 DistanceMatrix::setValue cached-minimum guard fix
- #9497 DistanceMatrix::operator==, ClusteringGrid, File path guard fixes
- #9583 LogStreamBuf thread-safety fix
- #9514 CI Windows migration to Visual Studio 2026


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

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.

ProSE aborts (uncaught exception in OpenMP region) when fragment tolerance > 0.1 Da / 100 ppm — cannot search low-res (ion-trap CID) data

1 participant