logplot


Log Plotting (Calzone)

This notebook shows how to use log plotting in Tellurium/PhraSEDML. Simply wrap the x & y axes in log10 instructions as shown below. The models are described in the other Calzone notebook. The notebook also uses the newTiledFigure instruction, which causes the next plot to be tiled.

References:

Calzone, L., Thieffry, D., Tyson, J. J., & Novak, B. (2007). Dynamical modeling of syncytial mitotic cycles in Drosophila embryos. Molecular systems biology, 3(1), 131. (Online)


In [ ]:
import tellurium as te
te.newTiledFigure(rows=2, cols=3)

In [ ]:
// Author information:
// - Name: Kyle Medley
// - Email: medleyj@uw.edu
// - Organization: University of Washington
%model ./model/BIOMD0000000144.xml
// -- Begin Antimony block converted from BIOMD0000000144.xml
// Created by libAntimony v2.9.3
model *Model_generated_by_BIOCHAM()

  // Compartments and Species:
  compartment nuclei, cytoplasm;
  species MPFc in cytoplasm, preMPFc in cytoplasm, StgPc in cytoplasm, Wee1c in cytoplasm;
  species $Wee1Pc in cytoplasm, N in nuclei, Wee1n in nuclei, Wee1Pn in nuclei;
  species Stgm in cytoplasm, Xp in cytoplasm, Stgc in cytoplasm, Xm in cytoplasm;
  species MPFn in nuclei, preMPFn in nuclei, StgPn in nuclei, Stgn in nuclei;
  species FZYa in nuclei, IEa_1 in nuclei;

  // Assignment Rules:
  Wee1Pc := (Wee1T - N*E_1*(Wee1n + Wee1Pn))/(1 - N*E_1) - Wee1c;
  CycBT := (1 - N*E_1)*(MPFc + preMPFc) + N*E_1*(MPFn + preMPFn);
  StgPT := (1 - N*E_1)*StgPc + N*E_1*StgPn;
  StgT := (1 - N*E_1)*Stgc + N*E_1*Stgn;
  StringTotal := StgPT + StgT;

  // Reactions:
  R_1:  => MPFc; ksc*cytoplasm;
  R_2: preMPFc => MPFc; cytoplasm*(kstgp + kstg*StgPc)*preMPFc;
  R_3: MPFc => preMPFc; cytoplasm*(kweep + kwee*Wee1c)*MPFc;
  R_6: preMPFc => ; cytoplasm*kdc*preMPFc;
  R_7: MPFc => ; cytoplasm*kdc*MPFc;
  R_8: Wee1c => $Wee1Pc; cytoplasm*((kiweep + kiwee*MPFc)*Wee1c/(Jiwee + Wee1c));
  R_9: $Wee1Pc => Wee1c; cytoplasm*(kawee*Wee1Pc/(Jawee + Wee1Pc));
  R_10: Stgm => ; nuclei*(kdmp*Stgm/(Jm + Stgm) + kdm*Xp*Stgm);
  R_12:  => Stgc; cytoplasm*ksstg*Stgm;
  R_13: Stgc => StgPc; cytoplasm*((kastgp + kastg*MPFc)*Stgc/(Jastg + Stgc));
  R_14: StgPc => Stgc; cytoplasm*(kistg*StgPc/(Jistg + StgPc));
  R_15: Stgc => ; cytoplasm*kdstg*Stgc;
  R_16: StgPc => ; cytoplasm*kdstg*StgPc;
  R_19: MPFc => ; cytoplasm*(kt*MPFc*E_1*N/(1 - N*E_1));
  importofMPFintocytoplasm_1:  => MPFc; nuclei*(kout_1*MPFn*E_1*N/(1 - N*E_1));
  _16:  => MPFn; cytoplasm*kt*MPFc;
  exportofMPFfromnucleus_1: MPFn => ; nuclei*kout_1*MPFn;
  importofpreMPFintocytoplaslm_1:  => preMPFc; nuclei*(kout_1*preMPFn*N*E_1/(1 - N*E_1));
  R_20: preMPFc => ; cytoplasm*(kt*preMPFc*E_1*N/(1 - N*E_1));
  _18:  => preMPFn; cytoplasm*kt*preMPFc;
  exportofpreMPFnfromnucleus_1: preMPFn => ; nuclei*kout_1*preMPFn;
  R_21: Wee1Pn => ; nuclei*koutw_1*Wee1Pn;
  _182_1:  => $Wee1Pc; nuclei*(koutw_1*Wee1Pn*N*E_1/(1 - N*E_1));
  R_22: $Wee1Pc => ; cytoplasm*(kinw_1*Wee1Pc*E_1*N/(1 - N*E_1));
  _20:  => Wee1Pn; cytoplasm*kinw_1*Wee1Pc;
  R_23: Wee1n => ; nuclei*koutw_1*Wee1n;
  _22:  => Wee1c; nuclei*(koutw_1*Wee1n*N*E_1/(1 - N*E_1));
  R_24: Wee1c => ; cytoplasm*(kinw_1*Wee1c*E_1*N/(1 - N*E_1));
  _24:  => Wee1n; cytoplasm*kinw_1*Wee1c;
  R_25: StgPn => ; nuclei*kouts_1*StgPn;
  _26:  => StgPc; nuclei*(kouts_1*StgPn*E_1*N/(1 - N*E_1));
  R_26: StgPc => ; cytoplasm*(kins_1*StgPc*E_1*N/(1 - N*E_1));
  _28:  => StgPn; cytoplasm*kins_1*StgPc;
  R_27: Stgn => ; nuclei*kouts_1*Stgn;
  _30:  => Stgc; nuclei*(kouts_1*Stgn*E_1*N/(1 - N*E_1));
  R_28: Stgc => ; cytoplasm*(kins_1*Stgc*E_1*N/(1 - N*E_1));
  _32:  => Stgn; cytoplasm*kins_1*Stgc;
  R_29: preMPFn => MPFn; nuclei*(kstgp + kstg*StgPn)*preMPFn;
  R_30: MPFn => preMPFn; nuclei*(kweep + kwee*Wee1n)*MPFn;
  R_33: preMPFn => ; nuclei*(kdnp + kdn*FZYa)*preMPFn;
  R_34: MPFn => ; nuclei*(kdnp + kdn*FZYa)*MPFn;
  R_37: IEa_1 => ; nuclei*(kiie*IEa_1/(Jiie + IEa_1));
  R_38:  => IEa_1; nuclei*(kaie*(1 - IEa_1)*MPFn/(Jaie + 1 - IEa_1));
  R_39:  => FZYa; nuclei*(kafzy*IEa_1*(1 - FZYa)/(Jafzy + 1 - FZYa));
  R_40: FZYa => ; nuclei*(kifzy*FZYa/(Jifzy + FZYa));
  R_41: Wee1n => Wee1Pn; nuclei*((kiweep + kiwee*MPFn)*Wee1n/(Jiwee + Wee1n));
  R_42: Wee1Pn => Wee1n; nuclei*(kawee*Wee1Pn/(Jawee + Wee1Pn));
  R_43: Stgn => StgPn; nuclei*((kastgp + kastg*MPFn)*Stgn/(Jastg + Stgn));
  R_44: StgPn => Stgn; nuclei*(kistg*StgPn/(Jistg + StgPn));
  R_45: Stgn => ; nuclei*kdstg*Stgn;
  R_46: StgPn => ; nuclei*kdstg*StgPn;
  Nuclei_1:  => N; 0;
  _50:  => Xm; nuclei*ksxm_1*N;
  _51:  => Xp; cytoplasm*ksxp_1*Xm;

  // Events:
  _E0: at FZYa >= kez_1: MPFc = MPFc*((1 - N*E_1)/(1 - 1.95*N*E_1)), StgPn = StgPn/1.95, Stgc = Stgc*((1 - N*E_1)/(1 - 1.95*N*E_1)), StgPc = StgPc*((1 - N*E_1)/(1 - 1.95*N*E_1)), Stgn = Stgn/1.95, Wee1c = Wee1c*((1 - N*E_1)/(1 - 1.95*N*E_1)), Wee1Pn = Wee1Pn/1.95, Wee1n = Wee1n/1.95, preMPFn = preMPFn/1.95, MPFn = MPFn/1.95, N = factor_1*N;

  // Species initializations:
  MPFc = 1;
  preMPFc = 0;
  StgPc = 0.8;
  Wee1c = 0;
  N = 1;
  Wee1n = 0;
  Wee1Pn = 0;
  Stgm = 1;
  Xp = 0;
  Stgc = 0;
  Xm = 0;
  MPFn = 0;
  preMPFn = 0;
  StgPn = 0;
  Stgn = 0;
  FZYa = 0;
  IEa_1 = 0;

  // Compartment initializations:
  nuclei = 1;
  cytoplasm = 1;

  // Variable initializations:
  Wee1T = 0.8;
  E_1 = 7e-05;
  kez_1 = 0.5;
  factor_1 = 1.95;
  ksc = 0.01;
  kstgp = 0.2;
  kstg = 2;
  kweep = 0.005;
  kwee = 1;
  kdc = 0.01;
  kiweep = 0.01;
  kiwee = 1;
  Jiwee = 0.05;
  kawee = 0.3;
  Jawee = 0.05;
  kdmp = 0.002;
  Jm = 0.05;
  kdm = 0.2;
  ksstg = 0;
  kastgp = 0;
  kastg = 1;
  Jastg = 0.05;
  kistg = 0.3;
  Jistg = 0.05;
  kdstg = 0;
  kt = 0.15;
  kout_1 = 0;
  koutw_1 = 0.01;
  kinw_1 = 0.04;
  kouts_1 = 0.02;
  kins_1 = 0.08;
  kdnp = 0.01;
  kdn = 1.5;
  kiie = 0.4;
  Jiie = 0.01;
  kaie = 1;
  Jaie = 0.01;
  kafzy = 1;
  Jafzy = 0.01;
  kifzy = 0.2;
  Jifzy = 0.01;
  ksxm_1 = 0.0005;
  ksxp_1 = 0.001;
  StringT = 0.8;

  // Other declarations:
  var CycBT, StgPT, StgT, StringTotal;
  const nuclei, cytoplasm, Wee1T, E_1, kez_1, factor_1, ksc, kstgp, kstg;
  const kweep, kwee, kdc, kiweep, kiwee, Jiwee, kawee, Jawee, kdmp, Jm, kdm;
  const ksstg, kastgp, kastg, Jastg, kistg, Jistg, kdstg, kt, kout_1, koutw_1;
  const kinw_1, kouts_1, kins_1, kdnp, kdn, kiie, Jiie, kaie, Jaie, kafzy;
  const Jafzy, kifzy, Jifzy, ksxm_1, ksxp_1, StringT;

  // Unit definitions:
  unit time_1 = 6e1 second;

  // Display Names:
  time_1 is "min";
  E_1 is "E";
  kez_1 is "kez";
  factor_1 is "factor";
  kstg is "kstgpp";
  kwee is "kweepp";
  kdc is "kdcp";
  kiwee is "kiweepp";
  kdm is "kdmpp";
  kastg is "kastgpp";
  kt is "kin";
  kout_1 is "kout";
  koutw_1 is "koutw";
  kinw_1 is "kinw";
  kouts_1 is "kouts";
  kins_1 is "kins";
  kdn is "kdnpp";
  ksxm_1 is "ksxm";
  ksxp_1 is "ksxp";
  R_1 is "Synthesis of MPFc";
  R_2 is "Activation of MPFc";
  R_3 is "Inactivation of MPFc";
  R_6 is "Degradation of cyclin";
  R_7 is "degradation of cyclin";
  R_8 is "Inactivation of Wee1c";
  R_9 is "Activation of Wee1c";
  R_10 is "mRNA of Stg";
  R_12 is "Synthesis of Stg";
  R_13 is "activation of Stgc";
  R_14 is "inactivation of Stgc";
  R_15 is "degradation of Stgc";
  R_16 is "degradation of active Stgc";
  R_19 is "export of MPF from cytoplasm";
  importofMPFintocytoplasm_1 is "import of MPF into cytoplasm";
  _16 is "import of MPF into nucleus";
  exportofMPFfromnucleus_1 is "export of MPF from nucleus";
  importofpreMPFintocytoplaslm_1 is "import of preMPF into cytoplasm";
  R_20 is "export of preMPF from cytoplasm";
  _18 is "import of preMPF into nucleus";
  exportofpreMPFnfromnucleus_1 is "export of preMPFn from nucleus";
  R_21 is "export of Wee1P from nucleus";
  _182_1 is "import of  Wee1P into cytoplasm";
  R_22 is "export of Wee1P from cytoplasm";
  _20 is "import of Wee1P into nucleus";
  R_23 is "export of Wee1 from nucleus";
  _22 is "import of Wee1 into cytoplasm";
  R_24 is "export of Wee1c from cytoplasm";
  _24 is "import of Wee1 into nucleus";
  R_25 is "export of StgP from nucleus";
  _26 is "import of StgP into cytoplasm";
  R_26 is "export of StgP from cytoplasm";
  _28 is "import of StgP into nucleus";
  R_27 is "export of Stg from nucleus";
  _30 is "import of Stg into cytoplasm";
  R_28 is "export of Stg from cytoplasm";
  _32 is "import of Stg into nucleus";
  R_29 is "activation of MPFn";
  R_30 is "inactivation of MPFn";
  R_33 is "degradation of preMPFn";
  R_34 is "degradation of MPFn";
  R_37 is "activation of intermediary enzyme";
  R_38 is "inactivation of intermediary enzyme";
  R_39 is "activation of FZY";
  R_40 is "inactivation of FZY";
  R_41 is "inactivation of Wee1n";
  R_42 is "activation of Wee1n";
  R_43 is "activation of StgPn";
  R_44 is "inactivation of StgPn";
  R_45 is "degradation of Stgn";
  R_46 is "degradation of StgPn";
  Nuclei_1 is "Nuclei";
  _50 is "Zygotic mRNA";
  _51 is "Zygotic proteins";
end
// -- End Antimony block

%tasks ./experiment/Calzone2007-simulation-figure-1B.xml --master=True
// -- Begin PhraSEDML block converted from Calzone2007-simulation-figure-1B.xml
// Created by libphrasedml v1.0.7
// Models
model1 = model "../model/BIOMD0000000144"
model2 = model model1 with ksstg = 0.02, kdstg = 0.015, StgPc = 0

// Simulations
sim1 = simulate uniform(0, 250, 1000)
sim2 = simulate uniform(0, 180, 1000)

// Tasks
task1 = run sim1 on model1
task2 = run sim2 on model2

// Outputs
plot "Cytoplasmic Comp" task1.time vs task1.model1.Wee1c, task1.model1.MPFc, task1.model1.StgPc, task1.model1.CycBT
plot "Nuclear Comp" task1.time vs task1.model1.Wee1n, task1.model1.MPFn, task1.model1.StgPn
plot "X/mRNA" task2.time vs task2.model2.Stgm, task2.model2.Xm, task2.model2.Xp

plot "Cytoplasmic Comp (Log)" log10(task1.time) vs log10(task1.model1.Wee1c), log10(task1.model1.MPFc), log10(task1.model1.StgPc), log10(task1.model1.CycBT)
plot "Nuclear Comp (Log)" log10(task1.time) vs log10(task1.model1.Wee1n), log10(task1.model1.MPFn), log10(task1.model1.StgPn)
plot "X/mRNA (Log)" log10(task2.time) vs log10(task2.model2.Stgm), log10(task2.model2.Xm), log10(task2.model2.Xp)
// -- End PhraSEDML block