Page 1 of 1

Soma stacks and the Import3d tool

Posted: Tue Mar 06, 2018 10:08 am
by ted
You may already know that the Import3d tool can handle Neurolucida morphometric data files in which the soma is defined by a stack of contours. A "soma stack" is a useful way to deal with complex soma shapes, because the soma volume and surface area of the resulting model will be more accurate (and the soma will look nicer in shape plots when you select the "Show Diam" style). However, the contours must be ordered monotonically according to depth (the z axis level). If they are out of sequence, importing the morphometric data can result in an obvious failure (breaking a single cell into two or more pieces that become separate "cells") or, worse yet, it can cause serious errors in soma volume and area that you may not notice but which will invalidate the resulting model cell.

It's easy to spot these errors by examining the contents of the morphometric data file. Make a copy of the file, then open the copy with a plain text editor. Soma contour data are typically near the beginning of the file. Each contour is specified by a block of text that starts something like this

Code: Select all

("Cell Body" ; I
  (Color RGB (255, 0, 128))
and ends with

Code: Select all

)  ;  End of contour
The data lines in a contour block will look like this

Code: Select all

  ( -637.05   685.32    60.93     0.18 S13)  ;  9, 1
The first three numbers on a line are the xyz coordinates of a point on the contour. The third number is the contour's z axis level; for any given contour, the z axis values will be identical or nearly identical.

Check each contour's z axis value, and make sure that the contours are arranged in an orderly manner, that is, bottom to top, or top to bottom. Here is the sequence of contour levels from a file I saw recently:
. . .
These contours are definitely not in a monotonic sequence. Even so, Import3d handled the file without complaint. Good? No, actually very bad. The surface area of the resulting model's soma was about 2520 um2. After the file was repaired by cutting and pasting the contour blocks in a monotonic sequence, the resulting model's soma had an area of only about 855 um2--three times smaller! That's a big difference, and it could have a significant effect on a model of a small cell like an interneuron.

If you are collaborating with someone who is generating morphometric data for you, it might be good to ask them to make sure to generate the contours in monotonic sequence along the z axis--either start at the bottom and work toward the top, or vice versa. But you, the modeler, are the ultimate user of the data, and you are responsible for deciding what will serve as the empirical basis of your models. Which means that you need to be aware of the problems that can affect morphometric data and know how to deal with them (either by fixing them or deciding to look for a better data set).

For other errors that can affect morphometric data, see Caveats about anatomically detailed model cells viewtopic.php?f=28&t=3862 in the Hot tips area of the forum.

Re: Soma stacks and the Import3d tool

Posted: Fri Dec 07, 2018 10:10 pm
by Mohamed_Hisham
Hello ted, thanks for these great information.

I have a Neurolucida file (ASC), where the soma is constructed into multiple contours, the file is fine, the contours are monotonically increasing, so when importing the file to neuron I can see the whole structure including the soma.

but when exporting the morphology to the cell builder it opens multiple windows, every one has it's own soma attached to some branch of the tree. the ASC file has more than one "cellbody" contours. I wonder if there is a way to keep the soma structure intact, and would it be fine to have a multi-compartment as a soma.

Thank you very much

Re: Soma stacks and the Import3d tool

Posted: Mon Dec 10, 2018 5:39 pm
by ted
I'll have to be able to reproduce this in order to find out what is the cause and how it can be fixed. Please zip up the Neurolucida file and email it to me
ted dot carnevale at yale dot edu

Re: Soma stacks and the Import3d tool

Posted: Mon Dec 10, 2018 6:07 pm
by Mohamed_Hisham
Hello Ted,

I have sent you the ASC Neurolucida file on the email.

Thank you very much for you help

Re: Soma stacks and the Import3d tool

Posted: Wed Dec 12, 2018 10:05 am
by ted
For the benefit of others who may read this discussion thread--

Import3d can handle Neurolucida text files that contain a soma stack (a sequence of tracings of the perimeter of the soma performed at different levels along the z axis), but only if the tracings are arranged with monotonically increasing, or monotonically decreasing, z coordinate. The problem with this particular cell's morphometric data file was that there were four z axis levels that had two separate perimeters at the same level. Editing a copy of the file to arbitrarily remove the second perimeter at each of the four levels produced a file that Import3d was able to handle. Of course, the edited file is missing part of the surface area and volume of the soma; whether this is a serious problem is up to the judgement of the experimentalist. I suspect that the edited cell is suitable for modeling electrical signaling, because somas typically account for only a small part of the total surface area of the cell--but this is an interneuron with relatively few branches, so it might be a good idea to verify by comparing the entire cell's area with the area of just the soma.

Code: Select all

forall nseg = 1
totalarea = 0
forall totalarea += area(0.5)
somaarea = 0
forsec "soma" somaarea += area(0.5)
print totalarea, somaarea
It may be less suitable for modeling chemical signaling in the soma, especially if detailed modeling is done with RxD, because the altered shape and volume of the soma may have significant effects on results.

Re: Soma stacks and the Import3d tool

Posted: Wed Dec 12, 2018 8:27 pm
by Mohamed_Hisham
Thank you very much Ted.