\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"
\\n\"+\n",
" \"\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
ACALD | \n", "0.000000 | \n", "0.0 | \n", "
ACALDt | \n", "0.000000 | \n", "0.0 | \n", "
ACKr | \n", "0.000000 | \n", "0.0 | \n", "
ACONTa | \n", "6.007250 | \n", "0.0 | \n", "
ACONTb | \n", "6.007250 | \n", "0.0 | \n", "
... | \n", "... | \n", "... | \n", "
TALA | \n", "1.496984 | \n", "0.0 | \n", "
THD2 | \n", "0.000000 | \n", "0.0 | \n", "
TKT1 | \n", "1.496984 | \n", "0.0 | \n", "
TKT2 | \n", "1.181498 | \n", "0.0 | \n", "
TPI | \n", "7.477382 | \n", "0.0 | \n", "
95 rows × 2 columns
\n", "\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
ACALD | \n", "0.000000 | \n", "0.000000e+00 | \n", "
ACALDt | \n", "0.000000 | \n", "0.000000e+00 | \n", "
ACKr | \n", "0.000000 | \n", "0.000000e+00 | \n", "
ACONTa | \n", "6.007250 | \n", "0.000000e+00 | \n", "
ACONTb | \n", "6.007250 | \n", "0.000000e+00 | \n", "
... | \n", "... | \n", "... | \n", "
TALA | \n", "1.496984 | \n", "2.220446e-16 | \n", "
THD2 | \n", "0.000000 | \n", "2.220446e-16 | \n", "
TKT1 | \n", "1.496984 | \n", "0.000000e+00 | \n", "
TKT2 | \n", "1.181498 | \n", "-1.110223e-16 | \n", "
TPI | \n", "7.477382 | \n", "0.000000e+00 | \n", "
95 rows × 2 columns
\n", "\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
ACALD | \n", "1.495879e-14 | \n", "2.914335e-16 | \n", "
ACALDt | \n", "1.495879e-14 | \n", "0.000000e+00 | \n", "
ACKr | \n", "1.554312e-15 | \n", "1.110223e-16 | \n", "
ACONTa | \n", "6.007250e+00 | \n", "0.000000e+00 | \n", "
ACONTb | \n", "6.007250e+00 | \n", "0.000000e+00 | \n", "
... | \n", "... | \n", "... | \n", "
TALA | \n", "1.496984e+00 | \n", "-1.665335e-15 | \n", "
THD2 | \n", "5.789919e-14 | \n", "0.000000e+00 | \n", "
TKT1 | \n", "1.496984e+00 | \n", "1.665335e-16 | \n", "
TKT2 | \n", "1.181498e+00 | \n", "-2.220446e-16 | \n", "
TPI | \n", "7.477382e+00 | \n", "0.000000e+00 | \n", "
95 rows × 2 columns
\n", "\n", " | minimum | \n", "maximum | \n", "
---|---|---|
DM_4CRSOL | \n", "0.000208 | \n", "0.000219 | \n", "
DM_5DRIB | \n", "0.000210 | \n", "0.112258 | \n", "
DM_AACALD | \n", "0.000000 | \n", "0.000000 | \n", "
DM_AMOB | \n", "0.000002 | \n", "0.000002 | \n", "
DM_MTHTHF | \n", "0.000418 | \n", "0.515309 | \n", "
DM_OXAM | \n", "0.000000 | \n", "1.010167 | \n", "
Ec_biomass_iJO1366_WT_53p95M | \n", "0.000000 | \n", "0.049326 | \n", "
Ec_biomass_iJO1366_core_53p95M | \n", "0.933253 | \n", "0.982372 | \n", "
EX_12ppd__R_e | \n", "0.000000 | \n", "0.724815 | \n", "
EX_12ppd__S_e | \n", "0.000000 | \n", "0.713997 | \n", "
EX_14glucan_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_15dap_e | \n", "0.000000 | \n", "0.394750 | \n", "
EX_23camp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23ccmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23cgmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23cump_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23dappa_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_26dap__M_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_2ddglcn_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_34dhpac_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3amp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3cmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3gmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3hcinnm_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3hpp_e | \n", "0.000000 | \n", "0.631600 | \n", "
EX_3hpppn_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3ump_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_4abut_e | \n", "0.000000 | \n", "0.667183 | \n", "
EX_4hoxpacd_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_5dglcn_e | \n", "0.000000 | \n", "0.563929 | \n", "
... | \n", "... | \n", "... | \n", "
VALTRS | \n", "0.000000 | \n", "0.000000 | \n", "
VALabcpp | \n", "0.000000 | \n", "15.790000 | \n", "
VALt2rpp | \n", "-15.790000 | \n", "0.000000 | \n", "
VALtex | \n", "-0.526333 | \n", "0.000000 | \n", "
VPAMTr | \n", "-999.605083 | \n", "999.457448 | \n", "
WCOS | \n", "0.000000 | \n", "0.000000 | \n", "
X5PL3E | \n", "0.000000 | \n", "0.000000 | \n", "
XAND | \n", "0.000000 | \n", "1.263200 | \n", "
XANt2pp | \n", "0.000000 | \n", "47.370000 | \n", "
XANtex | \n", "-0.644490 | \n", "0.000000 | \n", "
XANtpp | \n", "-47.370000 | \n", "0.000000 | \n", "
XMPtex | \n", "0.000000 | \n", "0.000000 | \n", "
XPPT | \n", "0.000000 | \n", "11.842500 | \n", "
XTSNH | \n", "0.000000 | \n", "11.842500 | \n", "
XTSNt2rpp | \n", "-0.302684 | \n", "0.000000 | \n", "
XTSNtex | \n", "-0.302684 | \n", "0.000000 | \n", "
XYLI1 | \n", "0.000000 | \n", "0.000000 | \n", "
XYLI2 | \n", "-11.842500 | \n", "19.342500 | \n", "
XYLK | \n", "0.000000 | \n", "0.000000 | \n", "
XYLK2 | \n", "0.000000 | \n", "0.000000 | \n", "
XYLUt2pp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLUtex | \n", "0.000000 | \n", "0.000000 | \n", "
XYLabcpp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLt2pp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLtex | \n", "0.000000 | \n", "0.000000 | \n", "
ZN2abcpp | \n", "0.000000 | \n", "11.842500 | \n", "
ZN2t3pp | \n", "0.000000 | \n", "47.370000 | \n", "
ZN2tpp | \n", "0.000000 | \n", "47.370318 | \n", "
ZNabcpp | \n", "0.000000 | \n", "9.474064 | \n", "
Zn2tex | \n", "0.000318 | \n", "0.000335 | \n", "
2583 rows × 2 columns
\n", "\n", " | minimum | \n", "maximum | \n", "
---|---|---|
DM_4CRSOL | \n", "0.000208 | \n", "0.000219 | \n", "
DM_5DRIB | \n", "0.000210 | \n", "0.112258 | \n", "
DM_AACALD | \n", "0.000000 | \n", "0.000000 | \n", "
DM_AMOB | \n", "0.000002 | \n", "0.000002 | \n", "
DM_MTHTHF | \n", "0.000418 | \n", "0.515309 | \n", "
DM_OXAM | \n", "0.000000 | \n", "1.010167 | \n", "
Ec_biomass_iJO1366_WT_53p95M | \n", "0.000000 | \n", "0.049326 | \n", "
Ec_biomass_iJO1366_core_53p95M | \n", "0.933253 | \n", "0.982372 | \n", "
EX_12ppd__R_e | \n", "0.000000 | \n", "0.724815 | \n", "
EX_12ppd__S_e | \n", "0.000000 | \n", "0.713997 | \n", "
EX_14glucan_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_15dap_e | \n", "0.000000 | \n", "0.394750 | \n", "
EX_23camp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23ccmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23cgmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23cump_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_23dappa_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_26dap__M_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_2ddglcn_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_34dhpac_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3amp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3cmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3gmp_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3hcinnm_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3hpp_e | \n", "0.000000 | \n", "0.631600 | \n", "
EX_3hpppn_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_3ump_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_4abut_e | \n", "0.000000 | \n", "0.667183 | \n", "
EX_4hoxpacd_e | \n", "0.000000 | \n", "0.000000 | \n", "
EX_5dglcn_e | \n", "0.000000 | \n", "0.563929 | \n", "
... | \n", "... | \n", "... | \n", "
VALTRS | \n", "0.000000 | \n", "0.000000 | \n", "
VALabcpp | \n", "0.000000 | \n", "15.790000 | \n", "
VALt2rpp | \n", "-15.790000 | \n", "0.000000 | \n", "
VALtex | \n", "-0.526333 | \n", "0.000000 | \n", "
VPAMTr | \n", "-999.605083 | \n", "999.457448 | \n", "
WCOS | \n", "0.000000 | \n", "0.000000 | \n", "
X5PL3E | \n", "0.000000 | \n", "0.000000 | \n", "
XAND | \n", "0.000000 | \n", "1.263200 | \n", "
XANt2pp | \n", "0.000000 | \n", "47.370000 | \n", "
XANtex | \n", "-0.644490 | \n", "0.000000 | \n", "
XANtpp | \n", "-47.370000 | \n", "0.000000 | \n", "
XMPtex | \n", "0.000000 | \n", "0.000000 | \n", "
XPPT | \n", "0.000000 | \n", "11.842500 | \n", "
XTSNH | \n", "0.000000 | \n", "11.842500 | \n", "
XTSNt2rpp | \n", "-0.302684 | \n", "0.000000 | \n", "
XTSNtex | \n", "-0.302684 | \n", "0.000000 | \n", "
XYLI1 | \n", "0.000000 | \n", "0.000000 | \n", "
XYLI2 | \n", "-11.842500 | \n", "19.342500 | \n", "
XYLK | \n", "0.000000 | \n", "0.000000 | \n", "
XYLK2 | \n", "0.000000 | \n", "0.000000 | \n", "
XYLUt2pp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLUtex | \n", "0.000000 | \n", "0.000000 | \n", "
XYLabcpp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLt2pp | \n", "0.000000 | \n", "0.000000 | \n", "
XYLtex | \n", "0.000000 | \n", "0.000000 | \n", "
ZN2abcpp | \n", "0.000000 | \n", "11.842500 | \n", "
ZN2t3pp | \n", "0.000000 | \n", "47.370000 | \n", "
ZN2tpp | \n", "0.000000 | \n", "47.370318 | \n", "
ZNabcpp | \n", "0.000000 | \n", "9.474064 | \n", "
Zn2tex | \n", "0.000318 | \n", "0.000335 | \n", "
2583 rows × 2 columns
\n", "\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "5.034815e+00 | \n", "optimal | \n", "
(b2276) | \n", "5.475871e+00 | \n", "optimal | \n", "
(b0114) | \n", "1.224159e+00 | \n", "optimal | \n", "
(b0008) | \n", "3.028591e-15 | \n", "optimal | \n", "
\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "5.034815 | \n", "optimal | \n", "
(b2276) | \n", "5.475871 | \n", "optimal | \n", "
(b0114) | \n", "1.224159 | \n", "optimal | \n", "
(b0008) | \n", "0.000000 | \n", "optimal | \n", "
\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "5.034815e+00 | \n", "optimal | \n", "
(b2276) | \n", "5.475871e+00 | \n", "optimal | \n", "
(b0114) | \n", "1.224159e+00 | \n", "optimal | \n", "
(b0008) | \n", "-5.857507e-17 | \n", "optimal | \n", "
\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "45.0 | \n", "optimal | \n", "
(b0008) | \n", "0.0 | \n", "optimal | \n", "
(b0114) | \n", "27.0 | \n", "optimal | \n", "
(b2276) | \n", "46.0 | \n", "optimal | \n", "
\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "45.0 | \n", "optimal | \n", "
(b0008) | \n", "0.0 | \n", "optimal | \n", "
(b0114) | \n", "27.0 | \n", "optimal | \n", "
(b2276) | \n", "46.0 | \n", "optimal | \n", "
\n", " | growth | \n", "status | \n", "
---|---|---|
ids | \n", "\n", " | \n", " |
(b1779) | \n", "45.0 | \n", "optimal | \n", "
(b0008) | \n", "0.0 | \n", "optimal | \n", "
(b0114) | \n", "NaN | \n", "time_limit | \n", "
(b2276) | \n", "NaN | \n", "time_limit | \n", "
Reaction identifier | EX_co2_e | \n", "
Name | CO2 exchange | \n", "
Memory address | \n", "0x07fef04703d90 | \n", "
Stoichiometry | \n", "\n",
" co2_e <=> \n", "CO2 <=> \n", " | \n",
"
GPR | \n", " |
Lower bound | -1000.0 | \n", "
Upper bound | 1000.0 | \n", "
Reaction identifier | SK_glycogen_c | \n", "
Name | glycogen sink | \n", "
Memory address | \n", "0x07fef046eb2e0 | \n", "
Stoichiometry | \n", "\n",
" glycogen_c <=> \n", "glycogen <=> \n", " | \n",
"
GPR | \n", " |
Lower bound | -1000.0 | \n", "
Upper bound | 1000.0 | \n", "
Reaction identifier | R1 | \n", "
Name | \n", " |
Memory address | \n", "0x07f0426135fd0 | \n", "
Stoichiometry | \n", "\n",
" --> \n", "--> \n", " | \n",
"
GPR | \n", " |
Lower bound | 0.0 | \n", "
Upper bound | 20 | \n", "
Reaction identifier | R2 | \n", "
Name | \n", " |
Memory address | \n", "0x07f04260d4438 | \n", "
Stoichiometry | \n", "\n",
" <=> \n", "<=> \n", " | \n",
"
GPR | \n", " |
Lower bound | -10 | \n", "
Upper bound | 20 | \n", "
Reaction identifier | ACt2r | \n", "
Name | R acetate reversible transport via proton - symport | \n", "
Memory address | \n", "0x07f042607c780 | \n", "
Stoichiometry | \n", "\n",
" ac_e + h_e <=> ac_c + h_c \n", "Acetate + H+ <=> Acetate + H+ \n", " | \n",
"
GPR | \n", " |
Lower bound | -1000.0 | \n", "
Upper bound | 1000.0 | \n", "
\n | ids | \ngrowth | \nstatus | \n
---|---|---|---|
0 | \n{b0351} | \n0.873922 | \noptimal | \n
1 | \n{b0727} | \n0.858307 | \noptimal | \n
2 | \n{b2587} | \n0.873922 | \noptimal | \n
3 | \n{b0474} | \n0.873922 | \noptimal | \n
4 | \n{b3734} | \n0.374230 | \noptimal | \n
5 | \n{b0726} | \n0.858307 | \noptimal | \n
6 | \n{b3735} | \n0.374230 | \noptimal | \n
7 | \n{b1241} | \n0.873922 | \noptimal | \n
8 | \n{b1276} | \n0.873922 | \noptimal | \n
9 | \n{b1849} | \n0.873922 | \noptimal | \n
10 | \n{b3732} | \n0.374230 | \noptimal | \n
11 | \n{s0001} | \n0.211141 | \noptimal | \n
12 | \n{b0118} | \n0.873922 | \noptimal | \n
13 | \n{b0356} | \n0.873922 | \noptimal | \n
14 | \n{b2296} | \n0.873922 | \noptimal | \n
15 | \n{b0116} | \n0.782351 | \noptimal | \n
16 | \n{b1478} | \n0.873922 | \noptimal | \n
17 | \n{b3115} | \n0.873922 | \noptimal | \n
18 | \n{b3736} | \n0.374230 | \noptimal | \n
19 | \n{b3733} | \n0.374230 | \noptimal | \n
\n | ids | \ngrowth | \nstatus | \n
---|---|---|---|
0 | \n{ACALDt} | \n0.873922 | \noptimal | \n
1 | \n{ATPS4r} | \n0.374230 | \noptimal | \n
2 | \n{EX_ac_e} | \n0.873922 | \noptimal | \n
3 | \n{AKGDH} | \n0.858307 | \noptimal | \n
4 | \n{ACKr} | \n0.873922 | \noptimal | \n
5 | \n{ETOHt2r} | \n0.873922 | \noptimal | \n
6 | \n{CS} | \n0.000000 | \noptimal | \n
7 | \n{ALCD2x} | \n0.873922 | \noptimal | \n
8 | \n{ACONTa} | \n0.000000 | \noptimal | \n
9 | \n{D_LACt2} | \n0.873922 | \noptimal | \n
10 | \n{ADK1} | \n0.873922 | \noptimal | \n
11 | \n{Biomass_Ecoli_core} | \n0.000000 | \noptimal | \n
12 | \n{ATPM} | \n0.916647 | \noptimal | \n
13 | \n{CYTBD} | \n0.211663 | \noptimal | \n
14 | \n{ACt2r} | \n0.873922 | \noptimal | \n
15 | \n{CO2t} | \n0.461670 | \noptimal | \n
16 | \n{ACALD} | \n0.873922 | \noptimal | \n
17 | \n{ENO} | \n0.000000 | \noptimal | \n
18 | \n{AKGt2r} | \n0.873922 | \noptimal | \n
19 | \n{ACONTb} | \n0.000000 | \noptimal | \n
\n | ids | \ngrowth | \nstatus | \n
---|---|---|---|
0 | \n{b2935} | \n0.8739 | \noptimal | \n
1 | \n{b2465, b2464} | \n0.8739 | \noptimal | \n
2 | \n{b0008, b2464} | \n0.8739 | \noptimal | \n
3 | \n{b0008, b3919} | \n0.7040 | \noptimal | \n
4 | \n{b3919, b2465} | \n0.7040 | \noptimal | \n
5 | \n{b0008, b2935} | \n0.8739 | \noptimal | \n
6 | \n{b3919} | \n0.7040 | \noptimal | \n
7 | \n{b2465, b2935} | \n0.8739 | \noptimal | \n
8 | \n{b0008, b2465} | \n0.8739 | \noptimal | \n
9 | \n{b3919, b2464} | \n0.7040 | \noptimal | \n
10 | \n{b2464} | \n0.8739 | \noptimal | \n
11 | \n{b0008} | \n0.8739 | \noptimal | \n
12 | \n{b3919, b2935} | \n0.7040 | \noptimal | \n
13 | \n{b2935, b2464} | \n0.8739 | \noptimal | \n
14 | \n{b2465} | \n0.8739 | \noptimal | \n
\n | ids | \ngrowth | \nstatus | \n
---|---|---|---|
0 | \n{ACt2r, ACKr} | \n0.8739 | \noptimal | \n
1 | \n{ACONTa, ACKr} | \n0.0000 | \noptimal | \n
2 | \n{ACONTa, ACONTb} | \n0.0000 | \noptimal | \n
3 | \n{ACONTa} | \n0.0000 | \noptimal | \n
4 | \n{ACONTb, ACt2r} | \n0.0000 | \noptimal | \n
5 | \n{ACt2r} | \n0.8739 | \noptimal | \n
6 | \n{ACONTa, ADK1} | \n0.0000 | \noptimal | \n
7 | \n{ACONTa, ACt2r} | \n0.0000 | \noptimal | \n
8 | \n{ADK1, ACt2r} | \n0.8739 | \noptimal | \n
9 | \n{ACONTb, ACKr} | \n0.0000 | \noptimal | \n
10 | \n{ADK1} | \n0.8739 | \noptimal | \n
11 | \n{ACONTb, ADK1} | \n0.0000 | \noptimal | \n
12 | \n{ADK1, ACKr} | \n0.8739 | \noptimal | \n
13 | \n{ACKr} | \n0.8739 | \noptimal | \n
14 | \n{ACONTb} | \n0.0000 | \noptimal | \n
Metabolite identifier | test_dcaACP_c | \n", "
Name | Decanoyl-ACP-n-C100ACP | \n", "
Memory address | \n", "0x0110f09630 | \n", "
Formula | C21H39N2O8PRS | \n", "
Name | \n", "e_coli_core | \n", "|
Memory address | \n", <<<<<<< HEAD "0x01158878d0 | \n", ======= "0x010cb2d358 | \n", >>>>>>> origin/devel "
Number of metabolites | \n", "72 | \n", "|
Number of reactions | \n", "95 | \n", "|
Objective expression | \n", "1.0*Biomass_Ecoli_core - 1.0*Biomass_Ecoli_core_reverse_2cdba | \n", "|
Compartments | \n", "cytosol, extracellular | \n", "
Reaction identifier | EX_glu__L_e | \n", "|
Name | L-Glutamate exchange | \n", "|
Memory address | \n", <<<<<<< HEAD "0x011615e2e8 | \n", ======= "0x0117a94898 | \n", >>>>>>> origin/devel "
Stoichiometry | \n", "\n",
" glu__L_e --> \n", "L-Glutamate --> \n", " | \n",
" |
GPR | \n", " | |
Lower bound | 0.0 | \n", "|
Upper bound | 1000.0 | \n", "
Metabolite identifier | atp_c | \n", "|
Name | ATP | \n", "|
Memory address | \n", <<<<<<< HEAD "0x01160d4630 | \n", ======= "0x01179dae48 | \n", >>>>>>> origin/devel "
Formula | C10H12N5O13P3 | \n", "|
Compartment | c | \n", "|
In 13 reaction(s) | \n", <<<<<<< HEAD " PPS, ADK1, ATPS4r, GLNS, SUCOAS, GLNabc, PGK, ATPM, PPCK, ACKr, PFK, Biomass_Ecoli_core, PYK | \n", ======= " PPCK, ATPS4r, ADK1, ATPM, GLNS, GLNabc, ACKr, PGK, PPS, PYK, SUCOAS, Biomass_Ecoli_core, PFK\n", >>>>>>> origin/devel "
Reaction identifier | PGI | \n", "|
Name | glucose-6-phosphate isomerase | \n", "|
Memory address | \n", <<<<<<< HEAD "0x0116188e48 | \n", ======= "0x0117afacc0 | \n", >>>>>>> origin/devel "
Stoichiometry | \n", "\n",
" g6p_c <=> f6p_c \n", "D-Glucose 6-phosphate <=> D-Fructose 6-phosphate \n", " | \n",
" |
GPR | b4025 | \n", "|
Lower bound | -1000.0 | \n", "|
Upper bound | 1000.0 | \n", "
Metabolite identifier | atp_c | \n", "|
Name | ATP | \n", "|
Memory address | \n", <<<<<<< HEAD "0x01160d4630 | \n", ======= "0x01179dae48 | \n", >>>>>>> origin/devel "
Formula | C10H12N5O13P3 | \n", "|
Compartment | c | \n", "|
In 13 reaction(s) | \n", <<<<<<< HEAD " PPS, ADK1, ATPS4r, GLNS, SUCOAS, GLNabc, PGK, ATPM, PPCK, ACKr, PFK, Biomass_Ecoli_core, PYK | \n", ======= " PPCK, ATPS4r, ADK1, ATPM, GLNS, GLNabc, ACKr, PGK, PPS, PYK, SUCOAS, Biomass_Ecoli_core, PFK\n", >>>>>>> origin/devel "
Gene identifier | b4025 | \n", "|
Name | pgi | \n", "|
Memory address | \n", <<<<<<< HEAD "0x011610a2b0 | \n", ======= "0x01179cec18 | \n", >>>>>>> origin/devel "
Functional | True | \n", "|
In 1 reaction(s) | \n", " PGI | \n", "
Gene identifier | spam | \n", "|
Name | \n", " | |
Memory address | \n", <<<<<<< HEAD "0x0116024080 | \n", ======= "0x011793d748 | \n", >>>>>>> origin/devel "
Functional | True | \n", "|
In 1 reaction(s) | \n", " PGI | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x01074fd080 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "cytosol, extracellular | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x0112fa6b38 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "cytosol, extracellular | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x0113061080 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "cytosol, extracellular | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x0113013390 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "extracellular, cytosol | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x0113000b70 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "c, e | \n", "
Name | \n", "mini_textbook | \n", "
Memory address | \n", "0x0113758438 | \n", "
Number of metabolites | \n", "23 | \n", "
Number of reactions | \n", "18 | \n", "
Objective expression | \n", "-1.0*ATPM_reverse_5b752 - 1.0*PFK_reverse_d24a6 + 1.0*PFK + 1.0*ATPM | \n", "
Compartments | \n", "c, e | \n", "
\n", " | 0 | \n", "1 | \n", "2 | \n", "3 | \n", "
---|---|---|---|---|
EX_fru_e | \n", "0.000000 | \n", "521.357767 | \n", "0.000000 | \n", "0.000000 | \n", "
EX_glc__D_e | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "519.750758 | \n", "
EX_gln__L_e | \n", "0.000000 | \n", "40.698058 | \n", "18.848678 | \n", "0.000000 | \n", "
EX_glu__L_e | \n", "348.101944 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "
EX_mal__L_e | \n", "0.000000 | \n", "0.000000 | \n", "1000.000000 | \n", "0.000000 | \n", "
EX_nh4_e | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "81.026921 | \n", "
EX_o2_e | \n", "500.000000 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "
EX_pi_e | \n", "66.431529 | \n", "54.913419 | \n", "12.583458 | \n", "54.664344 | \n", "
\n", " | carbon_source | \n", "carbon_yield_maximum | \n", "carbon_yield_minimum | \n", "flux_maximum | \n", "flux_minimum | \n", "mass_yield_maximum | \n", "mass_yield_minimum | \n", "EX_glc__D_e | \n", "EX_o2_e | \n", "
---|---|---|---|---|---|---|---|---|---|
0 | \n", "EX_glc__D_e | \n", "1.442300e-13 | \n", "0.0 | \n", "0.000000 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "-10.0 | \n", "-60.000000 | \n", "
1 | \n", "EX_glc__D_e | \n", "1.310050e+00 | \n", "0.0 | \n", "0.072244 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "-10.0 | \n", "-56.842105 | \n", "
2 | \n", "EX_glc__D_e | \n", "2.620100e+00 | \n", "0.0 | \n", "0.144488 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "-10.0 | \n", "-53.684211 | \n", "
3 | \n", "EX_glc__D_e | \n", "3.930150e+00 | \n", "0.0 | \n", "0.216732 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "-10.0 | \n", "-50.526316 | \n", "
4 | \n", "EX_glc__D_e | \n", "5.240200e+00 | \n", "0.0 | \n", "0.288975 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "-10.0 | \n", "-47.368421 | \n", "
\n", " | carbon_source | \n", "carbon_yield_maximum | \n", "carbon_yield_minimum | \n", "flux_maximum | \n", "flux_minimum | \n", "mass_yield_maximum | \n", "mass_yield_minimum | \n", "EX_o2_e | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "EX_glc__D_e | \n", "2.385536e-15 | \n", "0.0 | \n", "0.000000 | \n", "0.0 | \n", "2.345496e-15 | \n", "0.0 | \n", "-60.000000 | \n", "
1 | \n", "EX_glc__D_e | \n", "5.263158e-02 | \n", "0.0 | \n", "1.578947 | \n", "0.0 | \n", "5.174819e-02 | \n", "0.0 | \n", "-56.842105 | \n", "
2 | \n", "EX_glc__D_e | \n", "1.052632e-01 | \n", "0.0 | \n", "3.157895 | \n", "0.0 | \n", "1.034964e-01 | \n", "0.0 | \n", "-53.684211 | \n", "
3 | \n", "EX_glc__D_e | \n", "1.578947e-01 | \n", "0.0 | \n", "4.736842 | \n", "0.0 | \n", "1.552446e-01 | \n", "0.0 | \n", "-50.526316 | \n", "
4 | \n", "EX_glc__D_e | \n", "2.105263e-01 | \n", "0.0 | \n", "6.315789 | \n", "0.0 | \n", "2.069927e-01 | \n", "0.0 | \n", "-47.368421 | \n", "
\n", " | ACALD | \n", "ACALDt | \n", "ACKr | \n", "ACONTa | \n", "ACONTb | \n", "ACt2r | \n", "ADK1 | \n", "AKGDH | \n", "AKGt2r | \n", "ALCD2x | \n", "... | \n", "RPI | \n", "SUCCt2_2 | \n", "SUCCt3 | \n", "SUCDi | \n", "SUCOAS | \n", "TALA | \n", "THD2 | \n", "TKT1 | \n", "TKT2 | \n", "TPI | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "-2.060626 | \n", "-0.766231 | \n", "-1.746726 | \n", "6.136642 | \n", "6.136642 | \n", "-1.746726 | \n", "13.915541 | \n", "2.174506 | \n", "-0.242290 | \n", "-1.294395 | \n", "... | \n", "-6.117270 | \n", "33.457990 | \n", "34.319917 | \n", "704.483302 | \n", "-2.174506 | \n", "6.109618 | \n", "0.230408 | \n", "6.109618 | \n", "6.106540 | \n", "3.122076 | \n", "
1 | \n", "-1.518217 | \n", "-1.265778 | \n", "-0.253608 | \n", "9.081331 | \n", "9.081331 | \n", "-0.253608 | \n", "7.194475 | \n", "5.979050 | \n", "-0.225992 | \n", "-0.252439 | \n", "... | \n", "-5.072733 | \n", "39.902893 | \n", "40.343192 | \n", "718.488475 | \n", "-5.979050 | \n", "4.991843 | \n", "0.137019 | \n", "4.991843 | \n", "4.959315 | \n", "4.172389 | \n", "
2 | \n", "-3.790368 | \n", "-1.292543 | \n", "-0.457502 | \n", "9.340755 | \n", "9.340755 | \n", "-0.457502 | \n", "23.435794 | \n", "1.652395 | \n", "-0.333891 | \n", "-2.497825 | \n", "... | \n", "-0.674220 | \n", "0.153276 | \n", "1.506968 | \n", "844.889698 | \n", "-1.652395 | \n", "0.673601 | \n", "9.198001 | \n", "0.673601 | \n", "0.673352 | \n", "7.770955 | \n", "
3 | \n", "-5.173189 | \n", "-4.511308 | \n", "-2.333962 | \n", "7.364836 | \n", "7.364836 | \n", "-2.333962 | \n", "11.725401 | \n", "2.504044 | \n", "-0.051420 | \n", "-0.661881 | \n", "... | \n", "-0.681200 | \n", "7.506732 | \n", "9.110446 | \n", "885.755585 | \n", "-2.504044 | \n", "0.656561 | \n", "7.514520 | \n", "0.656561 | \n", "0.646653 | \n", "8.450394 | \n", "
4 | \n", "-6.787036 | \n", "-5.645414 | \n", "-1.521566 | \n", "6.373250 | \n", "6.373250 | \n", "-1.521566 | \n", "4.823373 | \n", "3.452123 | \n", "-0.126943 | \n", "-1.141621 | \n", "... | \n", "-0.510598 | \n", "9.307459 | \n", "10.941500 | \n", "749.854462 | \n", "-3.452123 | \n", "0.474878 | \n", "6.235982 | \n", "0.474878 | \n", "0.460514 | \n", "8.908012 | \n", "
5 rows × 95 columns
\n", "1.0 Biomass_Ecoli_core = 0.8739215069684306
Metabolite | \n", "Reaction | \n", "Flux | \n", "C-Number | \n", "C-Flux | \n", "
---|---|---|---|---|
glc__D_e | \n", "EX_glc__D_e | \n", "10 | \n", "6 | \n", "100.00% | \n", "
nh4_e | \n", "EX_nh4_e | \n", "4.765 | \n", "0 | \n", "0.00% | \n", "
o2_e | \n", "EX_o2_e | \n", "21.8 | \n", "0 | \n", "0.00% | \n", "
pi_e | \n", "EX_pi_e | \n", "3.215 | \n", "0 | \n", "0.00% | \n", "
Metabolite | \n", "Reaction | \n", "Flux | \n", "C-Number | \n", "C-Flux | \n", "
---|---|---|---|---|
co2_e | \n", "EX_co2_e | \n", "-22.81 | \n", "1 | \n", "100.00% | \n", "
h2o_e | \n", "EX_h2o_e | \n", "-29.18 | \n", "0 | \n", "0.00% | \n", "
h_e | \n", "EX_h_e | \n", "-17.53 | \n", "0 | \n", "0.00% | \n", "
C21H27N7O14P2
Percent | \n", "Flux | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|
13.14% | \n", "5.064 | \n", "AKGDH | \n", "akg_c + coa_c + nad_c --> co2_c + nadh_c + succoa_c | \n", "
8.04% | \n", "3.1 | \n", "Biomass_Ecoli_core | \n", "1.496 3pg_c + 3.7478 accoa_c + 59.81 atp_c + 0.361 e4p_c + 0.0709 f6p_c + 0.129 g3p_c + 0.205 g6p_c + 0.2557 gln__L_c + 4.9414 glu__L_c + 59.81 h2o_c + 3.547 nad_c + 13.0279 nadph_c + 1.7867 oaa_c + 0.5191 pep_c + 2.8328 pyr_c + 0.8977 r5p_c --> 59.81 adp_c + 4.1182 akg_c + 3.7478 coa_c + 59.81 h_c + 3.547 nadh_c + 13.0279 nadp_c + 59.81 pi_c | \n", "
41.58% | \n", "16.02 | \n", "GAPD | \n", "g3p_c + nad_c + pi_c <=> 13dpg_c + h_c + nadh_c | \n", "
13.14% | \n", "5.064 | \n", "MDH | \n", "mal__L_c + nad_c <=> h_c + nadh_c + oaa_c | \n", "
24.09% | \n", "9.283 | \n", "PDH | \n", "coa_c + nad_c + pyr_c --> accoa_c + co2_c + nadh_c | \n", "
Percent | \n", "Flux | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|
100.00% | \n", "-38.53 | \n", "NADH16 | \n", "4.0 h_c + nadh_c + q8_c --> 3.0 h_e + nad_c + q8h2_c | \n", "
C10H12N5O13P3
Percent | \n", "Flux | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|
66.58% | \n", "45.51 | \n", "ATPS4r | \n", "adp_c + 4.0 h_e + pi_c <=> atp_c + h2o_c + 3.0 h_c | \n", "
23.44% | \n", "16.02 | \n", "PGK | \n", "3pg_c + atp_c <=> 13dpg_c + adp_c | \n", "
2.57% | \n", "1.758 | \n", "PYK | \n", "adp_c + h_c + pep_c --> atp_c + pyr_c | \n", "
7.41% | \n", "5.064 | \n", "SUCOAS | \n", "atp_c + coa_c + succ_c <=> adp_c + pi_c + succoa_c | \n", "
Percent | \n", "Flux | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|
12.27% | \n", "-8.39 | \n", "ATPM | \n", "atp_c + h2o_c --> adp_c + h_c + pi_c | \n", "
76.46% | \n", "-52.27 | \n", "Biomass_Ecoli_core | \n", "1.496 3pg_c + 3.7478 accoa_c + 59.81 atp_c + 0.361 e4p_c + 0.0709 f6p_c + 0.129 g3p_c + 0.205 g6p_c + 0.2557 gln__L_c + 4.9414 glu__L_c + 59.81 h2o_c + 3.547 nad_c + 13.0279 nadph_c + 1.7867 oaa_c + 0.5191 pep_c + 2.8328 pyr_c + 0.8977 r5p_c --> 59.81 adp_c + 4.1182 akg_c + 3.7478 coa_c + 59.81 h_c + 3.547 nadh_c + 13.0279 nadp_c + 59.81 pi_c | \n", "
0.33% | \n", "-0.2235 | \n", "GLNS | \n", "atp_c + glu__L_c + nh4_c --> adp_c + gln__L_c + h_c + pi_c | \n", "
10.94% | \n", "-7.477 | \n", "PFK | \n", "atp_c + f6p_c --> adp_c + fdp_c + h_c | \n", "
\n", " | minimum | \n", "maximum | \n", "
---|---|---|
ACALD | \n", "-2.623542e-14 | \n", "0.000000e+00 | \n", "
ACALDt | \n", "-2.623542e-14 | \n", "0.000000e+00 | \n", "
ACKr | \n", "-4.012477e-14 | \n", "0.000000e+00 | \n", "
ACONTa | \n", "2.000000e+01 | \n", "2.000000e+01 | \n", "
ACONTb | \n", "2.000000e+01 | \n", "2.000000e+01 | \n", "
ACt2r | \n", "-4.012477e-14 | \n", "0.000000e+00 | \n", "
ADK1 | \n", "0.000000e+00 | \n", "1.705303e-13 | \n", "
AKGDH | \n", "2.000000e+01 | \n", "2.000000e+01 | \n", "
AKGt2r | \n", "-1.586328e-14 | \n", "0.000000e+00 | \n", "
ALCD2x | \n", "-2.273737e-14 | \n", "0.000000e+00 | \n", "
\n", " | minimum | \n", "maximum | \n", "
---|---|---|
ACALD | \n", "-2.692308 | \n", "0.0 | \n", "
ACALDt | \n", "-2.692308 | \n", "0.0 | \n", "
ACKr | \n", "-4.117647 | \n", "0.0 | \n", "
ACONTa | \n", "8.461538 | \n", "20.0 | \n", "
ACONTb | \n", "8.461538 | \n", "20.0 | \n", "
ACt2r | \n", "-4.117647 | \n", "0.0 | \n", "
ADK1 | \n", "0.000000 | \n", "17.5 | \n", "
AKGDH | \n", "2.500000 | \n", "20.0 | \n", "
AKGt2r | \n", "-1.489362 | \n", "0.0 | \n", "
ALCD2x | \n", "-2.333333 | \n", "0.0 | \n", "
\n", " | minimum | \n", "maximum | \n", "
---|---|---|
FRD7 | \n", "0.0 | \n", "980.0 | \n", "
SUCDi | \n", "20.0 | \n", "1000.0 | \n", "
\n", " | minimum | \n", "maximum | \n", "
---|---|---|
FRD7 | \n", "0.0 | \n", "0.0 | \n", "
SUCDi | \n", "20.0 | \n", "20.0 | \n", "
1.0 ATPM = 175.0
Metabolite | \n", "Reaction | \n", "Flux | \n", "Range | \n", "C-Number | \n", "C-Flux | \n", "
---|---|---|---|---|---|
glc__D_e | \n", "EX_glc__D_e | \n", "10 | \n", "[9.5; 10] | \n", "6 | \n", "100.00% | \n", "
o2_e | \n", "EX_o2_e | \n", "60 | \n", "[55.88; 60] | \n", "0 | \n", "0.00% | \n", "
Metabolite | \n", "Reaction | \n", "Flux | \n", "Range | \n", "C-Number | \n", "C-Flux | \n", "
---|---|---|---|---|---|
ac_e | \n", "EX_ac_e | \n", "0 | \n", "[-2.059; 0] | \n", "2 | \n", "0.00% | \n", "
acald_e | \n", "EX_acald_e | \n", "0 | \n", "[-1.346; 0] | \n", "2 | \n", "0.00% | \n", "
akg_e | \n", "EX_akg_e | \n", "0 | \n", "[-0.7447; 0] | \n", "5 | \n", "0.00% | \n", "
co2_e | \n", "EX_co2_e | \n", "-60 | \n", "[-60; -54.17] | \n", "1 | \n", "100.00% | \n", "
etoh_e | \n", "EX_etoh_e | \n", "0 | \n", "[-1.167; 0] | \n", "2 | \n", "0.00% | \n", "
for_e | \n", "EX_for_e | \n", "0 | \n", "[-5.833; 0] | \n", "1 | \n", "0.00% | \n", "
glu__L_e | \n", "EX_glu__L_e | \n", "0 | \n", "[-0.6731; 0] | \n", "5 | \n", "0.00% | \n", "
h2o_e | \n", "EX_h2o_e | \n", "-60 | \n", "[-60; -54.17] | \n", "0 | \n", "0.00% | \n", "
h_e | \n", "EX_h_e | \n", "0 | \n", "[-5.833; 0] | \n", "0 | \n", "0.00% | \n", "
lac__D_e | \n", "EX_lac__D_e | \n", "0 | \n", "[-1.129; 0] | \n", "3 | \n", "0.00% | \n", "
nh4_e | \n", "EX_nh4_e | \n", "0 | \n", "[0; 0.6731] | \n", "0 | \n", "0.00% | \n", "
pi_e | \n", "EX_pi_e | \n", "0 | \n", "[0; 0.171] | \n", "0 | \n", "0.00% | \n", "
pyr_e | \n", "EX_pyr_e | \n", "0 | \n", "[-1.346; 0] | \n", "3 | \n", "0.00% | \n", "
succ_e | \n", "EX_succ_e | \n", "0 | \n", "[-0.875; 0] | \n", "4 | \n", "0.00% | \n", "
C3H3O3
Percent | \n", "Flux | \n", "Range | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|---|
50.00% | \n", "10 | \n", "[9.5; 10] | \n", "GLCpts | \n", "glc__D_e + pep_c --> g6p_c + pyr_c | \n", "
0.00% | \n", "0 | \n", "[-1.129; 0] | \n", "LDH_D | \n", "lac__D_c + nad_c <=> h_c + nadh_c + pyr_c | \n", "
0.00% | \n", "0 | \n", "[0; 8.75] | \n", "ME1 | \n", "mal__L_c + nad_c --> co2_c + nadh_c + pyr_c | \n", "
0.00% | \n", "0 | \n", "[0; 8.75] | \n", "ME2 | \n", "mal__L_c + nadp_c --> co2_c + nadph_c + pyr_c | \n", "
50.00% | \n", "10 | \n", "[1.25; 18.75] | \n", "PYK | \n", "adp_c + h_c + pep_c --> atp_c + pyr_c | \n", "
0.00% | \n", "0 | \n", "[-1.346; 0] | \n", "PYRt2 | \n", "h_e + pyr_e <=> h_c + pyr_c | \n", "
Percent | \n", "Flux | \n", "Range | \n", "Reaction | \n", "Definition | \n", "
---|---|---|---|---|
0.00% | \n", "0 | \n", "[-0.1316; 0] | \n", "Biomass_Ecoli_core | \n", "1.496 3pg_c + 3.7478 accoa_c + 59.81 atp_c + 0.361 e4p_c + 0.0709 f6p_c + 0.129 g3p_c + 0.205 g6p_c + 0.2557 gln__L_c + 4.9414 glu__L_c + 59.81 h2o_c + 3.547 nad_c + 13.0279 nadph_c + 1.7867 oaa_c + 0.5191 pep_c + 2.8328 pyr_c + 0.8977 r5p_c --> 59.81 adp_c + 4.1182 akg_c + 3.7478 coa_c + 59.81 h_c + 3.547 nadh_c + 13.0279 nadp_c + 59.81 pi_c | \n", "
100.00% | \n", "-20 | \n", "[-28.75; -13] | \n", "PDH | \n", "coa_c + nad_c + pyr_c --> accoa_c + co2_c + nadh_c | \n", "
0.00% | \n", "0 | \n", "[-5.833; 0] | \n", "PFL | \n", "coa_c + pyr_c --> accoa_c + for_c | \n", "
0.00% | \n", "0 | \n", "[-8.75; 0] | \n", "PPS | \n", "atp_c + h2o_c + pyr_c --> amp_c + 2.0 h_c + pep_c + pi_c | \n", "
\n", " | fluxes | \n", "reduced_costs | \n", "
---|---|---|
ACALD | \n", "0.000000e+00 | \n", "0.0 | \n", "
ACALDt | \n", "0.000000e+00 | \n", "0.0 | \n", "
ACKr | \n", "7.454685e-15 | \n", "0.0 | \n", "
ACONTa | \n", "6.007250e+00 | \n", "0.0 | \n", "
ACONTb | \n", "6.007250e+00 | \n", "0.0 | \n", "
... | \n", "... | \n", "... | \n", "
TALA | \n", "1.496984e+00 | \n", "0.0 | \n", "
THD2 | \n", "0.000000e+00 | \n", "0.0 | \n", "
TKT1 | \n", "1.496984e+00 | \n", "0.0 | \n", "
TKT2 | \n", "1.181498e+00 | \n", "0.0 | \n", "
TPI | \n", "7.477382e+00 | \n", "0.0 | \n", "
95 rows × 2 columns
\n", "Attribute | Description | Value |
solver |
Mathematical optimization solver | {interface_to_str(self.solver)} |
tolerance |
General solver tolerance (feasibility, integrality, etc.) | {self.tolerance} |
lower_bound |
Default reaction lower bound | {self.lower_bound} |
upper_bound |
Default reaction upper bound | {self.upper_bound} |
processes |
Number of parallel processes | {self.processes} |
cache_directory |
Path for the model cache | {self.cache_directory} |
max_cache_size |
Maximum cache size in bytes | {self.max_cache_size} |
cache_expiration |
Model cache expiration time in seconds (if any) | {self.cache_expiration} |
Gene identifier | {id} |
Name | {name} |
Memory address | {address} |
Functional | {functional} |
In {n_reactions} reaction(s) | {reactions} |
Metabolite identifier | {id} |
Name | {name} |
Memory address | {address} |
Formula | {formula} |
Compartment | {compartment} |
In {n_reactions} reaction(s) | {reactions} |
Name | {name} |
Memory address | {address} |
Number of metabolites | {num_metabolites} |
Number of reactions | {num_reactions} |
Number of groups | {num_groups} |
Objective expression | {objective} |
Compartments | {compartments} |
Reaction identifier | {id} |
Name | {name} |
Memory address | {address} |
Stoichiometry |
{stoich_id} {stoich_name} |
GPR | {gpr} |
Lower bound | {lb} |
Upper bound | {ub} |
key: value
is read into the Object.notes dictionary when reading SBML files. On writing the Object.notes dictionary is serialized to the SBML notes information. Annotations are read in the Object.annotation fields. Some SBML related issues are still open, please refer to the respective issue: - update annotation format and support qualifiers (depends on decision for new annotation format; https://github.com/opencobra/cobrapy/issues/684) - write compartment annotations and notes (depends on updated first-class compartments; see https://github.com/opencobra/cobrapy/issues/760) - support compression on file handles (depends on solution for https://github.com/opencobra/cobrapy/issues/812) """ from __future__ import absolute_import import datetime import logging import os import re from collections import defaultdict, namedtuple from copy import deepcopy from sys import platform import libsbml import cobra from cobra.core import Gene, Group, Metabolite, Model, Reaction from cobra.core.gene import ast2str, parse_gpr from cobra.manipulation.validate import check_metabolite_compartment_formula from cobra.util.solver import linear_reaction_coefficients, set_objective try: from cStringIO import StringIO # Python 2 except ImportError: from io import StringIO class CobraSBMLError(Exception): """SBML error class.""" pass LOGGER = logging.getLogger(__name__) # ----------------------------------------------------------------------------- # Defaults and constants for writing SBML # ----------------------------------------------------------------------------- config = cobra.Configuration() # for default bounds LOWER_BOUND_ID = "cobra_default_lb" UPPER_BOUND_ID = "cobra_default_ub" ZERO_BOUND_ID = "cobra_0_bound" BOUND_MINUS_INF = "minus_inf" BOUND_PLUS_INF = "plus_inf" SBO_FBA_FRAMEWORK = "SBO:0000624" SBO_DEFAULT_FLUX_BOUND = "SBO:0000626" SBO_FLUX_BOUND = "SBO:0000625" SBO_EXCHANGE_REACTION = "SBO:0000627" LONG_SHORT_DIRECTION = {"maximize": "max", "minimize": "min"} SHORT_LONG_DIRECTION = {"min": "minimize", "max": "maximize"} Unit = namedtuple("Unit", ["kind", "scale", "multiplier", "exponent"]) UNITS_FLUX = ( "mmol_per_gDW_per_hr", [ Unit(kind=libsbml.UNIT_KIND_MOLE, scale=-3, multiplier=1, exponent=1), Unit(kind=libsbml.UNIT_KIND_GRAM, scale=0, multiplier=1, exponent=-1), Unit(kind=libsbml.UNIT_KIND_SECOND, scale=0, multiplier=3600, exponent=-1), ], ) # ----------------------------------------------------------------------------- # Functions for id replacements (import/export) # ----------------------------------------------------------------------------- SBML_DOT = "__SBML_DOT__" # ----------------------------------------------------------------------------- # Precompiled note pattern # ----------------------------------------------------------------------------- pattern_notes = re.compile( r"<(?P{}: {}
".format(k, v) for (k, v) in notes.items()] + [""] ) _check( sbase.setNotes("\n".join(tokens)), "Setting notes on sbase: {}".format(sbase), ) # ----------------------------------------------------------------------------- # Annotations # ----------------------------------------------------------------------------- """ cobra annotations will be dictionaries of the form: object.annotation = { 'provider' : [(qualifier, entity), ...] } A concrete example for a metabolite would look like the following metabolite.annotation = { 'chebi': [(isVersionOf, "CHEBI:17234), (is, "CHEBI:4167),], 'kegg.compound': [(is, "C00031")] } The providers are hereby MIRIAM registry keys for collections https://www.ebi.ac.uk/miriam/main/collections The qualifiers are biomodel qualifiers https://co.mbine.org/standards/qualifiers In the current stage the new annotation format is not completely supported yet. """ URL_IDENTIFIERS_PATTERN = re.compile(r"^https?://identifiers.org/(.+?)[:/](.+)") URL_IDENTIFIERS_PREFIX = "https://identifiers.org" QUALIFIER_TYPES = { "is": libsbml.BQB_IS, "hasPart": libsbml.BQB_HAS_PART, "isPartOf": libsbml.BQB_IS_PART_OF, "isVersionOf": libsbml.BQB_IS_VERSION_OF, "hasVersion": libsbml.BQB_HAS_VERSION, "isHomologTo": libsbml.BQB_IS_HOMOLOG_TO, "isDescribedBy": libsbml.BQB_IS_DESCRIBED_BY, "isEncodedBy": libsbml.BQB_IS_ENCODED_BY, "encodes": libsbml.BQB_ENCODES, "occursIn": libsbml.BQB_OCCURS_IN, "hasProperty": libsbml.BQB_HAS_PROPERTY, "isPropertyOf": libsbml.BQB_IS_PROPERTY_OF, "hasTaxon": libsbml.BQB_HAS_TAXON, "unknown": libsbml.BQB_UNKNOWN, "bqm_is": libsbml.BQM_IS, "bqm_isDescribedBy": libsbml.BQM_IS_DESCRIBED_BY, "bqm_isDerivedFrom": libsbml.BQM_IS_DERIVED_FROM, "bqm_isInstanceOf": libsbml.BQM_IS_INSTANCE_OF, "bqm_hasInstance": libsbml.BQM_HAS_INSTANCE, "bqm_unknown": libsbml.BQM_UNKNOWN, } def _parse_annotations(sbase): """Parses cobra annotations from a given SBase object. Annotations are dictionaries with the providers as keys. Parameters ---------- sbase : libsbml.SBase SBase from which the SBML annotations are read Returns ------- dict (annotation dictionary) FIXME: annotation format must be updated (this is a big collection of fixes) - see: https://github.com/opencobra/cobrapy/issues/684) """ annotation = {} # SBO term if sbase.isSetSBOTerm(): # FIXME: correct handling of annotations annotation["sbo"] = sbase.getSBOTermID() # RDF annotation cvterms = sbase.getCVTerms() if cvterms is None: return annotation for cvterm in cvterms: # type: libsbml.CVTerm for k in range(cvterm.getNumResources()): # FIXME: read and store the qualifier uri = cvterm.getResourceURI(k) data = _parse_annotation_info(uri) if data is None: continue else: provider, identifier = data if provider in annotation: if isinstance(annotation[provider], str): annotation[provider] = [annotation[provider]] # FIXME: use a list if identifier not in annotation[provider]: annotation[provider].append(identifier) else: # FIXME: always in list annotation[provider] = identifier return annotation def _parse_annotation_info(uri): """Parses provider and term from given identifiers annotation uri. Parameters ---------- uri : str uri (identifiers.org url) Returns ------- (provider, identifier) if resolvable, None otherwise """ match = URL_IDENTIFIERS_PATTERN.match(uri) if match: provider, identifier = match.group(1), match.group(2) if provider.isupper(): identifier = "%s:%s" % (provider, identifier) provider = provider.lower() else: LOGGER.warning( "%s does not conform to " "'http(s)://identifiers.org/collection/id' or" "'http(s)://identifiers.org/COLLECTION:id", uri, ) return None return provider, identifier def _sbase_annotations(sbase, annotation): """Set SBase annotations based on cobra annotations. Parameters ---------- sbase : libsbml.SBase SBML object to annotate annotation : cobra annotation structure cobra object with annotation information FIXME: annotation format must be updated (https://github.com/opencobra/cobrapy/issues/684) """ if not annotation or len(annotation) == 0: return # standardize annotations annotation_data = deepcopy(annotation) for key, value in annotation_data.items(): # handling of non-string annotations (e.g. integers) if isinstance(value, (float, int)): value = str(value) if isinstance(value, str): annotation_data[key] = [("is", value)] for key, value in annotation_data.items(): for idx, item in enumerate(value): if isinstance(item, str): value[idx] = ("is", item) # set metaId meta_id = "meta_{}".format(sbase.getId()) sbase.setMetaId(meta_id) # rdf_items = [] for provider, data in annotation_data.items(): # set SBOTerm if provider in ["SBO", "sbo"]: if provider == "SBO": LOGGER.warning( "'SBO' provider is deprecated, " "use 'sbo' provider instead" ) sbo_term = data[0][1] _check(sbase.setSBOTerm(sbo_term), "Setting SBOTerm: {}".format(sbo_term)) # FIXME: sbo should also be written as CVTerm continue for item in data: qualifier_str, entity = item[0], item[1] qualifier = QUALIFIER_TYPES.get(qualifier_str, None) if qualifier is None: qualifier = libsbml.BQB_IS LOGGER.error( "Qualifier type is not supported on " "annotation: '{}'".format(qualifier_str) ) qualifier_type = libsbml.BIOLOGICAL_QUALIFIER if qualifier_str.startswith("bqm_"): qualifier_type = libsbml.MODEL_QUALIFIER cv = libsbml.CVTerm() # type: libsbml.CVTerm cv.setQualifierType(qualifier_type) if qualifier_type == libsbml.BIOLOGICAL_QUALIFIER: cv.setBiologicalQualifierType(qualifier) elif qualifier_type == libsbml.MODEL_QUALIFIER: cv.setModelQualifierType(qualifier) else: raise CobraSBMLError("Unsupported qualifier: " "%s" % qualifier) resource = "%s/%s/%s" % (URL_IDENTIFIERS_PREFIX, provider, entity) cv.addResource(resource) _check( sbase.addCVTerm(cv), "Setting cvterm: {}, resource: {}".format(cv, resource), ) # ----------------------------------------------------------------------------- # Validation # ----------------------------------------------------------------------------- def validate_sbml_model( filename, check_model=True, internal_consistency=True, check_units_consistency=False, check_modeling_practice=False, **kwargs ): """Validate SBML model and returns the model along with a list of errors. Parameters ---------- filename : str The filename (or SBML string) of the SBML model to be validated. internal_consistency: boolean {True, False} Check internal consistency. check_units_consistency: boolean {True, False} Check consistency of units. check_modeling_practice: boolean {True, False} Check modeling practise. check_model: boolean {True, False} Whether to also check some basic model properties such as reaction boundaries and compartment formulas. Returns ------- (model, errors) model : :class:`~cobra.core.Model.Model` object The cobra model if the file could be read successfully or None otherwise. errors : dict Warnings and errors grouped by their respective types. Raises ------ CobraSBMLError """ # Errors and warnings are grouped based on their type. SBML_* types are # from the libsbml validator. COBRA_* types are from the cobrapy SBML # parser. keys = ( "SBML_FATAL", "SBML_ERROR", "SBML_SCHEMA_ERROR", "SBML_WARNING", "COBRA_FATAL", "COBRA_ERROR", "COBRA_WARNING", "COBRA_CHECK", ) errors = {key: [] for key in keys} # [1] libsbml validation doc = _get_doc_from_filename(filename) # type: libsbml.SBMLDocument # set checking of units & modeling practise doc.setConsistencyChecks( libsbml.LIBSBML_CAT_UNITS_CONSISTENCY, check_units_consistency ) doc.setConsistencyChecks( libsbml.LIBSBML_CAT_MODELING_PRACTICE, check_modeling_practice ) # check internal consistency if internal_consistency: doc.checkInternalConsistency() doc.checkConsistency() for k in range(doc.getNumErrors()): e = doc.getError(k) # type: libsbml.SBMLError msg = _error_string(e, k=k) sev = e.getSeverity() if sev == libsbml.LIBSBML_SEV_FATAL: errors["SBML_FATAL"].append(msg) elif sev == libsbml.LIBSBML_SEV_ERROR: errors["SBML_ERROR"].append(msg) elif sev == libsbml.LIBSBML_SEV_SCHEMA_ERROR: errors["SBML_SCHEMA_ERROR"].append(msg) elif sev == libsbml.LIBSBML_SEV_WARNING: errors["SBML_WARNING"].append(msg) # [2] cobrapy validation (check that SBML can be read into model) # all warnings generated while loading will be logged as errors log_stream = StringIO() stream_handler = logging.StreamHandler(log_stream) formatter = logging.Formatter("%(levelname)s:%(message)s") stream_handler.setFormatter(formatter) stream_handler.setLevel(logging.INFO) LOGGER.addHandler(stream_handler) LOGGER.propagate = False try: # read model and allow additional parser arguments model = _sbml_to_model(doc, **kwargs) except CobraSBMLError as e: errors["COBRA_ERROR"].append(str(e)) return None, errors except Exception as e: errors["COBRA_FATAL"].append(str(e)) return None, errors cobra_errors = log_stream.getvalue().split("\n") for cobra_error in cobra_errors: tokens = cobra_error.split(":") error_type = tokens[0] error_msg = ":".join(tokens[1:]) if error_type == "WARNING": errors["COBRA_WARNING"].append(error_msg) elif error_type == "ERROR": errors["COBRA_ERROR"].append(error_msg) # remove stream handler LOGGER.removeHandler(stream_handler) LOGGER.propagate = True # [3] additional model tests if check_model: errors["COBRA_CHECK"].extend(check_metabolite_compartment_formula(model)) for key in ["SBML_FATAL", "SBML_ERROR", "SBML_SCHEMA_ERROR"]: if len(errors[key]) > 0: LOGGER.error("SBML errors in validation, check error log " "for details.") break for key in ["SBML_WARNING"]: if len(errors[key]) > 0: LOGGER.error("SBML warnings in validation, check error log " "for details.") break for key in ["COBRA_FATAL", "COBRA_ERROR"]: if len(errors[key]) > 0: LOGGER.error("COBRA errors in validation, check error log " "for details.") break for key in ["COBRA_WARNING", "COBRA_CHECK"]: if len(errors[key]) > 0: LOGGER.error( "COBRA warnings in validation, check error log " "for details." ) break return model, errors def _error_string(error, k=None): """String representation of SBMLError. Parameters ---------- error : libsbml.SBMLError k : index of error Returns ------- string representation of error """ package = error.getPackage() if package == "": package = "core" template = "E{} ({}): {} ({}, L{}); {}; {}" error_str = template.format( k, error.getSeverityAsString(), error.getCategoryAsString(), package, error.getLine(), error.getShortMessage(), error.getMessage(), ) return error_str cobrapy-0.23.0/src/cobra/io/schema_v1.json 0000664 0000000 0000000 00000006172 14173370247 0020276 0 ustar 00root root 0000000 0000000 { "$schema": "http://json-schema.org/draft-04/schema#", "title": "COBRA", "description": "JSON representation of COBRA model", "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "version": { "type": "string", "default": "1" }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "metabolites": { "type": "object", "patternProperties": { ".*": { "type": "number" } } }, "gene_reaction_rule": { "type": "string" }, "lower_bound": { "type": "number" }, "upper_bound": { "type": "number" }, "objective_coefficient": { "type": "number", "default": 0 }, "subsystem": { "type": "string" }, "notes": { "type": "object" }, "annotation": { "type": "object" } }, "required": [ "id", "name", "metabolites", "lower_bound", "upper_bound", "gene_reaction_rule" ], "additionalProperties": false } }, "metabolites": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "compartment": { "type": "string", "pattern": "[a-z]{1,2}" }, "charge": { "type": "integer" }, "formula": { "type": "string" }, "_bound": { "type": "number", "default": 0 }, "notes": { "type": "object" }, "annotation": { "type": "object" } }, "required": [ "id", "name", "compartment" ], "additionalProperties": false } }, "genes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "notes": { "type": "object" }, "annotation": { "type": "object" } }, "required": [ "id", "name" ], "additionalProperties": false } }, "compartments": { "type": "object", "patternProperties": { "[a-z]{1,2}": { "type": "string" } } }, "notes": { "type": "object" }, "annotation": { "type": "object" } }, "required": [ "id", "reactions", "metabolites", "genes" ], "additionalProperties": false } cobrapy-0.23.0/src/cobra/io/web/ 0000775 0000000 0000000 00000000000 14173370247 0016304 5 ustar 00root root 0000000 0000000 cobrapy-0.23.0/src/cobra/io/web/__init__.py 0000664 0000000 0000000 00000000372 14173370247 0020417 0 ustar 00root root 0000000 0000000 """Provide functionality to access remote model repositories.""" from .abstract_model_repository import AbstractModelRepository from .bigg_models_repository import BiGGModels from .biomodels_repository import BioModels from .load import load_model cobrapy-0.23.0/src/cobra/io/web/abstract_model_repository.py 0000664 0000000 0000000 00000003660 14173370247 0024145 0 ustar 00root root 0000000 0000000 """Provide an abstract base class that describes a remote model repository.""" from abc import ABC, abstractmethod from typing import Union import httpx from rich.progress import ( BarColumn, DownloadColumn, Progress, TextColumn, TimeRemainingColumn, TransferSpeedColumn, ) class AbstractModelRepository(ABC): """ Define an abstract base class that describes a remote model repository. Attributes ---------- name : str The name of the remote repository. """ _progress = Progress( TextColumn("{task.fields[model_id]}", justify="right"), BarColumn(bar_width=None), "[progress.percentage]{task.percentage:>3.1f}%", DownloadColumn(), TransferSpeedColumn(), TimeRemainingColumn(), ) name: str = "Abstract" def __init__(self, *, url: Union[httpx.URL, str], **kwargs) -> None: """ Initialize the model repository. Parameters ---------- url : httpx.URL or str The base URL from where to load the models. Other Parameters ---------------- kwargs Passed to the parent constructor in order to enable multiple inheritance. """ super().__init__(**kwargs) self._url = httpx.URL(url=url) @property def url(self) -> httpx.URL: """Return the repository's URL.""" return self._url.copy_with() @abstractmethod def get_sbml(self, model_id: str) -> bytes: """ Attempt to download an SBML document from the repository. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. Returns ------- bytes A gzip-compressed, UTF-8 encoded SBML document. """ raise NotImplementedError("Implement `get_sbml` in a concrete child class.") cobrapy-0.23.0/src/cobra/io/web/bigg_models_repository.py 0000664 0000000 0000000 00000003714 14173370247 0023435 0 ustar 00root root 0000000 0000000 """Provide a concrete implementation of the BioModels repository interface.""" from io import BytesIO import httpx from .abstract_model_repository import AbstractModelRepository class BiGGModels(AbstractModelRepository): """ Define a concrete implementation of the BiGG Models repository. Attributes ---------- name : str The name of the BiGG Models repository. """ name: str = "BiGG Models" def __init__( self, **kwargs, ) -> None: """ Initialize a BiGG Models repository interface. Other Parameters ---------------- kwargs Passed to the parent constructor in order to enable multiple inheritance. """ super().__init__(url="http://bigg.ucsd.edu/static/models/", **kwargs) def get_sbml(self, model_id: str) -> bytes: """ Attempt to download an SBML document from the repository. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. Returns ------- bytes A gzip-compressed, UTF-8 encoded SBML document. Raises ------ httpx.HTTPError In case there are any connection problems. """ compressed = BytesIO() filename = f"{model_id}.xml.gz" with self._progress, httpx.stream( method="GET", url=self._url.join(filename) ) as response: response.raise_for_status() task_id = self._progress.add_task( description="download", total=int(response.headers["Content-Length"]), model_id=model_id, ) for chunk in response.iter_bytes(): compressed.write(chunk) self._progress.update(task_id=task_id, advance=len(chunk)) compressed.seek(0) return compressed.read() cobrapy-0.23.0/src/cobra/io/web/biomodels_repository.py 0000664 0000000 0000000 00000005314 14173370247 0023135 0 ustar 00root root 0000000 0000000 """Provide functions for loading metabolic models over the wire.""" import gzip from io import BytesIO from typing import List import httpx import pydantic from .abstract_model_repository import AbstractModelRepository class BioModelsFile(pydantic.BaseModel): """Define a single BioModels file description.""" name: str size: int = pydantic.Field(alias="fileSize") class BioModelsFilesResponse(pydantic.BaseModel): """Define the BioModels files JSON response.""" main: List[BioModelsFile] = [] class BioModels(AbstractModelRepository): """ Define a concrete implementation of the BioModels repository. Attributes ---------- name : str The name of the BioModels repository. """ name: str = "BioModels" def __init__( self, **kwargs, ) -> None: """ Initialize a BioModels repository interface. Other Parameters ---------------- kwargs Passed to the parent constructor in order to enable multiple inheritance. """ super().__init__(url="https://www.ebi.ac.uk/biomodels/model/", **kwargs) def get_sbml(self, model_id: str) -> bytes: """ Attempt to download an SBML document from the repository. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. Returns ------- bytes A gzip-compressed, UTF-8 encoded SBML document. Raises ------ httpx.HTTPError In case there are any connection problems. """ data = BytesIO() response = httpx.get( url=self._url.join(f"files/{model_id}"), headers={"Accept": "application/json"}, ) response.raise_for_status() files = BioModelsFilesResponse.parse_obj(response.json()) for model in files.main: if model.name.endswith("xml"): break else: RuntimeError(f"Could not find an SBML document for '{model_id}'.") with self._progress, httpx.stream( method="GET", url=self._url.join(f"download/{model_id}"), params={"filename": model.name}, ) as response: response.raise_for_status() task_id = self._progress.add_task( description="download", total=model.size, model_id=model_id, ) for chunk in response.iter_bytes(): data.write(chunk) self._progress.update(task_id=task_id, advance=len(chunk)) data.seek(0) return gzip.compress(data.read()) cobrapy-0.23.0/src/cobra/io/web/load.py 0000664 0000000 0000000 00000012373 14173370247 0017603 0 ustar 00root root 0000000 0000000 """Provide a function ``load_model`` to access remote model repositories.""" import gzip import logging from typing import TYPE_CHECKING, Iterable import diskcache import httpx import libsbml from ...core import Configuration from ..sbml import _sbml_to_model from .abstract_model_repository import AbstractModelRepository from .bigg_models_repository import BiGGModels from .biomodels_repository import BioModels if TYPE_CHECKING: from cobra.core import Model logger = logging.getLogger(__name__) configuration = Configuration() def load_model( model_id: str, repositories: Iterable[AbstractModelRepository] = (BiGGModels(), BioModels()), cache: bool = True, ) -> "Model": """ Download an SBML model from a remote repository. Downloaded SBML documents are by default stored in a cache on disk such that future access is much faster. By default, models can be loaded from the following repositories: * BiGG Models * BioModels You can use the ``AbstractModelRepository`` class as a parent to implement your own repository accessor which you pass to the ``load_model`` function. In case you implement a new interface, please consider submitting a pull request to COBRApy. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. repositories : iterable, optional An iterable of repository accessor instances. The model_id is searched in order. cache : bool, optional Whether or not to use the local caching mechanism (default yes). Returns ------- Model A model instance generated from the SBML document. Raises ------ RuntimeError As with any internet connection, there are multiple errors that can occur. Examples -------- # Most of the time calling `load_model` with an identifier should be enough. >>> print(load_model("e_coli_core")) e_coli_core >>> print(load_model("MODEL1510010000")) MODEL1510010000 See Also -------- BiGGModels BioModels """ if cache: data = _cached_load( model_id=model_id, repositories=repositories, ) else: data = _fetch_model(model_id=model_id, repositories=repositories) return get_model_from_gzip_sbml(data) def _cached_load( model_id: str, repositories: Iterable[AbstractModelRepository], ) -> bytes: """ Attempt to load a gzip-compressed SBML document from the cache. If the given model identifier is not in the cache, the remote repositories are searched. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. repositories : iterable An iterable of repository accessor instances. The model_id is searched in order. Returns ------- bytes A gzip-compressed, UTF-8 encoded SBML document. """ with diskcache.Cache( directory=str(configuration.cache_directory), size_limit=configuration.max_cache_size, ) as cache: try: return cache[model_id] except KeyError: data = _fetch_model(model_id=model_id, repositories=repositories) cache.set(key=model_id, value=data, expire=configuration.cache_expiration) return data def _fetch_model( model_id: str, repositories: Iterable[AbstractModelRepository], ) -> bytes: """ Attempt to load a gzip-compressed SBML document from the given repositories. Parameters ---------- model_id : str The identifier of the desired metabolic model. This is typically repository specific. repositories : iterable An iterable of repository accessor instances. The model_id is searched in order. Returns ------- bytes A gzip-compressed, UTF-8 encoded SBML document. """ for repository in repositories: logger.info( f"Attempting to fetch '{model_id}' from the {repository.name} repository." ) try: return repository.get_sbml(model_id=model_id) except httpx.HTTPStatusError as error: if error.response.status_code == 404: logger.debug( f"Model '{model_id}' not found in the {repository.name} repository." ) continue raise RuntimeError( f"The connection to the {repository.name} repository failed." ) from error except httpx.RequestError as error: raise RuntimeError( f"The connection to the {repository.name} repository failed." ) from error raise RuntimeError( f"The model '{model_id}' could not be found in any of the repositories." ) def get_model_from_gzip_sbml(stream: bytes) -> "Model": """ Generate a model instance from a gzip-compressed, UTF-8 encoded SBML document. Parameters ---------- stream : bytes A gzip-compressed, UTF-8 encoded SBML document. Returns ------- Model A model instance generated from the SBML document. """ return _sbml_to_model( libsbml.readSBMLFromString(gzip.decompress(stream).decode("utf-8")) ) cobrapy-0.23.0/src/cobra/io/yaml.py 0000664 0000000 0000000 00000006270 14173370247 0017050 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- from __future__ import absolute_import import io from ruamel.yaml.compat import StringIO from ruamel.yaml.main import YAML from cobra.io.dict import model_from_dict, model_to_dict YAML_SPEC = "1.2" class MyYAML(YAML): def dump(self, data, stream=None, **kwargs): inefficient = False if stream is None: inefficient = True stream = StringIO() YAML.dump(self, data, stream, **kwargs) if inefficient: return stream.getvalue() yaml = MyYAML(typ="rt") def to_yaml(model, sort=False, **kwargs): """ Return the model as a YAML document. ``kwargs`` are passed on to ``yaml.dump``. Parameters ---------- model : cobra.Model The cobra model to represent. sort : bool, optional Whether to sort the metabolites, reactions, and genes or maintain the order defined in the model. Returns ------- str String representation of the cobra model as a YAML document. See Also -------- save_yaml_model : Write directly to a file. ruamel.yaml.dump : Base function. """ obj = model_to_dict(model, sort=sort) obj["version"] = YAML_SPEC return yaml.dump(obj, **kwargs) def from_yaml(document): """ Load a cobra model from a YAML document. Parameters ---------- document : str The YAML document representation of a cobra model. Returns ------- cobra.Model The cobra model as represented in the YAML document. See Also -------- load_yaml_model : Load directly from a file. """ content = StringIO(document) return model_from_dict(yaml.load(content)) def save_yaml_model(model, filename, sort=False, **kwargs): """ Write the cobra model to a file in YAML format. ``kwargs`` are passed on to ``yaml.dump``. Parameters ---------- model : cobra.Model The cobra model to represent. filename : str or file-like File path or descriptor that the YAML representation should be written to. sort : bool, optional Whether to sort the metabolites, reactions, and genes or maintain the order defined in the model. See Also -------- to_yaml : Return a string representation. ruamel.yaml.dump : Base function. """ obj = model_to_dict(model, sort=sort) obj["version"] = YAML_SPEC if isinstance(filename, str): with io.open(filename, "w") as file_handle: yaml.dump(obj, file_handle, **kwargs) else: yaml.dump(obj, filename, **kwargs) def load_yaml_model(filename): """ Load a cobra model from a file in YAML format. Parameters ---------- filename : str or file-like File path or descriptor that contains the YAML document describing the cobra model. Returns ------- cobra.Model The cobra model as represented in the YAML document. See Also -------- from_yaml : Load from a string. """ if isinstance(filename, str): with io.open(filename, "r") as file_handle: return model_from_dict(yaml.load(file_handle)) else: return model_from_dict(yaml.load(filename)) cobrapy-0.23.0/src/cobra/manipulation/ 0000775 0000000 0000000 00000000000 14173370247 0017620 5 ustar 00root root 0000000 0000000 cobrapy-0.23.0/src/cobra/manipulation/__init__.py 0000664 0000000 0000000 00000000621 14173370247 0021730 0 ustar 00root root 0000000 0000000 from .annotate import add_SBO from .delete import ( delete_model_genes, find_gene_knockout_reactions, prune_unused_metabolites, prune_unused_reactions, remove_genes, undelete_model_genes, ) from .modify import ( escape_ID, get_compiled_gene_reaction_rules, rename_genes, ) from .validate import ( check_mass_balance, check_metabolite_compartment_formula, ) cobrapy-0.23.0/src/cobra/manipulation/annotate.py 0000664 0000000 0000000 00000002133 14173370247 0022002 0 ustar 00root root 0000000 0000000 """Provide function for annotating demand and exchange reactions.""" from typing import TYPE_CHECKING if TYPE_CHECKING: from cobra import Model def add_SBO(model: "Model") -> None: """Add SBO terms for demands and exchanges. This works for models which follow the standard convention for constructing and naming these reactions. The reaction should only contain the single metabolite being exchanged, and the id should be EX_{self._metabolite.formula}
" f"{objective}
" f"{self._reaction.build_reaction_string(use_metabolite_names=names)}
" f"Bounds: {self._reaction.lower_bound}, {self._reaction.upper_bound}
" f"Flux: {flux}
" ) cobrapy-0.23.0/src/cobra/summary/summary.py 0000664 0000000 0000000 00000011241 14173370247 0020663 0 ustar 00root root 0000000 0000000 """Provide the abstract base summary class.""" import logging from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Optional, Union import pandas as pd if TYPE_CHECKING: from cobra import Model, Solution logger = logging.getLogger(__name__) class Summary(ABC): """ Define the abstract base summary. See Also -------- MetaboliteSummary ReactionSummary ModelSummary """ def __init__( self, **kwargs, ) -> None: """ Initialize a summary. Other Parameters ---------------- kwargs : Further keyword arguments are passed on to the parent class. """ super().__init__(**kwargs) self._flux = None self._tolerance = None def _generate( self, model: "Model", solution: Optional["Solution"], fva: Optional[Union[float, pd.DataFrame]], ) -> None: """ Prepare the data for the summary instance. Parameters ---------- model : cobra.Model The metabolic model for which to generate a metabolite summary. solution : cobra.Solution, optional A previous model solution to use for generating the summary. If ``None``, the summary method will generate a parsimonious flux distribution. fva : pandas.DataFrame or float, optional Whether or not to include flux variability analysis in the output. If given, `fva` should either be a previous FVA solution matching the model or a float between 0 and 1 representing the fraction of the optimum objective to be searched. """ self._tolerance = model.tolerance def __str__(self) -> str: """Return a string representation of the summary.""" return self.to_string() def _repr_html_(self) -> str: """Return a rich HTML representation of the summary.""" return self.to_html() @property def tolerance(self) -> float: """Return the set threshold.""" return self._tolerance def _normalize_threshold(self, threshold: Optional[float]): """Return a sensible threshold value.""" if threshold is None: return self.tolerance else: if threshold < self.tolerance: logger.warning( "The chosen threshold cannot be less than the model's " "tolerance value. Using the tolerance instead." ) return self.tolerance else: return threshold @abstractmethod def to_string( self, names: bool = False, threshold: Optional[float] = None, float_format: str = ".4G", column_width: int = 79, ) -> str: """ Return a pretty string representation of the summary. Parameters ---------- names : bool, optional Whether or not elements should be displayed by their common names (default False). threshold : float, optional Hide fluxes below the threshold from being displayed. If no value is given, the model tolerance is used (default None). float_format : str, optional Format string for floats (default '.4G'). column_width : int, optional The maximum column width for each row (default 79). Returns ------- str The summary formatted as a pretty string. """ raise NotImplementedError( "This method needs to be implemented by the subclass." ) @abstractmethod def to_html( self, names: bool = False, threshold: Optional[float] = None, float_format: str = ".4G", ) -> str: """ Return a rich HTML representation of the metabolite summary. Parameters ---------- names : bool, optional Whether or not elements should be displayed by their common names (default False). threshold : float, optional Hide fluxes below the threshold from being displayed. If no value is given, the model tolerance is used (default None). float_format : str, optional Format string for floats (default '.4G'). Returns ------- str The summary formatted as HTML. """ raise NotImplementedError( "This method needs to be implemented by the subclass." ) def to_frame(self) -> pd.DataFrame: """Return the a data frame representation of the summary.""" return self._flux.copy() cobrapy-0.23.0/src/cobra/test/ 0000775 0000000 0000000 00000000000 14173370247 0016077 5 ustar 00root root 0000000 0000000 cobrapy-0.23.0/src/cobra/test/__init__.py 0000664 0000000 0000000 00000003262 14173370247 0020213 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- from __future__ import absolute_import from os.path import abspath, dirname, join from cobra.io import read_sbml_model try: import pytest import pytest_benchmark except ImportError: pytest = None try: from cPickle import load as _load except ImportError: from pickle import load as _load cobra_directory = abspath(join(dirname(abspath(__file__)), "..")) cobra_location = abspath(join(cobra_directory, "..")) data_dir = join(cobra_directory, "test", "data", "") def create_test_model(model_name="salmonella"): """Returns a cobra model for testing model_name: str One of 'ecoli', 'textbook', or 'salmonella', or the path to a pickled cobra.Model """ if model_name == "ecoli": ecoli_sbml = join(data_dir, "iJO1366.xml.gz") return read_sbml_model(ecoli_sbml) elif model_name == "textbook": textbook_sbml = join(data_dir, "textbook.xml.gz") return read_sbml_model(textbook_sbml) elif model_name == "mini": mini_sbml = join(data_dir, "mini_fbc2.xml") return read_sbml_model(mini_sbml) elif model_name == "salmonella": salmonella_pickle = join(data_dir, "salmonella.pickle") model_name = salmonella_pickle with open(model_name, "rb") as infile: return _load(infile) def test_all(args=None): """alias for running all unit-tests on installed cobra""" if pytest: args = args if args else [] return pytest.main( ["--pyargs", "cobra", "--benchmark-skip", "-v", "-rs"] + args ) else: raise ImportError( "missing package pytest and pytest_benchmark" " required for testing" ) cobrapy-0.23.0/src/cobra/test/conftest.py 0000664 0000000 0000000 00000005632 14173370247 0020304 0 ustar 00root root 0000000 0000000 """Define global fixtures.""" from os.path import join import pytest from cobra import Metabolite, Model, Reaction from cobra.test import create_test_model, data_dir from cobra.util import solver as sutil try: from cPickle import load as _load except ImportError: from pickle import load as _load def pytest_addoption(parser): try: parser.addoption("--run-slow", action="store_true", help="run slow tests") parser.addoption( "--run-non-deterministic", action="store_true", help="run tests that sometimes (rarely) fail", ) except ValueError: pass @pytest.fixture(scope="session") def data_directory(): return data_dir @pytest.fixture(scope="session") def empty_once(): return Model() @pytest.fixture(scope="function") def empty_model(empty_once): return empty_once.copy() @pytest.fixture(scope="session") def small_model(): return create_test_model("textbook") @pytest.fixture(scope="function") def model(small_model): return small_model.copy() @pytest.fixture(scope="session") def large_once(): return create_test_model("ecoli") @pytest.fixture(scope="function") def large_model(large_once): return large_once.copy() @pytest.fixture(scope="session") def medium_model(): return create_test_model("salmonella") @pytest.fixture(scope="function") def salmonella(medium_model): return medium_model.copy() @pytest.fixture(scope="function") def solved_model(data_directory): model = create_test_model("textbook") with open(join(data_directory, "textbook_solution.pickle"), "rb") as infile: solution = _load(infile) return solution, model @pytest.fixture(scope="session") def tiny_toy_model(): tiny = Model("Toy Model") m1 = Metabolite("M1") d1 = Reaction("ex1") d1.add_metabolites({m1: -1}) d1.upper_bound = 0 d1.lower_bound = -1000 tiny.add_reactions([d1]) tiny.objective = "ex1" return tiny stable_optlang = ["glpk", "cplex", "gurobi"] all_solvers = ["optlang-" + s for s in stable_optlang if s in sutil.solvers] @pytest.fixture(params=all_solvers, scope="session") def opt_solver(request): return request.param @pytest.fixture(scope="function") def metabolites(model, request): if request.param == "exchange": return [ met for met in model.metabolites if met.compartment == "e" and "EX_" + met.id not in model.reactions ] elif request.param == "demand": return [ met for met in model.metabolites if met.compartment == "c" and "DM_" + met.id not in model.reactions ] elif request.param == "sink": return [ met for met in model.metabolites if met.compartment == "c" and "SK_" + met.id not in model.reactions ] else: raise ValueError("unknown metabolites {}".format(request.param)) cobrapy-0.23.0/src/cobra/test/data/ 0000775 0000000 0000000 00000000000 14173370247 0017010 5 ustar 00root root 0000000 0000000 cobrapy-0.23.0/src/cobra/test/data/JSON_with_inf_bounds.json 0000664 0000000 0000000 00000005512 14173370247 0023720 0 ustar 00root root 0000000 0000000 { "metabolites": [ { "id": "Glcxt", "name": "glucose", "compartment": "bioreactor", "charge": 0, "formula": "" }, { "id": "Ac", "name": "acetate", "compartment": "bioreactor", "charge": 0, "formula": "" }, { "id": "O2", "name": "oxygen", "compartment": "bioreactor", "charge": 0, "formula": "" }, { "id": "X", "name": "biomass", "compartment": "bioreactor", "charge": 0, "formula": "" } ], "reactions": [ { "id": "v1", "name": "v1 (39.43 Ac + 35 O2 -> X)", "metabolites": { "Ac": -39.43, "O2": -35, "X": 1 }, "lower_bound": 0, "upper_bound": "inf", "gene_reaction_rule": "", "objective_coefficient": 1 }, { "id": "v2", "name": "v2 (9.46 Glcxt + 12.92 O2 -> X)", "metabolites": { "Glcxt": -9.46, "O2": -12.92, "X": 1 }, "lower_bound": 0, "upper_bound": "inf", "gene_reaction_rule": "", "objective_coefficient": 1 }, { "id": "v3", "name": "v3 (9.84 Glcxt + 12.73 O2 -> 1.24 Ac + X)", "metabolites": { "Ac": 1.24, "Glcxt": -9.84, "O2": -12.73, "X": 1 }, "lower_bound": 0, "upper_bound": "inf", "gene_reaction_rule": "", "objective_coefficient": 1 }, { "id": "v4", "name": "v4 (19.23 Glcxt -> 12.12 Ac + X)", "metabolites": { "Ac": 12.12, "Glcxt": -19.23, "X": 1 }, "lower_bound": 0, "upper_bound": "inf", "gene_reaction_rule": "", "objective_coefficient": 1 }, { "id": "EX_Ac", "name": "EX_Ac", "metabolites": { "Ac": -1 }, "lower_bound": "-inf", "upper_bound": "inf", "gene_reaction_rule": "", "annotation": { "sbo": "SBO:0000627" } }, { "id": "EX_O2", "name": "EX_O2", "metabolites": { "O2": -1 }, "lower_bound": -10, "upper_bound": 0, "gene_reaction_rule": "", "annotation": { "sbo": "SBO:0000627" } }, { "id": "EX_Glcxt", "name": "EX_Glcxt", "metabolites": { "Glcxt": -1 }, "lower_bound": -15, "upper_bound": 0, "gene_reaction_rule": "", "annotation": { "sbo": "SBO:0000627" } }, { "id": "EX_X", "name": "EX_X", "metabolites": { "X": -1 }, "lower_bound": "-inf", "upper_bound": "inf", "gene_reaction_rule": "", "annotation": { "sbo": "SBO:0000627" } } ], "genes": [], "id": "fbc_ex1_1", "name": "fbc_ex1_1", "compartments": { "bioreactor": "bioreactor" }, "version": "1" } cobrapy-0.23.0/src/cobra/test/data/annotation.xml 0000664 0000000 0000000 00000035366 14173370247 0021721 0 ustar 00root root 0000000 0000000This is a metabolism model of Escherichia coli str. K-12 substr. MG1655 in SBML format.
Redistribution and use of any part of this model from BiGG Models knowledge-base, with or without modification, are permitted provided that the following conditions are met:
For specific licensing terms about this particular model and regulations of commercial use, see this model in BiGG Models knowledge-base.