Commit 7f49dbd5 authored by Vítor Pereira's avatar Vítor Pereira
Browse files

[UPDATE] proteome limited

parent 69f4d205
%% Cell type:markdown id: tags:
# Exercice 1
Nutrient and proteome limited growth.
%% Cell type:code id: tags:
``` python
%matplotlib inline
from reframed.io.sbml import load_cbmodel
from cobra.io.sbml import read_sbml_model
import matplotlib.pyplot as plt
from mewpy.simulation import get_simulator
```
%% Cell type:markdown id: tags:
Start by loading the E. coli model iJO1366.
You may use COBRApy or REFRAMED.
You may use COBRApy.
%% Cell type:code id: tags:
``` python
model = load_cbmodel('data/iJO1366.xml',flavor='cobra')
model = read_sbml_model('data/iJO1366.xml')
simul = get_simulator(model)
```
%% Cell type:markdown id: tags:
Create medium conditions where all nutrients, except glucose, are unlimited. This medium simulates what somehow could be found in batch cultures
%% Cell type:code id: tags:
``` python
GLC = 'R_EX_glc__D_e'
BIOMASS = "R_BIOMASS_Ec_iJO1366_WT_53p95M"
GLC = 'EX_glc__D_e'
BIOMASS = "BIOMASS_Ec_iJO1366_WT_53p95M"
envcond = {rxn:(-10000,10000) for rxn in simul.get_uptake_reactions() if rxn!=GLC}
```
%% Cell type:markdown id: tags:
Redefine the simulation environment considering this medium.
%% Cell type:code id: tags:
``` python
simul = get_simulator(model,envcond=envcond)
simul.objective = BIOMASS
```
%% Cell type:markdown id: tags:
The function bellow plots the glucose dependent growth given a simulation environment
%% Cell type:code id: tags:
``` python
def plot_growth(simul,title=''):
x_values =[]
y_values =[]
for x in range(0,100,5):
for x in range(1,100,5):
c = {GLC:(-x,1000)}
s = simul.simulate(constraints=c)
try:
b = s.fluxes[BIOMASS]
except:
b = 0
x_values.append(x)
y_values.append(b)
plt.xlabel('Glucose uptake [mmol/(gDW*h)]')
plt.ylabel('Growth [mmol/(gDW*h)]')
plt.ylabel('Growth [1/h]')
plt.title(title)
plt.plot(x_values,y_values)
```
%% Cell type:code id: tags:
``` python
plot_growth(simul,'Nutrient-limited growth')
```
%% Cell type:markdown id: tags:
### Exercice
Replicate the previous experiment using the metabolic model with enzymatic constraints: `"data/iJO1366_sMOMENT_2019_06_25.xml"`.
There is no need to redefine the medium, glucose and biomass reactions as this last model is based on the previous.
Tasks:
* load the model;
* create a simulation environment;
* define the simulation objective;
* use the defined function to plot the cellular growth. You may define as title 'Proteome-limited growth';
* identify the minimum glucose uptake that allows to reach maximal growth;
%% Cell type:code id: tags:
``` python
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment