sectioning neuron based on distance from soma

The basics of how to develop, test, and use models.
Posts: 13
Joined: Wed Oct 24, 2018 12:09 pm

sectioning neuron based on distance from soma

Hello,
I have a granule cell that was built and then imported to Neuron. Everything came out beautiful in the hoc code but now I want to section the neuron into thirds based on distance from the soma.

I want to make a Proximal, Middle and Distal group so I can specify the channels on each.
Is there a simple way to define this?
I was trying to use the distance() function discussed on other threads, unsuccessfully.
Kind Regards,
Laura
ted
Posts: 5897
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: sectioning neuron based on distance from soma

In order to provide a useful answer, I must ask you to refine your question.
based on distance from the soma . . .
I want to make a Proxima, Middle and Distal group
Question 1: Groups of what? Sections?
Questions 2 and 3: Based on distance of what from the soma? Section midpoint? proximal end? distal end? Also, the soma is not vanishingly small. What location in the soma is supposed to be the reference point for distance measurements? Some midpoint, 0 end, 1 end?
Questions 4, 5, and 6: What distance measure do you want--radial (euclidian) distance, elevation below or above the plane in which the soma lies (similar to depth from cortical surface), or path distance (along the intervening neurites) to the somatic reference point? And is distance supposed to be anatomical distance in microns, or normalized distance (where 1 is the distance between the somatic reference point and the most distal point in the cell)?
Posts: 13
Joined: Wed Oct 24, 2018 12:09 pm

Re: sectioning neuron based on distance from soma

Hello,
I apologize, I realize now the question was vague. I will do my best to explain.
1. We want to apply parameters to different part of the neuron depending on how far away from the soma is. The goal is gradually have less channels the more we move away from the soma. The goal was to take the closest third of the neuron (in regards to the center of the soma, measuring out in all directions) and be able to give all the portions of dendrites in that area one set of channels., then do the same for the middle third and then the farthest third of the dendrite.

I was looking at the Subsets, Parameterized Domain Specification and the range for the neuron was p=318.784
So I want to create these groups and then be able to specify channels separately for each.
Proximal (center of soma-106.261)
Middle (106.261-212.522)
Distal (212.522-318.784)

Question 2&3: center of the soma for distance measurements since its a 3D neuron.
Question 4: path distance along the intervening neurites

6: I would love to do normalized distance if possible, so I could take the values above and just do 0-0.33 , 0.33-0.66, 0.66-1 or whatever intervals we decide to use.

Thank you for your guidance
Kind Regards,
Laura
rbdewell
Posts: 5
Joined: Wed Sep 09, 2015 2:47 pm

Re: sectioning neuron based on distance from soma

Something like this should work:

Code: Select all

``````soma distance()
maxdist=0
// get maximum distance
forall for(x,0) if (distance(x)>maxdist) maxdist=distance(x)

// generate sectionlists
objref prox, mid, dist
prox = new SectionList()
mid = new SectionList()
dist = new SectionList()

forall {
if (distance(0.5)/maxdist < 1/3) {		// if proximal
prox.append
} else if (distance(0.5)/maxdist > 2/3) {	// if distal
dist.append()
} else {	// not distal or proximal so middle
mid.append()
}
}``````
then code like forsec prox{ ... } can be used to set local properties
ted
Posts: 5897
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: sectioning neuron based on distance from soma

That helps, but two important questions remain unanswered:
Question 1: Groups of what? Sections?
Questions 2 and 3: Based on distance of what from the soma? Section midpoint? proximal end? distal end?
The goal is gradually have less channels the more we move away from the soma.
If the goal is to have channel density vary gradually with distance, shouldn't channel density vary along the length of each section? In which case the distance should be measured from the proximal reference point (soma(0.5)) to the center of each segment, right? And instead of three sets of sections, you'd just have one set of sections (the sections in which channel density varies with distance from the reference point), and a continuous function of distance that governs the relative channel density in each segment.
Posts: 13
Joined: Wed Oct 24, 2018 12:09 pm

Re: sectioning neuron based on distance from soma

If the goal is to have channel density vary gradually with distance, shouldn't channel density vary along the length of each section? In which case the distance should be measured from the proximal reference point (soma(0.5)) to the center of each segment, right?

correct.

And instead of three sets of sections, you'd just have one set of sections (the sections in which channel density varies with distance from the reference point), and a continuous function of distance that governs the relative channel density in each segment.
also correct, but another thing I am not sure how to code but would love to learn how.
Kind Regards,
Laura
Posts: 13
Joined: Wed Oct 24, 2018 12:09 pm

Re: sectioning neuron based on distance from soma

rbdewell wrote: Tue Dec 04, 2018 6:53 pm Something like this should work:

Code: Select all

``````soma distance()
maxdist=0
// get maximum distance
forall for(x,0) if (distance(x)>maxdist) maxdist=distance(x)

// generate sectionlists
objref prox, mid, dist
prox = new SectionList()
mid = new SectionList()
dist = new SectionList()

forall {
if (distance(0.5)/maxdist < 1/3) {		// if proximal
prox.append
} else if (distance(0.5)/maxdist > 2/3) {	// if distal
dist.append()
} else {	// not distal or proximal so middle
mid.append()
}
}``````
then code like forsec prox{ ... } can be used to set local properties
Thank you for providing me with this! I tried it and it provided no errors when running.
However, I tried removing channels to test if the action potentials would still work if a section had no channels.
Unfortunately it seems to still be working identically to before with and without the channels. Any better suggestions on how to test it/ update the code?
Kind Regards,
Laura
ted
Posts: 5897
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: sectioning neuron based on distance from soma

If path distance to section center is supposed to govern channel density, then
1. nseg must be odd in all sections (otherwise, there will be no internal node at the 0.5 location, and distance(0.5) will return instead the distance to one of the nodes on either side of the section midpoint, depending on roundoff error).
2. to be entirely consistent with the assumption that "distance to section center governs channel density", the maximum path distance should be found by
forall if (distance(0.5)>maxdist) maxdist=distance(0.5)
I tried removing channels to test if the action potentials would still work if a section had no channels.
Unfortunately it seems to still be working identically to before with and without the channels.
We don't know anything about your model. In your test in which "a section had no channels," did you reduce all channel densities in just one section to 0, while all of the other sections in the model cell had their usual channel densities? How did you verify that the channel densities were zero before you ran your test?
Posts: 13
Joined: Wed Oct 24, 2018 12:09 pm

Re: sectioning neuron based on distance from soma

I am working on a 3D Dentate Gyrus Granule Cell with 46 Dendrites.
The model was pulled and adapted from Neurolucida so there hasn't been nseg previously defined since each dendrite is actually made up of a few dendrites. This could explain why my previous trials did not work.

When I tested it, I didn't verify besides checking that I changed all of its values to 0 while keeping channel properties at normal for all the other.
ted
Posts: 5897
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: sectioning neuron based on distance from soma

I am working on a 3D Dentate Gyrus Granule Cell with 46 Dendrites.
If the sections are connected into a single model cell, electrical signals generated in "active" dendrites will spread into "passive" dendrites. The effect of changing all channel densities in a single section to 0 may be big or it may be small--it depends on details that are only available to you, on your computer.
there hasn't been nseg previously defined since each dendrite is actually made up of a few dendrites
The accuracy of a simulation depends on the adequacy of spatial and temporal discretization. One advantage of the CellBuilder for constructing or managing model cells is that it makes the d_lambda rule very easy to apply without having to do any programming (it's not that hard to use by writing code, but why bother writing code when there is a GUI tool that does the job for you?).
checking that I changed all of its values to 0
How did you check this? If the model is managed with a CellBuilder, did you check the relevant items on the Biophysics page? Or did you analyze the model with ModelView, or print out the numerical values of the channel densities in the section that you wanted to modify?

It would probably be very useful for you to collaborate with someone at or near your own lab or institution who is an experienced modeler.