Debian Codegraph @

examples/frompapers/Stimberg_et_al_2018/example_2_gchi_astrocyte.py

raw
1 # coding=utf-8
2 """
3 Modeling neuron-glia interactions with the Brian 2 simulator
4 Marcel Stimberg, Dan F. M. Goodman, Romain Brette, Maurizio De Pittà
5 bioRxiv 198366; doi: https://doi.org/10.1101/198366
6
7 Figure 2: Modeling of synaptically-activated astrocytes
8
9 Two astrocytes (one stochastic and the other deterministic) activated by
10 synapses (connecting "dummy" groups of neurons) (see De Pitta' et al., 2009)
11 """
12 from brian2 import *
13
14 import plot_utils as pu
15
16 set_device('cpp_standalone', directory=None) # Use fast "C++ standalone mode"
17 seed(790824) # to get identical figures for repeated runs
18
19 ################################################################################
20 # Model parameters
21 ################################################################################
22 ### General parameters
23 duration = 30*second # Total simulation time
24 sim_dt = 1*ms # Integrator/sampling step
25
26 ### Neuron parameters
27 f_0 = 0.5*Hz # Spike rate of the "source" neurons
28
29 ### Synapse parameters
30 rho_c = 0.001 # Synaptic vesicle-to-extracellular space volume ratio
31 Y_T = 500*mmolar # Total vesicular neurotransmitter concentration
32 Omega_c = 40/second # Neurotransmitter clearance rate
33
34 ### Astrocyte parameters
35 # --- Calcium fluxes
36 O_P = 0.9*umolar/second # Maximal Ca^2+ uptake rate by SERCAs
37 K_P = 0.1 * umolar # Ca2+ affinity of SERCAs
38 C_T = 2*umolar # Total cell free Ca^2+ content
39 rho_A = 0.18 # ER-to-cytoplasm volume ratio
40 Omega_C = 6/second # Maximal rate of Ca^2+ release by IP_3Rs
41 Omega_L = 0.1/second # Maximal rate of Ca^2+ leak from the ER
42 # --- IP_3R kinectics
43 d_1 = 0.13*umolar # IP_3 binding affinity
44 d_2 = 1.05*umolar # Ca^2+ inactivation dissociation constant
45 O_2 = 0.2/umolar/second # IP_3R binding rate for Ca^2+ inhibition
46 d_3 = 0.9434*umolar # IP_3 dissociation constant
47 d_5 = 0.08*umolar # Ca^2+ activation dissociation constant
48 # --- Agonist-dependent IP_3 production
49 O_beta = 5*umolar/second # Maximal rate of IP_3 production by PLCbeta
50 O_N = 0.3/umolar/second # Agonist binding rate
51 Omega_N = 0.5/second # Maximal inactivation rate
52 K_KC = 0.5*umolar # Ca^2+ affinity of PKC
53 zeta = 10 # Maximal reduction of receptor affinity by PKC
54 # --- IP_3 production
55 O_delta = 0.2 *umolar/second # Maximal rate of IP_3 production by PLCdelta
56 kappa_delta = 1.5 * umolar # Inhibition constant of PLC_delta by IP_3
57 K_delta = 0.3*umolar # Ca^2+ affinity of PLCdelta
58 # --- IP_3 degradation
59 Omega_5P = 0.1/second # Maximal rate of IP_3 degradation by IP-5P
60 K_D = 0.5*umolar # Ca^2+ affinity of IP3-3K
61 K_3K = 1*umolar # IP_3 affinity of IP_3-3K
62 O_3K = 4.5*umolar/second # Maximal rate of IP_3 degradation by IP_3-3K
63 # --- IP_3 external production
64 F_ex = 0.09*umolar/second # Maximal exogenous IP3 flow
65 I_Theta = 0.3*umolar # Threshold gradient for IP_3 diffusion
66 omega_I = 0.05*umolar # Scaling factor of diffusion
67
68 ################################################################################
69 # Model definition
70 ################################################################################
71 defaultclock.dt = sim_dt # Set the integration time
72
73 ### "Neurons"
74 # (We are only interested in the activity of the synapse, so we replace the
75 # neurons by trivial "dummy" groups
76 # # Regular spiking neuron
77 source_neurons = NeuronGroup(1, 'dx/dt = f_0 : 1', threshold='x>1',
78 reset='x=0', method='euler')
79 ## Dummy neuron
80 target_neurons = NeuronGroup(1, '')
81
82
83 ### Synapses
84 # Our synapse model is trivial, we are only interested in its neurotransmitter
85 # release
86 synapses_eqs = 'dY_S/dt = -Omega_c * Y_S : mmolar (clock-driven)'
87 synapses_action = 'Y_S += rho_c * Y_T'
88 synapses = Synapses(source_neurons, target_neurons,
89 model=synapses_eqs, on_pre=synapses_action,
90 method='exact')
91 synapses.connect()
92
93 ### Astrocytes
94 # We are modelling two astrocytes, the first is deterministic while the second
95 # displays stochastic dynamics
96 astro_eqs = '''
97 # Fraction of activated astrocyte receptors:
98 dGamma_A/dt = O_N * Y_S * (1 - Gamma_A) -
99 Omega_N*(1 + zeta * C/(C + K_KC)) * Gamma_A : 1
100
101 # IP_3 dynamics:
102 dI/dt = J_beta + J_delta - J_3K - J_5P + J_ex : mmolar
103 J_beta = O_beta * Gamma_A : mmolar/second
104 J_delta = O_delta/(1 + I/kappa_delta) *
105 C**2/(C**2 + K_delta**2) : mmolar/second
106 J_3K = O_3K * C**4/(C**4 + K_D**4) * I/(I + K_3K) : mmolar/second
107 J_5P = Omega_5P*I : mmolar/second
108 delta_I_bias = I - I_bias : mmolar
109 J_ex = -F_ex/2*(1 + tanh((abs(delta_I_bias) - I_Theta)/omega_I)) *
110 sign(delta_I_bias) : mmolar/second
111 I_bias : mmolar (constant)
112
113 # Ca^2+-induced Ca^2+ release:
114 dC/dt = J_r + J_l - J_p : mmolar
115 # IP3R de-inactivation probability
116 dh/dt = (h_inf - h_clipped)/tau_h *
117 (1 + noise*xi*tau_h**0.5) : 1
118 h_clipped = clip(h,0,1) : 1
119 J_r = (Omega_C * m_inf**3 * h_clipped**3) *
120 (C_T - (1 + rho_A)*C) : mmolar/second
121 J_l = Omega_L * (C_T - (1 + rho_A)*C) : mmolar/second
122 J_p = O_P * C**2/(C**2 + K_P**2) : mmolar/second
123 m_inf = I/(I + d_1) * C/(C + d_5) : 1
124 h_inf = Q_2/(Q_2 + C) : 1
125 tau_h = 1/(O_2 * (Q_2 + C)) : second
126 Q_2 = d_2 * (I + d_1)/(I + d_3) : mmolar
127
128 # Neurotransmitter concentration in the extracellular space
129 Y_S : mmolar
130 # Noise flag
131 noise : 1 (constant)
132 '''
133 # Milstein integration method for the multiplicative noise
134 astrocytes = NeuronGroup(2, astro_eqs, method='milstein')
135 astrocytes.h = 0.9 # IP3Rs are initially mostly available for CICR
136
137 # The first astrocyte is deterministic ("zero noise"), the second stochastic
138 astrocytes.noise = [0, 1]
139 # Connection between synapses and astrocytes (both astrocytes receive the
140 # same input from the synapse). Note that in this special case, where each
141 # astrocyte is only influenced by the neurotransmitter from a single synapse,
142 # the '(linked)' variable mechanism could be used instead. The mechanism used
143 # below is more general and can add the contribution of several synapses.
144 ecs_syn_to_astro = Synapses(synapses, astrocytes,
145 'Y_S_post = Y_S_pre : mmolar (summed)')
146 ecs_syn_to_astro.connect()
147 ################################################################################
148 # Monitors
149 ################################################################################
150 astro_mon = StateMonitor(astrocytes, variables=['Gamma_A', 'C', 'h', 'I'],
151 record=True)
152
153 ################################################################################
154 # Simulation run
155 ################################################################################
156 run(duration, report='text')
157
158 ################################################################################
159 # Analysis and plotting
160 ################################################################################
161 from matplotlib.ticker import FormatStrFormatter
162 plt.style.use('figures.mplstyle')
163
164 # Plot Gamma_A
165 fig, ax = plt.subplots(4, 1, figsize=(6.26894, 6.26894*0.66))
166 ax[0].plot(astro_mon.t/second, astro_mon.Gamma_A.T)
167 ax[0].set(xlim=(0., duration/second), ylim=[-0.05, 1.02], yticks=[0.0, 0.5, 1.0],
168 ylabel=r'$\Gamma_{A}$')
169 # Adjust axis
170 pu.adjust_spines(ax[0], ['left'])
171
172 # Plot I
173 ax[1].plot(astro_mon.t/second, astro_mon.I.T/umolar)
174 ax[1].set(xlim=(0., duration/second), ylim=[-0.1, 5.0],
175 yticks=arange(0.0, 5.1, 1., dtype=float),
176 ylabel=r'$I$ ($\mu M$)')
177 ax[1].yaxis.set_major_formatter(FormatStrFormatter('%.1f'))
178 ax[1].legend(['deterministic', 'stochastic'], loc='upper left')
179 pu.adjust_spines(ax[1], ['left'])
180
181 # Plot C
182 ax[2].plot(astro_mon.t/second, astro_mon.C.T/umolar)
183 ax[2].set(xlim=(0., duration/second), ylim=[-0.1, 1.3],
184 ylabel=r'$C$ ($\mu M$)')
185 pu.adjust_spines(ax[2], ['left'])
186
187 # Plot h
188 ax[3].plot(astro_mon.t/second, astro_mon.h.T)
189 ax[3].set(xlim=(0., duration/second),
190 ylim=[0.4, 1.02],
191 ylabel='h', xlabel='time ($s$)')
192 pu.adjust_spines(ax[3], ['left', 'bottom'])
193
194 pu.adjust_ylabels(ax, x_offset=-0.1)
195
196 plt.show()