Repository navigation
Rename IMFormat::CONCATENATED → IM_PEAK and MULTIPLE_SPECTRA → IM_SPECTRUM - #8993
Merged
Merged
Conversation
…PECTRUM Rename IMFormat enum values for clarity: - CONCATENATED → IM_PEAK (full TIMS frame / per-scan IM-resolved data) - MULTIPLE_SPECTRA → IM_SPECTRUM (conventional spectrum with one precursor IM value) Updated all references across ~20 source files including: - Core enum definition and string names (IMTypes.h/cpp) - C++ source files using these enum values - Header file documentation comments - Python bindings (bind_kernel.cpp, bind_spectrum.cpp) - C++ unit tests - Python unit tests Resolves the issue where MULTIPLE_SPECTRA sounded like a collection of spectra and CONCATENATED didn't indicate per-peak IM arrays. Co-authored-by: timosachsenberg <[email protected]> Agent-Logs-Url: https://github.com/OpenMS/OpenMS/sessions/88f19985-185e-4f77-b433-2494b6c95887
Copilot
AI
changed the title
[WIP] Rename IMFormat enum values for clarity
Rename IMFormat::CONCATENATED → IM_PEAK and MULTIPLE_SPECTRA → IM_SPECTRUM
Mar 25, 2026
timosachsenberg
marked this pull request as ready for review
March 25, 2026 08:58
timosachsenberg
requested review from
alhigaylan,
cbielow,
jcharkow and
singjc
and removed request for
timosachsenberg
March 25, 2026 10:22
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 26, 2026
Add missing entries for: - #8991: Arrow/Parquet made required dependency; WITH_PARQUET CMake option removed - #8993: BREAKING IMFormat enum rename (CONCATENATED→IM_PEAK, MULTIPLE_SPECTRA→IM_SPECTRUM) - #8997: Fix TOPPView performance regression when right-clicking in large mzML - #8999: BrukerTimsFile tiered scan→1/K0 calibration with RationalScan2ImConverter Co-authored-by: Copilot <[email protected]>
timosachsenberg
pushed a commit
that referenced
this pull request
Mar 26, 2026
Add missing entries for: - #8991: Arrow/Parquet made required dependency; WITH_PARQUET CMake option removed - #8993: BREAKING IMFormat enum rename (CONCATENATED→IM_PEAK, MULTIPLE_SPECTRA→IM_SPECTRUM) - #8997: Fix TOPPView performance regression when right-clicking in large mzML - #8999: BrukerTimsFile tiered scan→1/K0 calibration with RationalScan2ImConverter Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
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.
MULTIPLE_SPECTRAsounds like a collection of spectra but means "one IM value per spectrum";CONCATENATEDdoesn't convey "per-peak IM arrays." Per discussion, rename to names that describe the IM annotation granularity:CONCATENATEDIM_PEAKMULTIPLE_SPECTRAIM_SPECTRUMChanges
IMTypes.h): Rename values and update doxygen comments, includingMIXED/CENTROIDEDdescriptions that referenced old namesIMTypes.cpp):"concatenated"→"im_peak","multiple_spectra"→"im_spectrum"Biosaur2Algorithm,FeatureFinderAlgorithmMetaboIdent,FeatureFinderIdentificationAlgorithm,SimpleSearchEngineAlgorithm,PeptideSearchEngineFIAlgorithm,IMDataConverter,SpectrumMetaDataLookup,PeakPickerIM,BrukerTimsFilePeakPickerIM.cpp,OpenNuXL.cpp— updated error messagesbind_kernel.cppenum values,bind_spectrum.cppdocstringIMTypes_test,PeakPickerIM_test,BrukerTimsFile_test,SpectrumMetaDataLookup_test,MSSpectrum_rasterizeIMFrame_test) and Python tests (test_Utf8StringInput,test_StaticMethods)MSSpectrum.h,BrukerTimsFile.hBreaking changes
IMFormat::CONCATENATEDandIMFormat::MULTIPLE_SPECTRAno longer existIMFormat.CONCATENATED/IMFormat.MULTIPLE_SPECTRA→IMFormat.IM_PEAK/IMFormat.IM_SPECTRUMtoIMFormat("concatenated")→toIMFormat("im_peak"),toIMFormat("multiple_spectra")→toIMFormat("im_spectrum")Original prompt
This section details on the original issue you should resolve
<issue_title>Rename IMFormat::MULTIPLE_SPECTRA and CONCATENATED to clearer names</issue_title>
<issue_description>## Problem
The
IMFormatenum valuesMULTIPLE_SPECTRAandCONCATENATEDdo not clearly convey their semantic meaning:MULTIPLE_SPECTRAmeans "one IM value per spectrum" (a single drift time viagetDriftTime()). Used for DDA-PASEF MS2 spectra where each spectrum has one ion mobility value.CONCATENATEDmeans "per-peak IM values in a float data array" (each peak in the spectrum has its own IM value). Used for MS1 frames where all scans are stacked into one spectrum.The names are confusing:
MULTIPLE_SPECTRAsounds like it describes a collection of spectra, but it actually describes the IM annotation style of a single spectrumCONCATENATEDdoesn't indicate what is concatenated or that it refers to per-peak IM arraysThis makes code like the following hard to read without looking up the enum definition:
Suggested alternatives
MULTIPLE_SPECTRASPECTRUM_LEVELSINGLE_VALUESCALAR_DRIFT_TIMECONCATENATEDPEAK_LEVELPER_PEAKFLOAT_DATA_ARRAYOption A (
SPECTRUM_LEVEL/PEAK_LEVEL) is recommended — it clearly describes the granularity level at which IM is stored.Current enum definition
How
determineIMFormat()distinguishes themFrom
IMTypes.cpp:containsIMData()) →CONCATENATEDgetDriftTime() != -1.0) →MULTIPLE_SPECTRANONEUsage analysis across the codebase
Where MULTIPLE_SPECTRA is checked (scalar drift time per spectrum)
SpectrumMetaDataLookup.cpp:214SimpleSearchEngineAlgorithm.cppPeptideSearchEngineFIAlgorithm.cppOpenNuXL.cpp:4562IMDataConverter.cpp:291PeakPickerIM.cpp:198Where CONCATENATED is checked (per-peak IM arrays)
PeakPickerIM.cppBiosaur2Algorithm.cpp:889,1345,1436FeatureFinderIdentificationAlgorithm.cpp:697FeatureFinderAlgorithmMetaboIdent.cpp:338PeakPickerIM.cpp:748Both formats referenced
IMTypes.hIMTypes.cppIMTypes_test.cppPeakPickerIM_test.cppbind_kernel.cppBrukerTimsFile.cppTotal: ~17 source files + 2 doc files reference these enum values
User-facing error messages that would need updating
Additional considerations
bind_kernel.cpp): Enum values exposed asIMFormat.CONCATENATEDandIMFormat.MULTIPLE_SPECTRA— renaming is a pyOpenMS API changeNamesOfIMFormat): Currently"concatenated"and"multiple_spectra"— may appear in mzML or other serialized formatsCENTROIDEDvalue has the same data layout asCONCATENATED(per-peak IM in float array) but different semantics (post-centroiding). This could also benefit from a clearer name likeCENTROIDED_PEAK_LEVEL.MIXEDis only used at the experiment level (MSExperiment contains b...⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.