Repository navigation
[FIX,IO,TEST] Warn on imzML-dropped integer/string arrays, move the aux snapshot - #10002
Merged
Merged
Conversation
…ux snapshot imzML stores per-peak data only as FloatDataArrays, so IntegerDataArrays and StringDataArrays (e.g. a "charge array" carried over from mzML) vanish on export. Unnamed and length-mismatched FloatDataArrays already warn; these did not, so the loss was only visible downstream. Warn once per store -- not once per pixel -- and cap the listed array names so the line cannot grow with the dataset, matching the duplicate-pixel warning. The per-spectrum IMS snapshot also deep-copied cur_aux_metas_ and cur_inline_aux_names_ (three strings per aux array) even though both are cleared immediately afterwards; move them instead. Follow-up to #9908. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FHpfx4xEGqkzAr6hhj5GHR
Contributor
|
Warning Review limit reachedNext included review available in 2 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
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 |
1 task done
pull Bot
pushed a commit
to matchy233/OpenMS
that referenced
this pull request
Aug 30, 2026
- -feat_dir (ProteomicsLFQ) and the imzML dropped-array warning shipped without their PR citation (OpenMS#9989, OpenMS#10002). - The Biosaur2/FAIMS fix entry cited only the tracking issue (OpenMS#9980), not the merged PR (OpenMS#9996). - No entry existed for the NSIS Cfg_Settings.nsh path fix (OpenMS#9978, OpenMS#9991) or the multi-arch container deploy race fix (OpenMS#9951, OpenMS#9954).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two cheap follow-ups from the review of #9908 (merged). No behavior change beyond one new warning.
1. imzML export silently dropped per-peak Integer/StringDataArrays. The format stores per-peak data only as
FloatDataArrays (written as external.ibdarrays), so anIntegerDataArraysuch as a"charge array"carried over from mzML vanishes on export. Unnamed and length-mismatchedFloatDataArrays already warn, so this was the one silent loss left — users only discovered it downstream.warnOnDroppedDataArrays_now warns once perstore(), not once per pixel (a million-pixel dataset must not emit a million lines), and caps the listed array names at 20 with a, ...marker so the line cannot grow with the dataset — the same bounded-listing shape as the existing duplicate-pixel warning. Nothing is written differently; the arrays are still dropped.2. The per-spectrum IMS snapshot deep-copied two vectors it could move.
ImzMLHandler::onEndElementcopiedcur_aux_metas_(three strings per aux array) andcur_inline_aux_names_into the snapshot, then cleared both unconditionally a few lines later. Moving them — and the snapshot intospec_ims_— removes a per-spectrum allocation on datasets that have one spectrum per pixel. Nothing reads either vector between the move and the reset, so the moved-from state is never observed.Testing
Added
store drops integer and string data arrays: stores a spectrum carrying an IMFloatDataArrayplus an integer and a string array, then asserts both loaders return the peaks and the IM array with zero integer/string arrays. The helper's counting, de-duplication and cap logic was also checked standalone (empty arrays and metadata-only stores produce no warning; duplicate names across spectra are listed once).The change could not be built in the environment it was written in (no Xerces/Boost, no configured build), so it went to CI unbuilt. CI has since covered that:
build-and-testis green on all five platforms (Ubuntu g++/clang++, Ubuntu ARM g++, macOS xcode, Windows cl.exe), along withcppcheck-testand the wheel builds.Checklist
Remaining follow-ups from the #9908 review (not in this PR)
Left out deliberately — each needs a design decision rather than a cheap fix:
MS:1003441(ion mobility centroid frame) peak type diverges between loaders for third-party files:ImzMLSpectrumIndexrecords no peak type, so on-disc returnsIM_PROFILEwhere in-memory keepsIM_CENTROIDED.unit_accessionMetaValue, so declared units on multi-unit orMS:1000786arrays are dropped on imzML export while surviving mzML export.nameattribute is stored in everyCvEntryand forwarded throughapplyRefGroup_, buthandleIMSCvParam_ignores it.🤖 Generated with Claude Code
https://claude.ai/code/session_01FHpfx4xEGqkzAr6hhj5GHR