I have the morphologic data of a neuron in hoc format.
Because I need of a very detailed spatial and temporal information of axial currents on each point of the neuron, I have fixed the number of compartments of each section to the number of segments of the reconstructed section.
Now I need to build a list, for the whole neuron, of the coordinates (x,y,z) of the extremes of each segment, it's diameter(that is constant for each segment), and the names of the parent and child segments.
How can i do this?
I tried to do it in this way but i'm not sure
forall for i=0, n3d()-2 {
print x3d(i),y3d(i),z3d(i),x3d(i+1),y3d(i+1),z3d(i+1),diam3d(i),secname(i),secname(i+1)
}
I have not the swc file of the neuron. With this file the creation of the list is more simple. There exist a way to create a swc file from a hoc file?
Thank you for your help,
Antonio C.
Parent and child section names. How?
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Parent and child section names. How?
Sometimes the best answer to a question is another question.
easiest way to determine membrane current is to insert the extracellular mechanism,
which reports membrane current density as the range variable i_membrane--see
http://www.neuron.yale.edu/neuron/stati ... racellular
accuracy, this is almost certainly the wrong way to do it. There is no necessary
relationship between the number of points at which xyzdiam measurements were
made, and the fineness of the spatial grid that is needed for accurate simulations.
Two examples underscore this point:
1. Imagine a long, straight, unbranched neurite with nearly constant diameter. Only two
xyzdiam measurements are needed in the morphometric data file, but for spatial
accuracy a computational model of such a neurite may require multiple compartments.
2. Morphometric data files frequently contain many xyzdiam measurements that are
separated by < 10 um, and measurements at intervals of < 1 um are not unheard of.
Sometimes there are 2 or more measurements at the same xyz locaton! Yet numerically
accurate simulations almost never require compartments as short as 10 um.
"Ah, but there are neurites that have lots of wiggles, like this _/\/\/\______"
Well, if all those little zigzags are going to make a big difference to your simulation
results, then you can't use a single section to represent such a neurite. You'll have
to turn every adjacent pair of xyzdiam measurements into a separate section.
The computationally efficient alternative is to represent such a neurite with a single
section, and use the d_lambda rule (see
https://www.neuron.yale.edu/phpBB2/view ... ht=dlambda )
to determine what the discretization parameter nseg should be. Run a "baseline
simulation," then execute the command
forall nseg*=3
and run another simulation and compare it against the baseline results. If you see a
significant difference, triple nseg again and run yet another simulation. Repeat until
you are satisfied that you have found a multiple that achieves adequate accuracy.
NEURON's simulations are second order accurate in space, so tripling nseg reduces
spatial error by almost an order of magnitude. That should be sufficient to reveal
whether the spatial grid is fine enough.
the ends of segments. If you must have a model whose compartments capture all of
the messy twists and turns of the original morphometric data, you will absolutely have
to turn every adjacent pair of xyz measurements into a separate neurite. Then, for any
section that has nseg == 1, the xyz values will be the coordinates of the segment's
ends. For any section that has nseg>1, you will have to interpolate segment boundaries
from the value of nseg and the coordinates of the section ends.
secname for (x, 0) print diam(x)
will report the effective diameter of each segment. At least that part is easy.
The SectionRef class allows you to determine the parent and children of a section.
http://www.neuron.yale.edu/neuron/stati ... ecref.html
Is it your ultimate goal to simulate the extracellular field generated by a cell? If so, theI need of a very detailed spatial and temporal information of axial currents on each point of the neuron
easiest way to determine membrane current is to insert the extracellular mechanism,
which reports membrane current density as the range variable i_membrane--see
http://www.neuron.yale.edu/neuron/stati ... racellular
If your aim is to produce simulations that achieve a high degree of spatiotemporalBecause I need of a very detailed spatial and temporal information of axial currents on each point of the neuron, I have fixed the number of compartments of each section to the number of segments of the reconstructed section.
accuracy, this is almost certainly the wrong way to do it. There is no necessary
relationship between the number of points at which xyzdiam measurements were
made, and the fineness of the spatial grid that is needed for accurate simulations.
Two examples underscore this point:
1. Imagine a long, straight, unbranched neurite with nearly constant diameter. Only two
xyzdiam measurements are needed in the morphometric data file, but for spatial
accuracy a computational model of such a neurite may require multiple compartments.
2. Morphometric data files frequently contain many xyzdiam measurements that are
separated by < 10 um, and measurements at intervals of < 1 um are not unheard of.
Sometimes there are 2 or more measurements at the same xyz locaton! Yet numerically
accurate simulations almost never require compartments as short as 10 um.
"Ah, but there are neurites that have lots of wiggles, like this _/\/\/\______"
Well, if all those little zigzags are going to make a big difference to your simulation
results, then you can't use a single section to represent such a neurite. You'll have
to turn every adjacent pair of xyzdiam measurements into a separate section.
The computationally efficient alternative is to represent such a neurite with a single
section, and use the d_lambda rule (see
https://www.neuron.yale.edu/phpBB2/view ... ht=dlambda )
to determine what the discretization parameter nseg should be. Run a "baseline
simulation," then execute the command
forall nseg*=3
and run another simulation and compare it against the baseline results. If you see a
significant difference, triple nseg again and run yet another simulation. Repeat until
you are satisfied that you have found a multiple that achieves adequate accuracy.
NEURON's simulations are second order accurate in space, so tripling nseg reduces
spatial error by almost an order of magnitude. That should be sufficient to reveal
whether the spatial grid is fine enough.
x3d() etc. are the raw morphometric data. They are not the same as the coordinates ofNow I need to build a list, for the whole neuron, of the coordinates (x,y,z) of the extremes of each segment, it's diameter(that is constant for each segment), and the names of the parent and child segments.
the ends of segments. If you must have a model whose compartments capture all of
the messy twists and turns of the original morphometric data, you will absolutely have
to turn every adjacent pair of xyz measurements into a separate neurite. Then, for any
section that has nseg == 1, the xyz values will be the coordinates of the segment's
ends. For any section that has nseg>1, you will have to interpolate segment boundaries
from the value of nseg and the coordinates of the section ends.
secname for (x, 0) print diam(x)
will report the effective diameter of each segment. At least that part is easy.
The SectionRef class allows you to determine the parent and children of a section.
http://www.neuron.yale.edu/neuron/stati ... ecref.html
Not that I know of.I have not the swc file of the neuron. With this file the creation of the list is more simple. There exist a way to create a swc file from a hoc file?
1-why, when we use d_lambda rule again we need to change nseg forall ?d_lambda rule to determine what the discretization parameter nseg should be. Run a "baseline simulation," then execute the command
forall nseg*=3 and run another simulation and compare it against the baseline results. If you see a significant difference, triple nseg again and run yet another simulation. Repeat until you are satisfied that you have found a multiple that achieves adequate accuracy.