Repository navigation
PeakPickerHiRes: Introduce a new parameter to allow peak cores with no leading flank peaks - #8649
Conversation
left a comment
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
contribsrc/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.hsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/tests/topp/CMakeLists.txtsrc/tests/topp/PeakPickerHiRes_6.inisrc/tests/topp/PeakPickerHiRes_6_input.mzMLsrc/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, andmzData
Files:
contribsrc/tests/topp/PeakPickerHiRes_6_output.mzMLsrc/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.hsrc/tests/topp/PeakPickerHiRes_6.inisrc/tests/topp/PeakPickerHiRes_6_input.mzMLsrc/tests/topp/CMakeLists.txtsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
src/tests/topp/**
📄 CodeRabbit inference engine (AGENTS.md)
TOPP tests must be registered in
src/tests/topp/CMakeLists.txtand placed alongside test data
Files:
src/tests/topp/PeakPickerHiRes_6_output.mzMLsrc/tests/topp/PeakPickerHiRes_6.inisrc/tests/topp/PeakPickerHiRes_6_input.mzMLsrc/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.hsrc/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 addusing namespaceorusing std::...in header files; allowed only in.cppfiles
Prefer forward declarations in headers; include only base class headers, non-pointer members, and templates
Document possible exceptions in Doxygen comments using@throwsor@exceptiontags
Use Doxygen/** */block comments with@tags (not backslash\);@briefis 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@ingroupand@defgroupDoxygen tags to organize classes and functions into categories
Use@todotags with assignee name (e.g.,@todo JohnDoe fix this) in Doxygen comments
Every.hfile 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 useOPENMS_DLLAPImacro; templates are exempt
One class per file; class name must match file name exactly
Always pair.hheader files with.cppimplementation 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; preferenum classover C-style enums
Use OpenMS primitive types fromOpenMS/CONCEPT/Types.hinstead of standard C++ types
UseSize/SignedSizetypes 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 fromException::Base; throw with file, line, andOPENMS_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-formatconfiguration from repository root for code formatting; check withclang-format --dry-run -Werror
Use OpenMS logging macros andOpenMS::LogStream; avoidstd::coutandstd::cerr
Avoidstd::endl; prefer\nfor better performance
PreferOpenMS::Stringfor 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.hsrc/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.mzMLsrc/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.inisrc/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 modifyingcontribis 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_spacingsis 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_sidedparameter 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.txtasTOPP_PeakPickerHiRes_6with 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
DEPENDSproperty to avoid CTest parallel flakiness, and all referenced test data files (PeakPickerHiRes_6.ini,PeakPickerHiRes_6_input.mzML, andPeakPickerHiRes_6_output.mzML) are present insrc/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 newone_sidedparameter.The parameter is set to
trueto 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 requiredset_tests_propertieswithDEPENDSto prevent flakiness under parallel CTest runs.
commented
Jan 14, 2026
|
will clean it up a bit |
commented
Jan 14, 2026
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. |
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]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
…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]>
📝 WalkthroughWalkthroughAdds an Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (8)src/tests/class_tests/openms/**/*.cpp📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{cpp,h,hpp}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/tests/class_tests/**/source/*_test.cpp📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{cpp,h,hpp,pyx,pxd}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/tests/class_tests/openms/source/*_test.cpp📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.cpp📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{h,hpp,cpp}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (13)📚 Learning: 2025-08-05T12:43:11.681ZApplied to files:
📚 Learning: 2025-08-05T12:43:11.681ZApplied to files:
📚 Learning: 2026-01-15T17:33:37.739ZApplied to files:
📚 Learning: 2025-09-03T12:58:20.032ZApplied to files:
📚 Learning: 2025-08-05T12:43:11.681ZApplied to files:
📚 Learning: 2026-01-15T17:33:37.739ZApplied to files:
📚 Learning: 2026-01-15T17:33:37.739ZApplied to files:
📚 Learning: 2025-08-05T12:43:11.681ZApplied to files:
📚 Learning: 2026-01-15T17:33:37.739ZApplied to files:
📚 Learning: 2025-08-05T12:43:11.681ZApplied to files:
📚 Learning: 2025-08-29T19:09:45.997ZApplied to files:
📚 Learning: 2025-04-07T21:16:06.557ZApplied to files:
📚 Learning: 2025-12-04T16:25:07.026ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting 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. Comment |
left a comment
There was a problem hiding this comment.
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 usingMS: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
📒 Files selected for processing (8)
src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.hsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/tests/class_tests/openms/source/PeakPickerHiRes_test.cppsrc/tests/topp/CMakeLists.txtsrc/tests/topp/PeakPickerHiRes_6.inisrc/tests/topp/PeakPickerHiRes_6_input.mzMLsrc/tests/topp/PeakPickerHiRes_6_output.mzMLsrc/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; preferenum classover unscoped enums and avoid preprocessor macros when possible
One class per file; pair each.hheader file with a corresponding.cppimplementation file; class name must match file name
Use OpenMS primitive types fromOpenMS/CONCEPT/Types.h(e.g.,Size,SignedSize) instead of standard types likeint,unsigned intfor STL container sizes
Avoidstd::endl; prefer\nfor 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 fromException::Base; throw exceptions with file, line number, and function name usingOPENMS_PRETTY_FUNCTION; catch exceptions by reference
Use OpenMS logging macros andOpenMS::LogStreaminstead ofstd::coutandstd::cerrdirectly
Files:
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cppsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/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: UseSTART_TEST(ClassName, "$Id$")andSTART_SECTION(description)macros; wrap template methods with 2+ arguments in parentheses within START_SECTION
UseNEW_TMP_FILE(filename)for each temporary output file in tests to avoid side effects; do not reuse output files across test sections
UseFuzzyDifffor 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.cppsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**
📄 CodeRabbit inference engine (AGENTS.md)
**: Do not commit secrets, credentials, or.envfiles 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 againstdevelopbranch, use commit message format[TAG1,TAG2] summarywith tags like NOP, DOC, COMMENT, API, INTERNAL, FEATURE, FIX, TEST, FORMAT, PARAM, IO, LOG, GUI, RESOURCE, BUILD
UpdateAUTHORSandCHANGELOGfiles when making significant contributions; addFixes#Nor `Closes `#Nto commit messages for issue tracking
When changing C++ APIs, update corresponding.pxdfiles and pyOpenMS addons; when adding TOPP tools, register insrc/topp/executables.cmakeandToolHandler.cpp; when changing file formats, updateFileHandler::NamesOfTypes[]and schemas
Files:
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cppsrc/tests/topp/PeakPickerHiRes_6.inisrc/tests/topp/PeakPickerHiRes_6_output.mzMLsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/tests/topp/PeakPickerHiRes_6_input.mzMLsrc/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.hsrc/tests/topp/WRITE_INI_OUT.inisrc/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
ProgressLoggerin command-line tools for progress reporting to users
Files:
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cppsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cpp
**/*.{h,hpp,cpp}
📄 CodeRabbit inference engine (AGENTS.md)
Prefer
OpenMS::Stringfor numeric formatting and parsing due to precision and performance advantages
Files:
src/tests/class_tests/openms/source/PeakPickerHiRes_test.cppsrc/openms/source/PROCESSING/CENTROIDING/PeakPickerHiRes.cppsrc/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.cppsrc/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 addusing namespaceorusing std::...declarations in header files
AddOPENMS_DLLAPImacro 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@brieftag (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.hfiles only when necessary for template implementations;.hfiles must never include_impl.hfiles directly
Files:
src/openms/include/OpenMS/PROCESSING/CENTROIDING/PeakPickerHiRes.h
**/CMakeLists.txt
📄 CodeRabbit inference engine (CLAUDE.md)
**/CMakeLists.txt: Use-DBOOST_USE_STATIC_LIBS=OFFwhen 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-DCMake 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 insrc/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.cppsrc/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.cppsrc/tests/topp/PeakPickerHiRes_6.inisrc/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.cppsrc/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.cppsrc/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.cppsrc/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.mzMLsrc/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_flanksetting. 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=falserejects the peak whileallow_missing_flank=trueaccepts 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_flankTOPP 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.
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]>
commented
Jan 16, 2026
|
note that I slightly changed the name of the parameter |
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
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
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.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.