lost dendrites when importing neurolucida.asc to hoc

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
Anton Filipchuk
Posts: 4
Joined: Sat Nov 17, 2007 7:53 am
Contact:

lost dendrites when importing neurolucida.asc to hoc

Post by Anton Filipchuk »

Hallo,
Recently I’ve revealed a problem of importing ASC neurolucida files into cell builder and then in hoc. The problem is that after import-export procedure some dendrites turn out to be lost. It happens sometimes, not always, but it happens and I don’t know, how to fix it.
Now I’m doing in the following way:
Tools – Miscellaneous – Import 3D
Then I chose an ASC file and get the following message: File simulation problem…
Default logical connection to the nearest soma: line … connect to … 7.54 (um) away.
I approve this connection, and then chose export to the cell builder.
Management – Export, then I chose the following items:
Topology
Subsets
Geometry
And at last Export to hoc file. This is the usual procedure and in most of cases it works properly, but sometimes not.
I would be grateful if you could help with solving this problem.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Either the problem lies in the Neurolucida file, or you have discovered a bug in Import3D.
Need to see the Neurolucida file in order to figure this out. Please email it to
ted dot carnevale at yale dot edu
No winmail.dat or rar files, please--plain text, or pkzipped text if the file is very large.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Repairing fragmented morphometric data

Post by ted »

The problem was in the Neurolucida file. The clue was that exporting from Import3D to
a CellBuilder produced not one CellBuilder, but a stack of 6 CellBuilders. This meant that
the original data file contained multiple independent (unconnected) trees.

I examined each CellBuilder by clicking on its Topology button, then clicking on the
canvas's menu box (the square in the upper left corner of the large white area) and
selecting View = plot. This revealed that each CellBuilder contained a different piece of
the cell; 4 of them (CellBuild[2] through CellBuild[5]) had just a single section called
"soma," and 2 of them contained a "soma" section plus extensive dendritic trees.

In the Import3D tool I then clicked on the Show Points box to get rid of the little blue boxes,
then zoomed in on the vicinity of the soma, and used zoom, translate, and rotate to get
an oblique view of the cell. Sure enough, there was a stack of soma outlines like little
skinny smoke rings.

So the original data file contained a stack of soma outlines, plus two clusters of dendritic
trees, and they weren't connected to each other. Import3D had no way to know that all
these things belong to each other, so it treated the data as a collection of several
independent cells.

To make Import3D treat such data as a single cell, it is necessary to edit the Neurolucida
data file so that there is a single soma outline, which should be a closed loop. The
proximal ends of each of the independent dendritic trees must also be attached to the
soma outline.

Alternatively, one could do the following in hoc.

1. Export a hoc file from each CellBuilder that contains a big dendritic tree. For this
example, I'll call these part1.hoc and part2.hoc

2. Examine these files for conflicting section names. Let's say that part1.hoc contains

Code: Select all

  create soma, axon[3], dend[74]
and part2.hoc has

Code: Select all

  create soma, dend[207]
3. So copy part2.hoc to a new file called part2_revised.hoc, then edit part2_revised.hoc and make these changes:

First, change the statement

Code: Select all

  create soma, dend[207]
to

Code: Select all

  //  create soma, dend[207]
  create dend[207]
That will prevent part2's data from killing the soma section that will be created by part1's data.

Then replace every occurrence of dend with dend2. That will prevent part2's data from
killing the dend sections that will be created with part 1's data.

part2_revised.hoc will now read

Code: Select all

proc celldef() {
  etc.
  . . .
}

//  create soma, dend[207]
create dend2[207]

proc topol() { local i
  connect axon(0), soma(0.5)
  for i = 1, 2 connect axon[i](0), axon(1)
  connect dend2(0), soma(0.5)
  for i = 1, 5 connect dend2[i](0), dend2[i-1](1)
  etc.
4. Create a new file called combine.hoc that contains just these lines:

Code: Select all

load_file("nrngui.hoc")
load_file("part1.hoc")
load_file("part2_revised.hoc")
5. Start NEURON and load combine.hoc (double click on combine.hoc if you're using
MSWin, or type
nrngui combine.hoc
at the system prompt if you're using UNIX/Linux).

NEURON Main Menu / Graph / Shape plot should show your complete cell.

6. Now you need to get this into a single CellBuilder, so it will be easy to manage
biophysical properties and spatial discretization. Bring up a new CellBuilder, then import
the top level model into it. Be sure to activate the radio buttons next to "Turn off indexed
name display" and "Don't draw short sections as circles."

Notice that there are no subsets. Too bad. But you can recreate them yourself. In the
new CellBuilder, click on Geometry, then scroll through the list of section names to find
axon. Click on this name, and the section called axon will turn red in the CellBuilder's
canvas (actually it's axon[0], but axon without the [0] is a synonym in hoc).

Zoom in on this figure so you can see the axon section clearly. Then click on Subsets,
click on the "Select Subtree" button, and finally click on the axon section in the canvas.
axon and all its child branches will be selected, and the middle panel of the CellBuilder will
say "all differs from selection."

Click on the "New SectionList" button, and type
axonal
in the edit field of the window that pops up, then click on
Accept

Now you have defined the axonal subset. You should save this new CellBuilder to a ses
file. It contains the entire cell, except for a few soma outlines that were ignored.

That took more time and effort to explain, than it took to do.
Post Reply