Question About Graphing

The basics of how to develop, test, and use models.
Post Reply
dsengupta
Posts: 15
Joined: Tue Jul 10, 2012 4:23 pm

Question About Graphing

Post by dsengupta »

Hi,

I am new to programming in general and this is my first time trying out NEURON. I had a few questions.

I want to model a simple axon model with myelin and without myelin to show how the action potential changes as a signal propagates down the axon. My question is, is there a way to graph voltage vs length? My goal is to show how the action potential degenerates as it travels through a section of myelin and then how it regenerates itself once it hits a node( ion channel).

Another question was about running a myelinated model. I have a simple myelinated model that runs without error but when I go to graph it, the action potential will not show unless I change the initial voltage to -70 for the default of -65 in the GUI. Does anone know why that is?

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

Re: Question About Graphing

Post by ted »

dsengupta wrote:I want to model a simple axon model with myelin and without myelin to show how the action potential changes as a signal propagates down the axon. My question is, is there a way to graph voltage vs length? My goal is to show how the action potential degenerates as it travels through a section of myelin and then how it regenerates itself once it hits a node( ion channel).
You need what is often called a "space plot." See How to plot a variable vs. distance in the Hot tips area of the Forum. You might find it useful to turn on the space plot's "Keep lines" (click on its menu box--in the upper left corner of the graph's canvas--and select the "Keep Lines" item so that a check mark appears next to it), and to reduce "Points plotted /ms" in the RunControl panel from its default 40 to 4, 2, 1, or even 0.5 or less (this will generate a sequence of "snapshots" of v along the axon). You may find it useful to erase traces (Graph menu / Erase) before running a simulation with a different value for "Points plotted/ms".
Another question was about running a myelinated model. I have a simple myelinated model that runs without error but when I go to graph it, the action potential will not show unless I change the initial voltage to -70 for the default of -65 in the GUI.
To answer this question I'll have to be able to reproduce this for myself. Can you zip up just the files that are required to reproduce the observation (read What to include in a zip file, and what to leave out and No rar, doc, or winmail.dat files, please! in the Hot tips area of the NEURON Forum) and send them to me
ted dot carnevale at yale dot edu
?
dsengupta
Posts: 15
Joined: Tue Jul 10, 2012 4:23 pm

Re: Question About Graphing

Post by dsengupta »

Thank you so much for the reply. I will try the space plots and will send you the zip file shortly.
dsengupta
Posts: 15
Joined: Tue Jul 10, 2012 4:23 pm

Re: Question About Graphing

Post by dsengupta »

I was able to get a space plot but that led me to a few more questions.

1. How does NEURON deternime how long the x axis has to be on the graph or is it written somewhere in the program and i'm overlooking it?
2. How do you inject a current/ impulse at a specific point along the axon.

when I am graphing the myelinated model in a space plot, I am getting waves, but when I am running the unmyelinated model I am getting I flat line moving up and down. I think this is because the default x axis of the unmyelinated space plot is much shorter (1000 units) than the myelinated model (35000 units). Does that sound reasonable?

here is the model I am using: (Moore et al 1978)

load_file("nrngui.hoc")

create node[1], myelin[1]
objref nodes, myelins

// topol(nnode) connects an alternating sequence of node/myelin pairs.

proc topol() {local i
nnode = $1
create node[nnode], myelin[nnode-1]
nodes = new SectionList()
myelins = new SectionList()
forsec "node" nodes.append
forsec "myelin" myelins.append
access node[0]
for i=0, nnode-2 {
connect myelin(0), node(1)
connect node[i+1](0), myelin(1)
}

forsec myelins { nseg = 10 }
}

proc geom() {
forsec nodes { // area = 100 um2
L = 3.183
diam = 10
}
forsec myelins {
L = $1
diam = 10
}
}

proc biophys() {local fac
// ohm/cm must be converted to ohm-cm by multiplying by
// cross sectional area
fac = PI*diam^2/4 * 1e-8
forall {
Ra = 100
}
// paper relative to rest=0 but following values relative to -65
forsec nodes {
insert hh
gnabar_hh = 1.2
gkbar_hh = .36
gl_hh = .003
ena = 115 - 65
ek = -12 - 65
cm = 1 // uF/cm2
}
forsec myelins {
insert pas
e_pas = -65
g_pas = 1.5e-6 // S/cm2
cm = .005 // uF/cm2
}
celsius = 18.5
}


proc make() {
topol($1)
geom($2)
biophys()
}

make(20, 2000) // appropriate down to 25um internode length

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

Re: Question About Graphing

Post by ted »

dsengupta wrote:1. How does NEURON deternime how long the x axis has to be on the graph
Figures it out for itself. If you save the graph to a session file (not sure how? see What is a ses (session) file? in NEURON's FAQ list (link is on the Documentation page at http://www.neuron.yale.edu/) and examine the contents of that file, you will see something that looks like this:

Code: Select all

objectvar save_window_, rvp_
 . . . a bunch of code . . .
flush_list.append(save_window_)
save_window_.save_name("flush_list.")
objectvar rvp_
rvp_ = new RangeVarPlot("v")
node[5] rvp_.begin(1)
dend[0] rvp_.end(1)
rvp_.origin(0)
 . . . more code . . .
}
objectvar scene_vector_[1]
{doNotify()}
from which you might infer that the RangeVarPlot class has something to do with it, and reading the Programmer's Reference documentation of that class you would confirm your suspicion--and discover a link to documentation of a hoc function called distance(), which you might also want to read.
How do you inject a current/ impulse at a specific point along the axon.
Use an IClamp. Can be created with hoc statements (see Programmer's reference documentation of the IClamp class) or via the GUI (see
the tutorial Construction and Use of Models: Part 1. Elementary Tools (link is on NEURON's Documentation page)).
when I am graphing the myelinated model in a space plot, I am getting waves, but when I am running the unmyelinated model I am getting I flat line moving up and down. I think this is because the default x axis of the unmyelinated space plot is much shorter (1000 units) than the myelinated model (35000 units).
First a comment: in NEURON the units of length are microns. The behavior of your nonmyelinated model suggests to me that its spatial discretization parameter nseg is 1, so the entire axon is treated as a single compartment. You might try executing
forall nseg*=3
at the oc> prompt, and see how that affects the simulation. To discover an appropriate value for nseg, you might try (in pseudocode)

Code: Select all

REPEAT
  forall nseg*=3
  run a simulation
UNTIL there is no significant change from the previous simulation results
Hint: the keyboard's up arrow can be used to retrieve previous commands.
ted
Site Admin
Posts: 5796
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question About Graphing

Post by ted »

dsengupta wrote:I have a simple myelinated model that runs without error but when I go to graph it, the action potential will not show
The axon does nothing because no stimulus is applied to it.
unless I change the initial voltage to -70 for the default of -65 in the GUI.
This is "anode break excitation," also sometimes called "rebound excitation." The resting potential of the Hodgkin-Huxley squid axon model is -65 mV. Specifying an initial membrane potential of -70 mV is equivalent to injecting hyperpolarizing current throughout the entire model. When the simulation begins, this hyperpolarizing current stops and the membrane potential is free to change. Naturally it tries to return to -65 mV, and this causes both sodium channels and potassium channels to open. However, the sodium channels are faster than the potassium channels, so they generate an inward current that makes the cell's membrane potential depolarize even more, which opens more sodium channels etc., and you get a spike.

If you want to make the model spike at a time that you select, you'll need to drive it with an injected current. An IClamp will do the job. To learn how to do this with the GUI, work through the tutorial
Construction and Use of Models: Part 1. Elementary Tools
(see link on NEURON's Documentation page at http://www.neuron.yale.edu). Alternatively, you can attach an IClamp with hoc statements--see the Programmer's Reference documentation of the IClamp class.
Post Reply