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;
// following functions are utilized by the correction function in algorithm.fit
// "global" variables:  ax,bx,cx,IterCount,fa,fb,fc

print "loading numerical routines ....."

// ++++ NUMERICAL ROUTINES ++++


// The following function is a litteral implementation of the MNBRAK.C function
// from Numerical Recipes.  For explanation of the algorithm see the book.
// The only changes are the addition of the initial check for the significant change
// in the value of the LSQ.  Also the function SHFT, used in the original does not
// work in HOC.  Therefore, the shifting operation was implicitly added in the code.


func bracket() { local ulim, u, r, q, fu, dum, GOLD, GLIMIT, TINY,VStepCount

    GOLD=1.618034
    GLIMIT=3.0
    TINY=1.0e-20
    VStepCount=$1
    dum=0
    fa=LSQ_Calc(VStepCount,ax)
    fb=LSQ_Calc(VStepCount,bx)
//  if(abs(fa-fb)<Tolerance/100){
//      print "1 no significant change to LSQ, G is set to zero"
//      cx=-999
//      return cx
//  }
    if (fb>fa){  // invert fa,fb; ax,bx
        dum=ax
        ax=bx
        bx=dum
        dum=fa
        fa=fb
        fb=dum
    }
    cx=bx+GOLD*(bx-ax)
    fc=LSQ_Calc(VStepCount,cx)
//  if(abs(fb-fc)<Tolerance/100){
//      print "2 no significant change to LSQ, G is set to zero"
//      cx=-999
//      return cx
//  }
    while (fb>fc){
        r=(bx-ax)*(fb-fc)
        q=(bx-cx)*(fb-fa)
        dumm=q-r
        if (abs(dumm)<TINY) { print abs(q-r)/(q-r) dumm=TINY*abs(q-r)/(q-r)}
        u=bx-((bx-cx)*q-(bx-ax)*r)/(2*dumm)
        ulim=bx+GLIMIT*(cx-bx)
        if ((bx-u)*(u-cx) > 0.0) {
            fu=LSQ_Calc(VStepCount,u)
            IterCount+=1
            if (fu < fc) {
                ax=bx
                bx=u
                fa=fb
                fb=fu
                return cx
            } else if (fu > fb) {
                cx=u
                fc=fu
                return cx
            }
            u=cx+GOLD*(cx-bx)
            fu=LSQ_Calc(VStepCount,u)
            IterCount+=1
        } else if ((cx-u)*(u-ulim) > 0.0) {
            fu=LSQ_Calc(VStepCount,u)
            IterCount+=1
            if (fu < fc) {

                bx=cx
                cx=u
                u=cx+GOLD*(cx-bx)
                fb=fc
                fc=fu
                fu=LSQ_Calc(VStepCount,u)
                IterCount+=1
            }
        } else if ((u-ulim)*(ulim-cx) >= 0.0) {
            u=ulim
            fu=LSQ_Calc(VStepCount,u)
            IterCount+=1
        } else {
            u=cx+GOLD*(cx-bx)
            fu=LSQ_Calc(VStepCount,u)
            IterCount+=1
        }

        ax=bx
        bx=cx
        cx=u
        fa=fb
        fb=fc
        fc=fu
    }
    return cx
}


// The following function is a literal implementation of the GOLDEN.C function
// from Numerical Reciepes.  The changes are the implicit implementation of
// SHFT2 and SHFT3 into the code and the use of the LSQ_Calc function.  I also
// added the fprint "." lines to enable following the number of iterations.

func golden() { local VStepCount, Ratio, C1, f1,f2,x0,x1,x2,x3,dum

    VStepCount=$1
    Ratio=0.61803399
    C1=1-Ratio


    x0=ax
    x3=cx
    if (abs(cx-bx) > abs(bx-ax)) {
        x1=bx
        x2=bx+C1*(cx-bx)
    } else {
        x2=bx
        x1=bx-C1*(bx-ax)
    }
    f1=LSQ_Calc(VStepCount,x1)
    f2=LSQ_Calc(VStepCount,x2)
    IterCount+=2
    while (abs(x3-x0) > Tolerance*(abs(x1)+abs(x2))) {
        if (f2 < f1) {

            x0=x1
            x1=x2
            x2=Ratio*x1+C1*x3
            f1=f2
            f2=LSQ_Calc(VStepCount,x2)
		if(PrintVerbose==1) printf(".")
		doEvents()
            IterCount+=1
            if (IterCount>numRun) {ax=x2 return x2}
        } else {
            x3=x2
            x2=x1
            x1=Ratio*x2+C1*x0
            f2=f1
            f1=LSQ_Calc(VStepCount,x1)
		if(PrintVerbose==1) printf(".")
		doEvents()
            IterCount+=1
            if (IterCount>numRun) {ax=x1 return x1}
        }
    }
    if (f1 < f2) {
        ax=x1
        return x1
    } else {
        ax=x2
        return x2
    }

}