Shape plot and backpropagating action potential attenuation

NMODL and the Channel Builder.
Post Reply
codonn

Shape plot and backpropagating action potential attenuation

Post by codonn »

I am using morphologically realistic models of entorhinal stellate cells and am looking at signal propagation properties between different denritic arms etc.

The impedance class has been very helpful in generating plots of voltage attenuation vs distance from soma for the steady state, but I am now looking at active AP backpropagation. I've just been using the same membrane conductances as Mainen and Sejnowski (1996) to compare this directly to the paper by Vetter et al. (2001) which compared BAP attenuation in different cell morphologies.

I've calculated the attenuation by inducing a somatic spike, recording the membrane potential at soma and a denritic location, extracting the peak values for each and taking the ratio peak_dend/peak_soma. This is repeated for every point in the cell and all recorded as a vector. I have plotted this successfully against distance from soma.

What I would like to do now is use Shape Plot to plot this measure as a graded colour in the cell (to investigate if dendrite projection location is relevant). Unfortunately I can find no easy way to do this. I thought of three approaches.

First was to import the vector directly to ShapePlot but this fails because you then have to correlate each value with location.
Second was to create a variable which would be associated with each section and set this to the required value and then plot using the GUI. I can't figure out how to create a new variable.
Third was to manually set the colour at each point according to some scale, but I could not figure out a way to plot more than the default 8 colours in the colour index.

Vetter et al. seem to achieve this through assigning a new variable, but I couldn'd decipher their code!

Thanks for any help.

ted
Site Admin
Posts: 5770
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

The simplest solution: use NMODL to create a "distributed mechanism" that keeps track
of the peak depolarization. If this is saved in a range variable, you can then use a
RangeVarPlot* to display the peak depolarization throughout an anatomically complex
model. No need for Vector record.
*--Either make one from hoc, or use the GUI (NEURON Main Menu / Graph / Shape plot,
then click on the shape plot's menu box and select Plot What?, and finally click in that
tool's text field and enter the string
vmax_extr
then click on the Accept button. Then make a space plot or shape plot, and after a
simulation run you'll have a graph of the peak depolarization.

Code: Select all

: Detects max & min of Vm and when they occur

NEURON {
        SUFFIX extr     : for "extrema"
        RANGE vmax, vmin, tmax, tmin
}

ASSIGNED {
        v (millivolt)
        vmin (millivolt)
        tmin (ms)
        vmax (millivolt)
        tmax (ms)
}

INITIAL {
        vmin = v
        tmin = t
        vmax = v
        tmax = t
}

BREAKPOINT {
COMMENT
        if (v < vmin) {
                vmin = v
                tmin = t
        }
        if (v > vmax) {
                vmax = v
                tmax = t
        }
ENDCOMMENT
VERBATIM
        if (v < vmin) {
                vmin = v;
                tmin = t;
        }
        if (v > vmax) {
                vmax = v;
                tmax = t;
        }
ENDVERBATIM
}

codonn

Post by codonn »

Thanks Ted, this worked exactly as I had hoped.

ted
Site Admin
Posts: 5770
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

updated extrema.mod

Post by ted »

Updated extrema.mod--uses AFTER SOLVE, not BREAKPOINT, and has no need for VERBATIM.

Code: Select all

: Detects max & min of Vm and when they occur
: revised Feb 4, 2008

NEURON {
        SUFFIX extr     : for "extrema"
        RANGE vmax, vmin, tmax, tmin
}

ASSIGNED {
        v (millivolt)
        vmin (millivolt)
        tmin (ms)
        vmax (millivolt)
        tmax (ms)
}

INITIAL {
        vmin = v
        tmin = t
        vmax = v
        tmax = t
}

: use AFTER SOLVE, not BREAKPOINT
: no need for VERBATIM
AFTER SOLVE {
        if (v < vmin) {
                vmin = v
                tmin = t
        }
        if (v > vmax) {
                vmax = v
                tmax = t
        }
}
Last edited by ted on Mon Feb 04, 2008 7:37 pm, edited 1 time in total.

thats_karlo
Posts: 108
Joined: Thu Sep 08, 2005 11:49 am

Post by thats_karlo »

Hello,

I have saved last code as extr.mod. But mknrndll gives an error

:Illegal block AFTER_SOLVE


However, instead of space plot, what is the possible way to have same informations in a hoc file? (Ap amplitude V.S distance)


thanks in advance

ted
Site Admin
Posts: 5770
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

thats_karlo wrote:mknrndll gives an error

:Illegal block AFTER_SOLVE
My error. Should have been

Code: Select all

AFTER SOLVE
with no underscore--which I just changed it to.
However, instead of space plot, what is the possible way to have same informations in a hoc file? (Ap amplitude V.S distance)
In pseudocode

Code: Select all

Set a reference point for distance measurements (hint: use distance())
For each section in the model
  For each internal node
    Calculate distance from this node to the reference point
    Report this distance and the maximum (or minimum) value
      of the range variable at this point
The equivalent hoc would look like this

Code: Select all

"statement to set the reference point"
forall for (x,0) { // iterates over each internal node of each section
  "statement that calculates distance from location x
    in currently accessed section to reference point"
  "statement that reports the distance and the maximum
    (or minimum) value of the range variable at this point"
}

Post Reply