{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting started with cameo " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**cameo** reuses and extends model data structures defined by [cobrapy](https://opencobra.github.io/cobrapy/) (**CO**nstraints-**B**ased **R**econstruction and **A**nalysis tool for **Py**thon). So, in addition to following this quick start guide and other **cameo** tutorials, we encourage you to explore cobrapy's [documentation](https://cobrapy.readthedocs.org/en/latest/cobra.core.html) as well." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Step 1: Load a model\n", "-------------------\n", "\n", "Loading a model is easy. Just import the :class:`~cameo.io.load_model` function." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from cameo import load_model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For example, load a genome-scale metabolic reconstruction of _Escherichia coli_." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "model = load_model(\"iJO1366\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Models, reactions, metabolites, etc., return HTML when evaluated in Jupyter notebooks and can be easily inspected." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
Name | \n", "iJO1366 | \n", "
Memory address | \n", "0x01120756d8 | \n", "
Number of metabolites | \n", "1805 | \n", "
Number of reactions | \n", "2583 | \n", "
Objective expression | \n", "-1.0*BIOMASS_Ec_iJO1366_core_53p95M_reverse_5c8b1 + 1.0*BIOMASS_Ec_iJO1366_core_53p95M | \n", "
Compartments | \n", "extracellular space, cytosol, periplasm | \n", "
\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
12DGR120tipp | \n", "0.000000 | \n", "0.000000 | \n", "
12DGR140tipp | \n", "0.000000 | \n", "0.000000 | \n", "
12DGR141tipp | \n", "0.000000 | \n", "0.000000 | \n", "
12DGR160tipp | \n", "0.000000 | \n", "0.000000 | \n", "
12DGR161tipp | \n", "0.000000 | \n", "-0.008295 | \n", "
... | \n", "... | \n", "... | \n", "
ZN2abcpp | \n", "0.000000 | \n", "-0.008295 | \n", "
ZN2t3pp | \n", "0.000000 | \n", "-0.002074 | \n", "
ZN2tpp | \n", "0.000335 | \n", "0.000000 | \n", "
ZNabcpp | \n", "0.000000 | \n", "-0.008295 | \n", "
Zn2tex | \n", "0.000335 | \n", "-0.000000 | \n", "
2583 rows × 2 columns
\n", "\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
12DGR120tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12DGR140tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12DGR141tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12DGR160tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12DGR161tipp | \n", "0.000000 | \n", "-8.295308e-03 | \n", "
12DGR180tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12DGR181tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12PPDRtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12PPDRtpp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12PPDStex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
12PPDStpp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
14GLUCANabcpp | \n", "0.000000 | \n", "-5.551115e-17 | \n", "
14GLUCANtexi | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23CAMPtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23CCMPtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23CGMPtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23CUMPtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23DAPPAt2pp | \n", "0.000000 | \n", "1.517883e-18 | \n", "
23DAPPAtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23PDE2pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23PDE4pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23PDE7pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
23PDE9pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
26DAHtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA120tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA140tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA141tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA160tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA161tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
2AGPA180tipp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
... | \n", "... | \n", "... | \n", "
VALTRS | \n", "0.000000 | \n", "0.000000e+00 | \n", "
VALabcpp | \n", "0.000000 | \n", "-6.221481e-03 | \n", "
VALt2rpp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
VALtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
VPAMTr | \n", "0.000000 | \n", "0.000000e+00 | \n", "
WCOS | \n", "0.000000 | \n", "0.000000e+00 | \n", "
X5PL3E | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XAND | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XANt2pp | \n", "0.000000 | \n", "-2.073827e-03 | \n", "
XANtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XANtpp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XMPtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XPPT | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XTSNH | \n", "0.000000 | \n", "-8.295308e-03 | \n", "
XTSNt2rpp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XTSNtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLI1 | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLI2 | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLK | \n", "0.000000 | \n", "-1.387779e-17 | \n", "
XYLK2 | \n", "0.000000 | \n", "-1.387779e-17 | \n", "
XYLUt2pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLUtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLabcpp | \n", "0.000000 | \n", "-6.221481e-03 | \n", "
XYLt2pp | \n", "0.000000 | \n", "0.000000e+00 | \n", "
XYLtex | \n", "0.000000 | \n", "0.000000e+00 | \n", "
ZN2abcpp | \n", "0.000000 | \n", "-8.295308e-03 | \n", "
ZN2t3pp | \n", "0.000000 | \n", "-2.073827e-03 | \n", "
ZN2tpp | \n", "0.000335 | \n", "0.000000e+00 | \n", "
ZNabcpp | \n", "0.000000 | \n", "-8.295308e-03 | \n", "
Zn2tex | \n", "0.000335 | \n", "-0.000000e+00 | \n", "
2583 rows × 2 columns
\n", "\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
3OAR140 | \n", "0.076452 | \n", "0.000000e+00 | \n", "
3OAS140 | \n", "0.076452 | \n", "0.000000e+00 | \n", "
5DOAN | \n", "0.000221 | \n", "0.000000e+00 | \n", "
A5PISO | \n", "0.038226 | \n", "0.000000e+00 | \n", "
AACPS3 | \n", "0.125378 | \n", "-1.387779e-16 | \n", "
AACPS4 | \n", "0.147776 | \n", "-2.775558e-17 | \n", "
AACPS7 | \n", "0.076452 | \n", "-2.775558e-17 | \n", "
ACACT1r | \n", "0.349606 | \n", "0.000000e+00 | \n", "
ACACT2r | \n", "0.349606 | \n", "0.000000e+00 | \n", "
ACACT3r | \n", "0.349606 | \n", "0.000000e+00 | \n", "
ACACT4r | \n", "0.349606 | \n", "0.000000e+00 | \n", "
ACACT5r | \n", "0.349606 | \n", "0.000000e+00 | \n", "
ACACT6r | \n", "0.273154 | \n", "0.000000e+00 | \n", "
ACACT7r | \n", "0.273154 | \n", "0.000000e+00 | \n", "
ACCOAC | \n", "0.076458 | \n", "-7.090682e-17 | \n", "
ACGK | \n", "0.290578 | \n", "0.000000e+00 | \n", "
ACGS | \n", "0.290578 | \n", "2.927346e-17 | \n", "
ACHBS | \n", "0.285408 | \n", "-6.938894e-18 | \n", "
ACLS | \n", "0.858857 | \n", "0.000000e+00 | \n", "
ACOAD1f | \n", "-0.349606 | \n", "0.000000e+00 | \n", "
ACOAD2f | \n", "-0.349606 | \n", "0.000000e+00 | \n", "
ACOAD3f | \n", "-0.349606 | \n", "0.000000e+00 | \n", "
ACOAD4f | \n", "-0.349606 | \n", "0.000000e+00 | \n", "
ACOAD5f | \n", "-0.349606 | \n", "0.000000e+00 | \n", "
ACOAD6f | \n", "-0.273154 | \n", "0.000000e+00 | \n", "
ACOAD7f | \n", "-0.125378 | \n", "0.000000e+00 | \n", "
ACODA | \n", "0.290578 | \n", "0.000000e+00 | \n", "
ACONTa | \n", "4.857777 | \n", "0.000000e+00 | \n", "
ACONTb | \n", "4.857777 | \n", "0.000000e+00 | \n", "
ACOTA | \n", "-0.290578 | \n", "0.000000e+00 | \n", "
... | \n", "... | \n", "... | \n", "
TMDS | \n", "0.025705 | \n", "-5.551115e-17 | \n", "
TMPK | \n", "0.000219 | \n", "0.000000e+00 | \n", "
TMPPP | \n", "0.000219 | \n", "0.000000e+00 | \n", "
TPI | \n", "7.645371 | \n", "0.000000e+00 | \n", "
TRDR | \n", "0.243502 | \n", "0.000000e+00 | \n", "
TRPAS2 | \n", "-0.055841 | \n", "0.000000e+00 | \n", "
TRPS3 | \n", "0.055841 | \n", "2.775558e-17 | \n", "
TYRL | \n", "0.000219 | \n", "0.000000e+00 | \n", "
TYRTA | \n", "-0.135684 | \n", "0.000000e+00 | \n", "
U23GAAT | \n", "0.038226 | \n", "0.000000e+00 | \n", "
UAAGDS | \n", "0.027298 | \n", "0.000000e+00 | \n", "
UAGAAT | \n", "0.038226 | \n", "0.000000e+00 | \n", "
UAGCVT | \n", "0.027298 | \n", "0.000000e+00 | \n", "
UAGDP | \n", "0.092822 | \n", "0.000000e+00 | \n", "
UAGPT3 | \n", "0.027298 | \n", "-5.551115e-17 | \n", "
UAMAGS | \n", "0.027298 | \n", "0.000000e+00 | \n", "
UAMAS | \n", "0.027298 | \n", "5.551115e-17 | \n", "
UAPGR | \n", "0.027298 | \n", "0.000000e+00 | \n", "
UDCPDP | \n", "0.027298 | \n", "0.000000e+00 | \n", "
UDCPDPS | \n", "0.000054 | \n", "0.000000e+00 | \n", "
UGMDDS | \n", "0.027298 | \n", "1.110223e-16 | \n", "
UHGADA | \n", "0.038226 | \n", "0.000000e+00 | \n", "
UMPK | \n", "0.371375 | \n", "0.000000e+00 | \n", "
UPP3MT | \n", "0.000219 | \n", "1.110223e-16 | \n", "
UPP3S | \n", "0.000438 | \n", "0.000000e+00 | \n", "
UPPDC1 | \n", "0.000219 | \n", "0.000000e+00 | \n", "
USHD | \n", "0.019113 | \n", "0.000000e+00 | \n", "
VALTA | \n", "-0.415702 | \n", "0.000000e+00 | \n", "
ZN2tpp | \n", "0.000335 | \n", "0.000000e+00 | \n", "
Zn2tex | \n", "0.000335 | \n", "-0.000000e+00 | \n", "
436 rows × 2 columns
\n", "Reaction identifier | PGK | \n", "
Name | Phosphoglycerate kinase | \n", "
Memory address | \n", "0x01129829b0 | \n", "
Stoichiometry | \n", "\n",
" 3pg_c + atp_c <=> 13dpg_c + adp_c \n", "3-Phospho-D-glycerate + ATP C10H12N5O13P3 <=> 3-Phospho-D-glyceroyl phosphate + ADP C10H12N5O10P2 \n", " | \n",
"
GPR | b2926 | \n", "
Lower bound | -1000.0 | \n", "
Upper bound | 1000.0 | \n", "
Reaction identifier | E4PD | \n", "
Name | Erythrose 4-phosphate dehydrogenase | \n", "
Memory address | \n", "0x0112606160 | \n", "
Stoichiometry | \n", "\n",
" e4p_c + h2o_c + nad_c <=> 4per_c + 2.0 h_c + nadh_c \n", "D-Erythrose 4-phosphate + H2O H2O + Nicotinamide adenine dinucleotide <=> 4-Phospho-D-erythronate + 2.0 H+ + Nicotinamide adenine dinucleotide - reduced \n", " | \n",
"
GPR | b2927 or b1779 | \n", "
Lower bound | -1000.0 | \n", "
Upper bound | 1000.0 | \n", "
Reaction identifier | 12DGR120tipp | \n", "
Name | 1,2 diacylglycerol transport via flipping (periplasm to cytoplasm, n-C12:0) | \n", "
Memory address | \n", "0x0112506ba8 | \n", "
Stoichiometry | \n", "\n",
" 12dgr120_p --> 12dgr120_c \n", "1,2-Diacyl-sn-glycerol (didodecanoyl, n-C12:0) --> 1,2-Diacyl-sn-glycerol (didodecanoyl, n-C12:0) \n", " | \n",
"
GPR | \n", " |
Lower bound | 0.0 | \n", "
Upper bound | 1000.0 | \n", "
Metabolite identifier | glc__D_c | \n", "
Name | D-Glucose | \n", "
Memory address | \n", "0x01120db4a8 | \n", "
Formula | C6H12O6 | \n", "
Compartment | c | \n", "
In 19 reaction(s) | \n", " GLCt2pp, GLCATr, TRE6PH, MLTG2, G6PP, LACZ, MLTG3, AMALT1, HEX1, XYLI2, MLTG4, GALS3, GLCabcpp, AMALT2, MLTG5, AMALT3, AMALT4, TREH, MLTG1 | \n", "