Correcting space clamp in dendrites (Schaefer et al. 2003 and 2007)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:22203
In voltage-clamp experiments, incomplete space clamp distorts the recorded currents, rendering accurate analysis impossible. Here, we present a simple numerical algorithm that corrects such distortions. The method enabled accurate retrieval of the local densities, kinetics, and density gradients of somatic and dendritic channels. The correction method was applied to two-electrode voltage-clamp recordings of K currents from the apical dendrite of layer 5 neocortical pyramidal neurons. The generality and robustness of the algorithm make it a useful tool for voltage-clamp analysis of voltage-gated currents in structures of any morphology that is amenable to the voltage-clamp technique.
Reference:
1 . Schaefer AT, Helmstaedter M, Sakmann B, Korngreen A (2003) Correction of conductance measurements in non-space-clamped structures: 1. Voltage-gated K+ channels. Biophys J 84:3508-28 [PubMed]
2 . Schaefer AT, Helmstaedter M, Schmitt AC, Bar-Yehuda D, Almog M, Ben-Porat H, Sakmann B, Korngreen A (2007) Dendritic voltage-gated K+ conductance gradient in pyramidal neurones of neocortical layer 5B from rats. J Physiol 579:737-52 [PubMed]
Citations  Citation Browser
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 M1 L5B pyramidal pyramidal tract GLU cell;
Channel(s): I K; I K,leak; I M; I Potassium;
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEURON;
Model Concept(s): Parameter Fitting; Influence of Dendritic Geometry; Detailed Neuronal Models;
Implementer(s): Schaefer, Andreas T [andreas.schaefer at crick.ac.uk];
Search NeuronDB for information about:  Neocortex M1 L5B pyramidal pyramidal tract GLU cell; I K; I K,leak; I M; I Potassium;
print "loading correction algorithm routines ....."

// ++++ ROUTINES FOR CORRECTION ALGORITHM ++++

// Global Display Variables

DisplayT=0
DisplayV=0
DisplayG=0
objref g1,g2, g3 , g4, g5
strdef NullStr
  
IterCount=0
fa=0
fb=0
fc=0
ax=0
bx=0
cx=0
offset=1
measTime=0
FitTPoint=0
ImageCount=1
DummCount=1
// ("global" variables for correction routines in this and following files)



proc Correct() {local g, VCount,VStepCountB, VStepCount, FitTStepCount, TStepCount

  for VStepCountB=0,gDKVRange-1 {
    for TStepCount=0,gbarTRes*MaxMeasTime-1 gbar[VStepCountB][TStepCount]=0
  } // initializing gbar-array

  ReadIC_and_leak(ExperimentName,LeakFileName)
  g3.label(0.5,0.9,"Corrected Conductances",2, 1, 0.5, 0.5, 1)
                   
  for FitTStepCount=0,NumFitTPoints {  // only fitting at previously defined timepoints out of MeasTimes-Array
  	FitTPoint =FitTPoints[FitTStepCount]
  	measTime=MeasTimes[FitTPoint]     // converted into real meas time
  	measTime_gDKkin3 = measTime


  	for (VStepCount=FirstVStep;VStepCount*VStepDirection<=LastVStep;VStepCount+=VStepDirection*1) {
    		VProtocol.x[VProtocolNumSteps-1]=vclmp[VStepCount] 
    		g3.beginline()    


      		if (PrintVerbose==1) print "V : ",vclmp[VStepCount],"  i total : ",iclmp[VStepCount][FitTPoint]+leak[VStepCount][FitTPoint],  " i-leak: ",iclmp[VStepCount][FitTPoint], " t : ", measTime
      		DisplayV=vclmp[VStepCount]
      		DisplayT=measTime
      		for VCount=0,gDKVRange-1 gv_gDKkin3[VCount]=gbar[VCount][gbarTRes*measTime]  // initialize gv in gDK.mod at current time


      		offset=1
      		if (UseOffset) for VOffsetCount=0,NumVOffsets-1 {   // the area of voltage attenuation used
        		if (vclmp[VStepCount]>VOffset[VOffsetCount*2])   offset = VOffset[VOffsetCount*2+1]
      			}

      		ax=50*abs(iclmp[VStepCount][FitTPoint]/(vclmp[VStepCount]-revPot))  // first guess(Ohm)
      		bx=ax*1.5
      		IterCount=3
      		cx=bracket(VStepCount)
      		if (PrintVerbose==1) print "Bracketed minimum in ", IterCount, " Function evaluations"
      		IterCount=0
      		if(PrintVerbose==1) printf ("Minimizing")
		//g5.erase()
		g5.flush()
     		g=golden(VStepCount)
      		DisplayG=UpdateGbarArrays(VStepCount,g)
      		g3.color(3)      
      		g3.mark(measTime, abs(DisplayG),"O",4)
      		g3.flush() 
		g5.erase()    
      		doNotify()
      		if (PrintVerbose==1) printf ("\nConverged to a conductance of %7.4f pS/micron^2  in %4.0f iterations\n",abs(g), IterCount)
    	} // running over voltage
    	sprint(GFileName,"Output/%s.g",ExperimentName)  // for saving data if runtime error occurs
    	Write(GFileName)
    	g3.exec_menu("View = plot")
  } // running over time
  sprint(GFileName,"Output/%s.g",ExperimentName)
  Write(GFileName)

}


func LSQ_Calc() { local VStepCount,G, delta, cI
  VStepCount=$1
  G=abs($2)  // best guess so far
  UpdateGbarArrays(VStepCount,G)
  cI =  ClampCurr()
  delta = ((cI-leak[VStepCount][FitTPoint])-iclmp[VStepCount][FitTPoint])^2
  if (DebugOn==4) if (VStepCount>4) forall print "G: ",G,"gk:",gk_gDKkin3,"tau_gdk:",tau_gDKkin3[v+VoltageOffset_gDKkin3],"cI: ",cI," cI-leak:",cI-leak[VStepCount][FitTPoint],"ref-iclmp: ",iclmp[VStepCount][FitTPoint]
  doEvents()
  return delta
}


func UpdateGbarArrays() { local VStepCount,G,VCount,interpolStepCount,trueVoltage, trueVPointer,vStep
    // updates gbar[] and gv[]-Arrays from current VStep ($1) on due to new estimated G($2)
  VStepCount=$1
  G=abs($2)
  trueVoltage=vclmp[VStepCount-offset]  //  interpolate over a range of voltages due to voltage-attenuation
  TrueVPointer=trueVoltage+gDKVPointerConverter  //  pointer-conversion for gbar[] and gv[]
  vStep=VStep   // set in ParameterFile
  // INTERPOLATION of Gs:
  for VCount=TrueVPointer+1,gDKVRange-1 {
    interpolStepCount=VCount-TrueVPointer
    gv_gDKkin3[VCount]= gv_gDKkin3[TrueVPointer]+(G-gv_gDKkin3[TrueVPointer])/vStep/offset*interpolStepCount
    if (gv_gDKkin3[VCount]<0) gv_gDKkin3[VCount]=0
    gbar[VCount][gbarTRes*measTime]=gv_gDKkin3[VCount]
    
  }
  
   trueVoltage=vclmp[VStepCount]
   TrueVPointer=trueVoltage+gDKVPointerConverter
   
  for VCount=40, TrueVPointer {	
  	g5.mark(VCount-gDKVPointerConverter,gv_gDKkin3[VCount],"o",2)
  }
   
   return gbar[TrueVPointer][gbarTRes*measTime]
}


    xopen("Minimize.Algorithm.fit")  // includes numerical routines