Skip to content

PeakPickerHiRes: Introduce a new parameter to allow peak cores with no leading flank peaks - #8649

Merged
timosachsenberg merged 12 commits into
OpenMS:developfrom
alhigaylan:HiRes_PR
Jan 16, 2026
Merged

timosachsenberg merged 12 commits into
OpenMS:developfrom
alhigaylan:HiRes_PR

Conversation

@alhigaylan

@alhigaylan alhigaylan commented Jan 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This is a follow up to a bug described in #6781 and #5687

Briefly, PeakPickerHiRes was designed to scan for "peak core" in profile mode. In a given m/z spacing, it expects the highest intensity m/z peak to be flanked on both sides by lower intensity peaks.

In TimsTOF raw data, we observe peaks that are only flanked by one side, leading PeakPickerHiRes to fail. To avoid disrupting how PeakPickerHiRes works originally, I introduced a new parameter 'one_sided' to allow raw peaks from TimsTOF to be picked. I introduced a new test for this feature. All tests pass on MacOS (v.15.2).

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

  • New Features

    • Added an option to allow peak detection when a flank is missing, improving support for non‑symmetrical data.
  • Bug Fixes

    • More robust peak selection, boundary handling and ion-mobility weighting when neighbor data are absent, reducing false rejections.
  • Tests

    • New tests covering symmetric, missing‑left, missing‑right and ion mobility scenarios.
  • Documentation

    • Configuration/schema updated with the new parameter and defaults.

✏️ Tip: You can customize this high-level summary in your review settings.

ghost 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

🤖 Fix all issues with AI agents
In `@src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp`:
- Around line 360-363: The current block that resets left_neighbor_mz and
right_neighbor_mz when one_sided_ is true can collapse the bisection range if
check_spacings is false because has_left_neighbor/has_right_neighbor remain
false; wrap the existing if (one_sided_) { ... } logic with a guard checking
check_spacings (e.g., if (check_spacings && one_sided_) ...) so you only
override neighbors when spacings were actually evaluated, and ensure the block
uses braces on their own lines per style; refer to the symbols one_sided_,
check_spacings, has_left_neighbor, has_right_neighbor, left_neighbor_mz,
right_neighbor_mz, and central_peak_mz when making the change.
🧹 Nitpick comments (1)
src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp (1)

244-254: Consider multi-line formatting for readability.

The logic is correct—only including data from existing neighbors. However, these compound single-line statements could be more readable with standard multi-line formatting.

♻️ Optional: Multi-line formatting
-        if (!check_spacings || has_left_neighbor) {peak_raw_data[left_neighbor_mz] = left_neighbor_int;}
-        if (!check_spacings || has_right_neighbor) {peak_raw_data[right_neighbor_mz] = right_neighbor_int;}
+        if (!check_spacings || has_left_neighbor)
+        {
+          peak_raw_data[left_neighbor_mz] = left_neighbor_int;
+        }
+        if (!check_spacings || has_right_neighbor)
+        {
+          peak_raw_data[right_neighbor_mz] = right_neighbor_int;
+        }

Similar formatting could be applied to lines 252-253 for the ion mobility handling.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c39aba and 5a29be4.

📒 Files selected for processing (7)
  • contrib
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
  • src/tests/topp/PeakPickerHiRes_6_output.mzML
🧰 Additional context used
📓 Path-based instructions (6)
**

📄 CodeRabbit inference engine (AGENTS.md)

File extensions must be lowercase except for ML, XML, and mzData

Files:

  • contrib
  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
  • src/tests/topp/CMakeLists.txt
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
src/tests/topp/**

📄 CodeRabbit inference engine (AGENTS.md)

TOPP tests must be registered in src/tests/topp/CMakeLists.txt and placed alongside test data

Files:

  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
  • src/tests/topp/CMakeLists.txt
src/openms/**/*.{cpp,h,hpp,cc,cxx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
src/openms/include/OpenMS/**/*.h

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Add Doxygen comments for new public methods and classes

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**/*.h

📄 CodeRabbit inference engine (AGENTS.md)

**/*.h: Do not add using namespace or using std::... in header files; allowed only in .cpp files
Prefer forward declarations in headers; include only base class headers, non-pointer members, and templates
Document possible exceptions in Doxygen comments using @throws or @exception tags
Use Doxygen /** */ block comments with @ tags (not backslash \); @brief is required and must be followed by a blank line before details
All parameter documentation in Doxygen must include direction tags: [in], [out], or [in,out]
Use @ingroup and @defgroup Doxygen tags to organize classes and functions into categories
Use @todo tags with assignee name (e.g., @todo JohnDoe fix this) in Doxygen comments
Every .h file must include a file preamble with $Maintainer:$ marker

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**/*.{h,cpp}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{h,cpp}: Use 2-space indentation for C++ and header files; no tabs; Unix line endings (LF)
All non-template exported classes, structs, functions, and variables must use OPENMS_DLLAPI macro; templates are exempt
One class per file; class name must match file name exactly
Always pair .h header files with .cpp implementation files
Class and type names must use PascalCase; methods must use lowerCamelCase; variables must use snake_case
Private and protected member variables must end with trailing underscore _
Enum names and macro definitions must use UPPER_SNAKE_CASE; prefer enum class over C-style enums
Use OpenMS primitive types from OpenMS/CONCEPT/Types.h instead of standard C++ types
Use Size/SignedSize types for STL .size() values instead of standard integer types
Prefer references over pointers in C++ code
Use Rule-of-0 (no explicit copy/move) or Rule-of-6 (all copy/move/destroy); never use Rule-of-5
Accessor methods must use get/set pairs for protected/private members; do not return references to primitive types
All exceptions must derive from Exception::Base; throw with file, line, and OPENMS_PRETTY_FUNCTION; catch by reference
Code comments must use // style; should comprise at least ~5% of code; describe the next few lines in plain English
Use .clang-format configuration from repository root for code formatting; check with clang-format --dry-run -Werror
Use OpenMS logging macros and OpenMS::LogStream; avoid std::cout and std::cerr
Avoid std::endl; prefer \n for better performance
Prefer OpenMS::String for numeric formatting and parsing
Braces must be on their own lines and aligned; always use braces even for single-line blocks (trivial one-liners may remain single-line)
Space required after keywords (if, for, while) and around binary operators

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
🧠 Learnings (12)
📚 Learning: 2025-12-04T16:25:07.026Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp:5069-5074
Timestamp: 2025-12-04T16:25:07.026Z
Learning: In OpenMS mzML writing, PSI-MS term MS:1003441 "ion mobility centroid frame" is a spectrum-level cvParam. It should be written at spectrum level (not scan level).

Applied to files:

  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
📚 Learning: 2025-09-03T12:58:20.032Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/tests/topp/CMakeLists.txt:1857-1865
Timestamp: 2025-09-03T12:58:20.032Z
Learning: OpenMS tests: When adding new TOPP tests in src/tests/topp/CMakeLists.txt that compare outputs via FuzzyDiff, always add set_tests_properties("<tool>_<n>_out<m>" PROPERTIES DEPENDS "<tool>_<n>") to avoid flakiness under parallel CTest runs.

Applied to files:

  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to src/tests/topp/** : TOPP tests must be registered in `src/tests/topp/CMakeLists.txt` and placed alongside test data

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to src/topp/*.cpp : TOPP tool source files must be registered in `src/topp/executables.cmake` and added to `src/openms/source/APPLICATIONS/ToolHandler.cpp`

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to doc/doxygen/public/TOPP.doxygen : TOPP tool documentation must be added to `doc/doxygen/public/TOPP.doxygen` where applicable

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to src/tests/class_tests/openms/executables.cmake : Test files must be registered in `src/tests/class_tests/openms/executables.cmake` to be included in the build

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/*Test.cpp : Follow naming convention: `ClassNameTest.cpp` for `ClassName`

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to src/tests/class_tests/openms/source/*_test.cpp : Use `NEW_TMP_FILE(filename)` macro for each output file in tests to avoid side effects

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: PR checklist: update `AUTHORS` and `CHANGELOG`, run/extend tests, update pyOpenMS bindings when needed

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-10T13:35:09.526Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T13:35:09.526Z
Learning: Applies to src/tests/class_tests/openms/source/*_test.cpp : Use `FuzzyDiff` for numeric comparisons in tests instead of exact equality checks

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-04-07T21:16:06.557Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 7970
File: src/pyOpenMS/addons/MSSpectrum.pyx:24-28
Timestamp: 2025-04-07T21:16:06.557Z
Learning: In OpenMS, the proper way to access ion mobility data in MSSpectrum is to use the `getIMData()` method, which returns a tuple with (position, unit). The position corresponds to the index in the FloatDataArrays where the ion mobility data is stored. Always use this method rather than assuming the first FloatDataArray contains ion mobility data.

Applied to files:

  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
  • GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
  • GitHub Check: build-and-test (macos-14, xcode, 15.4)
  • GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
  • GitHub Check: build-macos-arm
  • GitHub Check: build-lnx
  • GitHub Check: build-win
  • GitHub Check: build-lnx-arm
🔇 Additional comments (13)
contrib (1)

1-1: The submodule update is intentional. The recent commit modifying contrib is titled "introduce tests for new hires param," which directly relates to the PeakPickerHiRes parameter changes in the PR. The update is necessary to include tests for the new functionality.

src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h (1)

195-198: LGTM!

The new one_sided_ member variable is correctly declared with proper naming convention (trailing underscore for private member) and includes appropriate documentation. The comment style matches the existing members in this class.

src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp (6)

49-50: LGTM!

The parameter declaration follows the established pattern used by other boolean parameters like report_FWHM. Default value of "false" ensures backward compatibility.


172-172: LGTM!

The neighbor tracking variables are correctly initialized. When check_spacings is false, the short-circuit evaluation at line 209 ensures these variables aren't used, preventing any logic issues.


190-193: LGTM!

The neighbor detection logic correctly determines whether left/right neighbors exist based on spacing constraints. This cleanly integrates with the one_sided parameter logic.


204-210: LGTM!

The modified peak-core selection logic correctly implements the one-sided behavior. When one_sided_ is enabled, peaks with only one flanking neighbor are accepted; otherwise, both neighbors are required, preserving backward compatibility.


225-234: LGTM!

The satellite peak (oscillation) detection correctly mirrors the primary peak detection logic. The consistent application of one_sided_ ensures that both peak detection and oscillation filtering use the same neighbor requirements.


646-646: LGTM!

The parameter initialization follows the established pattern used for other boolean parameters in updateMembers_().

src/tests/topp/PeakPickerHiRes_6_input.mzML (1)

1-99: Test file is properly registered and complete.

The mzML file is correctly registered in CMakeLists.txt as TOPP_PeakPickerHiRes_6 with all required companion files present:

  • PeakPickerHiRes_6_input.mzML (input)
  • PeakPickerHiRes_6_output.mzML (expected output)
  • PeakPickerHiRes_6.ini (configuration)

The file follows the expected mzML schema and provides appropriate test data for validating asymmetric peak picking behavior.

src/tests/topp/CMakeLists.txt (1)

1896-1899: New TOPP_PeakPickerHiRes_6 test wiring is correct and complete.

The test registration follows the required pattern with proper DEPENDS property to avoid CTest parallel flakiness, and all referenced test data files (PeakPickerHiRes_6.ini, PeakPickerHiRes_6_input.mzML, and PeakPickerHiRes_6_output.mzML) are present in src/tests/topp/.

src/tests/topp/PeakPickerHiRes_6_output.mzML (1)

1-107: LGTM!

The mzML expected output file is well-structured with proper indexed mzML format, appropriate CV references, and includes the PeakPickerHiRes software reference in the data processing section. The test placeholder values (completion time, file checksum) are appropriate for test fixtures.

src/tests/topp/PeakPickerHiRes_6.ini (2)

25-25: Correctly exercises the new one_sided parameter.

The parameter is set to true to test the new one-sided peak picking behavior introduced for TimsTOF data.


1-40: Test registration and dependencies are properly configured in CMakeLists.txt. The output comparison test includes the required set_tests_properties with DEPENDS to prevent flakiness under parallel CTest runs.

@timosachsenberg

ghost commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

will clean it up a bit

@alhigaylan

ghost commented Jan 14, 2026

Copy link
Copy Markdown
Collaborator Author

I think we could even remove the one_sided parameter. apparently all tests pass even with one_sided set to true by default. I will investigate a bit more ...

This should not happen. one_sided should be set to false by default. And for PeakPickerHiRes_6 test -- if one_sided is kept at false, it will fail to pick the monoisotopic peak.

Timo Sachsenberg and others added 4 commits January 15, 2026 18:28
Testing across all PeakPickerHiRes test datasets showed zero regression
on conventional instrument data (Orbitrap, FTMS, simulation). The
permissive behavior (allowing peaks with only one valid neighbor) is
now always enabled, which is essential for TimsTOF data support.

Resolves OpenMS#5687, OpenMS#6781

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The one_sided logic (allowing peaks without flanks on both sides) was
being applied unconditionally, breaking existing tests. Now:
- Default (one_sided=false): require both left AND right neighbors (original behavior)
- one_sided=true: allow peaks with either left OR right neighbor (for TimsTOF data)

This preserves backward compatibility while adding the new functionality.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
More descriptive name that clearly conveys the parameter's purpose:
allowing peaks that are missing data points on one side (flank).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@OpenMS OpenMS deleted a comment from coderabbitai Bot Jan 16, 2026
Timo Sachsenberg and others added 2 commits January 16, 2026 09:20
…cings

When check_spacings is false, has_left_neighbor and has_right_neighbor
remain at their initialized value of false. Without this guard, the
bisection range would collapse to a single point (central_peak_mz),
causing incorrect peak picking behavior.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tests cover:
- Symmetric peak picking (should work regardless of setting)
- Peak with missing left flank (rejected when false, accepted when true)
- Peak with missing right flank (rejected when false, accepted when true)
- Ion mobility data handling with missing flank

Note: Both flanks cannot fail the spacing check simultaneously since
min_spacing is always the smaller of the two spacings.

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

ghost commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds an allow_missing_flank option to PeakPickerHiRes and updates peak detection logic, neighbor validation, spline boundary handling, ion-mobility weighting, parameters, unit tests, and TOPP test fixtures to support peaks with only one flanking side.

Changes

Cohort / File(s) Summary
Core implementation
src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h, src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
Added boolean member allow_missing_flank_ and parameter; modified neighbor presence checks, spacing validation (including second neighbors), conditional neighbor insertion, ion-mobility weighting, and spline boundary handling to permit one-sided peaks when enabled.
Unit tests
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
Added tests exercising allow_missing_flank for symmetric peaks, missing-left/missing-right cases, and ion-mobility scenarios.
TOPP test registration
src/tests/topp/CMakeLists.txt
Added PeakPickerHiRes_6 test block (appears duplicated in diff).
TOPP test artifacts
src/tests/topp/PeakPickerHiRes_6.ini, src/tests/topp/PeakPickerHiRes_6_input.mzML, src/tests/topp/PeakPickerHiRes_6_output.mzML
New INI exposing allow_missing_flank in parameter tree; added input mzML fixture and expected output mzML for the new TOPP test.
Parameters/schema
src/tests/topp/WRITE_INI_OUT.ini
Bumped PARAMETERS root version and XSD reference; added allow_missing_flank parameter under PeakPickerHiRes -> algorithm.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

Review effort 2/5

Suggested reviewers

  • poshul

Poem

🐇 I nibble at peaks, one side or two,
If a flank is missing, I still hop through.
With splines and IM, I chase the light,
Finding summits in profile flight.
thump ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing a new parameter to allow peak cores with missing flank peaks, which is the primary objective addressed across all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d1f362 and 849f59b.

📒 Files selected for processing (1)
  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
🧰 Additional context used
📓 Path-based instructions (8)
src/tests/class_tests/openms/**/*.cpp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Write unit tests for new functionality

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.{cpp,h,hpp}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{cpp,h,hpp}: Use 2-space indentation for C++ files (no tabs); use Unix line endings (LF)
Place opening and closing braces on their own lines, aligned vertically; always use braces even for single-line blocks (trivial one-liners may stay single-line)
Add space after keywords (if, for, while, switch) and around binary operators
Use PascalCase for class names, type names, and namespace names; use lowerCamelCase for method names; use snake_case for variable names; use trailing underscore for private and protected member variables
Use UPPER_SNAKE_CASE for enum constants and macro names; prefer enum class over unscoped enums and avoid preprocessor macros when possible
One class per file; pair each .h header file with a corresponding .cpp implementation file; class name must match file name
Use OpenMS primitive types from OpenMS/CONCEPT/Types.h (e.g., Size, SignedSize) instead of standard types like int, unsigned int for STL container sizes
Avoid std::endl; prefer \n for better performance in logging and output operations
Avoid raw pointers; prefer references for parameters and member variables
Use Rule-of-0 (if no explicit destructors/copy operations needed) or Rule-of-6 (if custom copy/move needed) for class definitions
Provide get/set accessor pairs for protected and private member variables; do not return references to primitive types from getters
Derive custom exceptions from Exception::Base; throw exceptions with file, line number, and function name using OPENMS_PRETTY_FUNCTION; catch exceptions by reference
Use OpenMS logging macros and OpenMS::LogStream instead of std::cout and std::cerr directly

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
src/tests/class_tests/**/source/*_test.cpp

📄 CodeRabbit inference engine (AGENTS.md)

src/tests/class_tests/**/source/*_test.cpp: Use START_TEST(ClassName, "$Id$") and START_SECTION(description) macros; wrap template methods with 2+ arguments in parentheses within START_SECTION
Use NEW_TMP_FILE(filename) for each temporary output file in tests to avoid side effects; do not reuse output files across test sections
Use FuzzyDiff for numeric comparisons in tests; keep test data small; use whitelist for unstable lines

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.{cpp,h,hpp,pyx,pxd}

📄 CodeRabbit inference engine (AGENTS.md)

Add comments in plain English describing the next few lines; maintain at least ~5% of code as comments

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**

📄 CodeRabbit inference engine (AGENTS.md)

**: Do not commit secrets, credentials, or .env files to the repository
Never build the project unless explicitly asked, as it is extremely resource-intensive
Do not modify the contrib tree or third-party dependencies without explicit approval from the maintainers
Always run and extend tests when making code changes; do not skip tests
Follow Gitflow workflow: develop features on forks, open PRs against develop branch, use commit message format [TAG1,TAG2] summary with tags like NOP, DOC, COMMENT, API, INTERNAL, FEATURE, FIX, TEST, FORMAT, PARAM, IO, LOG, GUI, RESOURCE, BUILD
Update AUTHORS and CHANGELOG files when making significant contributions; add Fixes #N or `Closes `#N to commit messages for issue tracking
When changing C++ APIs, update corresponding .pxd files and pyOpenMS addons; when adding TOPP tools, register in src/topp/executables.cmake and ToolHandler.cpp; when changing file formats, update FileHandler::NamesOfTypes[] and schemas

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
src/tests/class_tests/openms/source/*_test.cpp

📄 CodeRabbit inference engine (AGENTS.md)

Place test data files in src/tests/class_tests/libs/data/ directory and prefix them with the class name

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.cpp

📄 CodeRabbit inference engine (AGENTS.md)

Use ProgressLogger in command-line tools for progress reporting to users

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.{h,hpp,cpp}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer OpenMS::String for numeric formatting and parsing due to precision and performance advantages

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
🧠 Learnings (13)
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/*Test.cpp : Follow naming convention: `ClassNameTest.cpp` for `ClassName`

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `FuzzyDiff` for numeric comparisons in tests; keep test data small; use whitelist for unstable lines

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-09-03T12:58:20.032Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/tests/topp/CMakeLists.txt:1857-1865
Timestamp: 2025-09-03T12:58:20.032Z
Learning: OpenMS tests: When adding new TOPP tests in src/tests/topp/CMakeLists.txt that compare outputs via FuzzyDiff, always add set_tests_properties("<tool>_<n>_out<m>" PROPERTIES DEPENDS "<tool>_<n>") to avoid flakiness under parallel CTest runs.

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/openms/source/*_test.cpp : Place test data files in `src/tests/class_tests/libs/data/` directory and prefix them with the class name

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `START_TEST(ClassName, "$Id$")` and `START_SECTION(description)` macros; wrap template methods with 2+ arguments in parentheses within START_SECTION

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `NEW_TMP_FILE(filename)` for each temporary output file in tests to avoid side effects; do not reuse output files across test sections

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/pyOpenMS/**/*.h : Add Doxygen comments for new public methods and classes in pyOpenMS bindings

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-29T19:09:45.997Z
Learnt from: jcharkow
Repo: OpenMS/OpenMS PR: 8188
File: src/topp/OpenSwathWorkflow.cpp:1118-1123
Timestamp: 2025-08-29T19:09:45.997Z
Learning: In OpenMS OpenSwathWorkflow, the use_ms1_ion_mobility parameter should be respected when applying estimated MS1 ion mobility extraction windows. The apply_window calls for MS1 ion mobility should check both pasef AND use_ms1_ion_mobility to avoid re-enabling disabled functionality.

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-04-07T21:16:06.557Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 7970
File: src/pyOpenMS/addons/MSSpectrum.pyx:24-28
Timestamp: 2025-04-07T21:16:06.557Z
Learning: In OpenMS, the proper way to access ion mobility data in MSSpectrum is to use the `getIMData()` method, which returns a tuple with (position, unit). The position corresponds to the index in the FloatDataArrays where the ion mobility data is stored. Always use this method rather than assuming the first FloatDataArray contains ion mobility data.

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-12-04T16:25:07.026Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp:5069-5074
Timestamp: 2025-12-04T16:25:07.026Z
Learning: In OpenMS mzML writing, PSI-MS term MS:1003441 "ion mobility centroid frame" is a spectrum-level cvParam. It should be written at spectrum level (not scan level).

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build-wheels-linux-arm
  • GitHub Check: build-wheels-linux
  • GitHub Check: build-wheels-windows
  • GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
  • GitHub Check: build-and-test (macos-14, xcode, 15.4)
  • GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
  • GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
🔇 Additional comments (1)
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp (1)

556-682: Good coverage for allow_missing_flank behavior.

Covers symmetric and one-sided peaks plus IM weighting, and explicitly validates default-false vs true behavior. Looks solid.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

ghost 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/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp (1)

173-214: Relax intensity checks on missing flank to match allow_missing_flank semantics.
With allow_missing_flank_ enabled, Line 209–214 still requires both neighbors to be lower intensity. If a flank is “missing” due to spacing, the distant neighbor can be higher and the peak is still rejected, which defeats the new option in those cases. Consider skipping the intensity check on missing sides.

💡 Suggested adjustment
-      if ((central_peak_int > left_neighbor_int) &&
-          (central_peak_int > right_neighbor_int) &&
+      bool left_intensity_ok = central_peak_int > left_neighbor_int;
+      bool right_intensity_ok = central_peak_int > right_neighbor_int;
+      if (allow_missing_flank_ && check_spacings)
+      {
+        if (!has_left_neighbor)
+        {
+          left_intensity_ok = true;
+        }
+        if (!has_right_neighbor)
+        {
+          right_intensity_ok = true;
+        }
+      }
+      if (left_intensity_ok &&
+          right_intensity_ok &&
           (act_snt >= signal_to_noise_) &&
           (act_snt_l1 >= signal_to_noise_) &&
           (act_snt_r1 >= signal_to_noise_) &&
           spacing_ok)
🤖 Fix all issues with AI agents
In `@src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp`:
- Around line 674-678: The test is missing a numeric check for the ion mobility
weighted average; add a TEST_REAL_SIMILAR assertion that inspects the first
element of out.getFloatDataArrays() for variable out and compares it to the
expected weighted IM value (use the same expected value used earlier in this
file, e.g. 135.1852) to verify the missing-flank weighting logic; place the
TEST_REAL_SIMILAR after the existing TEST_EQUAL checks and reference
out.getFloatDataArrays()[0] (and its first value) when adding the assertion.

In `@src/tests/topp/WRITE_INI_OUT.ini`:
- Line 24: Update the INI fixture entry by renaming the ITEM with
name="one_sided" to name="allow_missing_flank" and set advanced="true" so it
matches the current WriteINI output; locate the ITEM element in
WRITE_INI_OUT.ini that currently reads one_sided and change its name attribute
to allow_missing_flank and its advanced attribute to "true" (preserving the
type, description, and other attributes).
🧹 Nitpick comments (1)
src/tests/topp/PeakPickerHiRes_6_input.mzML (1)

64-67: Consider specifying spectrum type explicitly.

Line 65 uses MS:1000525 ("spectrum representation") without indicating profile or centroid mode. For test clarity and to match how PeakPickerHiRes expects input, consider using MS:1000128 (profile spectrum) instead, since peak picking operates on profile data.

This is a minor suggestion since the test may still work, but explicit typing improves test data clarity.

Suggested change
-				<cvParam cvRef="MS" accession="MS:1000525" name="spectrum representation" />
+				<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" />
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c39aba and e8299a2.

📒 Files selected for processing (8)
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/tests/topp/WRITE_INI_OUT.ini
🧰 Additional context used
📓 Path-based instructions (13)
src/tests/class_tests/openms/**/*.cpp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Write unit tests for new functionality

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.{cpp,h,hpp}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{cpp,h,hpp}: Use 2-space indentation for C++ files (no tabs); use Unix line endings (LF)
Place opening and closing braces on their own lines, aligned vertically; always use braces even for single-line blocks (trivial one-liners may stay single-line)
Add space after keywords (if, for, while, switch) and around binary operators
Use PascalCase for class names, type names, and namespace names; use lowerCamelCase for method names; use snake_case for variable names; use trailing underscore for private and protected member variables
Use UPPER_SNAKE_CASE for enum constants and macro names; prefer enum class over unscoped enums and avoid preprocessor macros when possible
One class per file; pair each .h header file with a corresponding .cpp implementation file; class name must match file name
Use OpenMS primitive types from OpenMS/CONCEPT/Types.h (e.g., Size, SignedSize) instead of standard types like int, unsigned int for STL container sizes
Avoid std::endl; prefer \n for better performance in logging and output operations
Avoid raw pointers; prefer references for parameters and member variables
Use Rule-of-0 (if no explicit destructors/copy operations needed) or Rule-of-6 (if custom copy/move needed) for class definitions
Provide get/set accessor pairs for protected and private member variables; do not return references to primitive types from getters
Derive custom exceptions from Exception::Base; throw exceptions with file, line number, and function name using OPENMS_PRETTY_FUNCTION; catch exceptions by reference
Use OpenMS logging macros and OpenMS::LogStream instead of std::cout and std::cerr directly

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
src/tests/class_tests/**/source/*_test.cpp

📄 CodeRabbit inference engine (AGENTS.md)

src/tests/class_tests/**/source/*_test.cpp: Use START_TEST(ClassName, "$Id$") and START_SECTION(description) macros; wrap template methods with 2+ arguments in parentheses within START_SECTION
Use NEW_TMP_FILE(filename) for each temporary output file in tests to avoid side effects; do not reuse output files across test sections
Use FuzzyDiff for numeric comparisons in tests; keep test data small; use whitelist for unstable lines

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.{cpp,h,hpp,pyx,pxd}

📄 CodeRabbit inference engine (AGENTS.md)

Add comments in plain English describing the next few lines; maintain at least ~5% of code as comments

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**

📄 CodeRabbit inference engine (AGENTS.md)

**: Do not commit secrets, credentials, or .env files to the repository
Never build the project unless explicitly asked, as it is extremely resource-intensive
Do not modify the contrib tree or third-party dependencies without explicit approval from the maintainers
Always run and extend tests when making code changes; do not skip tests
Follow Gitflow workflow: develop features on forks, open PRs against develop branch, use commit message format [TAG1,TAG2] summary with tags like NOP, DOC, COMMENT, API, INTERNAL, FEATURE, FIX, TEST, FORMAT, PARAM, IO, LOG, GUI, RESOURCE, BUILD
Update AUTHORS and CHANGELOG files when making significant contributions; add Fixes #N or `Closes `#N to commit messages for issue tracking
When changing C++ APIs, update corresponding .pxd files and pyOpenMS addons; when adding TOPP tools, register in src/topp/executables.cmake and ToolHandler.cpp; when changing file formats, update FileHandler::NamesOfTypes[] and schemas

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
  • src/tests/topp/WRITE_INI_OUT.ini
  • src/tests/topp/CMakeLists.txt
src/tests/class_tests/openms/source/*_test.cpp

📄 CodeRabbit inference engine (AGENTS.md)

Place test data files in src/tests/class_tests/libs/data/ directory and prefix them with the class name

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
**/*.cpp

📄 CodeRabbit inference engine (AGENTS.md)

Use ProgressLogger in command-line tools for progress reporting to users

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
**/*.{h,hpp,cpp}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer OpenMS::String for numeric formatting and parsing due to precision and performance advantages

Files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
src/openms/**/*.{cpp,h,hpp,cc,cxx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/openms/**/*.{cpp,h,hpp,cc,cxx}: Follow the existing C++ coding conventions in the codebase
Use the established naming patterns for classes, methods, and variables
Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)
Follow the established error handling patterns
Utilize OpenMS logging mechanisms
Be mindful of memory usage when processing large datasets
Consider algorithmic complexity for data processing operations
Use appropriate OpenMS containers and algorithms

Files:

  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
src/openms/include/OpenMS/**/*.h

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Add Doxygen comments for new public methods and classes

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**/*.{h,hpp}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{h,hpp}: Never add using namespace or using std::... declarations in header files
Add OPENMS_DLLAPI macro to all non-template exported classes, structs, functions, and variables in headers
Include only base class headers, non-pointer members, and template definitions in header files; use forward declarations for other types
Use Doxygen documentation with @brief tag (required), followed by blank line and details; use @param[in], @param[out], or @param[in,out] for all parameters
Include file header preamble with copyright, SPDX license, $Maintainer:$ marker, and $Authors:$ marker in every header file
Use _impl.h files only when necessary for template implementations; .h files must never include _impl.h files directly

Files:

  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**/CMakeLists.txt

📄 CodeRabbit inference engine (CLAUDE.md)

**/CMakeLists.txt: Use -DBOOST_USE_STATIC_LIBS=OFF when configuring CMake to avoid Boost linker errors on macOS due to incomplete transitive dependency declarations
Use semicolons (;) as list separators in CMAKE_PREFIX_PATH when using the -D CMake option

Files:

  • src/tests/topp/CMakeLists.txt
src/tests/topp/CMakeLists.txt

📄 CodeRabbit inference engine (AGENTS.md)

Add TOPP tests to src/tests/topp/CMakeLists.txt; place test data in src/tests/topp/ directory

Files:

  • src/tests/topp/CMakeLists.txt
🧠 Learnings (18)
📓 Common learnings
Learnt from: jcharkow
Repo: OpenMS/OpenMS PR: 8188
File: src/topp/OpenSwathWorkflow.cpp:1118-1123
Timestamp: 2025-08-29T19:09:45.997Z
Learning: In OpenMS OpenSwathWorkflow, the use_ms1_ion_mobility parameter should be respected when applying estimated MS1 ion mobility extraction windows. The apply_window calls for MS1 ion mobility should check both pasef AND use_ms1_ion_mobility to avoid re-enabling disabled functionality.
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/**/*.cpp : Write unit tests for new functionality

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-09-03T12:58:20.032Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/tests/topp/CMakeLists.txt:1857-1865
Timestamp: 2025-09-03T12:58:20.032Z
Learning: OpenMS tests: When adding new TOPP tests in src/tests/topp/CMakeLists.txt that compare outputs via FuzzyDiff, always add set_tests_properties("<tool>_<n>_out<m>" PROPERTIES DEPENDS "<tool>_<n>") to avoid flakiness under parallel CTest runs.

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/PeakPickerHiRes_6.ini
  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/tests/class_tests/openms/*Test.cpp : Follow naming convention: `ClassNameTest.cpp` for `ClassName`

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `FuzzyDiff` for numeric comparisons in tests; keep test data small; use whitelist for unstable lines

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/openms/source/*_test.cpp : Place test data files in `src/tests/class_tests/libs/data/` directory and prefix them with the class name

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `NEW_TMP_FILE(filename)` for each temporary output file in tests to avoid side effects; do not reuse output files across test sections

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/tests/topp/CMakeLists.txt
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/include/OpenMS/**/*.h : Add Doxygen comments for new public methods and classes

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
  • src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/class_tests/**/source/*_test.cpp : Use `START_TEST(ClassName, "$Id$")` and `START_SECTION(description)` macros; wrap template methods with 2+ arguments in parentheses within START_SECTION

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/openms/**/*.{cpp,h,hpp,cc,cxx} : Use OpenMS data structures (e.g., MSExperiment, FeatureMap, PeptideIdentification)

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-08-05T12:43:11.681Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-05T12:43:11.681Z
Learning: Applies to src/pyOpenMS/tests/**/*.py : Write pyOpenMS tests for new Python bindings

Applied to files:

  • src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp
📚 Learning: 2025-12-04T16:25:07.026Z
Learnt from: timosachsenberg
Repo: OpenMS/OpenMS PR: 8177
File: src/openms/source/FORMAT/HANDLERS/MzMLHandler.cpp:5069-5074
Timestamp: 2025-12-04T16:25:07.026Z
Learning: In OpenMS mzML writing, PSI-MS term MS:1003441 "ion mobility centroid frame" is a spectrum-level cvParam. It should be written at spectrum level (not scan level).

Applied to files:

  • src/tests/topp/PeakPickerHiRes_6_output.mzML
  • src/tests/topp/PeakPickerHiRes_6_input.mzML
📚 Learning: 2025-08-29T19:09:45.997Z
Learnt from: jcharkow
Repo: OpenMS/OpenMS PR: 8188
File: src/topp/OpenSwathWorkflow.cpp:1118-1123
Timestamp: 2025-08-29T19:09:45.997Z
Learning: In OpenMS OpenSwathWorkflow, the use_ms1_ion_mobility parameter should be respected when applying estimated MS1 ion mobility extraction windows. The apply_window calls for MS1 ion mobility should check both pasef AND use_ms1_ion_mobility to avoid re-enabling disabled functionality.

Applied to files:

  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
📚 Learning: 2025-04-07T21:16:06.557Z
Learnt from: jpfeuffer
Repo: OpenMS/OpenMS PR: 7970
File: src/pyOpenMS/addons/MSSpectrum.pyx:24-28
Timestamp: 2025-04-07T21:16:06.557Z
Learning: In OpenMS, the proper way to access ion mobility data in MSSpectrum is to use the `getIMData()` method, which returns a tuple with (position, unit). The position corresponds to the index in the FloatDataArrays where the ion mobility data is stored. Always use this method rather than assuming the first FloatDataArray contains ion mobility data.

Applied to files:

  • src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/tests/topp/CMakeLists.txt : Add TOPP tests to `src/tests/topp/CMakeLists.txt`; place test data in `src/tests/topp/` directory

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to ** : When changing C++ APIs, update corresponding `.pxd` files and pyOpenMS addons; when adding TOPP tools, register in `src/topp/executables.cmake` and `ToolHandler.cpp`; when changing file formats, update `FileHandler::NamesOfTypes[]` and schemas

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to src/topp/*.cpp : Register TOPP tool in `src/topp/executables.cmake` and in `src/openms/source/APPLICATIONS/ToolHandler.cpp` to enable help generation

Applied to files:

  • src/tests/topp/CMakeLists.txt
📚 Learning: 2026-01-15T17:33:37.739Z
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T17:33:37.739Z
Learning: Applies to CMakeLists.txt : Use CMake 3.21+ minimum version; enable out-of-tree builds in `OpenMS-build/` directory; use `CMAKE_BUILD_TYPE=Debug` for development to preserve assertions and conditions

Applied to files:

  • src/tests/topp/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build-wheels-linux-arm
  • GitHub Check: build-wheels-macos
  • GitHub Check: build-wheels-linux
  • GitHub Check: build-wheels-windows
  • GitHub Check: build-and-test (macos-14, xcode, 15.4)
  • GitHub Check: build-and-test (windows-2025, cl.exe, 14.44)
  • GitHub Check: build-and-test (ubuntu-24.04-arm, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04, g++, 13)
  • GitHub Check: build-and-test (ubuntu-24.04, clang++, 17)
🔇 Additional comments (16)
src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h (1)

195-196: LGTM: new allow_missing_flank_ state is clear and scoped.

src/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp (5)

50-52: LGTM: default parameter wiring for allow_missing_flank.


228-234: LGTM: second-neighbor spacing check respects allow_missing_flank_.


249-259: LGTM: missing-side neighbors are excluded from raw data and IM weighting.


365-371: LGTM: bisection bounds guarded when spacing checks are disabled.


654-654: LGTM: allow_missing_flank_ loaded from parameters.

src/tests/topp/WRITE_INI_OUT.ini (1)

2-2: LGTM: schema version bump looks consistent.

src/tests/topp/PeakPickerHiRes_6.ini (1)

1-36: LGTM: new PeakPickerHiRes_6.ini covers the allow_missing_flank test scenario.

src/tests/topp/PeakPickerHiRes_6_output.mzML (1)

1-107: LGTM: output mzML fixture added for the new test case.

src/tests/class_tests/openms/source/PeakPickerHiRes_test.cpp (5)

552-561: Well-documented test introduction.

The comments clearly explain the purpose of this test section and its relevance to TimsTOF data. Good context for future maintainers.


568-592: LGTM!

Test 1 correctly validates that symmetric peaks are picked regardless of the allow_missing_flank setting. The test setup and assertions are appropriate.


594-619: LGTM!

Test 2 properly validates the missing left flank scenario. The spacing calculations documented in comments are correct, and the assertions verify that allow_missing_flank=false rejects the peak while allow_missing_flank=true accepts it.


621-646: LGTM!

Test 3 correctly validates the missing right flank scenario, mirroring Test 2 for the opposite side. The spacing logic and assertions are appropriate.


648-650: Helpful clarification.

Good explanatory comment documenting why testing "both flanks missing" is not needed. This prevents future confusion about missing test coverage.

src/tests/topp/PeakPickerHiRes_6_input.mzML (1)

1-99: Test data file looks well-formed.

The mzML structure is valid with proper indexing, binary data encoding, and metadata. The file provides suitable test input for the allow_missing_flank TOPP test scenario.

src/tests/topp/CMakeLists.txt (1)

1896-1899: LGTM: PeakPickerHiRes_6 test wiring looks consistent.
Matches existing TOPP test patterns and includes the dependency for the diff check.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread src/tests/topp/WRITE_INI_OUT.ini Resolved
Timo Sachsenberg and others added 3 commits January 16, 2026 10:22
Regenerate test reference file to reflect parameter rename from
one_sided to allow_missing_flank with updated description.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
The test was expecting only core points (central + right neighbor) in
the ion mobility weighted average, but the algorithm also extends the
peak and includes the next point (100.08, 200, IM=1.4) because it meets
the spacing_difference_gap criteria.

Updated expected value: 1.2357 -> 1.27222 (= 1145/900)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@timosachsenberg
timosachsenberg merged commit afa7cb4 into OpenMS:develop Jan 16, 2026
@timosachsenberg

ghost commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

note that I slightly changed the name of the parameter

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.

2 participants