Parameter estimation for Hodgkin-Huxley based models of cortical neurons (Lepora et al. 2011)

 Download zip file 
Help downloading and running models
Accession:136808
Simulation and fitting of two-compartment (active soma, passive dendrite) for different classes of cortical neurons. The fitting technique indirectly matches neuronal currents derived from somatic membrane potential data rather than fitting the voltage traces directly. The method uses an analytic solution for the somatic ion channel maximal conductances given approximate models of the channel kinetics, membrane dynamics and dendrite. This approach is tested on model-derived data for various cortical neurons.
Reference:
1 . Lepora NF, Overton PG, Gurney K (2012) Efficient fitting of conductance-based model neurons from somatic current clamp. J Comput Neurosci 32:1-24 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Neuron or other electrically excitable cell;
Brain Region(s)/Organism:
Cell Type(s): Neocortex V1 L6 pyramidal corticothalamic GLU cell; Neocortex V1 L2/6 pyramidal intratelencephalic GLU cell; Neocortex fast spiking (FS) interneuron; Neocortex spiking regular (RS) neuron; Neocortex spiking low threshold (LTS) neuron;
Channel(s): I Na,t; I L high threshold; I T low threshold; I K; I M;
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: GENESIS; MATLAB;
Model Concept(s): Parameter Fitting; Simplified Models; Parameter sensitivity;
Implementer(s): Lepora, Nathan [n.lepora at shef.ac.uk];
Search NeuronDB for information about:  Neocortex V1 L6 pyramidal corticothalamic GLU cell; Neocortex V1 L2/6 pyramidal intratelencephalic GLU cell; I Na,t; I L high threshold; I T low threshold; I K; I M;
% notes: code modified because of passive fit work;
%        need to run again for active fitting (when revise ms)
%        changes: no dir_sim, corrected tinj error, optional act_param args
%        also to using t as a variable - written out (to check)

function makeCell_1act1pas(id,IV_data,pas_param,act_param,sim_param)

% OPTIONS: plot_XY, plot_IV, save_XY, test

output = []; % output string
diary([id,'.txt'])
disp(' '); disp(['running makeCell_1act1pas at ',date]); disp(' ')
output = [output,id,'.txt, '];

%% load data from file

warning off MATLAB:load:variableNotFound
disp(['loading ',IV_data,'.mat'])
load(IV_data,'tinj','Iinj');
disp(['loading ',pas_param,'.mat'])
load(pas_param,'CM','RM','RA','Em','len','dia');
disp(['loading ',act_param,'.mat'])
load(act_param,'G','chan_list','chan_sc','Vhalf');
disp(['loading ',sim_param,'.mat'])
load(sim_param,'dt_out','dt_sim','tmax','dir_sim','dir_model','option');

% optional arguments
if ~exist('option','var'); option = ''; end
[id_path,id_name] = fileparts(id); 
nodir = ~exist('dir_sim','var'); if nodir; dir_sim = ['output/output_',id_name]; end
dir_model = fileparts(mfilename('fullpath')); 
if ~exist('dt_sim','var'); dt_sim = tinj(2)-tinj(1); end
if ~exist('dt_out','var'); dt_out = dt_sim; end
if ~exist('chan_sc','var'); chan_sc = []; end
if ~exist('Vhalf','var'); Vhalf = []; end
dir_chans = fileparts(mfilename('fullpath')); 

% ensure current trace starts at time zero
ntinj = size(tinj,1); t0 = tinj(1,:);
tinj = tinj - repmat(t0,[ntinj,1]); 

% truncate range
ntinj = max(find(tinj<=tmax)); rtinj = 1:ntinj; 
tinj_data = tinj(rtinj); Iinj_data = Iinj(rtinj,:); 

% ensure chan_sc and Vhalf have nchan elements
nchan = length(chan_list); nsc = size(chan_sc,1); nVh = size(Vhalf,1);
if nsc>nchan; chan_sc(nchan+1:end,:) = []; nsc = nchan; end
chan_sc = [chan_sc; repmat([0,1,1,0,1,1],[nchan-nsc,1])];
if nVh>nchan; Vhalf(nchan+1:end,:) = []; nVh = nchan; end
Vhalf = [Vhalf; repmat([0,0],[nchan-nVh,1])];
for i = 1:nchan; if isempty(fileparts(chan_list{i})); chan_list{i} = [dir_chans,'/',chan_list{i}]; end; end

%% run simulation
simCell_1act1pas(id, tinj_data,Iinj_data, CM,RM,RA,Em,len,dia, G,chan_list,chan_sc,Vhalf, dt_sim,dir_sim,dir_model);
[t_sim,Vm_sim,Iinj_sim] = load_IV(dir_sim);
Vs_sim = squeeze(Vm_sim(:,:,1)); tinj_sim = t_sim;

% correct time shift from genesis timescale 
dt_inj = tinj(2) - tinj(1); fs = ceil(dt_inj/dt_sim); 
t_sim = t_sim - (fs-1)*dt_sim; rt = t_sim>=0; tinj_sim = t_sim;
t_sim = t_sim(rt); Vs_sim = Vs_sim(rt,:); tinj_sim = tinj_sim(rt); Iinj_sim = Iinj_sim(rt,:);

% subsample results to dt_out
fs = fix(dt_out/dt_sim); rt = 1:fs:length(t_sim);
t_sim = t_sim(rt); Vs_sim = Vs_sim(rt,:); tinj_sim = tinj_sim(rt); Iinj_sim = Iinj_sim(rt,:);

%% save and clean up

tinj = tinj_sim; t = t_sim; Iinj = Iinj_sim; Vs = Vs_sim; 
save(id, 'tinj','Iinj','t','Vs')  
disp(['saving results: ',id,'.mat'])
output = [output,id,'.mat, '];

% option: plot results
if strfind(option,'plot_XY'); plot_XY(id,dir_sim); output = [output,id,'_XY.jpg, ']; end
if strfind(option,'plot_IV'); plot_IV(id,dir_sim); output = [output,id,'_IV.jpg, ']; end
if strfind(option,'save_XY'); save_XY(id,dir_chan); end

% clean up
if isempty(strfind(option,'test')); rmdir(dir_sim,'s'); end

% CARMEN output
disp(' ')
disp(['<output>',output(1:end-2),'<\output>'])
diary off

end

Loading data, please wait...