template and morphological data

Moderator: wwlytton

Post Reply
shahali

template and morphological data

Post by shahali »

hi.I have morphological data of one cell in a file (I call it md.nrn), which I want to include to Template,
I defined the soma and dendrites which are created at md.nrn by ‘external’, I wrote like this:
load_file("md.nrn")
begintemplate Cell
external soma, dend1,dend2
public axon,
create axon

connect soma(1),axon(0)

….
endtemplate Cell
but this error comes:
nrniv: axon : section was deleted
in C:/……/temp.hoc near line 59
connect soma(1),axon(0)
^
why? how can I use morphological data in a Template?
ted
Site Admin
Posts: 6303
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

One possibility is to wrap the code that specifies topology and geometry in
a proc and embed it in the template, then call that proc from your template's
init proc. But that involves many tedious details that are easily overlooked.
Far easier is to take advantage of the GUI tools, which can generate a lot
of hoc code for you.

Presumably you want to make a network model (why else bother with cell
classes?). The steps are:
1. Get the morphometric data into a CellBuilder. If the original data are in
Neurolucida, Eutectics, or swc format, use the Import3D tool. If instead
you have a hoc file full of pt3dadd statements, start NEURON, xopen the
hoc file, then start a new CellBuilder and use its Management page's
Import feature. When the CellBuilder contains the morphometric data, save
it to a ses file and exit NEURON. (after this point it is assumed that you
will periodically save things to ses files).
2. Restart NEURON, load the CellBuilder's ses file, then specify the
biophysical properties and spatial grid. Test the model cell to verify that
it has the desired properties.
3. Import that CellBuilder into a Network Cell tool, and use the latter to
specify the locations of synapses.
4. Use the Network Builder to create a prototype network that involves an
instance of your cell class, then export that network model to a hoc file.
5. That hoc file will contain a template for each cell class in the toy network,
plus code that sets up the connections between them that you specified.
You can extract those templates and use them in your own networks.

For tutorials on the CellBuilder, Import3D tool, and Network Builder, see the
Documentation page http://www.neuron.yale.edu/neuron/docs
For an example of mining reusable code from a hoc file exported by the
Network Builder, see chapter 11 of The NEURON Book.
shahali

Post by shahali »

Dear ted, I have a nrn file (e.g md.nrn) including morphological data. I wrote a hoc file just with one line: load_file("md.nrn"), or xopen("md.nrn") then loaded this hoc through NEURON main menu,then used the Management page's Import feature of CellBuilder, but this error came:
nrniv: Section access unspecified
near line 2
{iport()}
^
CellBuildTopology[0].section_owner )
CellBuildTopology[0].iport )
CellManage[0].iport )
I loaded a hoc file including topology and geometry like one in md.nrn, but I just got above error, again.I could not use Import3D tool for this file,too.the message "can't figure out file format for ./md.nrn"came. where is the problem?what should I do?how can I overcome this eeror and solve my problem, using morphological data in a network?
I used external key word in template for sectiones defined in md.nrn but because they were not public I could not reach them out of template to define synapses.
ted
Site Admin
Posts: 6303
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

shahali wrote:I wrote a hoc file just with one line: load_file("md.nrn"), or xopen("md.nrn")
So when NEURON loads your hoc file, it will then read md.nrn
No need to use the toolbar to load md.nrn again (nothing will happen,
because it only executes load_file() which will silently decline to read a
file that has already been read in the same session).

But that isn't the cause of the error msg.

Before I get to the cause and cure, a minor digression:
If you are using MSWin, it's a good idea to make
load_file("nrngui.hoc")
be the first statement in your hoc file. Then when you double click on
that file, the first thing NEURON will do is to load its GUI library and bring
up a NEURON Main Menu toolbar. UNIX/Linux users merely execute the
command
nrngui filename.hoc
to do the same, but are advised to include
load_file("nrngui.hoc")
as the first line in their code for the sake of interoperability with
MSWin users.

Now back to the main topic.
used the Management page's Import feature of CellBuilder, but this error came:

Code: Select all

nrniv: Section access unspecified
This simply means there is no default section. Change your hoc file to

Code: Select all

load_file("nrngui.hoc")
load_file("md.nrn")
access soma
and you can then proceed as I described in my prior msg.

Unless, of course, there is no section called "soma". If that's the case,
just type
topology()
at the oc> prompt, and scroll back up to the top of the printout to
discover the name of the root section (the first section whose name is
printed). Then change the access statement to refer to the name of
the root section.
I used external key word in template for sections defined in md.nrn
Don't bother with that approach. The problem isn't that it can't be done,
but that the payoff/effort ratio is unfavorable.
Post Reply