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