# Working with morphometric data

If you have detailed morphometric data, why not use it? This may be easier said than done, since quantitative morphometry typically produces hundreds or thousands of measurements for a single cell -- you wouldn't want to translate this into a model by hand. Several programs have been written to generate hoc code from morphometric data files.

## Stylized specification

Some of these programs create very simple translations that amount to "stylized specifications" of anatomy, i.e. explicit specification of length and diameter without any orientation information, such as

    	dend[n] { L = aa diam = bb }

This is fine if your model is simple enough, but Shape Plots of complex models can be indecipherable.

> Example: model with a soma and a single primary dendrite that gives rise to several side branches. Each of the short neurites is 10 um long, and the soma and long neurites are all 50 um long.

> You can examine the hoc code that implements a stylized specification of this model, or run it yourself, if you like. Here is the resulting Shape plot

> Real cells can look much worse.

## 3d specification

A better way to construct architecturally complex models from quantitative morphometric data is through 3d specification (pt3d data).

Example: consider the morphometric data in the following table. The data format is practically identical to one that is actually in use. The principal difference is the presence of a comment field that spells out which measurements belong to which section, so you don't have to try to figure this out for yourself.

    Item	Definition
    ----	----------
    n	measurement index
    p	index of previous measurement (-1 means no previous)
    	If current position is an origin of a daughter neurite,
    	previous measurement is the termination of the parent neurite.
    x,y,z,d	position and diameter of measurement
    t	type of measurement
    	O	origin
    	C	continuation
    	B	branch point (gives rise to 1 or 2 daughters)
    	T	termination
    comment	ap, ba == neurite in apical or basilar field

    n	p	x	y	z	d	t	comment
    0	-1	0	0	0	20	O	soma(0)
    1	0	0	15	0	20	C	soma
    2	1	0	20	0	3	B	soma(1)
    3	2	0	20	0	3	O	ap[0](0)
    4	3	0	120	0	3	B	ap[0](1)
    5	4	0	120	0	2	O	ap[1](0)
    6	5	0	320	0	2	B	ap[1](1)
    7	6	0	320	0	1	O	ap[2](0)
    8	7	-70	390	0	1	T	ap[2](1)
    9	6	0	320	0	1	O	ap[3](0)
    10	9	70	390	0	1	T	ap[3](1)
    11	4	0	120	0	1	O	ap[4](0)
    12	11	60	200	0	1	T	ap[4](1)
    13	0	0	0	0	1	O	ba[0](0)
    14	13	-60	-80	0	1	T	ba[0](1)
    15	0	0	0	0	1	O	ba[1](0)
    16	15	80	-60	0	1	T	ba[1](1)

The file anat.hoc implements a model based on these data by

1. creating the necessary sections
2. connecting them to build the basic architecture of the cell
3. using `forall pt3dclear()` to eliminate any pre-existing 3d data
4. using `pt3dadd()` to enter the individual measurement in this table, on a section-by-section basis.

## Exercise

This shows you how to perform a "litmus test" for the integrity of a model with complex architecture.

Execute anat.hoc.

1. Bring up the CellBuilder and Import this model. Review its Topology and Geometry.
2. Insert the `pas` mechanism into all sections.
   If you're dealing with a very extensive cell (especially if the axon is included), you might want to cut Ra to 10 ohm cm and reduce g_pas to 1e-5 mho/cm2.
3. Turn on Continuous Export (if you haven't already).
4. Bring up a Shape Plot, which should look like this

5. Turn this into a Shape Plot of Vm (R click in the Shape Plot and scroll down the menu to "Shape Plot". Release the mouse button and a color scale calibrated in mV should appear).
6. Examine the response of the cell to a 3 nA current step lasting 5 ms applied at the soma.
   For very extensive cells, especially if you have reduced g_pas, you may want to increase both Tstop and the duration of the injected current to 1000 ms and use variable dt.

Left: Vm at t = 0. Right: Vm at t = 5 ms.

### Quantitative tests of anatomy

This one line hoc statement checks for pt3d diameters == 0 and reports the names of the sections where they are found :

`forall for i=0, n3d()-1 if (diam3d(i) == 0) print secname(), i, diam3d(i)`

There are many other potential strategies for checking anatomical data, such as

- creating a space plot of diam. Bring up a Shape Plot and use its Plot what? menu item to select diam. Then select its Space plot menu item, click and drag over the path of interest, and voila!
- making a histogram of diameter measurements, which can reveal outliers and systematic errors such as "favorite values" and quantization artifacts (what is the smallest diameter that was measured? how fine is the smallest increment of diameter?). This requires some coding, which is left as an exercise to the reader.

## From Neurolucida to NEURON

Robert Cannon has developed cvapp, a morphology viewer/editor that can read a couple of different file formats (including Neurolucida's ASCII files) and write hoc code that specifies topology and geometry. This program, which was written in Java so it can run on multiple platforms, is available from http://www.compneuro.org/.

An archive of morphometric data that cvapp can read is available at http://www.compneuro.org/CDROM/nmorph/cellArchive.html . These data were originally from the Duke / Southampton Archive of Neuronal Morphology, which was established through a collaboration between Howard Wheal and Dennis Turner "to facilitate the free exchange of data between groups studying neuronal morphology." It contains detailed morphometric data from a large number of cells (mostly hippocampal neurons) that you can download.

I have used cvapp to generate some hoc files from a few of these cells. These files, which are located in course/anatomy, will give you practice working with models that have complex architectures.

File | Cell type | Comments
n254named.hoc | interneuron from inner molecular layer of dentate gyrus | includes axon
n274named.hoc | granule cell from dentate gyrus | includes axon
l22struc.hoc | CA3c pyramidal cell | no axon first letter of file name is lower case L
n411struc.hoc | CA1 pyramidal cell | no axon

Hints:

- Open an xterm or DOS window in course/anatomy and start NEURON with the command `nrngui`
- Use NEURON Main Menu / File / load hoc and select the hoc file you generated with cvapp.
- CellBuilder / Import
  If necessary, turn off indexed name display to reduce clutter.
- Use CellBuilder to define cell regions (e.g. apical vs. basilar dendrites, dendrites vs. soma, subtrees of interest), set biophysical properties, etc..
- Remember: repositioning sections will change appearance of the cell (may be helpful for improving visibility and access to crowded regions) without having any effect on L and diam.
- When satisfied with result, activate Continuous Export so you can instrument the cell and run simulations.
  If very satisfied, save CellBuilder to a session file.

Comments

1. Please be sure to credit the source of the files that you use, whether they come from the Duke / Southampton Archive or elsewhere.
2. You should always be concerned about the quality and reliability of any data or software that you use. Do data files contain implausible values, evidence of bias, or signs of other errors? Does software work the way it should? N.B.: if you encounter any bugs in cvapp, I am sure that Robert Cannon would be very interested in hearing about them so he can fix them.
3. To use cvapp yourself, you'll need cvapp.jar and you will also need to have either Java or the Java Runtime Environment (jre) installed on your own machine. If you don't have Java, either get it straight from SUN's WWW site or find it through links at http://www.compneuro.org/. which also tells how to configure your computer to run cvapp conveniently.

NEURON hands-on course
Copyright © 1998-2001 by N.T. Carnevale and M.L. Hines, all rights reserved.