Skip to content

Commit

Permalink
Upload files
Browse files Browse the repository at this point in the history
  • Loading branch information
fotisdr committed Dec 4, 2020
0 parents commit 9a2ae1e
Show file tree
Hide file tree
Showing 75 changed files with 136,412 additions and 0 deletions.
Binary file added Dierich2020/ihc.h5
Binary file not shown.
1 change: 1 addition & 0 deletions Dierich2020/ihc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"class_name": "Model", "config": {"name": "model_3", "layers": [{"name": "bmm_input", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 2560, 201], "dtype": "float32", "sparse": false, "name": "bmm_input"}, "inbound_nodes": []}, {"name": "model_2", "class_name": "Model", "config": {"name": "model_2", "layers": [{"name": "input_2", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 2560, 201], "dtype": "float32", "sparse": false, "name": "input_2"}, "inbound_nodes": []}, {"name": "reshape_3", "class_name": "Reshape", "config": {"name": "reshape_3", "trainable": true, "dtype": "float32", "target_shape": [2560, 201, 1]}, "inbound_nodes": [[["input_2", 0, 0, {}]]]}, {"name": "conv2d_4", "class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["reshape_3", 0, 0, {}]]]}, {"name": "activation_6", "class_name": "Activation", "config": {"name": "activation_6", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_4", 0, 0, {}]]]}, {"name": "conv2d_5", "class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_6", 0, 0, {}]]]}, {"name": "activation_7", "class_name": "Activation", "config": {"name": "activation_7", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_5", 0, 0, {}]]]}, {"name": "conv2d_6", "class_name": "Conv2D", "config": {"name": "conv2d_6", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_7", 0, 0, {}]]]}, {"name": "activation_8", "class_name": "Activation", "config": {"name": "activation_8", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_6", 0, 0, {}]]]}, {"name": "conv2d_transpose_4", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_4", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["activation_8", 0, 0, {}]]]}, {"name": "activation_9", "class_name": "Activation", "config": {"name": "activation_9", "trainable": true, "dtype": "float32", "activation": "sigmoid"}, "inbound_nodes": [[["conv2d_transpose_4", 0, 0, {}]]]}, {"name": "concatenate_3", "class_name": "Concatenate", "config": {"name": "concatenate_3", "trainable": true, "dtype": "float32", "axis": -1}, "inbound_nodes": [[["activation_9", 0, 0, {}], ["conv2d_5", 0, 0, {}]]]}, {"name": "conv2d_transpose_5", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_5", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["concatenate_3", 0, 0, {}]]]}, {"name": "activation_10", "class_name": "Activation", "config": {"name": "activation_10", "trainable": true, "dtype": "float32", "activation": "sigmoid"}, "inbound_nodes": [[["conv2d_transpose_5", 0, 0, {}]]]}, {"name": "concatenate_4", "class_name": "Concatenate", "config": {"name": "concatenate_4", "trainable": true, "dtype": "float32", "axis": -1}, "inbound_nodes": [[["activation_10", 0, 0, {}], ["conv2d_4", 0, 0, {}]]]}, {"name": "conv2d_transpose_6", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_6", "trainable": true, "dtype": "float32", "filters": 1, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["concatenate_4", 0, 0, {}]]]}, {"name": "reshape_4", "class_name": "Reshape", "config": {"name": "reshape_4", "trainable": true, "dtype": "float32", "target_shape": [2560, 201]}, "inbound_nodes": [[["conv2d_transpose_6", 0, 0, {}]]]}, {"name": "cropping1d_2", "class_name": "Cropping1D", "config": {"name": "cropping1d_2", "trainable": true, "dtype": "float32", "cropping": [256, 256]}, "inbound_nodes": [[["reshape_4", 0, 0, {}]]]}], "input_layers": [["input_2", 0, 0]], "output_layers": [["cropping1d_2", 0, 0]]}, "inbound_nodes": [[["bmm_input", 0, 0, {}]]]}], "input_layers": [["bmm_input", 0, 0]], "output_layers": [["model_2", 1, 0]]}, "keras_version": "2.3.1", "backend": "tensorflow"}
1 change: 1 addition & 0 deletions Dierich2020/ihc_1cf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"class_name": "Model", "config": {"name": "model_5", "layers": [{"name": "bmm_input", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 2560, 1], "dtype": "float32", "sparse": false, "name": "bmm_input"}, "inbound_nodes": []}, {"name": "model_4", "class_name": "Model", "config": {"name": "model_4", "layers": [{"name": "input_3", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 2560, 1], "dtype": "float32", "sparse": false, "name": "input_3"}, "inbound_nodes": []}, {"name": "reshape_5", "class_name": "Reshape", "config": {"name": "reshape_5", "trainable": true, "dtype": "float32", "target_shape": [2560, 1, 1]}, "inbound_nodes": [[["input_3", 0, 0, {}]]]}, {"name": "conv2d_7", "class_name": "Conv2D", "config": {"name": "conv2d_7", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["reshape_5", 0, 0, {}]]]}, {"name": "activation_11", "class_name": "Activation", "config": {"name": "activation_11", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_7", 0, 0, {}]]]}, {"name": "conv2d_8", "class_name": "Conv2D", "config": {"name": "conv2d_8", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_11", 0, 0, {}]]]}, {"name": "activation_12", "class_name": "Activation", "config": {"name": "activation_12", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_8", 0, 0, {}]]]}, {"name": "conv2d_9", "class_name": "Conv2D", "config": {"name": "conv2d_9", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_12", 0, 0, {}]]]}, {"name": "activation_13", "class_name": "Activation", "config": {"name": "activation_13", "trainable": true, "dtype": "float32", "activation": "tanh"}, "inbound_nodes": [[["conv2d_9", 0, 0, {}]]]}, {"name": "conv2d_transpose_7", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_7", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["activation_13", 0, 0, {}]]]}, {"name": "activation_14", "class_name": "Activation", "config": {"name": "activation_14", "trainable": true, "dtype": "float32", "activation": "sigmoid"}, "inbound_nodes": [[["conv2d_transpose_7", 0, 0, {}]]]}, {"name": "concatenate_5", "class_name": "Concatenate", "config": {"name": "concatenate_5", "trainable": true, "dtype": "float32", "axis": -1}, "inbound_nodes": [[["activation_14", 0, 0, {}], ["conv2d_8", 0, 0, {}]]]}, {"name": "conv2d_transpose_8", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_8", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["concatenate_5", 0, 0, {}]]]}, {"name": "activation_15", "class_name": "Activation", "config": {"name": "activation_15", "trainable": true, "dtype": "float32", "activation": "sigmoid"}, "inbound_nodes": [[["conv2d_transpose_8", 0, 0, {}]]]}, {"name": "concatenate_6", "class_name": "Concatenate", "config": {"name": "concatenate_6", "trainable": true, "dtype": "float32", "axis": -1}, "inbound_nodes": [[["activation_15", 0, 0, {}], ["conv2d_7", 0, 0, {}]]]}, {"name": "conv2d_transpose_9", "class_name": "Conv2DTranspose", "config": {"name": "conv2d_transpose_9", "trainable": true, "dtype": "float32", "filters": 1, "kernel_size": [16, 1], "strides": [2, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null, "output_padding": null}, "inbound_nodes": [[["concatenate_6", 0, 0, {}]]]}, {"name": "reshape_6", "class_name": "Reshape", "config": {"name": "reshape_6", "trainable": true, "dtype": "float32", "target_shape": [2560, 1]}, "inbound_nodes": [[["conv2d_transpose_9", 0, 0, {}]]]}, {"name": "cropping1d_4", "class_name": "Cropping1D", "config": {"name": "cropping1d_4", "trainable": true, "dtype": "float32", "cropping": [256, 256]}, "inbound_nodes": [[["reshape_6", 0, 0, {}]]]}], "input_layers": [["input_3", 0, 0]], "output_layers": [["cropping1d_4", 0, 0]]}, "inbound_nodes": [[["bmm_input", 0, 0, {}]]]}], "input_layers": [["bmm_input", 0, 0]], "output_layers": [["model_4", 1, 0]]}, "keras_version": "2.3.1", "backend": "tensorflow"}
Binary file added Dierich2020/reference/CurrPar.mat
Binary file not shown.
137 changes: 137 additions & 0 deletions Dierich2020/reference/IHC_model.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
function [Vm,MET,K74,Kf,K18,K11,K12,Kn]=IHC_model(mu,fs,block_list)

% Inner hair cell model including 6 distinct basolateral K+ channels

% Script supplementing:
% "Dierich et al., Optimized Tuning of Auditory Inner Hair Cells to Encode Complex Sound through
% Synergistic Activity of Six Independent K+ Current Entities", Cell Reports (2020) 32, 107869
% https://doi.org/10.1016/j.celrep.2020.107869
% For fair use only.


% inputs:
% mu - signal representing stereocilia vibration
% fs - sampling frequency
% block_list - list of currents to be made voltage independent (see
% example)
% {'Kf','Kn','K11','K12',K74','K18'}
%Kf - BK fast K+ channels
%K74 -> Kv7.4 (Ik,s)
%Kn -> Kv7.4 (Ik,n)
%K11 -> Kv11.1
%K18 -> Kv1.8
%K12 -> Kv12.1

%outputs
% Vm - membrane potential
% MET - MET current
% K74... Kn - the current flowing in the various K+ channels

if nargin<3
block_list={};
end
filename='IHC_param';
run(filename)
dt=1/fs;

% coefficient for including activation time constants.
% Numerical calculations based on the impulse invariance method
% https://en.wikipedia.org/wiki/Impulse_invariance
alphakf=exp(-dt/tauKf);
alphak18=exp(-dt/tauK18);
alphakn=exp(-dt/tauKn);
alphak11=exp(-dt/tauK11);
alphak12=exp(-dt/tauK12);
alphaMet=exp(-dt/tauMet);


% initial parameters
V=-53e-3; %start with values obtained using a close approximation of resting potential
mkf=1/(1+exp(-(V-Xkf)/SKf));
mk74=1/(1+exp(-(V-Xk74)/SK74));
mkn=1/(1+exp(-(V-Xkn)/SKn));
mk11=1/(1+exp(-(V-Xk11)/SK11));
mk18=1/(1+exp(-(V-Xk18)/SK18));
mk12=1/(1+exp(-(V-Xk12)/SK12));

Vm=zeros(size(mu));
MET=zeros(size(mu));
K74=zeros(size(mu));
Kn=zeros(size(mu));
K11=zeros(size(mu));
K18=zeros(size(mu));
K12=zeros(size(mu));
Kf=zeros(size(mu));
mu=[zeros(100e-3*fs,1)' mu]; %input (cilia vibrations) padded with 100 ms of silence
mtIn=1./(1+exp((x0-mu)./s1).*(1+exp((x0-mu)./s0)));
mt=1./(1+exp((x0-0)./s1).*(1+exp((x0-0)./s0)));

% run 100 ms of silence before running the stimulus,
% to be sure to start with the model at Equilibrium
for i=1:100e-3*fs
mt=alphaMet*mt+(1-alphaMet)*mtIn(i); %met activation
Imet=(Gmet*mt)*(V-EP); %met current
Ileak=Gleak*(V); %Leak current (0 in this model)
mkf=1/(1+exp(-(V-Xkf)/SKf))*(1-alphakf)+mkf*alphakf; %activation of the channels
mk74=1/(1+exp(-(V-Xk74)/SK74))*(1-alphakn)+mk74*alphakn;
mkn=1/(1+exp(-(V-Xkn)/SKn))*(1-alphakn)+mkn*alphakn;
mk11=1/(1+exp(-(V-Xk11)/SK11))*(1-alphak11)+mk11*alphak11;
mk18=1/(1+exp(-(V-Xk18)/SK18))*(1-alphak18)+mk18*alphak18;
mk12=1/(1+exp(-(V-Xk12)/SK12))*(1-alphak12)+mk12*alphak12;
Ikf=GKf*mkf*(V-Ek); %currents
Ik74=GK74*mk74*(V-Ek);
Ikn=GKn*mkn*(V-Ek);
Ik11=GKv11*mk11*(V-Ek);
Ik12=GKv12*mk12*(V-Ek);
Ik18=GKv18*mk18*(V-Ek);
Ik=Ikf+Ik74+Ikn+Ik11+Ik12+Ik18; %total K+ current
dV=-(Ileak+Imet+Ik)/Cm; % Update the IHC potential
V=V+dV*dt;
end
% here run the model with the input stimulus
mtIn=mtIn(100e-3*fs+1:end);
for i=1:length(mtIn)
mt=alphaMet*mt+(1-alphaMet)*mtIn(i);
Imet=(Gmet*mt)*(V-EP);
Ileak=Gleak*(V);
% "blocked" channels are not voltage dependent,
% their activation is that at the resting potential
if(~any(strcmp('Kf',block_list)))
mkf=1/(1+exp(-(V-Xkf)/SKf))*(1-alphakf)+mkf*alphakf;
end
if(~any(strcmp('K74',block_list)))
mk74=1/(1+exp(-(V-Xk74)/SK74))*(1-alphakn)+mk74*alphakn;
end
if(~any(strcmp('Kn',block_list)))
mkn=1/(1+exp(-(V-Xkn)/SKn))*(1-alphakn)+mkn*alphakn;
end
if(~any(strcmp('K11',block_list)))
mk11=1/(1+exp(-(V-Xk11)/SK11))*(1-alphak11)+mk11*alphak11;
end
if(~any(strcmp('K18',block_list)))
mk18=1/(1+exp(-(V-Xk18)/SK18))*(1-alphak18)+mk18*alphak18;
end
if(~any(strcmp('K12',block_list)))
mk12=1/(1+exp(-(V-Xk12)/SK12))*(1-alphak12)+mk12*alphak12;
end
Ikf=GKf*mkf*(V-Ek);
Ik74=GK74*mk74*(V-Ek);
Ikn=GKn*mkn*(V-Ek);
Ik11=GKv11*mk11*(V-Ek);
Ik12=GKv12*mk12*(V-Ek);
Ik18=GKv18*mk18*(V-Ek);
Ik=Ikf+Ik74+Ikn+Ik11+Ik12+Ik18;
dV=-(Ileak+Imet+Ik)/Cm;
V=V+dV*dt;

K74(i)=Ik74; % Save the output variables
Kn(i)=Ikn;
K11(i)=Ik11;
K18(i)=Ik18;
K12(i)=Ik12;
Kf(i)=Ikf;
MET(i)=Imet;
Vm(i)=V;
end


30 changes: 30 additions & 0 deletions Dierich2020/reference/IHC_param.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% Script supplementing:
% "Dierich et al., Optimized Tuning of Auditory Inner Hair Cells to Encode Complex Sound through
% Synergistic Activity of Six Independent K+ Current Entities", Cell Reports (2020) 32, 107869
% https://doi.org/10.1016/j.celrep.2020.107869
% For fair use only.

Cm=9.8e-12;

load CurrPar.mat
Gmet=30e-9; %MET channel max conductance
s0=16e-9; % Parameters of Boltzmann nonlinearity describing MET channels, \
s1=s0*3; %for details see Appendix A of Altoe et al. (2018) Hear. Res. 364, 68-80
x0=20e-9;
Gleak=0e-9; % no membrane leakage
tauMet=50e-6; % time constant of activation of MET channels

EP=90e-3; % Endocochlear potential
Ek=-70e-3; % K+ reversal potential

GKv11=GKv11*Cm/1e-12; %Max. conductance of the various channel, see "IHC_model.m" for details
GKv18=GKv18*Cm/1e-12;
GK74=GK74*Cm/1e-12;
GKn=GKn*Cm/1e-12;
GKf=GKf*Cm/1e-12;
GKv12=GKv12*Cm/1e-12;

tot_K=GKv11+GKv12+GKv18+GK74+GKn+GKf; %total K+ conductance

tauKf=0.3e-3; % time constant of Fast-activating K+ channels, based on Kros and Crawford (1990), J. Physiol. 421, 263-291
Ileak=0.0e-9; % no leakage currents

0 comments on commit 9a2ae1e

Please sign in to comment.