Back to the main Index
Analysis of the yeast glycolysis model.
Which enzyme changes result in atp/adp > 3
?
The model has the Vmax values defines as local parameters on the reactions. In a first step we promote all the local parameters to global parameters and find the parameters which correspond to Vmax
values.
%matplotlib inline
from __future__ import print_function
import tellurium as te
# load the model
r = te.loadSBMLModel('yeast_glycolysis.xml')
# promote all the local parameters to global parameters
sbml_str = r.getSBML()
sbmlp_str = r.getParamPromotedSBML(sbml_str)
r = te.loads(sbmlp_str)
print(r.getGlobalParameterIds())
# find Vmax parameters
import re
vmaxs = []
for p in sorted(r.getGlobalParameterIds()):
if re.match(pattern='^\w+_Vmax\w*$', string=p) is not None:
print(p, '=', r[p])
vmaxs.append(p)
Now we look at the ATP/ADP of the model.
r.resetToOrigin()
s = r.simulate(0,1E6,101)
r.plot(s, loc=None)
print('ATP/ADP = {:.2f}'.format(r.ATP/r.ADP))
# model reaches steady state, everything looks good
Now we change all the Vmax and see how the ratio changes
import numpy as np
# parameter variation on log scale relative to initial value
factors = np.logspace(-2.5, 2.5, num=25)
Nv = len(vmaxs)
Nf = len(factors)
atp = np.zeros([Nv, Nf])
adp = np.zeros_like(atp)
# simulate
# we have no idea in which parameter areas the model will be unstable
# so we just catch these cases and set the atp and adp values to NaN
for kv, p in enumerate(vmaxs):
print('***', p, '***')
p_init = r[p]
for kf, f in enumerate(factors):
r.resetToOrigin()
r[p] = f * p_init
try:
s = r.simulate(0,1E6,101)
# store the ratio
atp[kv, kf] = r.ATP
adp[kv, kf] = r.ADP
except RuntimeError:
print('unstable: {} = {:.2f}'.format(p, r[p]))
atp[kv, kf] = np.nan
adp[kv, kf] = np.nan
Now we plot the results
import matplotlib.pyplot as plt
# maximum ignoring nans
max_atp = np.nanmax(np.nanmax(atp))
max_adp = np.nanmax(np.nanmax(adp))
for kv, p in enumerate(vmaxs):
print('***', p, '***')
plt.figure(num=None, figsize=(14, 5), dpi=80, facecolor='w', edgecolor='k')
plt.subplot(1,3,1)
plt.plot(atp[kv,:], adp[kv,:], '-o', color='black')
plt.title('ADP ~ ATP ({})'.format(p), fontweight='bold')
plt.xlabel('ATP', fontweight='bold')
# plt.xlim([0, max_atp*1.05])
plt.ylabel('ADP', fontweight='bold')
# plt.ylim([0, max_adp*1.05])
plt.subplot(1,3,2)
plt.plot(factors, adp[kv,:], '-o', color='red')
plt.plot(factors, atp[kv,:], '-o', color='blue')
plt.plot([1, 1], [0, 3], linestyle='-', color='grey')
plt.title('ADP, ATP ~ factors ({})'.format(p), fontweight='bold')
plt.xlabel('Vmax factor', fontweight='bold')
plt.xlim([min(factors)*0.95, max(factors)*1.05])
plt.xscale('log')
plt.ylabel('ATP (blue) & ADP (red)', fontweight='bold')
plt.ylim([0, max_atp*1.05])
plt.subplot(1,3,3)
plt.plot(factors, atp[kv,:]/adp[kv,:], '-o', color='red')
plt.title('ATP/ADP ~ factors ({})'.format(p), fontweight='bold')
# line for atp/adp of interest
plt.plot([1, 1], [0, 3], linestyle='-', color='grey')
plt.plot([min(factors)*0.95, max(factors)*1.05], [3.0, 3.0], linestyle='--', color='grey')
plt.xlabel('Vmax factor', fontweight='bold')
plt.xscale('log')
plt.xlim([min(factors)*0.95, max(factors)*1.05])
plt.ylabel('ATP/ADP', fontweight='bold')
plt.show()