Your choice is to work hard or to work smart. Hard would be to literally rename each section, and that would involve you using a text editor to modify a copy of the original file from Imaris. Very tedious, and P(making multiple, time-wasting mistakes) is 1.
Smart would be to import the morphology into a CellBuilder, and then use the CellBulider's (very convenient) ability to group sections into sets. The following instructions sound complicated, but they're really quite simple, and this is all much easier to do than to write about or read.
Start by using NEURON to execute that ugly hoc file generated by Imaris (or whatever you're using to generate hoc from Imaris data)
nrngui uglyfile.hoc
(or double click on uglyfile.hoc if you're using MSWin).
Then start a CellBuilder
NEURON Main Menu / Build / Cell Builder
In the CellBuilder click on Management, then on the Management page click on Import / Top level
This pops up a window with a message and a button labeled "Go ahead and import". Click on that button.
The CellBuilder's canvas will be full of annoying names; they're not useful to you, so click on the checkbox next to "Turn off indexed name display"
Don't worry about the fact that the figure on the canvas looks like a bunch of sticks; that appearance is caused by a drawing shortcut that the CellBuilder uses. All of the anatomical details are still present.
Now click on the CellBuilder's Subsets button, and use the Select options to group related sections into subsets. It may help to bring up a Shape plot
NEURON Main Menu / Graph / Shape plot
and then click and drag to expand the size of the Shape plot so you can see more details. You might also want to zoom in on the shape plot--click on the menu box in its upper left corner, mouse over the primary menu to bring up the secondary menu, then drag the cursor over to select Zoom in/out. Finally, click on the canvas just to the right of what you want to zoom in on, and drag the cursor to the right (zoom back out by dragging to the left). You also might find it helpful to show diameters (menu box / Shape Style / Show Diam) or switch back to showing just the centroids (menu box / Show Diam / Centroid).
The radio buttons Select One and Select Subtree on the CellBuilder's Subsets page specify what happens when you click on a section. Each time you click on a section, you toggle the selection on or off. I've never used "Select Basaename" and have no idea what it does. Clicking on the "Select" button offers a menu of set operations that act on the current selection. Click on the Hints button to learn a bit more, and play with the tool for a bit, and you'll get the hang of it. Your goal is to group related sections into subsets (SectionLists) that have mnemonic names, such as axonal, somatic, apical, basilar (or just plain dendritic).
As you go along, be sure to save the CellBuilder to a session file every so often so you can recover if a problem occurs (shouldn't happen, but better safe than sorry).
After you're finished, be sure to save the fully configured CellBuilder to a session file. Then, and only then, you can export either a top level cell specification (Management / Export / Export to file) or a cell class definition (Management / Cell Type, then use Classname to specify the name of the cell class; it may be necessary to drag the lower margin of the CellBuilder down to expose the
Save hoc code in file
button).
When the time finally comes to specify the biophysical properties of the sections in each SectionList, just iterate over the contents of each SectionList and apply whatever assignments you require, e.g. if the sections in axonal are all supposed to have mechanisms called nafast and kfast, then these hoc statements (or their Python eqivalent) will do the job:
Code: Select all
forsec axonal {
insert nafast
insert kfast
}