Mamm Genome. 2007 Jul;18(6-7):508-20. Epub 2007 May 21.
A kinetic core model of the glucose-stimulated insulin secretion network of pancreatic beta cells.
Jiang N1, Cox RD, Hancock JM.
https://www.ncbi.nlm.nih.gov/pubmed/17514510
The model was downloaded from https://www.ebi.ac.uk/biomodels-main/BIOMD0000000239
In [1]:
from __future__ import print_function, absolute_import
import os
import pandas as pd
from matplotlib import pyplot as plt
from sbmlutils.report import sbmlreport
import roadrunner
out_dir = "./results"
if not os.path.exists(out_dir):
os.makedirs(out_dir)
# sbmlreport
sbmlreport.create_sbml_report('BIOMD0000000239.xml', out_dir=out_dir, validate=False)
In [2]:
r = roadrunner.RoadRunner('BIOMD0000000239.xml')
s = r.simulate(start=0, end=1000, steps=1000)
# print(r.timeCourseSelections)
In [3]:
columns = [s.replace('[', '').replace(']', '') for s in r.timeCourseSelections]
df = pd.DataFrame(s, columns=columns)
df.head()
Out[3]:
In [4]:
flatten = lambda l: [item for sublist in l for item in sublist]
fig, axes = plt.subplots(nrows=3, ncols=3, figsize=(15,15))
((ax1, ax2, ax3), (ax4, ax5, ax6), (ax7, ax8, ax9)) = axes
for sid, ax in zip(['GLC', 'ATP_cyt', 'ADP_cyt', 'F6P', 'FBP', 'GAP', 'PYR_cyt', 'Mal', 'Cit'],
flatten(axes)):
# print(ax, sid)
ax.set_title('{} (Cytoplasm)'.format(sid))
ax.plot(df.time, df[sid], color="k", label=sid)
for ax in flatten(axes):
ax.set_xlabel("Time")
ax.legend()
plt.show()