connections

Moderator: wwlytton

Post Reply
OJAG
Posts: 34
Joined: Wed Nov 14, 2007 4:46 am
Location: Bogota

connections

Post by OJAG »

Hi,
I am starting with neuron hoc programming. My basic idea is to build a simple Pyramidal-fast spiking cells's network.

For the case of pyr<-->pyr connections I implemented a simple integrate and fire model and everything worked nice.
In the new case pyr <--> fs I know pyr => excit. fs => inhib., but I can't figure out how to include these properties in the connections..

-Should I write a mod file and insert (call) it in the hoc files?
-How can I combine an alpha synapse with both inhibitory and excitatory properties in a mod file?

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

Re: connections

Post by ted »

OJAG wrote:For the case of pyr<-->pyr connections I implemented a simple integrate and fire model and everything worked nice.
Are your model cells based on the built-in artificial spiking cell classes (IntFire1, 2, or 4), or
are they sections plus artificial "spike mechanisms" (e.g. the COBA cells in the NEURON
implementation of the benchmark model described in Brette et al. 2007
http://www.neuron.yale.edu/ftp/ted/neur ... te2007.pdf
code available here
http://senselab.med.yale.edu/ModelDB/Sh ... odel=83319)
or did you do something entirely different, as the Monty Python group used to say?

Code: Select all

In the new case  pyr <--> fs I know pyr => excit. fs => inhib., but I can't figure out how to include these properties in the connections..
Neither can I. But perhaps the answer to the above question will help me make a useful
suggestion.
-Should I write a mod file and insert (call) it in the hoc files?
-How can I combine an alpha synapse with both inhibitory and excitatory properties in a mod file?
The answers are, respectively:
--This sounds like reinventing the wheel. It's probably not necessary.
--This is not a good idea, from the standpoint of code management alone.
More specific answers and suggestions must be deferred until I know more about the
implementational details of what you have done so far.
OJAG
Posts: 34
Joined: Wed Nov 14, 2007 4:46 am
Location: Bogota

Model Details

Post by OJAG »

Hi Ted,

First of all I created templates for pyramidals and interneurons, each of them with their own geometrical properties, but for now and to test the model, the same biophysical porperties; pas and hh.


to make my pyramidal cells connections I am creating my synapses so

Code: Select all

$o1.object(targ).soma $o2.append(new ExpSyn(0.8))
where $o1 and $o2 are respectively the pyram and synapse lists.

then I connected the cells with

Code: Select all

$o2.object(source).Dend[0] $o1.object(targ).connections.append(new NetCon(&v(0), $o3.object(i), $6, 1, 0.5)) 
where $o1, $o2, are the cells lists and $o3 the synapses list.

The external excitation is provided by an IClamp with this characteristics

Code: Select all

proc setup_IC_soma(){
    $o1.object($2).soma{
    ic=new IClamp(0.7)
    ic.del=100
    ic.dur=1500
    ic.amp=10
    }
}       
and connected to the first cell in my list

Code: Select all

setup_IC_soma(pyram,0)
So, I think I am not using an IntFire class, but maybe something similar to a coba benchmark model (I am not sure).


Until now everything works perfect if I have only one type of cells

But when I try to include two different types (pyramidals and fs interneurons) I can't figure out how to include in the connections its biophysical properties to decide when the input is excitatory (glutamatergic from pyramidals) or inhibitory (gabaergic from interneurons)

Where should I put these mechanisms:
a. in the cell templates by adding artificial answer to voltage values?

b. In a new mod File (or exist any?) which should be inserted in the template (excitation.mod for glutamatergic inputs from pyramidals and inhib.mod for gabaergic depression from fs interneurons).

If any of the last two options is valid, how can I create the synapses and connect the cells once those specificcations are defined.

or could you just give me a clue to follow because actually I am lost..

any comment and/or remarks are welcome
ted
Site Admin
Posts: 5786
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Model Details

Post by ted »

Thanks for choosing NEURON for your research, and asking the questions that prompted
this note.

You need (A) an effective development strategy and (B) a good software pattern to
follow in setting up your own network models. Implicit in the whole enterprise are multiple
issues of policy, including how to manage
--the attributes of a cell
--the synaptic mechanisms that are attached to it
--the mechanics of setting up a connection between two cells
and how to deal with collections of objects. Lacking a good set of policies, it is very easy
to be overwhelmed by details. Given a consistent set of policies, implementing them in
code is almost a rote exercise. Indeed, much of it amounts to boilerplate that can be
generated automatically by a computer.

So how should you proceed?

The first step is to define the elementary properties of the your cell classes. This means
creating and testing models of single cells. At this point, an experienced developer may
wish to begin wrapping these inside templates. However, most users should defer
that until later, because NEURON can do it for you automatically, and in a way that will
save you much time and effort. This is because NEURON has tools that will use your cell
and synapse specifications to create templates, and those templates will also contain
procedures that implement policies for setting up connections between cells.

Once you are satisfied that your artificial spiking cells have the desired dynamics, and
that you can create models of individual biophysical cells with appropriate anatomical and
membrane/cytoplasm properties, it is time to focus on biophysical synaptic mechanisms. It
is best to test these on the simplest testbed possible: a passive single compartment.

After that, it becomes time to create the templates that define the cell classes. The tools
in NEURON's Network Builder suite are good at this. The idea is to use them to specify the
properties of the cell classes that will be involved in the network--including biophysical
model cellls such as yours, and also any artificial spiking cells. The development outline is

Code: Select all

For each class of biophysical model cells {
  Bring up a new NetReadyCellGUI tool 
    and use it to place synaptic mechanisms at appropriate locations
}
If there will be any artificial spiking cell classes {
  Bring up an ArtCellGui tool
    and use it to define the properties of all artificial spiking cell classes
}
Bring up a Network Builder (NetGUI tool) and use it to create a prototype network by:
  1. Spawning one instance of each cell class
  2. For each biophysical model cell in the prototype net
     attach a spike source to each of its synapses
  3. For each artificial spiking cell that is to receive spike events
     attach a spike source to it
Click on the Network Builder's "Hoc file" button to export a hoc file 
  that can be mined for reusable code
The "reusable code" will contain class definitions (templates) for each of your cell classes,
and it will also contain examples of how to set up synaptic connections between them.
If the network will involve more than 3 or 4 different kinds of cell classes, or if individual
cell classes have a large number of synapses, it may be a good idea to set up several
tiny protype nets, each with just a small subset of cell types.

For an introduction to the Network Builder, see the Network Builder tutorial (link on this
page http://www.neuron.yale.edu/neuron/docs). Chapter 11 of The NEURON
Book contains an example of mining reusable code from an exported hoc file. The
"serial" network implementations in this paper are good examples of how to reuse a
biophysical model cell template, created by the Network Builder, in network models:

Hines, M.L. and Carnevale, N.T. Translating network models to parallel hardware in
NEURON. J. Neurosci. Methods in press.
http://www.neuron.yale.edu/ftp/ted/neur ... _press.pdf
Source code available from
http://senselab.med.yale.edu/modeldb/Sh ... odel=96444

The code in this paper also provides pretty good software patterns to follow when
developing your own network models. At this stage, you should focus on the serial
implementations
ringser.hoc
and
ran3ser.hoc

In addition, it addresses other important issues, e.g. verification of network architecture,
reproducible implementation of randomization in models, but this is beginning to stray from
your original question . . .
OJAG wrote:to make my pyramidal cells connections . . . [/code]
I think you will find it easier to use a mkcells() / connectcells() approach, as illustrated in
the above paper.
So, I think I am not using an IntFire class

True. Looks like they're all biophysical model cells (they have physical dimensions,
membrane capacitance and conductance(s), and calculate membrane potential by
numerical integration of the cable equation).
But when I try to include two different types (pyramidals and fs interneurons) I can't figure out how to include in the connections its biophysical properties to decide when the input is excitatory (glutamatergic from pyramidals) or inhibitory (gabaergic from interneurons)
. . .
Where should I put these mechanisms:
a. in the cell templates by adding artificial answer to voltage values?
Using the NetReadyCellGUI tool, I'd attach an ExpSyn to each location that is supposed
to have a glutamatergic (AMPAergic) synapse, and give it a reversal potential of 0 mV
and a decay time constant of what? 2 ms? 5 ms? How fast should your AMPAergic
synaptic conductance decay?

I'd use Exp2Syns for the GABAergic synapses, with appropriate time constants
(1 or 2 ms for the fast one, and 5 or 10 ms for the slow? you decide, based on
experimental observations in your particular organism and cell class).

The NetReadyCellGUI tool's SynTypeGUI tool lets you define as many different kinds of
synapses as you like, and rename them as you wish. So if you just have AMPAergic
and GABAergic synapses, you might change the name of ExpSyn to AMPA or E,
and change the name of Exp2Syn to GABA or I. And if you had fast AMPA and slow
AMPA synapses, with different decay time constants, use the SynTypeGUI to make
two ExpSyn classes, then change their names to Ef and Es, give them different values
for tau, etc. as needed (think of it as creating derived classes from the ExpSyn base class).

Clicking on the Network Builder's "Hoc file" button makes it emit hoc code that will contain
a template for each of your different cell classes. Each template will contain code that
specifies the anat & biophys properties of your cell, and also the location and properties
of the synaptic mechanisms that are attached to it. For one example of such a file, see
cell.hoc for the ring network in our JNM paper.
how can I create the synapses and connect the cells once those specificcations are defined.
The templates generated by the Network Builder contain all the boilerplate code that will
automatically create an instance of your cells, with their attached synaptic mechanisms,
when you execute statements of the form

Code: Select all

objref foo
foo = new WhateverCell() // creates a new instance of the WhateverCell class
  // complete with all synapses, ready to be driven by NetCons
Please let me know if you have any further questions or suggestions.
Post Reply