Add ion mobility support via float data arrays and mobilogram wrapper#21
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Added float_data_arrays property to Py_MSSpectrum for accessing/setting float data arrays - Added ion_mobility property for convenient access to ion mobility data - Added drift_time property for spectrum-level drift time - Updated to_dataframe() to include float data arrays as columns - Updated from_dataframe() to create float data arrays from DataFrame columns - Created Py_Mobilogram wrapper class for MSChromatogram (mobilograms) - Added comprehensive tests for all new functionality - All tests passing (93 tests, 86% coverage) Co-authored-by: timosachsenberg <5803621+timosachsenberg@users.noreply.github.com>
Co-authored-by: timosachsenberg <5803621+timosachsenberg@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for ion mobility dimension in float data array
Add ion mobility support via float data arrays and mobilogram wrapper
Nov 19, 2025
Contributor
|
@copilot add a note that a mobilogram class exists in OpenMS but might not yet be wrapped |
Added documentation note that OpenMS C++ has a native Mobilogram class that may not yet be wrapped in pyopenms, and this wrapper uses MSChromatogram as the underlying representation. Co-authored-by: timosachsenberg <5803621+timosachsenberg@users.noreply.github.com>
Contributor
Author
Added documentation notes in both the module docstring and README explaining that OpenMS C++ has a native Mobilogram class that may not yet be wrapped in pyopenms, and that this wrapper uses MSChromatogram as the underlying representation. (da88471) |
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.
Add support for ion mobility dimension in float data arrays and mobilogram support
Implementation Complete ✓
Successfully implemented comprehensive support for ion mobility data in openms-python:
Features Implemented
Float Data Arrays in Py_MSSpectrum ✓
float_data_arraysproperty for direct access to float data arraysion_mobilityproperty for convenient ion mobility access/manipulationdrift_timeproperty for spectrum-level drift timeto_dataframe()to include float arrays as columnsfrom_dataframe()to create float arrays from DataFrame columnsPy_Mobilogram Class ✓
drift_time,intensity,mz,nametotal_ion_current,base_peak_drift_time,base_peak_intensityto_dataframe(),from_dataframe(),from_arrays()Testing ✓
Documentation ✓
Code Quality ✓
Files Modified
openms_python/py_msspectrum.py- Added float data array and ion mobility supportopenms_python/py_mobilogram.py- New file with Py_Mobilogram classopenms_python/__init__.py- Exported new Py_Mobilogram classtests/test_py_msspectrum.py- Added 8 new tests for ion mobility featurestests/test_py_mobilogram.py- New test file with 10 tests for mobilogramsREADME.md- Added documentation and examplesVerification
Ready for Review
This PR is complete and ready for review. All requirements from the problem statement have been implemented with comprehensive testing and documentation.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.