Analyzing models

cameo uses the model data structures defined by cobrapy, our favorite COnstraints-Based Reconstruction and Analysis tool for Python. cameo is thus 100% compatible with cobrapy. For efficiency reasons though cameo implements its own analysis methods that take advantage of a more advanced solver interface.

In [1]:
from cameo import models
from cameo.visualization.plotting.with_plotly import PlotlyPlotter

model = models.bigg.e_coli_core
plotter = PlotlyPlotter()
Note that plotter is passed as the first argument of every plotting function.

Flux Variability Analysis

Flux variability analysis (FVA) enables the computation of lower and upper bounds of reaction fluxes.

In [2]:
from cameo import flux_variability_analysis
In [3]:
fva_result = flux_variability_analysis(model)
fva_result.data_frame
Out[3]:
lower_bound upper_bound
PFK 0.000000e+00 176.61
PFL 0.000000e+00 40.00
PGI -5.000000e+01 10.00
PGK -2.000000e+01 0.00
PGL 0.000000e+00 60.00
... ... ...
NADH16 0.000000e+00 120.00
NADTRHD 0.000000e+00 378.22
NH4t -5.712836e-30 10.00
O2t 0.000000e+00 60.00
PDH 0.000000e+00 40.00

95 rows × 2 columns

In [4]:
fva_result.plot(plotter, index=fva_result.data_frame.index[:25])