-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimulation.py
More file actions
executable file
·65 lines (54 loc) · 1.72 KB
/
simulation.py
File metadata and controls
executable file
·65 lines (54 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import numpy as np
from scipy.integrate import odeint
from model.name2idx import parameters as C
from model.name2idx import variables as V
from model.param_const import f_params
from model.initial_condition import initial_values
from model.differential_equation import diffeq
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]