delete a section from a created neuron

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
youngJose

delete a section from a created neuron

Post by youngJose »

Hi,
I created a neuron by using the following code. And now I want to delete a section from this neuron. What should I do?
For example, I want to delete all the axons in the neuron and I can get section index of all these axons. So what should I do to delete all these axons?
Thanks!

Code: Select all

cell_parameters = {
            'morphology': 'Import3D.hoc',
            'v_init': -65,
            'passive': False,
            'nsegs_method': 'lambda_f',
            'lambda_f': 400,  # Higher number means higher spatial resolution of the cell
            'timeres_NEURON': 2**-3,  # Should be a power of 2
            'timeres_python': 2**-3,
            'tstartms': 0,
            'tstopms': 50,
        }
cell = LFPy.Cell(**cell_parameters)
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: delete a section from a created neuron

Post by ted »

The code excerpt you provide is completely opaque to anyone who is not feeding it to exactly the same Python program as you are. That being the case, you might want to direct your question to the person who developed that program, e.g. by email or whatever support group might exist for that program.

That said, if you want to learn about how to specify the anatomical properties of a model cell, suggest you read any or all of the following:
* chapters 5 and 6 of The NEURON Book
* the Programmer's Reference entries about Topology and Geometry--start here
https://www.neuron.yale.edu/neuron/stat ... ology.html
* these two papers
Hines, M.L. and Carnevale, N.T.
The NEURON simulation environment.
Neural Computation 9:1179-1209, 1997.
Hines, M.L. and Carnevale, N.T.
NEURON: a tool for neuroscientists.
The Neuroscientist 7:123-135, 2001.
--see links at http://www.neuron.yale.edu/neuron/nrnpubs

My own opinion is that this is a situation in which the best workflow would be to _manually_ use the Import3D tool to get the morphometric data into a CellBuilder, and then use the CellBuilder to manage the model cell. The CellBuilder makes it very easy to
* specify biophysical properties
* specify spatial discretization
* select and delete sections (provides immediate visual feedback about what has been selected or deleted)

And it can export hoc code that is usable by NEURON even if you are using Python as NEURON's interpreter.
youngJose

Re: delete a section from a created neuron

Post by youngJose »

ted wrote:
My own opinion is that this is a situation in which the best workflow would be to _manually_ use the Import3D tool to get the morphometric data into a CellBuilder, and then use the CellBuilder to manage the model cell. The CellBuilder makes it very easy to
* specify biophysical properties
* specify spatial discretization
* select and delete sections (provides immediate visual feedback about what has been selected or deleted)

And it can export hoc code that is usable by NEURON even if you are using Python as NEURON's interpreter.
Hi Ted,
Thanks for your reply!
I tried to use CellBuilder to delete sections, however, it's hard to manually delete all the axons when the neuron has lots of sections and complex morphology.
Is there any way to select and delete all axon sections in CellBuilder? I didn't find it in the tutorial of CellBuilder.
And I'll read those references carefully.
Thanks again!
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: delete a section from a created neuron

Post by ted »

In the detailed morphologies that I have seen, the axon consists of a single subtree with a root section that attaches to one point on the cell--often the soma, but sometimes a dendritic branch. On the CellBuilder's topology page, zoom in to identify the axonal tree's root section, then click on the "Delete Subtree" radio button, and finally click on the axonal tree's root section. If you don't know how to zoom in, work through the Import3D tutorial (find link on the Documentation page at www.neuron.yale.edu).
youngJose

Re: delete a section from a created neuron

Post by youngJose »

ted wrote:In the detailed morphologies that I have seen, the axon consists of a single subtree with a root section that attaches to one point on the cell--often the soma, but sometimes a dendritic branch. On the CellBuilder's topology page, zoom in to identify the axonal tree's root section, then click on the "Delete Subtree" radio button, and finally click on the axonal tree's root section. If you don't know how to zoom in, work through the Import3D tutorial (find link on the Documentation page at http://www.neuron.yale.edu).
Thank you, Ted! It works very well. But how to set the view in the CellBuilder as x-z plane instead of the default x-y plane? I didn't find a way in the right-click menu.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: delete a section from a created neuron

Post by ted »

That's right. The CellBuilder's canvas does not allow rotation around the y or x axis. Save the CellBuider to a ses file and exit NEURON. Restart NEURON and load the saved CellBuilder. Make sure its "Continuous create" button has a check mark. Now bring up a "shape plot" by clicking on
NEURON Main Menu / Graph / Shape plot
The shape plot shows all of the wiggly details of each branch (the CellBuilder takes a shortcut of only showing straight lines between branch points) and can be zoomed and rotated in whatever way you like. If you need to learn how to rotate around the x or y axis, see
http://www.neuron.yale.edu/neuron/stati ... /shape.htm
youngJose

Re: delete a section from a created neuron

Post by youngJose »

ted wrote:That's right. The CellBuilder's canvas does not allow rotation around the y or x axis. Save the CellBuider to a ses file and exit NEURON. Restart NEURON and load the saved CellBuilder. Make sure its "Continuous create" button has a check mark. Now bring up a "shape plot" by clicking on
NEURON Main Menu / Graph / Shape plot
The shape plot shows all of the wiggly details of each branch (the CellBuilder takes a shortcut of only showing straight lines between branch points) and can be zoomed and rotated in whatever way you like. If you need to learn how to rotate around the x or y axis, see
http://www.neuron.yale.edu/neuron/stati ... /shape.htm
Thank you Ted. I solved the problem by editing the .hoc file using delete_section().
I also tried your method, as you said I could see all the wiggly details of the neuron in different angle, however, in the CellBuilder, the canvas never changed.
So it's very helpful for me to delete section according to z position.
Anyway, thanks again for your quick and juicy response.
Post Reply