Analysis of Models to Templatize


In [1]:
%matplotlib inline
import tellurium as te
import matplotlib.pyplot as plt


/home/ubuntu/miniconda2/lib/python2.7/site-packages/tellurium/notebooks/__init__.py:16: UserWarning: Notebook tools are not imported, due to missing dependencies.
  warnings.warn("Notebook tools are not imported, due to missing dependencies.")

In [2]:
def getAntimonyModel(biomodel):
  """
  :param str biomodel: string identifier of the biomodel
  """
  url = "http://www.ebi.ac.uk/biomodels-main/download?mid=%s" % biomodel
  return te.loadSBMLModel(url).getAntimony()

In [3]:
fd = open("BIOMD0000000200.mdl", "w")
fd.writelines(getAntimonyModel("BIOMD0000000200"))
fd.close()

In [4]:
print("{s} => {s}p")


{s} => {s}p

In [5]:
a = '''
TTWWAA => TTWWAAp
AA => AAp
WAA => WAAp
WWAA => WWAAp
TTAA => TTAAp
TTWAA => TTWAAp
Y => Yp
'''
print(a)


TTWWAA => TTWWAAp
AA => AAp
WAA => WAAp
WWAA => WWAAp
TTAA => TTAAp
TTWAA => TTWAAp
Y => Yp


In [6]:
print("{s}p{n} => {s}p{n+1}")


{s}p{n} => {s}p{n+1}

In [7]:
#print getAntimonyModel("BIOMD0000000223")

In [8]:
#print getAntimonyModel("BIOMD0000000090")

In [9]:
#print getAntimonyModel("insulin_model.xml")

In [10]:
tab = '''
Re(pat='CT', pfx='complex',  num=1,   m1='TT',     m2='W'                )
Re(                          num=2,   m1='W',      m2='AA'               )
Re(                          num=3,   m1='TT',     m2='WAA'              )
Re(                          num=4,   m1='TTW',    m2='WAA'              )
Re(                          num=5,   m1='TTWW',   m2='AA'               )
Re(                          num=6,   m1='TT',     m2='WWAA'             )
Re(                          num=7,   m1='TT',     m2='AA'               )
Re(                          num=8,   m1='TTW',    m2='AA'               )
Re(                          num=10,  m1='TTWW',   m2='W'                )
Re(                          num=11,  m1='W',      m2='WAA'              )
Re(                          num=9,   m1='TTWAA',  m2='W',   mf='TTWWAA' )
Re(                          num=12,  m1='W',      m2='W',   mf='TTWAA'  )
'''
print(tab)


Re(pat='CT', pfx='complex',  num=1,   m1='TT',     m2='W'                )
Re(                          num=2,   m1='W',      m2='AA'               )
Re(                          num=3,   m1='TT',     m2='WAA'              )
Re(                          num=4,   m1='TTW',    m2='WAA'              )
Re(                          num=5,   m1='TTWW',   m2='AA'               )
Re(                          num=6,   m1='TT',     m2='WWAA'             )
Re(                          num=7,   m1='TT',     m2='AA'               )
Re(                          num=8,   m1='TTW',    m2='AA'               )
Re(                          num=10,  m1='TTWW',   m2='W'                )
Re(                          num=11,  m1='W',      m2='WAA'              )
Re(                          num=9,   m1='TTWAA',  m2='W',   mf='TTWWAA' )
Re(                          num=12,  m1='W',      m2='W',   mf='TTWAA'  )


In [11]:
mdl = '''
complex_r1: TTW -> TT + W; cell*(complex_r1_k1*TTW - complex_r1_k2*TT*W);
complex_r2: WAA -> W + AA; cell*(complex_r2_k1*WAA - complex_r2_k2*W*AA);
complex_r3: TTWAA -> TT + WAA; cell*(complex_r3_k1*TTWAA - complex_r3_k2*TT*WAA);
complex_r4: TTWWAA -> TTW + WAA; cell*(complex_r4_k1*TTWWAA - complex_r4_k2*TTW*WAA);
complex_r5: TTWWAA -> TTWW + AA; cell*(complex_r5_k1*TTWWAA - complex_r5_k2*TTWW*AA);
complex_r6: TTWWAA -> TT + WWAA; cell*(complex_r6_k1*TTWWAA - complex_r6_k2*TT*WWAA);
complex_r7: TTAA -> TT + AA; cell*(complex_r7_k1*TTAA - complex_r7_k2*TT*AA);
complex_r8: TTWAA -> TTW + AA; cell*(complex_r8_k1*TTWAA - complex_r8_k2*TTW*AA);
complex_r9: TTWWAA -> TTWAA + W; cell*(complex_r9_k1*TTWWAA - complex_r9_k2*TTWAA*W);
complex_r10: TTWW -> TTW + W; cell*(complex_r10_k1*TTWW - complex_r10_k2*TTW*W);
complex_r11: WWAA -> W + WAA; cell*(complex_r11_k1*WWAA - complex_r11_k2*W*WAA);
complex_r12: TTWAA -> TTAA + W; cell*(complex_r12_k1*TTWAA - complex_r12_k2*TTAA*W);
'''
print(mdl)


complex_r1: TTW -> TT + W; cell*(complex_r1_k1*TTW - complex_r1_k2*TT*W);
complex_r2: WAA -> W + AA; cell*(complex_r2_k1*WAA - complex_r2_k2*W*AA);
complex_r3: TTWAA -> TT + WAA; cell*(complex_r3_k1*TTWAA - complex_r3_k2*TT*WAA);
complex_r4: TTWWAA -> TTW + WAA; cell*(complex_r4_k1*TTWWAA - complex_r4_k2*TTW*WAA);
complex_r5: TTWWAA -> TTWW + AA; cell*(complex_r5_k1*TTWWAA - complex_r5_k2*TTWW*AA);
complex_r6: TTWWAA -> TT + WWAA; cell*(complex_r6_k1*TTWWAA - complex_r6_k2*TT*WWAA);
complex_r7: TTAA -> TT + AA; cell*(complex_r7_k1*TTAA - complex_r7_k2*TT*AA);
complex_r8: TTWAA -> TTW + AA; cell*(complex_r8_k1*TTWAA - complex_r8_k2*TTW*AA);
complex_r9: TTWWAA -> TTWAA + W; cell*(complex_r9_k1*TTWWAA - complex_r9_k2*TTWAA*W);
complex_r10: TTWW -> TTW + W; cell*(complex_r10_k1*TTWW - complex_r10_k2*TTW*W);
complex_r11: WWAA -> W + WAA; cell*(complex_r11_k1*WWAA - complex_r11_k2*W*WAA);
complex_r12: TTWAA -> TTAA + W; cell*(complex_r12_k1*TTWAA - complex_r12_k2*TTAA*W);


In [12]:
constants = '''
complex_r1_k1 = 0.00365;
  complex_r1_k1 has persec;
  complex_r1_k2 = 1000000;
  complex_r1_k2 has perMpersec;
  complex_r2_k1 = 0.00894;
  complex_r2_k1 has persec;
  complex_r2_k2 = 1000000;
  complex_r2_k2 has perMpersec;
  complex_r3_k1 = 297;
  complex_r3_k1 has persec;
  complex_r3_k2 = 1000000;
  complex_r3_k2 has perMpersec;
  complex_r4_k1 = 0.64;
  complex_r4_k1 has persec;
  complex_r4_k2 = 1000000;
  complex_r4_k2 has perMpersec;
  complex_r5_k1 = 0.112;
  complex_r5_k1 has persec;
  complex_r5_k2 = 1000000;
  complex_r5_k2 has perMpersec;
  complex_r6_k1 = 0.0229;
  complex_r6_k1 has persec;
  complex_r6_k2 = 1000000;
  complex_r6_k2 has perMpersec;
  complex_r7_k1 = 39.3;
  complex_r7_k1 has persec;
  complex_r7_k2 = 1000000;
  complex_r7_k2 has perMpersec;
  complex_r8_k1 = 727;
  complex_r8_k1 has persec;
  complex_r8_k2 = 1000000;
  complex_r8_k2 has perMpersec;
  complex_r9_k1 = 7.87e-06;
  complex_r9_k1 has persec;
  complex_r9_k2 = 1000000;
  complex_r9_k2 has perMpersec;
  complex_r10_k1 = 0.0511;
  complex_r10_k1 has persec;
  complex_r10_k2 = 1000000;
  complex_r10_k2 has perMpersec;
  complex_r11_k1 = 0.102;
  complex_r11_k1 has persec;
  complex_r11_k2 = 1000000;
  complex_r11_k2 has perMpersec;
  complex_r12_k1 = 0.0676;
  complex_r12_k1 has persec;
  complex_r12_k2 = 1000000;
  complex_r12_k2 has perMpersec;
'''
print(constants.replace('  complex', 'complex'))


complex_r1_k1 = 0.00365;
complex_r1_k1 has persec;
complex_r1_k2 = 1000000;
complex_r1_k2 has perMpersec;
complex_r2_k1 = 0.00894;
complex_r2_k1 has persec;
complex_r2_k2 = 1000000;
complex_r2_k2 has perMpersec;
complex_r3_k1 = 297;
complex_r3_k1 has persec;
complex_r3_k2 = 1000000;
complex_r3_k2 has perMpersec;
complex_r4_k1 = 0.64;
complex_r4_k1 has persec;
complex_r4_k2 = 1000000;
complex_r4_k2 has perMpersec;
complex_r5_k1 = 0.112;
complex_r5_k1 has persec;
complex_r5_k2 = 1000000;
complex_r5_k2 has perMpersec;
complex_r6_k1 = 0.0229;
complex_r6_k1 has persec;
complex_r6_k2 = 1000000;
complex_r6_k2 has perMpersec;
complex_r7_k1 = 39.3;
complex_r7_k1 has persec;
complex_r7_k2 = 1000000;
complex_r7_k2 has perMpersec;
complex_r8_k1 = 727;
complex_r8_k1 has persec;
complex_r8_k2 = 1000000;
complex_r8_k2 has perMpersec;
complex_r9_k1 = 7.87e-06;
complex_r9_k1 has persec;
complex_r9_k2 = 1000000;
complex_r9_k2 has perMpersec;
complex_r10_k1 = 0.0511;
complex_r10_k1 has persec;
complex_r10_k2 = 1000000;
complex_r10_k2 has perMpersec;
complex_r11_k1 = 0.102;
complex_r11_k1 has persec;
complex_r11_k2 = 1000000;
complex_r11_k2 has perMpersec;
complex_r12_k1 = 0.0676;
complex_r12_k1 has persec;
complex_r12_k2 = 1000000;
complex_r12_k2 has perMpersec;


In [13]:
table = '''
Co(pfx='complex', num=1,  k1v=0.00365, k1u='persec', k2v=1000000, k2u='perMpersec')
Co(               num=2,  k1v=0.00894                                             )
Co(               num=3,  k1v=297                                                 )
Co(               num=4,  k1v=0.64                                                )
Co(               num=5,  k1v=0.112                                               )
Co(               num=6,  k1v=0.022                                               )
Co(               num=7,  k1v=39.3                                                )
Co(               num=8,  k1v=727                                                 )
Co(               num=9,  k1v=7.87e-06                                            )
Co(               num=10, k1v=0.102                                               )
Co(               num=12, k1v=0.0676                                              )
'''
print(table)


Co(pfx='complex', num=1,  k1v=0.00365, k1u='persec', k2v=1000000, k2u='perMpersec')
Co(               num=2,  k1v=0.00894                                             )
Co(               num=3,  k1v=297                                                 )
Co(               num=4,  k1v=0.64                                                )
Co(               num=5,  k1v=0.112                                               )
Co(               num=6,  k1v=0.022                                               )
Co(               num=7,  k1v=39.3                                                )
Co(               num=8,  k1v=727                                                 )
Co(               num=9,  k1v=7.87e-06                                            )
Co(               num=10, k1v=0.102                                               )
Co(               num=12, k1v=0.0676                                              )


In [14]:
biomodel = "BIOMD0000000640"
print getAntimonyModel(biomodel)


// Created by libAntimony v2.8.1
function function_6(IRS_p, IRS_p_phos_by_p70_S6K_pT229_pT389, p70_S6K_pT229_pT389)
  IRS_p_phos_by_p70_S6K_pT229_pT389*IRS_p*p70_S6K_pT229_pT389;
end

function function_3(Amino_Acids, mTORC2, mTORC2_S2481_phos_by_Amino_Acids)
  mTORC2_S2481_phos_by_Amino_Acids*mTORC2*Amino_Acids;
end

function function_14(Akt_S473_phos_by_mTORC2_pS2481_second, Akt_pT308, mTORC2_pS2481)
  Akt_S473_phos_by_mTORC2_pS2481_second*Akt_pT308*mTORC2_pS2481;
end

function function_17(TSC1_TSC2, TSC1_TSC2_pS1387, mTORC1_pS2448, mTORC1_pS2448_dephos_by_TSC1_TSC2)
  mTORC1_pS2448_dephos_by_TSC1_TSC2*mTORC1_pS2448*(TSC1_TSC2 + TSC1_TSC2_pS1387);
end

function function_20(PI3K_p_PDK1, p70_S6K, p70_S6K_T229_phos_by_PI3K_p_PDK1_first)
  p70_S6K_T229_phos_by_PI3K_p_PDK1_first*p70_S6K*PI3K_p_PDK1;
end

function function_19(PI3K_variant_p, mTORC2, mTORC2_S2481_phos_by_PI3K_variant_p)
  mTORC2_S2481_phos_by_PI3K_variant_p*mTORC2*PI3K_variant_p;
end

function function_2(AMPK, AMPK_T172_phos_by_Amino_Acids, Amino_Acids)
  AMPK_T172_phos_by_Amino_Acids*AMPK*Amino_Acids;
end

function function_4(IR_beta, IR_beta_phos_by_Insulin, Insulin)
  IR_beta_phos_by_Insulin*IR_beta*Insulin;
end

function function_23(mTORC1_pS2448, p70_S6K_T389_phos_by_mTORC1_pS2448_second, p70_S6K_pT229)
  p70_S6K_T389_phos_by_mTORC1_pS2448_second*p70_S6K_pT229*mTORC1_pS2448;
end

function function_22(PI3K_p_PDK1, p70_S6K_T229_phos_by_PI3K_p_PDK1_second, p70_S6K_pT389)
  p70_S6K_T229_phos_by_PI3K_p_PDK1_second*p70_S6K_pT389*PI3K_p_PDK1;
end

function function_16(Akt_pT308, Akt_pT308_pS473, TSC1_TSC2, TSC1_TSC2_T1462_phos_by_Akt_pT308)
  TSC1_TSC2_T1462_phos_by_Akt_pT308*TSC1_TSC2*(Akt_pT308 + Akt_pT308_pS473);
end

function function_11(Akt, Akt_T308_phos_by_PI3K_p_PDK1_first, PI3K_p_PDK1)
  Akt_T308_phos_by_PI3K_p_PDK1_first*Akt*PI3K_p_PDK1;
end

function function_27(PRAS40_S183_phos_by_mTORC1_pS2448_second, PRAS40_pT246, mTORC1_pS2448)
  PRAS40_S183_phos_by_mTORC1_pS2448_second*PRAS40_pT246*mTORC1_pS2448;
end

function function_26(Akt_pT308, Akt_pT308_pS473, PRAS40_T246_phos_by_Akt_pT308_second, PRAS40_pS183)
  PRAS40_T246_phos_by_Akt_pT308_second*PRAS40_pS183*(Akt_pT308 + Akt_pT308_pS473);
end

function function_7(IRS, IRS_phos_by_p70_S6K_pT229_pT389, p70_S6K_pT229_pT389)
  IRS_phos_by_p70_S6K_pT229_pT389*IRS*p70_S6K_pT229_pT389;
end

function function_15(AMPK_pT172, TSC1_TSC2, TSC1_TSC2_S1387_phos_by_AMPK_pT172)
  TSC1_TSC2_S1387_phos_by_AMPK_pT172*TSC1_TSC2*AMPK_pT172;
end

function function_9(IR_beta_pY1146, PI3K_variant, PI3K_variant_phos_by_IR_beta_pY1146)
  PI3K_variant_phos_by_IR_beta_pY1146*PI3K_variant*IR_beta_pY1146;
end

function function_12(Akt, Akt_S473_phos_by_mTORC2_pS2481_first, mTORC2_pS2481)
  Akt_S473_phos_by_mTORC2_pS2481_first*Akt*mTORC2_pS2481;
end

function function_18(Amino_Acids, mTORC1, mTORC1_S2448_activation_by_Amino_Acids)
  mTORC1_S2448_activation_by_Amino_Acids*mTORC1*Amino_Acids;
end

function function_10(AMPK, AMPK_T172_phos, IRS_p)
  AMPK_T172_phos*AMPK*IRS_p;
end

function function_13(Akt_T308_phos_by_PI3K_p_PDK1_second, Akt_pS473, PI3K_p_PDK1)
  Akt_T308_phos_by_PI3K_p_PDK1_second*Akt_pS473*PI3K_p_PDK1;
end

function function_8(IRS_p, PI3K_PDK1, PI3K_PDK1_phos_by_IRS_p)
  PI3K_PDK1_phos_by_IRS_p*PI3K_PDK1*IRS_p;
end

function function_21(mTORC1_pS2448, p70_S6K, p70_S6K_T389_phos_by_mTORC1_pS2448_first)
  p70_S6K_T389_phos_by_mTORC1_pS2448_first*p70_S6K*mTORC1_pS2448;
end

function function_5(IRS, IRS_phos_by_IR_beta_pY1146, IR_beta_pY1146)
  IRS_phos_by_IR_beta_pY1146*IRS*IR_beta_pY1146;
end

function function_24(PRAS40, PRAS40_S183_phos_by_mTORC1_pS2448_first, mTORC1_pS2448)
  PRAS40_S183_phos_by_mTORC1_pS2448_first*PRAS40*mTORC1_pS2448;
end

function function_25(Akt_pT308, Akt_pT308_pS473, PRAS40, PRAS40_T246_phos_by_Akt_pT308_first)
  PRAS40_T246_phos_by_Akt_pT308_first*PRAS40*(Akt_pT308 + Akt_pT308_pS473);
end

function function_1(Amino_Acids, IRS, IRS_phos_by_Amino_Acids)
  IRS_phos_by_Amino_Acids*IRS*Amino_Acids;
end


model *MODEL1702270000()

  // Compartments and Species:
  compartment Cell;
  species IR_beta in Cell, IR_beta_pY1146 in Cell, IR_beta_refractory in Cell;
  species IRS in Cell, IRS_p in Cell, IRS_pS636 in Cell, AMPK in Cell, AMPK_pT172 in Cell;
  species Akt in Cell, Akt_pT308 in Cell, Akt_pS473 in Cell, Akt_pT308_pS473 in Cell;
  species TSC1_TSC2 in Cell, TSC1_TSC2_pT1462 in Cell, TSC1_TSC2_pS1387 in Cell;
  species mTORC1 in Cell, mTORC1_pS2448 in Cell, mTORC2 in Cell, mTORC2_pS2481 in Cell;
  species p70_S6K in Cell, p70_S6K_pT229 in Cell, p70_S6K_pT389 in Cell, p70_S6K_pT229_pT389 in Cell;
  species PRAS40 in Cell, PRAS40_pT246 in Cell, PRAS40_pS183 in Cell, PRAS40_pT246_pS183 in Cell;
  species PI3K_variant in Cell, PI3K_variant_p in Cell, PI3K_PDK1 in Cell;
  species PI3K_p_PDK1 in Cell, $Insulin in Cell, $Amino_Acids in Cell, $IR_beta_pY1146_obs in Cell;
  species $IRS_pS636_obs in Cell, $AMPK_pT172_obs in Cell, $Akt_pT308_obs in Cell;
  species $Akt_pS473_obs in Cell, $TSC1_TSC2_pS1387_obs in Cell, $mTOR_pS2448_obs in Cell;
  species $mTOR_pS2481_obs in Cell, $p70_S6K_pT229_obs in Cell, $p70_S6K_pT389_obs in Cell;
  species $PRAS40_pT246_obs in Cell, $PRAS40_pS183_obs in Cell;

  // Assignment Rules:
  Insulin := piecewise(0, time < 0, 0);
  Amino_Acids := piecewise(0, time < 0, 1);
  IR_beta_pY1146_obs := IR_beta_pY1146;
  IRS_pS636_obs := IRS_pS636;
  AMPK_pT172_obs := AMPK_pT172;
  Akt_pT308_obs := Akt_pT308 + Akt_pT308_pS473;
  Akt_pS473_obs := Akt_pS473 + Akt_pT308_pS473;
  TSC1_TSC2_pS1387_obs := TSC1_TSC2_pS1387;
  mTOR_pS2448_obs := mTORC1_pS2448;
  mTOR_pS2481_obs := mTORC2_pS2481;
  p70_S6K_pT229_obs := p70_S6K_pT229 + p70_S6K_pT229_pT389;
  p70_S6K_pT389_obs := p70_S6K_pT389 + p70_S6K_pT229_pT389;
  PRAS40_pT246_obs := PRAS40_pT246 + PRAS40_pT246_pS183;
  PRAS40_pS183_obs := PRAS40_pS183 + PRAS40_pT246_pS183;

  // Reactions:
  reaction_1: IRS => IRS_p; Cell*function_1(Amino_Acids, IRS, IRS_phos_by_Amino_Acids);
  reaction_2: AMPK => AMPK_pT172; Cell*function_2(AMPK, AMPK_T172_phos_by_Amino_Acids, Amino_Acids);
  reaction_3: mTORC2 => mTORC2_pS2481; Cell*function_3(Amino_Acids, mTORC2, mTORC2_S2481_phos_by_Amino_Acids);
  reaction_4: IR_beta => IR_beta_pY1146; Cell*function_4(IR_beta, IR_beta_phos_by_Insulin, Insulin);
  reaction_5: IR_beta_pY1146 => IR_beta_refractory; Cell*IR_beta_pY1146_dephos*IR_beta_pY1146;
  reaction_6: IR_beta_refractory => IR_beta; Cell*IR_beta_ready*IR_beta_refractory;
  reaction_7: IRS => IRS_p; Cell*function_5(IRS, IRS_phos_by_IR_beta_pY1146, IR_beta_pY1146);
  reaction_8: IRS_p => IRS_pS636; Cell*function_6(IRS_p, IRS_p_phos_by_p70_S6K_pT229_pT389, p70_S6K_pT229_pT389);
  reaction_9: IRS => IRS_pS636; Cell*function_7(IRS, IRS_phos_by_p70_S6K_pT229_pT389, p70_S6K_pT229_pT389);
  reaction_10: IRS_pS636 => IRS; Cell*IRS_pS636_turnover*IRS_pS636;
  reaction_11: PI3K_p_PDK1 => PI3K_PDK1; Cell*PI3K_p_PDK1_dephos*PI3K_p_PDK1;
  reaction_12: PI3K_PDK1 => PI3K_p_PDK1; Cell*function_8(IRS_p, PI3K_PDK1, PI3K_PDK1_phos_by_IRS_p);
  reaction_13: PI3K_variant_p => PI3K_variant; Cell*PI3K_variant_p_dephos*PI3K_variant_p;
  reaction_14: PI3K_variant => PI3K_variant_p; Cell*function_9(IR_beta_pY1146, PI3K_variant, PI3K_variant_phos_by_IR_beta_pY1146);
  reaction_15: AMPK => AMPK_pT172; Cell*function_10(AMPK, AMPK_T172_phos, IRS_p);
  reaction_16: AMPK_pT172 => AMPK; Cell*AMPK_pT172_dephos*AMPK_pT172;
  reaction_17: Akt => Akt_pT308; Cell*function_11(Akt, Akt_T308_phos_by_PI3K_p_PDK1_first, PI3K_p_PDK1);
  reaction_18: Akt => Akt_pS473; Cell*function_12(Akt, Akt_S473_phos_by_mTORC2_pS2481_first, mTORC2_pS2481);
  reaction_19: Akt_pS473 => Akt_pT308_pS473; Cell*function_13(Akt_T308_phos_by_PI3K_p_PDK1_second, Akt_pS473, PI3K_p_PDK1);
  reaction_20: Akt_pT308 => Akt_pT308_pS473; Cell*function_14(Akt_S473_phos_by_mTORC2_pS2481_second, Akt_pT308, mTORC2_pS2481);
  reaction_21: Akt_pT308 => Akt; Cell*Akt_pT308_dephos_first*Akt_pT308;
  reaction_22: Akt_pS473 => Akt; Cell*Akt_pS473_dephos_first*Akt_pS473;
  reaction_23: Akt_pT308_pS473 => Akt_pS473; Cell*Akt_pT308_dephos_second*Akt_pT308_pS473;
  reaction_24: Akt_pT308_pS473 => Akt_pT308; Cell*Akt_pS473_dephos_second*Akt_pT308_pS473;
  reaction_25: TSC1_TSC2 => TSC1_TSC2_pS1387; Cell*function_15(AMPK_pT172, TSC1_TSC2, TSC1_TSC2_S1387_phos_by_AMPK_pT172);
  reaction_26: TSC1_TSC2 => TSC1_TSC2_pT1462; Cell*function_16(Akt_pT308, Akt_pT308_pS473, TSC1_TSC2, TSC1_TSC2_T1462_phos_by_Akt_pT308);
  reaction_27: TSC1_TSC2_pS1387 => TSC1_TSC2; Cell*TSC1_TSC2_pS1387_dephos*TSC1_TSC2_pS1387;
  reaction_28: TSC1_TSC2_pT1462 => TSC1_TSC2; Cell*TSC1_TSC2_pT1462_dephos*TSC1_TSC2_pT1462;
  reaction_29: mTORC1_pS2448 => mTORC1; Cell*function_17(TSC1_TSC2, TSC1_TSC2_pS1387, mTORC1_pS2448, mTORC1_pS2448_dephos_by_TSC1_TSC2);
  reaction_30: mTORC1 => mTORC1_pS2448; Cell*function_18(Amino_Acids, mTORC1, mTORC1_S2448_activation_by_Amino_Acids);
  reaction_31: mTORC2 => mTORC2_pS2481; Cell*function_19(PI3K_variant_p, mTORC2, mTORC2_S2481_phos_by_PI3K_variant_p);
  reaction_32: mTORC2_pS2481 => mTORC2; Cell*mTORC2_pS2481_dephos*mTORC2_pS2481;
  reaction_33: p70_S6K => p70_S6K_pT229; Cell*function_20(PI3K_p_PDK1, p70_S6K, p70_S6K_T229_phos_by_PI3K_p_PDK1_first);
  reaction_34: p70_S6K => p70_S6K_pT389; Cell*function_21(mTORC1_pS2448, p70_S6K, p70_S6K_T389_phos_by_mTORC1_pS2448_first);
  reaction_35: p70_S6K_pT389 => p70_S6K_pT229_pT389; Cell*function_22(PI3K_p_PDK1, p70_S6K_T229_phos_by_PI3K_p_PDK1_second, p70_S6K_pT389);
  reaction_36: p70_S6K_pT229 => p70_S6K_pT229_pT389; Cell*function_23(mTORC1_pS2448, p70_S6K_T389_phos_by_mTORC1_pS2448_second, p70_S6K_pT229);
  reaction_37: p70_S6K_pT229 => p70_S6K; Cell*p70_S6K_pT229_dephos_first*p70_S6K_pT229;
  reaction_38: p70_S6K_pT389 => p70_S6K; Cell*p70_S6K_pT389_dephos_first*p70_S6K_pT389;
  reaction_39: p70_S6K_pT229_pT389 => p70_S6K_pT389; Cell*p70_S6K_pT229_dephos_second*p70_S6K_pT229_pT389;
  reaction_40: p70_S6K_pT229_pT389 => p70_S6K_pT229; Cell*p70_S6K_pT389_dephos_second*p70_S6K_pT229_pT389;
  reaction_41: PRAS40 => PRAS40_pS183; Cell*function_24(PRAS40, PRAS40_S183_phos_by_mTORC1_pS2448_first, mTORC1_pS2448);
  reaction_42: PRAS40 => PRAS40_pT246; Cell*function_25(Akt_pT308, Akt_pT308_pS473, PRAS40, PRAS40_T246_phos_by_Akt_pT308_first);
  reaction_43: PRAS40_pS183 => PRAS40_pT246_pS183; Cell*function_26(Akt_pT308, Akt_pT308_pS473, PRAS40_T246_phos_by_Akt_pT308_second, PRAS40_pS183);
  reaction_44: PRAS40_pT246 => PRAS40_pT246_pS183; Cell*function_27(PRAS40_S183_phos_by_mTORC1_pS2448_second, PRAS40_pT246, mTORC1_pS2448);
  reaction_45: PRAS40_pS183 => PRAS40; Cell*PRAS40_pS183_dephos_first*PRAS40_pS183;
  reaction_46: PRAS40_pT246 => PRAS40; Cell*PRAS40_pT246_dephos_first*PRAS40_pT246;
  reaction_47: PRAS40_pT246_pS183 => PRAS40_pT246; Cell*PRAS40_pS183_dephos_second*PRAS40_pT246_pS183;
  reaction_48: PRAS40_pT246_pS183 => PRAS40_pS183; Cell*PRAS40_pT246_dephos_second*PRAS40_pT246_pS183;

  // Species initializations:
  IR_beta = 50;
  IR_beta_pY1146 = 0;
  IR_beta_refractory = 0;
  IRS = 150;
  IRS_p = 0;
  IRS_pS636 = 0;
  AMPK = 50;
  AMPK_pT172 = 0;
  Akt = 300;
  Akt_pT308 = 0;
  Akt_pS473 = 0;
  Akt_pT308_pS473 = 0;
  TSC1_TSC2 = 50;
  TSC1_TSC2_pT1462 = 0;
  TSC1_TSC2_pS1387 = 0;
  mTORC1 = 100;
  mTORC1_pS2448 = 0;
  mTORC2 = 100;
  mTORC2_pS2481 = 0;
  p70_S6K = 300;
  p70_S6K_pT229 = 0;
  p70_S6K_pT389 = 0;
  p70_S6K_pT229_pT389 = 0;
  PRAS40 = 20;
  PRAS40_pT246 = 0;
  PRAS40_pS183 = 0;
  PRAS40_pT246_pS183 = 0;
  PI3K_variant = 50;
  PI3K_variant_p = 0;
  PI3K_PDK1 = 50;
  PI3K_p_PDK1 = 0;

  // Compartment initializations:
  Cell = 1;

  // Variable initializations:
  IRS_phos_by_Amino_Acids = 0.0331672;
  AMPK_T172_phos_by_Amino_Acids = 17.6284;
  mTORC2_S2481_phos_by_Amino_Acids = 0.0268658;
  IR_beta_phos_by_Insulin = 0.0203796;
  IR_beta_pY1146_dephos = 0.493514;
  IR_beta_ready = 323.611;
  IRS_phos_by_IR_beta_pY1146 = 2.11894;
  IRS_p_phos_by_p70_S6K_pT229_pT389 = 0.338859859949792;
  IRS_phos_by_p70_S6K_pT229_pT389 = 0.0863775267376444;
  IRS_pS636_turnover = 25;
  AMPK_T172_phos = 0.490602;
  AMPK_pT172_dephos = 165.704;
  Akt_S473_phos_by_mTORC2_pS2481_first = 1.31992e-05;
  Akt_S473_phos_by_mTORC2_pS2481_second = 0.159093;
  Akt_T308_phos_by_PI3K_p_PDK1_first = 7.47437;
  Akt_T308_phos_by_PI3K_p_PDK1_second = 7.47345;
  Akt_pT308_dephos_first = 88.9654;
  Akt_pT308_dephos_second = 88.9639;
  Akt_pS473_dephos_first = 0.376999;
  Akt_pS473_dephos_second = 0.380005;
  TSC1_TSC2_S1387_phos_by_AMPK_pT172 = 0.00175772;
  TSC1_TSC2_T1462_phos_by_Akt_pT308 = 1.52417;
  TSC1_TSC2_pS1387_dephos = 0.25319;
  TSC1_TSC2_pT1462_dephos = 147.239;
  mTORC1_pS2448_dephos_by_TSC1_TSC2 = 0.00869774;
  mTORC1_S2448_activation_by_Amino_Acids = 0.0156992;
  mTORC2_pS2481_dephos = 1.42511;
  mTORC2_S2481_phos_by_PI3K_variant_p = 0.120736;
  p70_S6K_T229_phos_by_PI3K_p_PDK1_first = 0.0133520172873009;
  p70_S6K_T229_phos_by_PI3K_p_PDK1_second = 1.00000002814509e-06;
  p70_S6K_T389_phos_by_mTORC1_pS2448_first = 0.00261303413778722;
  p70_S6K_T389_phos_by_mTORC1_pS2448_second = 0.110720890919343;
  p70_S6K_pT229_dephos_first = 1.00000012897033e-06;
  p70_S6K_pT229_dephos_second = 0.159201353240651;
  p70_S6K_pT389_dephos_first = 1.10036057608758;
  p70_S6K_pT389_dephos_second = 1.10215267954479;
  PRAS40_S183_phos_by_mTORC1_pS2448_first = 0.15881;
  PRAS40_S183_phos_by_mTORC1_pS2448_second = 0.0683009;
  PRAS40_T246_phos_by_Akt_pT308_first = 0.279344;
  PRAS40_T246_phos_by_Akt_pT308_second = 0.279401;
  PRAS40_pS183_dephos_first = 1.8706;
  PRAS40_pS183_dephos_second = 1.88453;
  PRAS40_pT246_dephos_first = 11.8759;
  PRAS40_pT246_dephos_second = 11.876;
  PI3K_p_PDK1_dephos = 0.18913343080532;
  PI3K_PDK1_phos_by_IRS_p = 0.000187226757782201;
  PI3K_variant_p_dephos = 0.108074886441184;
  PI3K_variant_phos_by_IR_beta_pY1146 = 0.000549027801822575;
  scale_IR_beta_pY1146_obs = 1;
  scale_IRS_pS636_obs = 1;
  scale_AMPK_pT172_obs = 1;
  scale_Akt_pT308_obs = 1;
  scale_Akt_pS473_obs = 1;
  scale_TSC1_TSC2_pS1387_obs = 1;
  scale_mTOR_pS2448_obs = 1;
  scale_mTOR_pS2481_obs = 1;
  scale_p70_S6K_pT229_obs = 1;
  scale_p70_S6K_pT389_obs = 1;
  scale_PRAS40_pT246_obs = 1;
  scale_PRAS40_pS183_obs = 1;

  // Other declarations:
  const Cell, IRS_phos_by_Amino_Acids, AMPK_T172_phos_by_Amino_Acids, mTORC2_S2481_phos_by_Amino_Acids;
  const IR_beta_phos_by_Insulin, IR_beta_pY1146_dephos, IR_beta_ready, IRS_phos_by_IR_beta_pY1146;
  const IRS_p_phos_by_p70_S6K_pT229_pT389, IRS_phos_by_p70_S6K_pT229_pT389;
  const IRS_pS636_turnover, AMPK_T172_phos, AMPK_pT172_dephos, Akt_S473_phos_by_mTORC2_pS2481_first;
  const Akt_S473_phos_by_mTORC2_pS2481_second, Akt_T308_phos_by_PI3K_p_PDK1_first;
  const Akt_T308_phos_by_PI3K_p_PDK1_second, Akt_pT308_dephos_first, Akt_pT308_dephos_second;
  const Akt_pS473_dephos_first, Akt_pS473_dephos_second, TSC1_TSC2_S1387_phos_by_AMPK_pT172;
  const TSC1_TSC2_T1462_phos_by_Akt_pT308, TSC1_TSC2_pS1387_dephos, TSC1_TSC2_pT1462_dephos;
  const mTORC1_pS2448_dephos_by_TSC1_TSC2, mTORC1_S2448_activation_by_Amino_Acids;
  const mTORC2_pS2481_dephos, mTORC2_S2481_phos_by_PI3K_variant_p, p70_S6K_T229_phos_by_PI3K_p_PDK1_first;
  const p70_S6K_T229_phos_by_PI3K_p_PDK1_second, p70_S6K_T389_phos_by_mTORC1_pS2448_first;
  const p70_S6K_T389_phos_by_mTORC1_pS2448_second, p70_S6K_pT229_dephos_first;
  const p70_S6K_pT229_dephos_second, p70_S6K_pT389_dephos_first, p70_S6K_pT389_dephos_second;
  const PRAS40_S183_phos_by_mTORC1_pS2448_first, PRAS40_S183_phos_by_mTORC1_pS2448_second;
  const PRAS40_T246_phos_by_Akt_pT308_first, PRAS40_T246_phos_by_Akt_pT308_second;
  const PRAS40_pS183_dephos_first, PRAS40_pS183_dephos_second, PRAS40_pT246_dephos_first;
  const PRAS40_pT246_dephos_second, PI3K_p_PDK1_dephos, PI3K_PDK1_phos_by_IRS_p;
  const PI3K_variant_p_dephos, PI3K_variant_phos_by_IR_beta_pY1146, scale_IR_beta_pY1146_obs;
  const scale_IRS_pS636_obs, scale_AMPK_pT172_obs, scale_Akt_pT308_obs, scale_Akt_pS473_obs;
  const scale_TSC1_TSC2_pS1387_obs, scale_mTOR_pS2448_obs, scale_mTOR_pS2481_obs;
  const scale_p70_S6K_pT229_obs, scale_p70_S6K_pT389_obs, scale_PRAS40_pT246_obs;
  const scale_PRAS40_pS183_obs;

  // Unit definitions:
  unit volume = dimensionless;
  unit time_unit = 60 second;
  unit substance = dimensionless;

  // Display Names:
  time_unit is "time";
end


In [17]:
biomodel = "BIOMD0000000622"
#print getAntimonyModel(biomodel)
fd = open(biomodel + ".mdl", "w")
fd.writelines(getAntimonyModel(biomodel))
fd.close()