NEURON changes dendrite diameter to default value

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
schmidla
Posts: 2
Joined: Tue Mar 02, 2021 9:41 am

NEURON changes dendrite diameter to default value

Post by schmidla »

Hi all,

a student of mine is introducing herself to NEURON (I am usally not using the software myself) and she observed something strange and I was also able to reproduce the issue.
She took a .swc file from neuromorpho and used the CellBuilder tool to create an anatomically detailed neuron model. She stored the result in a .hoc file.

Scenario 1:
I use the GUI and use File -> load hoc -> select file 'geom_test.hoc'
I type 'forall psection()' to the neuron command window to see the sizes of each section.
Result: The dendrites alle have different diameters in the range of 1 to 10 um. -> that looks good

Scenario 2:
I type 'load_file("geom_test.hoc") into the command field.
I type 'forall psection()' to the neuron command window to see the sizes of each section.
Result: All dendrites have a diameter of 500um.

My question is: Why do Scenario 1 and 2 not produce the same result? What is lost when using the load_file command?

Thanks for your help!
Laura

PS.: I would post the geom_test.hoc file but it is very long.
ted
Site Admin
Posts: 5892
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON changes dendrite diameter to default value

Post by ted »

Can't begin to guess what's going on. Would have to reproduce this in order to discover what's happening. Zip up the hoc file and email it to
ted dot carnevale at yale dot edu
and I'll tell you what I find out.
ted
Site Admin
Posts: 5892
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON changes dendrite diameter to default value

Post by ted »

That's an ugly bug.

No matter what I do, I'm not seeing what you did. I tried

nrngui geom_test.hoc
nrngui followed by execution of load_file("geom_test.hoc") at the oc> prompt
nrngui followed by use of GUI (NEURON Main Menu / File / load hoc, then clicking on geom_test.hoc)

and each produced identical results. Diameters are never 500. Largest morphometric diameter is 120 (big cell! spinal motoneuron maybe?), smallest is 0.26 um (nice reconstruction). Largest reported diam (with nseg==1) is 120, smallest is 0.58.

This is with NEURON v. 8.0.dev-194-g8570e8e+ master (8570e8e+) 2020-10-14. What version are you using?
ramcdougal
Posts: 224
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: NEURON changes dendrite diameter to default value

Post by ramcdougal »

Thank you for bringing this to our attention. This has now been fixed in the development version: https://github.com/neuronsimulator/nrn/ ... 2b12d87e53

The underlying issue was that 3D diameters are internally stored separately from the diameters reported at the center of a segment, and a call to psection was not checking to make sure the center-of-segment diameters were up to date.

It's very easy to miss this because if NEURON is running interactively, there are lots of other things happening that do automatically trigger the center of segment diam updates, but for a Python example of this glitch and a work-around by calling h.finitialize(-65) before doing the psection, see:
https://colab.research.google.com/drive ... sp=sharing

Incidentally, invoking the psection method on a section in Python (e.g. print(dend.psection())) did not have this issue.
schmidla
Posts: 2
Joined: Tue Mar 02, 2021 9:41 am

Re: NEURON changes dendrite diameter to default value

Post by schmidla »

Thank you both for your help!
Both the finitialize command and running it in Python solved the issue for me.

For anyone reading this post in the future:
This issue came up with NEURON 7.8.

And yes, it is a spinal motoneuron ;)
Post Reply