Esempio n. 1
0
import numpy as np
import seaborn as sns

from parameters_menten import d
import sys
sys.path.append("/home/burt/Documents/projects/2019/tcell_model/ode_models/")

from analysis_module import multi_exp, generate_readouts
from ode_models import null_model_menten, il2_model_menten, timer_model_menten, C_model_menten, core_model_menten
import pandas as pd
sns.set(context="talk")

time = np.arange(0, 20, 0.01)
model_list = [
    timer_model_menten, il2_model_menten, C_model_menten, null_model_menten
]
sim_names = ["test", "a", "b"]
model_names = ["Timer", "IL2", "K", "Null"]
d_list = [d]

# time course
df = multi_exp(time,
               d_list,
               model_list,
               sim_names,
               model_names,
               core_model=core_model_menten)
g = sns.relplot(data=df, x="time", y="cells", hue="model", kind="line")

readouts = generate_readouts(df)
print(readouts)
Esempio n. 2
0
# =============================================================================
# define exp conditions
# =============================================================================
model_list = [il2_model, timer_model, C_model]
model_names = ["IL2", "Timer", "K"]
time = np.arange(0,15,0.01)

arr = np.logspace(-1,1,51)

d_list = [update_dict(d, val, "n_div") for val in arr]
sim_names = ["n_div"+str(val) for val in arr]

# =============================================================================
# run experiment
# =============================================================================
exp = multi_exp(time, d_list, model_list, sim_names, model_names)

norm = matplotlib.colors.LogNorm(
    vmin=np.min(arr),
    vmax=np.max(arr))

# choose a colormap
cm = matplotlib.cm.Blues

# create a ScalarMappable and initialize a data structure
sm = matplotlib.cm.ScalarMappable(cmap=cm, norm=norm)
sm.set_array([])

g = sns.relplot(x = "time", y = "cells", kind = "line", data = exp, hue = "sim", 
                col = "model", palette = "Blues", height = 5,legend = False)
Esempio n. 3
0
"""

import numpy as np
import seaborn as sns

from parameters import d
import sys
sys.path.append("/home/burt/Documents/projects/2019/tcell_model/ode_models/")

from analysis_module import multi_exp, generate_readouts
from ode_models import il2_model, timer_model, null_model, C_model, core_model_timer_il2
import pandas as pd
sns.set(context="talk")

time = np.arange(0, 20, 0.01)
model_list = [timer_model]
sim_names = ["a"]
model_names = ["Timer"]
d_list = [d]

# time course
df = multi_exp(time,
               d_list,
               model_list,
               sim_names,
               model_names,
               core_model=core_model_timer_il2)
g = sns.relplot(data=df, x="time", y="cells", hue="model", kind="line")

readouts = generate_readouts(df)
print(readouts)