Repository navigation
feat(CometAdapter): add Bruker .d DDA-PASEF support - #9126
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…spec Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
5 tasks: SearchEngineBase BRUKER_TDF case, input registration, .d-to-mzML conversion, post-processing IM validation, build/test verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
TimsTOF data is inherently centroided, so suppress the misleading 'make sure spectra are centroided' warning for .d input.
Add 'd' to valid input formats (guarded by WITH_OPENTIMS). Register bruker:export_mode, bruker:calibration_tolerance, and bruker:calibrate parameters matching the PeakPickerIM/FileConverter pattern. Add getBrukerConfig_() helper.
When input is a Bruker .d directory, load via BrukerTimsFile, filter to MS2 spectra, and write a temporary indexed mzML for Comet. The MSExperiment is retained for IM annotation in post-processing. Existing mzML path is unchanged.
… mismatch Warn when Bruker .d input is used but not all peptide IDs could be annotated with ion mobility values, indicating a possible native ID mismatch between the .d data and Comet results. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add CometAdapter integration test using the shared OPENTIMS DDA test data, guarded by WITH_OPENTIMS, OPENTIMS_DDA_TEST_DATA, and Comet binary availability. Includes FDR filtering step. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded Bruker TimsTOF Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CometAdapter
participant BrukerTimsFile
participant mzMLTemp
participant CometEngine
User->>CometAdapter: invoke with `.d` input + ms_level
CometAdapter->>CometAdapter: detect file type -> BRUKER .d
CometAdapter->>BrukerTimsFile: load(config)
BrukerTimsFile-->>CometAdapter: spectra (with IM metadata)
CometAdapter->>CometAdapter: filter spectra by ms_level
CometAdapter->>mzMLTemp: serialize filtered spectra to indexed mzML
mzMLTemp-->>CometAdapter: indexed mzML path
CometAdapter->>CometEngine: run Comet on mzML
CometEngine-->>CometAdapter: identification results
CometAdapter->>CometAdapter: annotate IDs with IM (warn if incomplete)
CometAdapter-->>User: write idXML (with IM metadata)
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🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (3)
docs/superpowers/specs/2026-04-10-cometadapter-bruker-d-support-design.md (1)
58-59: Document the expected Bruker nativeID CV term/pattern explicitly.This section discusses native-ID mismatch handling, but adding the exact expected format would make troubleshooting deterministic.
Based on learnings: In OpenMS BrukerTimsFile.cpp, the correct PSI-MS CV term is `MS:1002818` with nativeID pattern `frame= scan=`.✍️ Proposed doc addition
- Native ID validation: log a warning if `addMissingIMToPeptideIDs` returns false for .d input (since DDA-PASEF data should always have IM). + - Expected Bruker nativeID metadata/pattern: `MS:1002818` ("Bruker TDF nativeID format"), with IDs like `frame=<FRAME_ID> scan=<SCAN_ID>`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/superpowers/specs/2026-04-10-cometadapter-bruker-d-support-design.md` around lines 58 - 59, Update the native-ID mismatch handling section to explicitly state the expected Bruker nativeID CV term and pattern: add that the PSI-MS CV term is MS:1002818 and the nativeID should follow the pattern "frame=<FRAME_ID> scan=<SCAN_ID>". Also mention that when processing .d (DDA-PASEF) inputs the function addMissingIMToPeptideIDs should never return false because IM is expected, and add a warning note in the text suggesting to log or surface a diagnostic if addMissingIMToPeptideIDs does return false for .d files.src/topp/CometAdapter.cpp (2)
709-709: Prefer'\n'overstd::endlin the new log messages.These new logging paths do not need an unconditional flush.
As per coding guidelines, "Avoid
std::endlfor performance reasons; prefer\nin C++".Also applies to: 811-812
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/CometAdapter.cpp` at line 709, Replace the use of std::endl in the new logging calls with '\n' to avoid unnecessary flushes: locate the OPENMS_LOG_INFO statements added in CometAdapter (the lines that print "Loaded ... MS" and the similar messages around the same area referenced) and change the trailing std::endl to '\n' in those log message expressions (also update the occurrences noted near the later two lines). Ensure the log text and spacing remain identical except for replacing std::endl with '\n'.
121-122: Add braces around theexport_modebranch.This helper introduces a new conditional without braces, which goes against the repository’s C++ style and makes later edits easier to get wrong.
♻️ Suggested cleanup
- if (mode == "spectrum") c.export_mode = BrukerTimsFile::Config::SPECTRUM; - else c.export_mode = BrukerTimsFile::Config::AUTO; + if (mode == "spectrum") + { + c.export_mode = BrukerTimsFile::Config::SPECTRUM; + } + else + { + c.export_mode = BrukerTimsFile::Config::AUTO; + }As per coding guidelines, "Use braces on their own lines and keep them aligned in C++ code" and "Always use braces for code blocks in C++, even for single-line blocks (unless trivial one-liners)".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/CometAdapter.cpp` around lines 121 - 122, The two-line conditional that sets c.export_mode based on mode should use explicit braces to follow C++ style: change the if/else that assigns c.export_mode (using BrukerTimsFile::Config::SPECTRUM and BrukerTimsFile::Config::AUTO) to use block braces for both branches so each assignment is wrapped in its own { ... } block, keeping braces on their own lines and aligned with the surrounding code.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/superpowers/plans/2026-04-10-cometadapter-bruker-d-support.md`:
- Around line 327-331: The documented Step 3 uses `cmake --build` with
`-DWITH_OPENTIMS=OFF`, which is ignored; update the instructions under "Step 3:
Verify build without WITH_OPENTIMS (if feasible)" to first run a configure
invocation that passes the cache variable (e.g., `cmake -S . -B <build-dir>
-DWITH_OPENTIMS=OFF`) and then build the `CometAdapter` target from that build
directory with `cmake --build <build-dir> --target CometAdapter -j$(nproc)` so
the `#ifdef` guarded code path is actually tested; reference the Step 3 heading,
the `cmake -S . -B ... -DWITH_OPENTIMS=OFF` configure command and the `cmake
--build ... --target CometAdapter` build command in the doc change.
In `@docs/superpowers/specs/2026-04-10-cometadapter-bruker-d-support-design.md`:
- Line 72: The fenced code block at the diagram around "idXML output" is missing
a language identifier causing markdownlint MD040; update that code fence by
adding a language tag like "text" (i.e., change the opening ``` to ```text) so
the block becomes ```text ... ``` and the lint warning is resolved.
In `@src/tests/topp/CMakeLists.txt`:
- Around line 3009-3026: Add a post-check after the TOPP_CometAdapter_DDA /
TOPP_FalseDiscoveryRate tests that parses the produced idXML (preferably the
FDR-filtered ${TESTS_TEMP_DIR}/CometAdapter_DDA_fdr.tmp.idXML) and asserts that
at least one peptide hit contains ion-mobility metadata (e.g. presence of an ion
mobility CV term/userParam or non-empty mobility/drift time on a
PeptideHit/SpectrumIdentificationItem). Implement this as an additional add_test
(or a small script invoked by set_tests_properties DEPENDS) that opens the
idXML, looks for the IM field on any identification entry, and fails if none are
found; reference the existing test names TOPP_CometAdapter_DDA and
TOPP_FalseDiscoveryRate when wiring the dependency so it runs only after the
adapter and FDR steps.
- Line 3008: The if condition uses an unquoted expansion (${COMET_BINARY}) which
breaks when COMET_BINARY contains spaces; update the conditional that currently
reads if (NOT (${COMET_BINARY} STREQUAL "COMET_BINARY-NOTFOUND")) to compare a
quoted expansion (e.g., quote the COMET_BINARY variable in the STREQUAL check)
or simplify to if (COMET_BINARY) so that the COMET_BINARY variable is handled
safely; locate the conditional referencing COMET_BINARY in the targed CMakeLists
and apply the quoted comparison or the simplified truthy check.
In `@src/topp/CometAdapter.cpp`:
- Around line 700-719: The current flow loads full Bruker MS2 peak arrays into
exp (via BrukerTimsFile::load) and keeps them in memory until after
MzMLFile().store(tmp_mzml, exp), which causes OOM on large runs; after writing
the temporary mzML you must free the heavy binary arrays by either reloading
metadata-only from tmp_mzml (call MzMLFile::load into a fresh MSSpectrum
container or PeakFile with metadata-only option) or explicitly clear the binary
arrays in exp (e.g., for each spectrum call clear() on its intensity and m/z
arrays) before launching Comet; apply the same change to the other .d path (the
code around lines 739-744) so Comet only sees metadata-only spectra and full
peak data is not retained in memory.
---
Nitpick comments:
In `@docs/superpowers/specs/2026-04-10-cometadapter-bruker-d-support-design.md`:
- Around line 58-59: Update the native-ID mismatch handling section to
explicitly state the expected Bruker nativeID CV term and pattern: add that the
PSI-MS CV term is MS:1002818 and the nativeID should follow the pattern
"frame=<FRAME_ID> scan=<SCAN_ID>". Also mention that when processing .d
(DDA-PASEF) inputs the function addMissingIMToPeptideIDs should never return
false because IM is expected, and add a warning note in the text suggesting to
log or surface a diagnostic if addMissingIMToPeptideIDs does return false for .d
files.
In `@src/topp/CometAdapter.cpp`:
- Line 709: Replace the use of std::endl in the new logging calls with '\n' to
avoid unnecessary flushes: locate the OPENMS_LOG_INFO statements added in
CometAdapter (the lines that print "Loaded ... MS" and the similar messages
around the same area referenced) and change the trailing std::endl to '\n' in
those log message expressions (also update the occurrences noted near the later
two lines). Ensure the log text and spacing remain identical except for
replacing std::endl with '\n'.
- Around line 121-122: The two-line conditional that sets c.export_mode based on
mode should use explicit braces to follow C++ style: change the if/else that
assigns c.export_mode (using BrukerTimsFile::Config::SPECTRUM and
BrukerTimsFile::Config::AUTO) to use block braces for both branches so each
assignment is wrapped in its own { ... } block, keeping braces on their own
lines and aligned with the surrounding code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b6a801a-06ce-4e9f-9108-9154c7b0d506
📒 Files selected for processing (5)
docs/superpowers/plans/2026-04-10-cometadapter-bruker-d-support.mddocs/superpowers/specs/2026-04-10-cometadapter-bruker-d-support-design.mdsrc/openms/source/APPLICATIONS/SearchEngineBase.cppsrc/tests/topp/CMakeLists.txtsrc/topp/CometAdapter.cpp
Move DecoyDatabase generation out of the SageAdapter-only block so it is shared by both CometAdapter and SageAdapter DDA-PASEF tests. Without decoys, FDR filtering is meaningless. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…t assertion, remove docs - Clear peak arrays from MSExperiment after writing temporary mzML for Comet. Only spectrum metadata (native IDs, drift times) is needed for post-processing IM annotation. Avoids unnecessary memory usage during the Comet run on large DDA-PASEF files. - Add grep-based test assertion that verifies IM UserParam metadata is present in CometAdapter DDA output idXML. - Remove implementation plan and design spec docs (served their purpose, not user-facing). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/tests/topp/CMakeLists.txt (1)
3015-3015:⚠️ Potential issue | 🟠 MajorStop expanding
COMET_BINARY/SAGE_BINARYinsideif().Line 3015 and Line 3043 use
if (NOT (${...} STREQUAL "...-NOTFOUND")). That form is fragile in CMake and breaks when the resolved path contains spaces. Use CMake truthiness (if(COMET_BINARY),if(SAGE_BINARY)) or quote the string comparison instead.Suggested fix
- if (NOT (${COMET_BINARY} STREQUAL "COMET_BINARY-NOTFOUND")) + if (COMET_BINARY) @@ - if (NOT (${SAGE_BINARY} STREQUAL "SAGE_BINARY-NOTFOUND")) + if (SAGE_BINARY)#!/bin/bash set -eu tmpdir="$(mktemp -d)" cat > "${tmpdir}/bad.cmake" <<'EOF' set(COMET_BINARY "C:/Program Files/Comet/comet.exe") if (NOT (${COMET_BINARY} STREQUAL "COMET_BINARY-NOTFOUND")) message(STATUS "unexpectedly parsed") endif() EOF cat > "${tmpdir}/good.cmake" <<'EOF' set(COMET_BINARY "C:/Program Files/Comet/comet.exe") if (COMET_BINARY) message(STATUS "parsed correctly") endif() EOF ! cmake -P "${tmpdir}/bad.cmake" cmake -P "${tmpdir}/good.cmake"Also applies to: 3043-3043
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tests/topp/CMakeLists.txt` at line 3015, The if() checks that expand variables inside the condition (if (NOT (${COMET_BINARY} STREQUAL "COMET_BINARY-NOTFOUND")) and the analogous SAGE_BINARY check) are fragile with paths containing spaces; change these to use CMake truthiness (if(COMET_BINARY) and if(SAGE_BINARY)) or perform a safe quoted comparison (if (NOT ("${COMET_BINARY}" STREQUAL "COMET_BINARY-NOTFOUND"))) so the condition does not break when the resolved path contains spaces; update the two occurrences referencing COMET_BINARY and SAGE_BINARY accordingly.
🧹 Nitpick comments (1)
src/tests/topp/CMakeLists.txt (1)
3037-3039: Consider using${CMAKE_COMMAND} -Pfor more portable file content validation.The test currently shells out to
grep, which may not be consistently available across all CTest runners despite working in current CI environments. A CMake-based approach usingfile(READ)andstring(FIND)would be more self-contained and eliminate external tool dependencies. While this specific test functions correctly on Windows via Visual Studio's environment, this refactor aligns with OpenMS test best practices for cross-platform robustness.Portable alternative
- add_test(NAME "TOPP_CometAdapter_DDA_IM_check" - COMMAND grep -q "UserParam type=\"float\" name=\"IM\"" ${TESTS_TEMP_DIR}/CometAdapter_DDA_out.tmp.idXML) + add_test(NAME "TOPP_CometAdapter_DDA_IM_check" + COMMAND ${CMAKE_COMMAND} + -DINPUT_FILE=${TESTS_TEMP_DIR}/CometAdapter_DDA_out.tmp.idXML + -DPATTERN=UserParam\ type=\"float\"\ name=\"IM\" + -P ${DATA_DIR_TOPP}/check_file_contains.cmake)# src/tests/topp/check_file_contains.cmake if (NOT DEFINED INPUT_FILE OR NOT DEFINED PATTERN) message(FATAL_ERROR "INPUT_FILE and PATTERN are required") endif() file(READ "${INPUT_FILE}" CONTENTS) string(FIND "${CONTENTS}" "${PATTERN}" POS) if (POS EQUAL -1) message(FATAL_ERROR "Pattern not found in ${INPUT_FILE}: ${PATTERN}") endif()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tests/topp/CMakeLists.txt` around lines 3037 - 3039, Replace the grep-based test with a CMake-scripted check: create a script (e.g., check_file_contains.cmake) that expects INPUT_FILE and PATTERN, uses file(READ) and string(FIND) to fail if pattern not found, then update the add_test for TOPP_CometAdapter_DDA_IM_check to invoke ${CMAKE_COMMAND} -P check_file_contains.cmake with INPUT_FILE set to ${TESTS_TEMP_DIR}/CometAdapter_DDA_out.tmp.idXML and PATTERN set to 'UserParam type="float" name="IM"'; keep the set_tests_properties(... DEPENDS "TOPP_CometAdapter_DDA") unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/tests/topp/CMakeLists.txt`:
- Line 3015: The if() checks that expand variables inside the condition (if (NOT
(${COMET_BINARY} STREQUAL "COMET_BINARY-NOTFOUND")) and the analogous
SAGE_BINARY check) are fragile with paths containing spaces; change these to use
CMake truthiness (if(COMET_BINARY) and if(SAGE_BINARY)) or perform a safe quoted
comparison (if (NOT ("${COMET_BINARY}" STREQUAL "COMET_BINARY-NOTFOUND"))) so
the condition does not break when the resolved path contains spaces; update the
two occurrences referencing COMET_BINARY and SAGE_BINARY accordingly.
---
Nitpick comments:
In `@src/tests/topp/CMakeLists.txt`:
- Around line 3037-3039: Replace the grep-based test with a CMake-scripted
check: create a script (e.g., check_file_contains.cmake) that expects INPUT_FILE
and PATTERN, uses file(READ) and string(FIND) to fail if pattern not found, then
update the add_test for TOPP_CometAdapter_DDA_IM_check to invoke
${CMAKE_COMMAND} -P check_file_contains.cmake with INPUT_FILE set to
${TESTS_TEMP_DIR}/CometAdapter_DDA_out.tmp.idXML and PATTERN set to 'UserParam
type="float" name="IM"'; keep the set_tests_properties(... DEPENDS
"TOPP_CometAdapter_DDA") unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e4669fc-9e63-439d-93bd-26c07e49384d
📒 Files selected for processing (2)
src/tests/topp/CMakeLists.txtsrc/topp/CometAdapter.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
- src/topp/CometAdapter.cpp
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/tests/topp/THIRDPARTY/CometAdapter_1_out.idXML`:
- Around line 4-9: The SearchParameters fixture contains machine-local absolute
paths because CometAdapter writes raw tool params into SearchParameters; update
the serialization path in CometAdapter so that when running in test mode it
strips or canonicalizes path-valued UserParam values (e.g., params with names
like "in","out","database","comet_executable","pin_out" or any value containing
path separators) before adding them to SearchParameters. Modify the code path in
the CometAdapter that writes tool params (the block mentioned at
CometAdapter.cpp:798-801) to replace absolute paths with either a stable
placeholder (e.g., "<REDACTED_PATH>" or basename) or omit them entirely in test
mode so the golden fixture no longer contains machine-specific filesystem
details.
- Around line 59-61: The Bruker-specific parameters are being written without
their "bruker:" namespace because
DefaultParamHandler::writeParametersToMetaValues is not preserving hierarchical
namespaces when flattening parameters; update that function to detect and retain
nested namespaces (e.g., parameters registered in CometAdapter.cpp as
"CometAdapter:1:bruker:...") when converting Param objects to MetaValue entries
so the serialized names include the "bruker:" segment (ensure the logic that
builds the meta key concatenates all namespace segments rather than dropping the
"bruker" token), and add/adjust unit tests to assert that parameters registered
with the "bruker" namespace produce meta keys like
"CometAdapter:1:bruker:export_mode" rather than "CometAdapter:1:export_mode".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 71f79825-036e-487b-83e6-d18f6797daf9
📒 Files selected for processing (6)
src/tests/topp/THIRDPARTY/Chy_test.idXMLsrc/tests/topp/THIRDPARTY/CometAdapter_1_out.idXMLsrc/tests/topp/THIRDPARTY/CometAdapter_2_out.idXMLsrc/tests/topp/THIRDPARTY/CometAdapter_3_out.idXMLsrc/tests/topp/THIRDPARTY/CometAdapter_4_out.idXMLsrc/tests/topp/THIRDPARTY/CometAdapter_6_out.idXML
| <SearchParameters id="SP_0" db="/home/sachsenb/Development/tmp2/OpenMS/src/tests/topp/THIRDPARTY/proteins.fasta" db_version="" taxonomy="" mass_type="monoisotopic" charges="0:0" enzyme="trypsin" missed_cleavages="1" precursor_peak_tolerance="3" precursor_peak_tolerance_ppm="true" peak_mass_tolerance="0.50025" peak_mass_tolerance_ppm="false" > | ||
| <UserParam type="string" name="CometAdapter:1:in" value="/home/sachsenb/Development/tmp2/OpenMS/src/tests/topp/THIRDPARTY/spectra_comet.mzML"/> | ||
| <UserParam type="string" name="CometAdapter:1:out" value="/tmp/CometAdapter_1_out1.idXML"/> | ||
| <UserParam type="string" name="CometAdapter:1:database" value="/home/sachsenb/Development/tmp2/OpenMS/src/tests/topp/THIRDPARTY/proteins.fasta"/> | ||
| <UserParam type="string" name="CometAdapter:1:comet_executable" value="/mnt/c/Program Files/OpenMS-3.1.0-pre-nightly-2024-02-02/share/OpenMS/THIRDPARTY/Comet/comet.exe"/> | ||
| <UserParam type="string" name="CometAdapter:1:pin_out" value="/tmp/CometAdapter_1_out2.tsv"/> |
There was a problem hiding this comment.
Normalize machine-local paths out of the golden fixture.
These reference lines now embed a local username, workstation-specific install paths, and /tmp output locations. That leaks developer filesystem details and makes the fixture non-reproducible when regenerated on CI or another machine. Since src/topp/CometAdapter.cpp:798-801 writes all tool params into SearchParameters, this churn will keep coming back unless test mode strips or canonicalizes path-valued params before serialization/comparison.
Also applies to: 96-96
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/tests/topp/THIRDPARTY/CometAdapter_1_out.idXML` around lines 4 - 9, The
SearchParameters fixture contains machine-local absolute paths because
CometAdapter writes raw tool params into SearchParameters; update the
serialization path in CometAdapter so that when running in test mode it strips
or canonicalizes path-valued UserParam values (e.g., params with names like
"in","out","database","comet_executable","pin_out" or any value containing path
separators) before adding them to SearchParameters. Modify the code path in the
CometAdapter that writes tool params (the block mentioned at
CometAdapter.cpp:798-801) to replace absolute paths with either a stable
placeholder (e.g., "<REDACTED_PATH>" or basename) or omit them entirely in test
mode so the golden fixture no longer contains machine-specific filesystem
details.
| <UserParam type="string" name="CometAdapter:1:export_mode" value="auto"/> | ||
| <UserParam type="float" name="CometAdapter:1:calibration_tolerance" value="0.0"/> | ||
| <UserParam type="string" name="CometAdapter:1:calibrate" value="false"/> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== CometAdapter parameter registration ==="
rg -n -C2 'export_mode|calibration_tolerance|calibrate|bruker:' src/topp/CometAdapter.cpp
echo
echo "=== SearchParameters metadata serialization ==="
rg -n -C2 'writeParametersToMetaValues' src/topp/CometAdapter.cpp src/openms/source/DATASTRUCTURES/DefaultParamHandler.cpp src/openms/include/OpenMS/DATASTRUCTURES/DefaultParamHandler.h
echo
echo "=== Serialized keys present in the updated fixtures ==="
rg -n 'CometAdapter:1:(bruker:)?(export_mode|calibration_tolerance|calibrate)' src/tests/topp/THIRDPARTYRepository: OpenMS/OpenMS
Length of output: 5291
The new Bruker options are being serialized without the bruker: namespace prefix.
The parameters are registered correctly with the bruker: prefix (lines 274–280 in CometAdapter.cpp), but the serialized metadata shows them unprefixed as CometAdapter:1:export_mode, CometAdapter:1:calibration_tolerance, and CometAdapter:1:calibrate instead of the expected CometAdapter:1:bruker:* nesting. This indicates a bug in how hierarchical parameters are serialized to metadata via DefaultParamHandler::writeParametersToMetaValues, causing Bruker-specific options to pollute the top-level CometAdapter metadata namespace across all affected test fixtures.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/tests/topp/THIRDPARTY/CometAdapter_1_out.idXML` around lines 59 - 61, The
Bruker-specific parameters are being written without their "bruker:" namespace
because DefaultParamHandler::writeParametersToMetaValues is not preserving
hierarchical namespaces when flattening parameters; update that function to
detect and retain nested namespaces (e.g., parameters registered in
CometAdapter.cpp as "CometAdapter:1:bruker:...") when converting Param objects
to MetaValue entries so the serialized names include the "bruker:" segment
(ensure the logic that builds the meta key concatenates all namespace segments
rather than dropping the "bruker" token), and add/adjust unit tests to assert
that parameters registered with the "bruker" namespace produce meta keys like
"CometAdapter:1:bruker:export_mode" rather than "CometAdapter:1:export_mode".
The new bruker:export_mode, bruker:calibration_tolerance, and bruker:calibrate parameters are written as UserParams to all idXML output via writeParametersToMetaValues. Regenerate reference files so FuzzyDiff comparisons pass. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
e6ae2e0 to
058542d
Compare
Add missing changelog entries for commits merged after the last sync: - #9127: Fix LinearResampler right_index bounds clamping (intensity spike bug) - #9126: CometAdapter Bruker .d DDA-PASEF input support - #9121: PeptideDataBaseSearchFI runtime search diagnostics and tolerance estimation - #9122: PeptideDataBaseSearchFI automatic mass accuracy calibration (two-pass search) - #9123: PeptideDataBaseSearchFI protein-level FDR (picked-protein) - #9129: OpenSwathWorkflow Bruker DIA MS2 frame aggregation, denoising, and streaming Co-authored-by: Copilot <[email protected]>
Add missing changelog entries for commits merged after the last sync: - #9127: Fix LinearResampler right_index bounds clamping (intensity spike bug) - #9126: CometAdapter Bruker .d DDA-PASEF input support - #9121: PeptideDataBaseSearchFI runtime search diagnostics and tolerance estimation - #9122: PeptideDataBaseSearchFI automatic mass accuracy calibration (two-pass search) - #9123: PeptideDataBaseSearchFI protein-level FDR (picked-protein) - #9129: OpenSwathWorkflow Bruker DIA MS2 frame aggregation, denoising, and streaming Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Summary
.d(DDA-PASEF) input support to CometAdapter, converting.dto temporary indexed mzML viaBrukerTimsFilefor Comet processingSearchEngineBasefor TimsTOF data (inherently centroided)bruker:export_mode,bruker:calibration_tolerance,bruker:calibrate) behind#ifdef WITH_OPENTIMS.ddata onto peptide identifications in post-processing, with a warning if annotation fails (native ID mismatch)WITH_OPENTIMS,OPENTIMS_DDA_TEST_DATA, and Comet binary availabilityTest plan
WITH_OPENTIMS=ONpassWITH_OPENTIMS=OFFpass (compile guards)TOPP_CometAdapter_DDAtest passes with OPENTIMS test data enabled.dinputChecklist
Summary by CodeRabbit
New Features
Bug Fixes
Tests