def initial_values(): y0 = [0] * V.len_f_vars x = f_params() y0[V.TGFb] = 0.05 y0[V.Rec] = 1.84 y0[V.TGFb_pRec] = 0 y0[V.S2] = x[C.S2tot] y0[V.S3] = x[C.S3tot] y0[V.S4] = x[C.S4tot] y0[V.ppS2_ppS2_ppS2] = 0 y0[V.ppS3_ppS3_ppS3] = 0 y0[V.S4_S4_S4] = 0 y0[V.pS2] = 0 y0[V.pS3] = 0 y0[V.ppS2] = 0 y0[V.ppS3] = 0 y0[V.ppS2_ppS2_S4] = 0 y0[V.ppS2_ppS2_ppS3] = 0 y0[V.ppS2_ppS3_ppS3] = 0 y0[V.ppS3_ppS3_S4] = 0 y0[V.ppS2_ppS3_S4] = 0 y0[V.ppS3_S4_S4] = 0 y0[V.ppS2_S4_S4] = 0 y0[V.gene] = 1 return y0
class Simulation(object): x = f_params() y0 = initial_values() tspan = np.arange(0, 72, 0.01) t = np.array(tspan) Y = odeint(diffeq, y0, tspan, args=tuple(x))
def get_steady_state(): x = f_params() y0 = initial_values() ss_time = range(2401) # 2400 min y0[V.Ins] = 0.01 # 0.01 nM of insulin during starvation Y = odeint(diffeq, y0, ss_time, args=tuple(x)) return Y[-1,:]
class Simulation(object): tspan = [i / 10 for i in range(120 * 10 + 1)] t = np.array(tspan) condition = 9 Gwl = np.empty((len(t), condition)) Cdc25 = np.empty((len(t), condition)) ENSAP = np.empty((len(t), condition)) Y15 = np.empty((len(t), condition)) B55 = np.empty((len(t), condition)) x = f_params() y0 = initial_values() for i in range(condition): #OA insensitive phosphatase if i in [0, 3, 6]: x[C.kigwl] = 0 x[C.kigwl_d] = 2 x[C.kigwl_dd] = 0 #OA sensitive phosphatase if i in [1, 4, 7]: x[C.kigwl] = 0 x[C.kigwl_d] = 0.02 x[C.kigwl_dd] = 2 #PP2A-B55 if i in [2, 5, 8]: x[C.kigwl] = 2 x[C.kigwl_d] = 0.02 x[C.kigwl_dd] = 0 #Cdk1 Inhibition +OA if i in [3, 4, 5]: x[C.OA] = 100 x[C.RO] = 25 #Mitotic block if i in [6, 7, 8]: y0[V.MPF] = 0.96 y0[V.Cdc25] = 0.97 y0[V.Wee1] = 0.03 y0[V.Gwl] = 0.9 y0[V.ENSAPt] = 0.75 y0[V.PP2] = 0.027 x[C.OA] = 0 x[C.RO] = 100 Y = odeint(diffeq, y0, tspan, args=tuple(x)) Gwl[:, i] = Y[:, V.Gwl] Cdc25[:, i] = Y[:, V.Cdc25] ENSAP[:, i] = Y[:, V.ENSAPt] B55[:, i] = Y[:, V.PP2] Y15[:, i] = x[C.CycT] - Y[:, V.MPF]
class Simulation(object): tspan = range(121) t = np.array(tspan) condition = 4 IL13stimulation = np.empty((len(t), condition)) Rec = np.empty((len(t), condition)) Rec_i = np.empty((len(t), condition)) IL13_Rec = np.empty((len(t), condition)) p_IL13_Rec = np.empty((len(t), condition)) p_IL13_Rec_i = np.empty((len(t), condition)) JAK2 = np.empty((len(t), condition)) pJAK2 = np.empty((len(t), condition)) SHP1 = np.empty((len(t), condition)) STAT5 = np.empty((len(t), condition)) pSTAT5 = np.empty((len(t), condition)) SOCS3mRNA = np.empty((len(t), condition)) DecoyR = np.empty((len(t), condition)) IL13_DecoyR = np.empty((len(t), condition)) SOCS3 = np.empty((len(t), condition)) CD274mRNA = np.empty((len(t), condition)) x = f_params() y0 = initial_values() for i in range(condition): if i == 0: y0[V.IL13stimulation] = 80.0 elif i == 1: y0[V.IL13stimulation] = 20.0 elif i == 2: y0[V.IL13stimulation] = 4.0 elif i == 3: y0[V.IL13stimulation] = 0.0 Y = odeint(diffeq, y0, tspan, args=tuple(x)) IL13stimulation[:, i] = Y[:, V.IL13stimulation] Rec[:, i] = Y[:, V.Rec] Rec_i[:, i] = Y[:, V.Rec_i] IL13_Rec[:, i] = Y[:, V.IL13_Rec] p_IL13_Rec[:, i] = Y[:, V.p_IL13_Rec] p_IL13_Rec_i[:, i] = Y[:, V.p_IL13_Rec_i] JAK2[:, i] = Y[:, V.JAK2] pJAK2[:, i] = Y[:, V.pJAK2] SHP1[:, i] = Y[:, V.SHP1] STAT5[:, i] = Y[:, V.STAT5] pSTAT5[:, i] = Y[:, V.pSTAT5] SOCS3mRNA[:, i] = Y[:, V.SOCS3mRNA] DecoyR[:, i] = Y[:, V.DecoyR] IL13_DecoyR[:, i] = Y[:, V.IL13_DecoyR] SOCS3[:, i] = Y[:, V.SOCS3] CD274mRNA[:, i] = Y[:, V.CD274mRNA]
class Simulation(object): x = f_params() y0 = initial_values() tspan = range(901) t = np.array(tspan) Y = odeint(diffeq, y0, tspan, args=tuple(x)) CyclinA = Y[:, V.CycAT] - Y[:, V.CycAp27] CyclinE = Y[:, V.CycET] - Y[:, V.CycEp27] p27_tot = Y[:, V.p27T]
class Simulation(object): x = f_params() y0 = initial_values() tspan = range(1200) t = np.array(tspan) / 60 Y = odeint(diffeq, y0, tspan, args=tuple(x)) CycA = Y[:, V.tCa] CycE = Y[:, V.tCe] active_RC = Y[:, V.aRc] P21_tot = Y[:, V.tP21]
class Simulation(object): t = range(121) condition = 3 totalShc = np.empty((len(t), condition)) totalGrb2 = np.empty((len(t), condition)) RSh = np.empty((len(t), condition)) RGrb2 = np.empty((len(t), condition)) totalSOS = np.empty((len(t), condition)) ShGS = np.empty((len(t), condition)) PLCg = np.empty((len(t), condition)) x = f_params() y0 = initial_values() for i in range(condition): if i == 0: # 20nM pass elif i == 1: # 2nM y0[V.EGF] = 68. elif i == 2: # Absence of the PLCγP translocation step y0[V.EGF] = 680. x[C.k25f] = 0. x[C.k25b] = 0. Y = odeint(diffeq, y0, t, args=tuple(x)) totalShc[:, i] = Y[:, V. R_ShP] + Y[:, V. R_Sh_G] + Y[:, V. R_Sh_G_S] + Y[:, V. ShP] + Y[:, V. Sh_G] + Y[:, V . Sh_G_S] totalGrb2[:, i] = Y[:, V.R_Sh_G] + Y[:, V.Sh_G] + Y[:, V.R_Sh_G_S] + Y[:, V.Sh_G_S] RSh[:, i] = Y[:, V.R_ShP] + Y[:, V.R_Sh_G] + Y[:, V.R_Sh_G_S] RGrb2[:, i] = Y[:, V.R_G] + Y[:, V.R_G_S] + Y[:, V.R_Sh_G] + Y[:, V.R_Sh_G_S] totalSOS[:, i] = Y[:, V.R_G_S] + Y[:, V.R_Sh_G_S] ShGS[:, i] = Y[:, V.Sh_G_S] PLCg[:, i] = Y[:, V.R_PLP] + Y[:, V.PLCgP]
class Simulation(object): def get_steady_state(): x = f_params() y0 = initial_values() ss_time = range(2401) # 2400 min y0[V.Ins] = 0.01 # 0.01 nM of insulin during starvation Y = odeint(diffeq, y0, ss_time, args=tuple(x)) return Y[-1,:] tspan = range(481) t = np.array(tspan) condition = 5 pAKT = np.empty((len(t), condition)) pS6K = np.empty((len(t), condition)) pGSK3B = np.empty((len(t), condition)) G6Pase = np.empty((len(t), condition)) x = f_params() y0 = get_steady_state() for i in range(condition): if i == 0: y0[V.Ins] = 0.01 elif i == 1: y0[V.Ins] = 0.03 elif i == 2: y0[V.Ins] = 0.1 elif i == 3: y0[V.Ins] = 0.3 elif i == 4: y0[V.Ins] = 1.0 Y = odeint(diffeq, y0, tspan, args=tuple(x)) pAKT[:, i] = Y[:, V.pAKT] pS6K[:, i] = Y[:, V.pS6K] * 83.8672192461257 pGSK3B[:, i] = Y[:, V.pGSK3B] * 0.111097316860158 G6Pase[:, i] = Y[:, V.G6Pase] * 0.0363622452066626
class Simulation(object): tspan = np.linspace(0, 480, 4801) t = np.array(tspan) / 60 # min -> hour Ton = np.linspace(0, 0.5, 6) # 30 s pulse Toff = np.linspace(0, 479.5, 4796) x = f_params() y0 = initial_values() Y = odeint(diffeq, y0, tspan, args=tuple(x)) totalNumPSmad2_sustained = (Y[:,V.PSmad2c] + 2*Y[:,V.PSmad2_PSmad2_c] + Y[:,V.PSmad2_PSmad4_c])*2.3*602 \ + (Y[:,V.PSmad2n] + 2*Y[:,V.PSmad2_PSmad2_n] + Y[:,V.PSmad2_Smad4_n])*602 pulse = odeint(diffeq, y0, Ton, args=tuple(x)) Y0 = pulse[-1, :] # washout Y0[V.TGF_beta_ex] = 0 washout = odeint(diffeq, Y0, Toff, args=tuple(x)) Y = np.vstack((np.delete(pulse, -1, axis=0), washout)) totalNumPSmad2_singlePulse = (Y[:,V.PSmad2c] + 2*Y[:,V.PSmad2_PSmad2_c] + Y[:,V.PSmad2_PSmad4_c])*2.3*602 \ + (Y[:,V.PSmad2n] + 2*Y[:,V.PSmad2_PSmad2_n] + Y[:,V.PSmad2_Smad4_n])*602
class Simulation(object): x = f_params() y0 = initial_values() t = range(481) condition = 4 p38_activity = np.empty((len(t),condition)) for i in range(condition): # k8: the rate constant for MKP-1 protein degradation if i==0: x[C.k8] = 0.024 elif i==1: x[C.k8] = 0.012 elif i==2: x[C.k8] = 0.008 elif i==3: x[C.k8] = 0.004 Y = odeint(diffeq,y0,t,args=tuple(x)) p38_activity[:,i] = Y[:,V.FRET]
class Simulation(object): tspan_ss = range(3600 * 100 + 1) tspan_a = range(3601) tspan_b = range(3600 * 6 + 1) t = np.arange(3600 * 7 + 1) / 3600. x = f_params() y0 = initial_values() # t < 0 Yss = odeint(diffeq, y0, tspan_ss, args=tuple(x)) y0 = Yss[-1, :] # 0 <= t < 1 Ya = odeint(diffeq, y0, tspan_a, args=tuple(x)) y0 = Ya[-1, :] x[C.TR] = 1 # 1 <= t <= 7 Yb = odeint(diffeq, y0, tspan_b, args=tuple(x)) Y = np.vstack((np.delete(Ya, -1, axis=0), Yb)) Neutral_IKK = Y[:, V.IKKn] Active_IKK = Y[:, V.IKKa] Inactive_IKK = Y[:, V.IKKi] Free_cyt_IkBa = Y[:, V.IkBa] Cyt = Y[:, V.IkBaNFkB] Free_nuclear_IkBa = Y[:, V.IkBan] Free_nuclear_NFkB = Y[:, V.NFkBn] IkBa_mRNA = Y[:, V.IkBat] A20_mRNA = Y[:, V.A20t] A20_protein = Y[:, V.A20] cgen_mRNA = Y[:, V.cgent]
class Simulation(object): t_start = 0 t_end = 600 h = 10000 t = np.linspace(t_start, t_end, h) conditions = 12 x = f_params() y0 = initial_values() for i in range(conditions): if i == 0: x[C.gene_turn] = x[C.Ski_turn] x[C.gene_act1] = x[C.Ski_act1] x[C.gene_act2] = x[C.Ski_act2] x[C.gene_act3] = x[C.Ski_act3] x[C.gene_inh1] = x[C.Ski_inh1] x[C.gene_inh2] = x[C.Ski_inh2] x[C.gene_inh3] = x[C.Ski_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Ski_treated = np.log2(Y[:, V.gene]) if i == 1: x[C.gene_turn] = x[C.Skil_turn] x[C.gene_act1] = x[C.Skil_act1] x[C.gene_act2] = x[C.Skil_act2] x[C.gene_act3] = x[C.Skil_act3] x[C.gene_inh1] = x[C.Skil_inh1] x[C.gene_inh2] = x[C.Skil_inh2] x[C.gene_inh3] = x[C.Skil_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Skil_treated = np.log2(Y[:, V.gene]) if i == 2: x[C.gene_turn] = x[C.Dnmt3a_turn] x[C.gene_act1] = x[C.Dnmt3a_act1] x[C.gene_act2] = x[C.Dnmt3a_act2] x[C.gene_act3] = x[C.Dnmt3a_act3] x[C.gene_inh1] = x[C.Dnmt3a_inh1] x[C.gene_inh2] = x[C.Dnmt3a_inh2] x[C.gene_inh3] = x[C.Dnmt3a_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Dnmt3a_treated = np.log2(Y[:, V.gene]) if i == 3: x[C.gene_turn] = x[C.Sox4_turn] x[C.gene_act1] = x[C.Sox4_act1] x[C.gene_act2] = x[C.Sox4_act2] x[C.gene_act3] = x[C.Sox4_act3] x[C.gene_inh1] = x[C.Sox4_inh1] x[C.gene_inh2] = x[C.Sox4_inh2] x[C.gene_inh3] = x[C.Sox4_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Sox4_treated = np.log2(Y[:, V.gene]) if i == 4: x[C.gene_turn] = x[C.Jun_turn] x[C.gene_act1] = x[C.Jun_act1] x[C.gene_act2] = x[C.Jun_act2] x[C.gene_act3] = x[C.Jun_act3] x[C.gene_inh1] = x[C.Jun_inh1] x[C.gene_inh2] = x[C.Jun_inh2] x[C.gene_inh3] = x[C.Jun_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Jun_treated = np.log2(Y[:, V.gene]) if i == 5: x[C.gene_turn] = x[C.Smad7_turn] x[C.gene_act1] = x[C.Smad7_act1] x[C.gene_act2] = x[C.Smad7_act2] x[C.gene_act3] = x[C.Smad7_act3] x[C.gene_inh1] = x[C.Smad7_inh1] x[C.gene_inh2] = x[C.Smad7_inh2] x[C.gene_inh3] = x[C.Smad7_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Smad7_treated = np.log2(Y[:, V.gene]) if i == 6: x[C.gene_turn] = x[C.Klf10_turn] x[C.gene_act1] = x[C.Klf10_act1] x[C.gene_act2] = x[C.Klf10_act2] x[C.gene_act3] = x[C.Klf10_act3] x[C.gene_inh1] = x[C.Klf10_inh1] x[C.gene_inh2] = x[C.Klf10_inh2] x[C.gene_inh3] = x[C.Klf10_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Klf10_treated = np.log2(Y[:, V.gene]) if i == 7: x[C.gene_turn] = x[C.Bmp4_turn] x[C.gene_act1] = x[C.Bmp4_act1] x[C.gene_act2] = x[C.Bmp4_act2] x[C.gene_act3] = x[C.Bmp4_act3] x[C.gene_inh1] = x[C.Bmp4_inh1] x[C.gene_inh2] = x[C.Bmp4_inh2] x[C.gene_inh3] = x[C.Bmp4_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Bmp4_treated = np.log2(Y[:, V.gene]) if i == 8: x[C.gene_turn] = x[C.Cxcl15_turn] x[C.gene_act1] = x[C.Cxcl15_act1] x[C.gene_act2] = x[C.Cxcl15_act2] x[C.gene_act3] = x[C.Cxcl15_act3] x[C.gene_inh1] = x[C.Cxcl15_inh1] x[C.gene_inh2] = x[C.Cxcl15_inh2] x[C.gene_inh3] = x[C.Cxcl15_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Cxcl15_treated = np.log2(Y[:, V.gene]) if i == 9: x[C.gene_turn] = x[C.Dusp5_turn] x[C.gene_act1] = x[C.Dusp5_act1] x[C.gene_act2] = x[C.Dusp5_act2] x[C.gene_act3] = x[C.Dusp5_act3] x[C.gene_inh1] = x[C.Dusp5_inh1] x[C.gene_inh2] = x[C.Dusp5_inh2] x[C.gene_inh3] = x[C.Dusp5_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Dusp5_treated = np.log2(Y[:, V.gene]) if i == 10: x[C.gene_turn] = x[C.Tgfa_turn] x[C.gene_act1] = x[C.Tgfa_act1] x[C.gene_act2] = x[C.Tgfa_act2] x[C.gene_act3] = x[C.Tgfa_act3] x[C.gene_inh1] = x[C.Tgfa_inh1] x[C.gene_inh2] = x[C.Tgfa_inh2] x[C.gene_inh3] = x[C.Tgfa_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Tgfa_treated = np.log2(Y[:, V.gene]) if i == 11: x[C.gene_turn] = x[C.Pdk4_turn] x[C.gene_act1] = x[C.Pdk4_act1] x[C.gene_act2] = x[C.Pdk4_act2] x[C.gene_act3] = x[C.Pdk4_act3] x[C.gene_inh1] = x[C.Pdk4_inh1] x[C.gene_inh2] = x[C.Pdk4_inh2] x[C.gene_inh3] = x[C.Pdk4_inh3] Y = odeint(diffeq, y0, t, args=tuple(x)) Pdk4_treated = np.log2(Y[:, V.gene])
def timecourse(sim): x = f_params() yticks = [np.arange(-0.4, 0.6, 0.2)] plt.rcParams['font.size'] = 6 plt.rcParams['font.family'] = 'Arial' #plt.rcParams['axes.linewidth'] = 1 plt.rcParams['lines.linewidth'] = 2 plt.subplots_adjust(wspace=0.3, hspace=1.0) for i in range(12): plt.subplot(4, 3, i + 1) plt.gca().spines['right'].set_visible(False) plt.gca().spines['top'].set_visible(False) if i == 0: plt.plot(sim.t, sim.Ski_treated, 'r') plt.fill_between(sim.t, sim.Ski_treated - x[C.sd_Ski], sim.Ski_treated + x[C.sd_Ski], facecolor='r', lw=0, alpha=0.1) plt.title('Ski (Cluster 1)', fontweight="bold") plt.ylim([-0.5, 0.7]) plt.yticks([-0.4, -0.2, 0, 0.2, 0.4, 0.6]) elif i == 1: plt.plot(sim.t, sim.Skil_treated, 'r') plt.fill_between(sim.t, sim.Skil_treated - x[C.sd_Skil], sim.Skil_treated + x[C.sd_Skil], facecolor='r', lw=0, alpha=0.1) plt.title('Skil (Cluster 2)', fontweight="bold") plt.ylim([-0.2, 1.2]) plt.yticks([0, 0.5, 1.0]) elif i == 2: plt.plot(sim.t, sim.Dnmt3a_treated, 'r') plt.fill_between(sim.t, sim.Dnmt3a_treated - x[C.sd_Dnmt3a], sim.Dnmt3a_treated + x[C.sd_Dnmt3a], facecolor='r', lw=0, alpha=0.1) plt.title('Dnmt3a (Cluster 3)', fontweight="bold") plt.ylim([-0.2, 0.5]) plt.yticks([-0.2, 0, 0.2, 0.4]) elif i == 3: plt.plot(sim.t, sim.Sox4_treated, 'r') plt.fill_between(sim.t, sim.Sox4_treated - x[C.sd_Sox4], sim.Sox4_treated + x[C.sd_Sox4], facecolor='r', lw=0, alpha=0.1) plt.title('Sox4 (Cluster 4)', fontweight="bold") plt.ylim([-0.6, 1.0]) plt.yticks([-0.5, 0.0, 0.5]) elif i == 4: plt.plot(sim.t, sim.Jun_treated, 'r') plt.fill_between(sim.t, sim.Jun_treated - x[C.sd_Jun], sim.Jun_treated + x[C.sd_Jun], facecolor='r', lw=0, alpha=0.1) plt.title('Jun (Cluster 5)', fontweight="bold") plt.ylim([-0.8, 1.0]) plt.yticks([-0.5, 0, 0.5, 1.0]) elif i == 5: plt.plot(sim.t, sim.Smad7_treated, 'r') plt.fill_between(sim.t, sim.Smad7_treated - x[C.sd_Smad7], sim.Smad7_treated + x[C.sd_Smad7], facecolor='r', lw=0, alpha=0.1) plt.title('Smad7 (Cluster 6)', fontweight="bold") plt.ylim([-0.5, 1.1]) plt.yticks([0, 0.5, 1.0]) elif i == 6: plt.plot(sim.t, sim.Klf10_treated, 'r') plt.fill_between(sim.t, sim.Klf10_treated - x[C.sd_Klf10], sim.Klf10_treated + x[C.sd_Klf10], facecolor='r', lw=0, alpha=0.1) plt.title('Klf10 (Cluster 7)', fontweight="bold") plt.ylim([-0.3, 1.5]) plt.yticks([0, 0.5, 1.0, 1.5]) elif i == 7: plt.plot(sim.t, sim.Bmp4_treated, 'r') plt.fill_between(sim.t, sim.Bmp4_treated - x[C.sd_Bmp4], sim.Bmp4_treated + x[C.sd_Bmp4], facecolor='r', lw=0, alpha=0.1) plt.title('Bmp4 (Cluster 8)', fontweight="bold") plt.ylim([-0.5, 0.6]) plt.yticks([-0.4, -0.2, 0, 0.2, 0.4]) elif i == 8: plt.plot(sim.t, sim.Cxcl15_treated, 'r') plt.fill_between(sim.t, sim.Cxcl15_treated - x[C.sd_Cxcl15], sim.Cxcl15_treated + x[C.sd_Cxcl15], facecolor='r', lw=0, alpha=0.1) plt.title('Cxcl15 (Cluster 9)', fontweight="bold") plt.ylim([-0.5, 0.4]) plt.yticks([-0.4, -0.2, 0, 0.2]) elif i == 9: plt.plot(sim.t, sim.Dusp5_treated, 'r') plt.fill_between(sim.t, sim.Dusp5_treated - x[C.sd_Dusp5], sim.Dusp5_treated + x[C.sd_Dusp5], facecolor='r', lw=0, alpha=0.1) plt.title('Dusp5 (Cluster 10)', fontweight="bold") plt.ylim([-0.4, 0.3]) plt.yticks([-0.2, 0, 0.2]) elif i == 10: plt.plot(sim.t, sim.Tgfa_treated, 'r') plt.fill_between(sim.t, sim.Tgfa_treated - x[C.sd_Tgfa], sim.Tgfa_treated + x[C.sd_Tgfa], facecolor='r', lw=0, alpha=0.1) plt.title('Tgfa (Cluster 11)', fontweight="bold") plt.ylim([-0.6, 0.2]) plt.yticks([-0.4, -0.2, 0, 0.2]) elif i == 11: plt.plot(sim.t, sim.Pdk4_treated, 'r') plt.fill_between(sim.t, sim.Pdk4_treated - x[C.sd_Pdk4], sim.Pdk4_treated + x[C.sd_Pdk4], facecolor='r', lw=0, alpha=0.1) plt.title('Pdk4 (Cluster 12)', fontweight="bold") plt.ylim([-0.6, 0.1]) plt.yticks([-0.4, -0.2, 0]) if i >= 9: plt.xlabel('time (min)') plt.xticks([0, 120, 240, 360, 480, 600]) if i % 3 == 0: plt.ylabel('gene expression(log2)') plt.show()
class Simulation(object): t_start = 0 t_end = 300 h = 1000 t = np.linspace(t_start, t_end, h) conditions = 5 pEGFR_au = np.empty((len(t), conditions)) pErbB2_au = np.empty((len(t), conditions)) pErbB3_au = np.empty((len(t), conditions)) pIGF1R_au = np.empty((len(t), conditions)) pERK_au = np.empty((len(t), conditions)) pAKT_au = np.empty((len(t), conditions)) pS6_au = np.empty((len(t), conditions)) x = f_params() y0 = initial_values() # Cell line H322M for i in range(conditions): if i == 0: y0[V.dose_EGF] = 0 y0[V.dose_HGF] = 0 y0[V.dose_IGF1] = 0 y0[V.dose_HRG] = 0 elif i == 1: y0[V.dose_EGF] = 0.156 * x[C.scale_Ligand] y0[V.dose_IGF1] = 0 y0[V.dose_HRG] = 0 elif i == 2: y0[V.dose_EGF] = 0.625 * x[C.scale_Ligand] y0[V.dose_HGF] = 0 y0[V.dose_IGF1] = 0 y0[V.dose_HRG] = 0 elif i == 3: y0[V.dose_EGF] = 2.5 * x[C.scale_Ligand] y0[V.dose_HGF] = 0 y0[V.dose_IGF1] = 0 y0[V.dose_HRG] = 0 elif i == 4: y0[V.dose_EGF] = 10 * x[C.scale_Ligand] y0[V.dose_HGF] = 0 y0[V.dose_IGF1] = 0 y0[V.dose_HRG] = 0 Y = odeint(diffeq, y0, t, args=tuple(x)) pEGFR = 2*Y[:,V.pEGFRd] + 2*Y[:,V.pEGFRi] + 2*Y[:,V.pEGFRi_ph] + Y[:,V.pErbB12] \ + Y[:,V.pErbB12i] + Y[:,V.pErbB12i_ph] + Y[:,V.pErbB13] + Y[:,V.pErbB13i] \ + Y[:,V.pErbB13i_ph] + Y[:,V.pMetEGFR] + Y[:,V.pMetEGFRi] + Y[:,V.pMetEGFRi_ph] pErbB2 = Y[:,V.pErbB12] + Y[:,V.pErbB12i] + Y[:,V.pErbB12i_ph] + 2*Y[:,V.pErbB2] + 2*Y[:,V.pErbB2i] \ + 2*Y[:,V.pErbB2i_ph] + Y[:,V.pErbB32] + Y[:,V.pErbB32i] + Y[:,V.pErbB32i_ph] pErbB3 = Y[:,V.pErbB13] + Y[:,V.pErbB13i] + Y[:,V.pErbB13i_ph] + Y[:,V.pErbB32] \ + Y[:,V.pErbB32i] + Y[:,V.pErbB32i_ph] + 2*Y[:,V.pErbB3d] + 2*Y[:,V.pErbB3i] \ + 2*Y[:,V.pErbB3i_ph] + Y[:,V.pMetErbB3] + Y[:,V.pMetErbB3i] + Y[:,V.pMetErbB3i_ph] pERK = Y[:, V.pERK] pAKT = Y[:, V.pAKT] pS6 = Y[:, V.pS6] pEGFR_au[:, i] = np.log10(x[C.offset_pEGFR_CelllineH322M] + x[C.scale_pEGFR_CelllineH322M] * pEGFR) pErbB2_au[:, i] = np.log10(x[C.offset_pErbB2_CelllineH322M] + x[C.scale_pErbB2_CelllineH322M] * pErbB2) pErbB3_au[:, i] = np.log10(x[C.offset_pErbB3_CelllineH322M] + x[C.scale_pErbB3_CelllineH322M] * pErbB3) pERK_au[:, i] = np.log10(x[C.offset_pERK_CelllineH322M] + x[C.scale_pERK_CelllineH322M] * pERK) pAKT_au[:, i] = np.log10(x[C.offset_pAKT_CelllineH322M] + x[C.scale_pAKT_CelllineH322M] * pAKT) pS6_au[:, i] = np.log10(x[C.offset_pS6_CelllineH322M] + x[C.scale_pS6_CelllineH322M] * pS6)