Hi!
I would like to know if it is possible to measure the distance of a gap junction/synapse from a given section of the cell. I used the distance() function, but an error occured: "distance not a public member of Gap". I interpreted the gap.mod from The NEURON Book. What would be a proper solution?
Thank you for your answer in advance!
Measuring the distance of a synapse
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Measuring the distance of a synapse
What was the hoc code that generated the error message?
Re: Measuring the distance of a synapse
objref vec
vec = new Vector()
proc dist_gap(){
access soma
distance()
for i=0,3{
vec.append(g.distance())
}
}
vec = new Vector()
proc dist_gap(){
access soma
distance()
for i=0,3{
vec.append(g.distance())
}
}
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Measuring the distance of a synapse
Well, there's your problem. The error message was right. The documentation of "distance" in the Programmer's Reference says
It only talks about points on sections. Says nothing about gap junctions or anything else. For example, to find the distance between the 0 end of soma and the midpoint of dend[25], you'd do
soma distance()
dend[25] { print distance(0.5) }
By the way, code should only contain one access statement. Read about that in the "Hot tips" area of the NEURON Forum
viewforum.php?f=28
in this thread:
Use only one "access" statement
Code: Select all
distance() with no arguments
specifies the origin as location 0 of the currently accessed section.
distance(x) (0<=x<=1)
returns the distance (in microns) from the origin to this point on the currently accessed section
soma distance()
dend[25] { print distance(0.5) }
By the way, code should only contain one access statement. Read about that in the "Hot tips" area of the NEURON Forum
viewforum.php?f=28
in this thread:
Use only one "access" statement
Re: Measuring the distance of a synapse
Thank you for the correction!
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Measuring the distance of a synapse
Thanks for using NEURON.
Re: Measuring the distance of a synapse
I have a further question of the location and the connection of the gap junctions.
I located them on the two different cells which I would like to connect, but it was not successful.
1) the distance() function - with 0.5 in the argument -returns with "1e+20" (which means there are no continuous path between the soma and the gap junction according to the programmer's reference)
2) after injecting a depolarizing current (IClamp), only one cell (the one which received the injection directly) was depolarized, the other cell's membrane potential remains at the resting level.
I think I made some mistakes on the location of the gap junctions, but unfortunately I'm not able to figure it out.
My code if the following, where dendb and dendr are the two different dendrites of the two cells which I would like to connect. The .mod file of the gap junction is still the same from the NEURON Book.
I located them on the two different cells which I would like to connect, but it was not successful.
1) the distance() function - with 0.5 in the argument -returns with "1e+20" (which means there are no continuous path between the soma and the gap junction according to the programmer's reference)
2) after injecting a depolarizing current (IClamp), only one cell (the one which received the injection directly) was depolarized, the other cell's membrane potential remains at the resting level.
I think I made some mistakes on the location of the gap junctions, but unfortunately I'm not able to figure it out.
My code if the following, where dendb and dendr are the two different dendrites of the two cells which I would like to connect. The .mod file of the gap junction is still the same from the NEURON Book.
Code: Select all
objref g[4]
for i=0,3 {
g[i] = new Gap(0.5)
g[i].g = 3
}
dendb[126] g[0].loc(0.953)
dendr[3] g[1].loc(0.409)
setpointer g[0].vgap, dendr[3].v(0.409)
setpointer g[1].vgap, dendb[126].v(0.953)
dendb[76] g[2].loc(0.793)
dendr[111] g[3].loc(0.594)
setpointer g[2].vgap, dendr[111].v(0.594)
setpointer g[3].vgap, dendb[76].v(0.793)
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Measuring the distance of a synapse
That is as expected if a point process is attached to one cell and you try to measure the distance between that location and the soma of the other cell.miklos wrote:I located them on the two different cells which I would like to connect, but it was not successful.
1) the distance() function - with 0.5 in the argument -returns with "1e+20" (which means there are no continuous path between the soma and the gap junction according to the programmer's reference)
Have you examined the gap junction mechanisms' i variables? If the i variables are zero, did you examine the membrane potentials on the two sides of each gap to verify that your current injection changes at least one of them?2) after injecting a depolarizing current (IClamp), only one cell (the one which received the injection directly) was depolarized, the other cell's membrane potential remains at the resting level.
Re: Measuring the distance of a synapse
I examined the variables, and the problem is solved now. Thank you!