Add HDF5 integrity checks, permissive data format, and robust merging#40
Merged
Jozefov merged 12 commits intopluskal-lab:mainfrom Apr 8, 2026
Merged
Conversation
Add a permissive DataFormatAll data format class that accepts essentially all spectra (wide ranges for charge, m/z, intensity). Update assign_dformat() to return 'ALL' instead of '-' when no standard format matches, and add the 'ALL' case to DataFormatBuilder.
Add MSLevelsOrder.MISSING_MS1 enum value to detect files lacking MS1 precursor spectra. Add a check in get_order_of_spectra() that returns MISSING_MS1 when MS1 level is absent. Wrap get_instrument_props() in try/except to gracefully handle files where TBXIC computation fails.
Add verify_hdf5_integrity() to detect corrupted/truncated HDF5 files. Rewrite merge_lcmsms_hdf5s() with a two-pass approach: first validate and collect union keys from all input files, then merge with proper handling of heterogeneous datasets, metadata collection into a dedicated HDF5 group, and output integrity verification. Add helper functions for dataset appending, metadata coercion, and fill-array generation. Handle MISSING_MS1 files in read_lcmsms().
…provements' into merging_func
io.read_mzml update
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.
Improvements to HDF5 merging and LC-MS/MS processing robustness, developed for the GeMS dataset construction pipeline.
Key changes:
DataFormatAllpermissive format class and'ALL'fallback inassign_dformat()MSLevelsOrder.MISSING_MS1for files lacking MS1 spectra; makeget_instrument_props()exception-safeverify_hdf5_integrity()to detect corrupted/truncated filesmerge_lcmsms_hdf5s()with two-pass union-key handling, per-file metadata group, and output integrity verification