Neurolucida to NEURON diameter missing problem (swc file)

Anything that doesn't fit elsewhere.
Post Reply
makrseke
Posts: 16
Joined: Mon Apr 03, 2017 6:43 am

Neurolucida to NEURON diameter missing problem (swc file)

Post by makrseke » Thu May 11, 2017 12:08 pm

Dear all,

I am trying to import a morphology from Neurolucida (generating a swc file from a Nurolucida-dat file) to NEURON.
The file is properly loaded to the Cell Builder of NEURON and then I export it to a hoc file. However with one psection() I see that the diameter information is not there and gets set by default from NEURON at 500 [um].

Any idea what can be the problem? I would really appreciate it if someone could clue me in!

I am using NEURON - Releash 7.4 and the generated swc file was produced from the NLMorphologyViewer (Neuroland website).

P.S.: Also tried with .asc files but there were again problems (loosing the wholistic model - creates different Cell-Builders for the axon and the dendrite-blocks).

Thank you in advance,
Best,

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

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by ted » Thu May 11, 2017 2:52 pm

I am trying to import a morphology from Neurolucida (generating a swc file from a Nurolucida-dat file) to NEURON.
In order to help with this, I'll have to be able to reproduce the problem. Can you email me the Neurolucida file and the swc file? Zip them up and send to
ted dot carnevale at yale dot edu

makrseke
Posts: 16
Joined: Mon Apr 03, 2017 6:43 am

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by makrseke » Fri May 12, 2017 4:09 am

Dear Ted,

I just sent the email with the 2 files attached. Thank you very much for your time in advance!

Best,

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

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by ted » Fri May 12, 2017 5:02 pm

The problem is that the soma is represented by an outline. The swc file format has no provision for soma outlines, but Neurolucida does. Suggest you convert your Neurolucida dat file to a txt file, then import that with Import3d. If you can't do that, my other suggestion is to measure diameter and xyz coordinates along the visually-estimated centroid of the soma outline; I can then help you convert those to a sequence of pt3dadd statements that implement the soma's geometry.

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

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by ted » Sun May 14, 2017 2:53 pm

makrseke wrote:with one psection() I see that the diameter information is not there and gets set by default from NEURON at 500 [um].
That's not what I see. What I see is a model cell in which neurite diameters vary from one to the next. What version of NEURON are you running?
P.S.: Also tried with .asc files but there were again problems (loosing the wholistic model - creates different Cell-Builders for the axon and the dendrite-blocks).
That happens when Import3d processes a morphometric data file in which the proximal end of a neurite is not connected to its parent. What do you mean by ".asc files"--Neurolucida text files, or what?

makrseke
Posts: 16
Joined: Mon Apr 03, 2017 6:43 am

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by makrseke » Tue May 16, 2017 8:17 am

Dear Ted,

Thank you again for your invaluable help!
I am writing here to give the correct way I think I found of transforming a Neurolucida .dat file to a .hoc file for everyone to check if they (may) encounter problems too.

The main key-problem as you told me at an email is that:
In the swc file the outline of the soma is represented by
a series of measurements of x,y,z,diam measurements that
have a very small diam. Import3d is not recognizing this
as the perimeter of the soma--instead, it is converting
these measurements to a thin neurite that curves around
in an almost-closed loop.
Hence, the idea was to try and not use the conversion of the .dat file to a .swc format into the Import3d of the CellBuider in NEURON, due to the above quoted reason.
After several trials some observations:
- Simple .txt file cannot be directly created from Neurolucida (not the 360 version at least);
- A directly produced .asc Neurolucida file for some reason still will give wrong results in the final .hoc file;
- And also a .xml Neurolucida file will also give incorrect resutls.
I still do not understand exactly why these work in a wrong way, and it would be nice to check it more thoroughly at some point and understand it better, but since it was seen that (in my case at least) they were not giving correct results, I thought to try some more things from the .dat initial file.

Having all these in mind, the steps followed to have a correct result (correct diameter and length soma-data - psection() tested) are:

1. Download the .dat Neurolucida File

2. Open NLMorphologyViewer (Version 0.3.0) - or maybe another converter that you use
(i) File >> Import Neuron >> choose the Neurolucida .dat file >> Open
- Many different contours and thus numbers of somata will be present, along with some warning messages if the section-to-section distances happen to be very small: "Samples being very
close together". This may mean that those connections may not be prefect (the program may connect them to close sections that were not the ones actually connected) but that
depends on the reconstructed neuron's characteristics - actual distances.
(ii) File >> Export Neuron >> Export Original Neuron as >>
>> File Name: Write desired name.asc
>> Save as type: NeurolucidaASC(*.*)
>> Save (to the folder where all the files that are going to run reside)

3. Open NEURON Window (nrngui file).
(i) Tools >> Miscalleneus >> Import 3D (opens new window - Import3d_GUI[0])
(ii) Choose a file >> in new appeared window choose the previously created .asc file >> open
(iii) For better view, unclick the "Show Points" selection.
(iv) Export >> CellBuilder

4. The NEURON CellBuild[0] window will be automatically opened.
(i) Management >> Export to file >> in new appeared window choose where to save the .hoc file and with what name.
(ii) >> Choose the same folder as the rest files.
>> Enter filename: Write desired name.hoc
>> Save
(iii) Close.

5. In the saved folder, double click the previously created .hoc file to open NEURON (Version 7.4)
and thus have automatically loaded all the: desired functions, channels availability, other
created mechanisms and point processes.

GENERAL: Again there will be warning messages. These probably are generated from the very small dimensions of
some sections and thus NEURON says it will connect those sections to the closest
other section (but I am not 100% sure on this).

This ran correctly and generated a good .hoc file from a Neurolucida .dat file for Windows OS, NEURON Version 7.4, NLMorphologyViewer (Version 0.3.0), and Neurolucida 360 produced .dat file.

Hope it is helpful, and indeed correct!
Best,
Makrina

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

Re: Neurolucida to NEURON diameter missing problem (swc file

Post by ted » Tue May 16, 2017 10:40 am

And now you have a model cell that has a soma that looks like a soma and has the correct size and shape, based on morphometric data that represented the soma as a stack of perimeter outlines. Thank you for posting the steps you used to get this result!

Post Reply