cobrapy_io
Cobrapy I/O function overrides and enhancements.
This module patches cobra I/O functions to fix bugs and add missing features for handling model serialisation (MATLAB, JSON formats).
Key enhancements: - Load/save MATLAB models with better error handling - Handle NaN and Na values during JSON serialisation - Support rxnECNumber field from MATLAB structs - Handle geneShortNames field as fallback - Load subsystems correctly from MATLAB arrays
Changes made: - 2025-01-22: Initial wrapper around load_mat; EC number support - 2025-02-11: Fixed subsystem loading from MATLAB arrays - 2025-06-20: Consolidated and documented all I/O fixes
Author: Jelle Bonthuis (MaCSBio)
Functions
|
Convert MATLAB struct to cobra Model object. |
|
Load cobrapy Model from MATLAB .mat file with error handling. |
|
Construct cobra Model from dictionary (inverse of model_to_dict). |
|
Convert cobra Model to OrderedDict suitable for JSON serialisation. |
|
Serialise cobra Model to JSON file with NaN/Inf/int64 handling. |