importing "Amaral format" morphometric data

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
ubartsch
Posts: 34
Joined: Thu May 19, 2005 11:02 am
Location: CTCN, University of Plymouth
Contact:

importing "Amaral format" morphometric data

Post by ubartsch »

Hi
this is about importing again:
I received a file reconstructed cell which was used in Neuron simulations (possibly an earlier version). It seems to be in .swc format.

Unfortunately the import through the 3d import tool doesnt work (and cvapp cant read the file either).
I tried to change the first lines of the file, as suggested in the error message, but that didnt help.

Many thanks for any ideas!
Cheers
Ullrich

PS
@Dr Carnevale: You might be familiar with the file as this is the prefrontal cortex cell from the paper Jaffe & Carnevale, J Neurophysiol. 1999 82(6):3268-85, kindly provided by Dr Jaffe.


the prompt:
ulli@turing:~/neuron/pcmodel/ref_pc/jaffe99> nrngui
NEURON -- Version 5.7 2005-4-21 11:7:7 Main (159)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 2001

oc> 1
1
error ./pfc_full.asc line 17: pid.x[0]=0 (shifted by 4) is not less its index
error ./pfc_full.asc line 18: pid.x[1]=0 (shifted by 7) is not less its index
error ./pfc_full.asc line 19: pid.x[2]=0 (shifted by 10) is not less its index
error ./pfc_full.asc line 20: pid.x[3]=0 (shifted by 13) is not less its index
error ./pfc_full.asc line 21: pid.x[4]=0 (shifted by 11) is not less its index

Notice: ./pfc_full.asc:
The first two points have different types (-1 and 0) but
a single point root section is not allowed.
Changing point id 1 so that it is type -1.
If this is an incorrect repair, then change the file.
/usr/local/nrn/x86_64/bin/nrniv: Arg out of range in user function near line 0
{readfile()}
^
List[11].object(9)
Import3d_SWC_read[0].pt2sec(10.3, NULLobject)
Import3d_SWC_read[0].mksection(1, 2, 3)
Import3d_SWC_read[0].mksections()
and others
the start of the file looks like this:

Code: Select all

3675
0 -1 -0.89 1.93 0 1.79011 4.26
1 0 -3.27 4.6 1.7 3.96021 7.82
2 1 -5.45 8.5 1.7 4.46793 10.3
3 2 -6.97 11.52 1.7 3.38095 13.5
4 3 -11.09 12.75 1.7 4.29969 11.72
5 0 -5.13 0.49 9.88 2.63013 1.78
6 5 -4.8 -0.03 9.88 0.615873 1.78
7 6 -5.01 -1.8 10.94 2.07379 1.78
8 7 -4.58 -3.58 10.66 1.85248 1.78
9 8 -4.8 -5 13.58 3.25441 1.78
10 9 -4.58 -6.6 15.14 2.24544 1.78
11 10 -4.58 -6.6 14.65 0.490001 1.78
12 11 -3.81 -8.05 16.24 2.2855 1.78
13 12 -3.2 -9.54 16.69 1.67174 1.42
14 13 -3.41 -10.25 16.12 0.934398 1.42
15 14 -2.76 -11.49 17.9 2.26462 1.42
16 15 -2.54 -12.38 18.7 1.21676 1.42
17 16 -1.89 -14.34 19.69 2.29002 1.42
18 17 -1.46 -15.58 19.69 1.31244 1.42
19 18 -0.37 -17.18 19.69 1.936 1.78
20 19 0.93 -17.36 19.69 1.3124 1.42
21 20 2.23 -17.89 19.69 1.40389 1.42
22 21 3.32 -18.07 19.69 1.10476 1.42

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

Post by ted »

Not swc. It's a format generated by a "home brew" reconstruction rig developed originally
by David Amaral and used subsequently by others including Brenda Claiborne. In fact,
this is probably one of her cells. I have an old program that read files that contained,
among other things, this kind of data. It's too idiosyncratic for me to dump on you and
say "here, good luck." And it needs modification to be able to read the exact data format
of the file that you have. If you zip up the data file and send it to me
ted dot carnevale at yale dot edu
I'll see if I can get my old program to read it and produce something useful for you.

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

A programming challenge

Post by ted »

I dug up some old and very ugly code that was originally developed for a different purpose, and hacked at it until it could do the job. The result was a program that works
but is far too complicated and ugly--just reading the code reminds me of the old saying
that BASIC should be banned because learning it causes brain damage.

Anyone who wants a small programming challenge is encouraged to devise their own
program for translating this file format to a NEURON model. Solutions can be completely
de novo, or they can be extensions of the code for NEURON's Import3D tool (you all
have the source code for that in
c:\nrn58\lib\hoc\import3d (MSWin)
or
nrn/share/nrn/lib/hoc/import3d (UNIX/Linux/OS X)
Anyone who submits a program that works prior to May 1, 2006 will receive a coupon
good for a 20% discount on The NEURON Book. Entries may not use any code from
the awful program that I sent to Ullrich. All entries will be judged by me. All decisions
will be final. At my discretion, winning code may be posted (with credit to its author)
somewhere on NEURON's WWW site or at SimToolDB
http://senselab.med.yale.edu/senselab/simtooldb/ (SimToolDB is in a very early
experimental stage, but we expect it to grow with time).

The data file format has been used extensively by several investigators who
have made some of their data available on the WWW.

Code: Select all

Each data line contains 7 entries
        id              index of line (0 is "root" or first measurement)
        par             index of parent measurement
        x, y, z         coords where measurement was made
        len, diam       distance from parent measurement, diameter
The first line of data actually defines the root of the tree as a cylinder with 
dimensions len0 x diam0
--Ted
Post Reply