-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreleasef.m
191 lines (155 loc) · 4.95 KB
/
releasef.m
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
% Interactions between multiple sources of short term plasticity
% during evoked and spontaneous activity at the rat calyx of Held
% J Physiol, 2008
%
% Matthias H. Hennig, Michael Postlethwaite, Ian D. Forsythe, Bruce
% P. Graham
% MHH: mhhennig@gmail.com; BPG: b.graham@cs.stir.ac.uk
%
% This function is called to simulate a sequence of EPSCs in
% response to a series of presyanptic spikes.
%
% The funtion expects a series of inter-spike-intervals as argument
% (isi).
%
% It returns the following data:
% nresps - the normalised EPSC amplitude for each presyn. AP
% pprel - the release probability for each AP
% ns - the vesicle pool occypancy for each AP
% ppbase - the "basal" Ca++ calcium transient amplitude (c2) for each AP
% nrels - the number of released vesicles for each AP
% ppfac - the "release" Ca++ calcium transient amplitude (c1) for each AP
% rdess - level of postsyn. AMPAR desensitisation for each AP
% finalstate - the state of all variables after the last AP (allows
% to continue simulations with different stimuli etc.)
% retrieved - amount of recruited vesicles for each AP
function [nresps, pprel, ns, ppbase, nrels, ppfac, ...
rdess, finalstate, retrieved] = releasef(isi)
% Below, all activation rates are given in units of 1/AP (per
% presyn. action potential), and decay time constants are given in
% units of seconds.
% variables required by synOde.m
global gcairel gcairel2 gfrel gglrel gkd gke kek ke
% globally control calcium channel modulation
withca = 1;
% globally control slow calcium channel modulation
withslow = 1;
% Ca++ transient amplitude (release probability)
fac = 0.9894;
ca = 0.034*fac;
% facilitation activation
gfac = withca * 0.06;
% facilitation relaxation
gfrel = 0.04;
% activation of activity-dependent vesicle retrieval
kefrac = 1;
% decay time of activity-dependent vesicle retrieval
kek = 0.1;
ke = 6.0;
gke = 0.2373;
% passive vesicle recycling time constant
gkd = 4.4;
% fast Ca++ channel inactivation
gcai = withslow * withca * 0.009;
% fast Ca++ channel relaxation
gcairel = 0.3;
% slow Ca++ channel inactivation
gcai2 = withslow * withca * 0.007;
% slow Ca++ channel relaxation
gcairel2 = 20;
% mGluR/AMPAR mediated Ca++ channel inhibition (presyn.)
ggli = withslow * withca * 0.013;
% relaxation of mGluR/AMPAR effect
gglrel = 10;
% AMPAR desensitisation (postsyn.)
grr = 0.0230;
% AMPAR desensitisation recovery time
grd = 2.8955;
% factor to convert (ca*[0:1])^4 into release probability
k=138000*1.4;
% power law exponent for release probability
exponent = 4;
% ODE solver parameters
options = odeset('RelTol',1e-8,'AbsTol',1e-8);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% prepare initial values
time = 1:length(isi)-1;
nrels = zeros(length(time),1);
rdess = zeros(length(time),1);
resps = zeros(length(time),1)';
ppbase = zeros(length(time),1);
ppfac = zeros(length(time),1);
pprel = zeros(length(time),1);
ns(1) = 1;
rdess(1) = 0;
pp = 1;
ppb = 1;
ppin = 0;
ppin2 = 0;
ppmglu = 0;
prel(1) = 1-exp(-k*(ca)^exponent);
pprel(1) = 1-exp(-k*(ca)^exponent);
ca_amp = pp;
ppbase(1) = ca_amp;
ppfac(1) = ca_amp;
enhrep = 0;
Y = [ 0 0 0 0 1 0];
T = [0];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% run simulation
for t=time,
% next inter-spike interval
dt = isi(t);
% Desensitisation
rr = 1-exp(-dt/grr);
% Transmitter release
nrels(t) = ns(t) * pprel(t);
nt = ns(t) - nrels(t);
% AMPAR desensitisation
desstmp = 1-rdess(t);
rdess(t+1) = rdess(t) + nrels(t) * grd * desstmp;
rdess(t+1) = rdess(t+1) - rr * rdess(t+1);
% postsynaptic response
resps(t) = nrels(t) * desstmp;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% update all state variables in the model
% mGluR activation
pglut = ggli * ppb * nrels(t);
% Ca++ channel inactivation
pcait = gcai * ppb * ca_amp;
pcait2 = gcai2 * ppin * ca_amp;
% Ca++ channel facilitation
facilt = gfac * ppb;
% activity-dependent vesicle retrieval
enhrep = enhrep + gke * ca_amp * (1-enhrep);
% store number of vesicles
retrieved(t) = nt;
finalstate = [ ppin ppin2 ppmglu desstmp (1-nt) enhrep];
% solve the ODE system
[T, Y] = ode45(@synOde, [0 dt], [ppin + pcait - pcait2, pp + facilt, ...
ppmglu + pglut, ppin2+pcait2, nt, enhrep],options);
% find last element of calculated time course (used for backwards compatibility)
tn = length(T);
% release prob.
pp = Y(tn,2);
% inactivated Ca++ channels
ppin = Y(tn,1);
ppin2 = Y(tn,4);
% mGluR effect on Ca++ channels
ppmglu = Y(tn,3);
% activity-dependent vesicle retrieval
enhrep = kefrac*Y(tn,6);
% vesicle pool size
ns(t+1) = Y(tn,5);
% calculate number of retrieved vesicles
retrieved(t) = ns(t+1)-retrieved(t);
% base release probability
ppb = 1-ppin-ppmglu-ppin2;
% new release probability/Ca++ transient amplitude
ca_amp = pp;
ppbase(t+1) = ppb;
ppfac(t+1) = ca_amp;
pprel(t+1) = 1-exp(-k*(ca * ca_amp)^exponent);
end
% calculate normalised EPSCs
nresps = resps/resps(1);