IMARIS vs. Neurolucida For NEURON Use

Post Reply
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hey everyone,

The lab I work at is considering purchasing neuronal modeling software, either IMARIS or Neurolucida, in order to construct digital models of neurons captured with neurobiotin.

We were wondering if either one of these is more compatible than the other for eventual use with NEURON.

What file types does NEURON accept? Do IMARIS and Neurolucida have the ability to export finished models as .swc, or other file type that is compatible with NEURON?

Thank you!
ted
Site Admin
Posts: 6313
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: IMARIS vs. Neurolucida For NEURON Use

Post by ted »

NEURON can import morphometric data from Neurolucida text files and swc files. This can be done with a GUI tool or by a function call from hoc or Python.

All I know about Imaris is that it has the reputation of being a very powerful tool for dealing with images. I don't know anything about its ability to export data into any file format readable by NEURON.
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

Re: IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hello Ted,

Thank you for your reply! Do you know if NEURON could import morphometric data from XML files? If so, could you link me to a thread (if it exists) in which this was done?

Thank you!
ted
Site Admin
Posts: 6313
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: IMARIS vs. Neurolucida For NEURON Use

Post by ted »

Which XML do you have in mind?

NEURON used to be able to import some flavors of NeuroML, but NeuroML (1) encodes a lot more than neuronal morphology, and (2) has been a bit of a moving target, so I'm not sure what NEURON can do with that currently. More recently, MicroBrightField introduced their own XML format which NEURON has not yet adopted.

Or are you thinking about some other XML?
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

Re: IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hello Ted,

Neurolucida offers 4 options to save files as:

XML Document File (*.xml)
MBF Binary files (*.dat)
MBF Ascii files (*.asc)
Export Sets to files (*.asc)

Are any of these compatible with NEURON? Apologies if I am not being too specific, all of this is quite new to me.
ted
Site Admin
Posts: 6313
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: IMARIS vs. Neurolucida For NEURON Use

Post by ted »

Try MBF ASCII file format. Use NEURON's Import3d tool. See https://nrn.readthedocs.io/en/latest/gu ... ort3d.html
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

Re: IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hello Ted,

Thank you for your suggestion!

I used the Import3d tool to view a simple neuron (a soma with one dendrite), except the soma did not load. Do you know of any fixes?

If it's any help, I am a MacBook Air user with Python 3.7.9.
ted
Site Admin
Posts: 6313
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: IMARIS vs. Neurolucida For NEURON Use

Post by ted »

I used the Import3d tool to view a simple neuron (a soma with one dendrite), except the soma did not load.
This would mean there's something wrong with the morphology file. Is it publically available?
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

Re: IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hi Ted,

Here is a link to the .swc file:

https://www.dropbox.com/t/LfYIk2WurkLiMYAJ

All of the morphology seems correct besides no soma being loaded when using the Import3d tool.

I appreciate your help with this, thank you!
ted
Site Admin
Posts: 6313
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: IMARIS vs. Neurolucida For NEURON Use

Post by ted »

You really need to have a detailed discussion with the person from whom you got these data.

Here's what I found.

I strongly suspect that the data are from an automated reconstruction, with minimal (if any) human supervision or intervention. That's an inference.

What follows, however, is absolute fact.

No data points in the file are flagged as "soma" (numeric value in field 2 of each line is 0, which signifies "unidentified"; should be 1 for measurements from soma).

dend_0[0] is the root section (the section that has no parent). To see this for yourself, import the data into a CellBuilder, then click the CellBuilder's "Continuous create" button, and finally at the oc> prompt execute

topology()

From the appearance of the model cell created by importing the morphometric data, it looks like the original cell had a Y shaped soma. To see for yourself, bring up a Shape plot by clicking on

NEURON Main Menu / Graph / Shape plot

In the Shape plot, click on the menu box (upper left corner of its canvas), scroll slightly up and to the right to reveal the secondary menu, and then down to select Translate. Next click in roughly the middle of the tangle of branches at the left end of the figure and drag it to the middle of the canvas.

Now click on the menu box and scroll down the primary menu to

Shape Style

and then slightly to the right to select

Show Diam

Zoom in by clicking on the menu box, scrolling to the secondary menu, and down to Zoom in/out. Finally click in the middle of the canvas and drag the cursor to the right. Do this until (repositioning with Translate as necessary) until you can see the Y shaped soma, and the branches that extend from it, clearly.

The three arms of the Y belong to sections dend_0[0], dend_0[19], and dend_0[23], and indeed these are the three sections whose morphometric data have the largest diameters (> 5 um). To see this for yourself, at the oc> prompt execute

forall for i=0,n3d()-1 if (diam3d(i)>5) print secname(), " ", i, diam3d(i)

However, the distal ends of dend_0[0] and dend_0[23] contain measurements from parts of the cell that any human anatomist would have called a dendrite or axon because of narrow diameter (< 2 um or so). To see for yourself, execute

dend_0[0] for i=0,20 print diam3d(i)

and

dend_0[23] for i=0,20 print diam3d(i)

By the way, I suspect that dend_0[23] is actually an axon.

Also, measurements from dend_0[19] start at its distal end and work proximally, which opposite from the usual practice. To see this execute

dend_0[19] for i=0,n3d()-1 print diam3d(i)

and notice that the diameters get larger as i increases. This is going to cause problems if you are interested in accessing variables in an orderly manner as a function of path distance from a reference point (e.g. for the purpose of assigning values to parameters such as channel density that may vary with position in a cell, or to study the spatial variation of v, membrane currents, second messenger concentrations etc. in a cell).

But the worst is yet to come.

From the Shape plot it looks like dend_0[0] should be the parent of dend_0[19]--in particular, it should be attached to the 0 end of dend_0[0]--but it isn't. Instead, its parent is dend_0[11]. See for yourself: execute

objref sref
dend_0[19] sref = new SectionRef()
sref.parent() print secname()

And if you work your way back through the chain of parents (and also confirm by examining topology()'s output), you'll see

dend_0[11]'s parent is dend_0[9]
dend_0[9]'s parent is dend_0[7]
dend_0[7]'s parent is dend_0[3]
dend_0[3]'s parent is dend_0[2]
dend_0[2]'s parent is dend_0[1]
and
dend_0[1]'s parent is dend_0[0]

Which is totally nuts. From the Shape plot it is clear that dend_0[19] should actually be the parent of dend_0[11] and dend_0[12].

There are even more problems with this morphometric data file, but this is enough. The file is perfectly fine for people who want to look at cell shapes. But this file is catastrophically useless for computational modeling. For computational modeling, you need a file that has proper connectivity between adjacent neurites, which this file doesn't have.
dhruskar
Posts: 7
Joined: Mon Jul 31, 2023 2:24 pm

Re: IMARIS vs. Neurolucida For NEURON Use

Post by dhruskar »

Hello Ted,

Thank you for taking such a close look at the file! I now see how the connectivity between neurites of that file is entirely dysfunctional.

For now, I think we will use simple ball and stick models, but input surface area, diameter, and other statistics into NEURON as calculated by our own reconstructions (instead of automated).

Thank you for all your help! I will make another post if I have any other questions.

Best,

Dylan
Post Reply