sbmlutils.fbc.cobra

cobrapy based helper methods.

Module Contents

Functions

read_cobra_model(sbml_path)

Load cobra model from path.

cobra_reaction_info(cobra_model)

Create data frame with bound and objective information.

check_mass_balance(sbml_path)

Check mass and charge balance of the model.

Attributes

cobra

logger

sbmlutils.fbc.cobra.cobra[source]
sbmlutils.fbc.cobra.logger[source]
sbmlutils.fbc.cobra.read_cobra_model(sbml_path)[source]

Load cobra model from path.

Sets default flux bounds to allow loading and changes all boundaryConditions to False.

Parameters:

sbml_path (pathlib.Path) – str path

Returns:

cobra model

Return type:

cobra.core.Model

sbmlutils.fbc.cobra.cobra_reaction_info(cobra_model)[source]

Create data frame with bound and objective information.

Parameters:

cobra_model (cobra.core.Model) –

Returns:

pandas DataFrame

Return type:

pandas.DataFrame

sbmlutils.fbc.cobra.check_mass_balance(sbml_path)[source]

Check mass and charge balance of the model.

Parameters:

sbml_path (pathlib.Path) – Path to SBML file

Returns:

Dict of unbalanced reactions

Return type:

Dict