corneto.io.parse_cobra_model#
- corneto.io.parse_cobra_model(model)#
Parse a COBRA metabolic model and extract its core components.
This function takes a COBRA model and extracts its stoichiometric matrix, reaction data, and metabolite data.
- Parameters:
model (
CobraModel
) – A COBRA model object to import.- Returns:
A tuple containing:
S (
numpy.ndarray
): The stoichiometric matrix.R (
numpy.ndarray
): A structured numpy array containing reaction data with fields:M (
numpy.ndarray
): A structured numpy array containing metabolite data with fields:
- Return type:
Tuple[
numpy.ndarray
,numpy.ndarray
,numpy.ndarray
]- Raises:
ImportError – If COBRApy is not installed.