-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_mapk_models.py
49 lines (43 loc) · 1.49 KB
/
build_mapk_models.py
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
from pysb import Model
from pysb.bng import generate_equations
import itertools
import mapk_model
def build_model(mek_seq_rand, mkp_seq_rand, erk_dimerization, mkp_activation):
Model()
mapk_model.mapk_monomers()
if mek_seq_rand == 'seq':
mapk_model.mek_phos_erk_seq()
else:
mapk_model.mek_phos_erk_random()
if mkp_seq_rand == 'seq':
mapk_model.mkp_dephos_erk_seq()
else:
mapk_model.mkp_dephos_erk_random()
if erk_dimerization == 'any':
mapk_model.erk_dimerize_any()
elif erk_dimerization == 'uT':
mapk_model.erk_dimerize_uT()
elif erk_dimerization == 'phos':
mapk_model.erk_dimerize_phos()
if erk_dimerization:
mapk_model.erk_autophos()
if mkp_activation:
mapk_model.erk_activate_mkp()
mapk_model.mapk_initials()
mapk_model.mapk_observables()
model.name = 'mek_%s_mkp_%s_erkauto_%s_mkpact_%s' % \
(mek_seq_rand, mkp_seq_rand, erk_dimerization, mkp_activation)
return model
def build_all_models():
mek_seq_rand = ['seq', 'random']
mkp_seq_rand = ['seq', 'random']
erk_dimerization = [False, 'any', 'uT', 'phos']
mkp_activation = [False, True]
model_combinations = itertools.product(*(mek_seq_rand, mkp_seq_rand,
erk_dimerization, mkp_activation))
models = {}
for mc in model_combinations:
model = build_model(*mc)
generate_equations(model)
models[model.name] = model
return models