Neural Network Toolbox - University of Sunderland
Download
Report
Transcript Neural Network Toolbox - University of Sunderland
Cell Modeling in Genesis
COMM2M
Harry R. Erwin, PhD
University of Sunderland
Resources
• Bower and Beeman, 1998, The Book of
Genesis, Second edition, Springer-Verlag.
Structurally Realistic Modeling
• Why?
– Biological realism allows known neural data to
be used as constraints, limiting the
dimensionality of the resulting search space.
– Biological relevance makes predictions
testable.
– The model-building process identifies the data
researchers should be collecting.
Pedagogical Reasons
• Increased chance of generating
unanticipated functional insights based on
emergent properties of neurons.
• The more realistic the model, the more
likely it will discover something new.
• It is easier to make a realistic model more
abstract than the reverse.
The Questions You Must Be
Ready to Answer
• “What do you know now that you did not
know before?”
• “How can you determine its likelihood?”
Model-Building is a Process, not
an End in Itself
• A good model makes it very clear what you do not
know and what you need to find out.
• It is quite possible that evolution has produced a
very tight relationship between structure and
function.
• AI has shown that the nervous system has solved
some very hard problems. This suggests the CNS
may be the only feasible solution to producing
intelligence. It is interesting that neuropil has
evolved at least three times.
The Modeling Process
• Build the model first, to aid in experimental
design, the choice of data to collect, and the
relevance of experiments.
• Neurobiology has a massive amount of data on its
hands. Yet we don’t understand the answers to
simple questions like how the cortex functions.
• Modeling is a tool for dealing with the data and
for storing it efficiently.
How and When to Model
• A stepwise process:
– Single neurons or networks?
– Individual modeling steps
Single Neurons or Networks?
• The best place to start is with an existing model.
Single cell or network?
• It depends:
– Detailed single cell models show the dynamics of
responses, but do not tell how the cell is activated.
– Networks use more simplified neural models
• Look at your data.
• You will do both kinds of modeling in the end.
Modeling Steps
1. Establish sufficient structural detail to replicate
physiological (or non-physiological) responses.
(Non-physiological responses are unnatural.)
2. Simulate results from as many different
recording types as possible.
3. Then begin exploring functional properties of
the model. In single-cell models, this involves
adding synaptic conductances. In networks, this
involves synaptic activation or plasticity.
4. Interesting results appear early, during tuning.
To Simulate a Compartment
• The compartment object is used to construct
neurons.
– ‘create object name [options]’
• Elements form a hierarchy like directories.
• Use ‘create neutral /cell’ to create a parent element
for the hierarchy.
• ‘create compartment /cell/soma’ then creates a
somatic compartment for the cell.
• To delete an object: ‘delete name’
Examining and Modifying
Elements
• ‘le’ lists the elements in the current level of the
hierarchy.
• Elements contain fields. To see some: ‘showfield
/cell/soma -all’
• To see the membrane resistance field: ‘showfield
/cell/soma Rm’
• To change the current working element to
location: ‘ce location’
• This location will be the default for all commands.
Moving Around
• ‘pwe’ prints the current working element
• ‘pushe location’ and ‘pope’ allows to you
set up a stack of elements.
• To set field values use the ‘setfield location
field value’
• Multiple fields in a location can be set by
repeating the ‘field value’ arguments.
Running Genesis
•
•
•
•
Use ‘check’ to validate the simulation.
Use ‘reset’ to go to a known initial state.
To step the simulation, use ‘step count’
Graphics can be added by using the
XODUS library. ‘create xform location’
• xform is a default form.
• To show a form, ‘xshow location’
Graphs
• To create a graph named voltage ‘create
xgraph /data/voltage’
• This means a given form can contain
multiple graphical elements.
• To hide a form: ‘xhide location’
To Plot Data
• Interelement communication is done using
messages. This can be between model
elements or between model and graphical
elements.
• ‘addmsg /cell/soma /data/voltage PLOT Vm
*volts *red’
• Source-destination-type-datafield namelabel-color
Running the Simulation
• ‘reset’
• ‘step 100’
To Add Another Field to the
Same Graph
• ‘addmsg /cell/soma /data/voltage PLOT
inject *current *blue’
• ‘showmsg’ will list the messages entering
and leaving a given element.
• ‘deletemsg’ can be used to remove
messages.
Adding Buttons to a Form
• ‘create xbutton /data/RESET -script reset’
• This creates a reset button in the form and
attaches the ‘reset’ script to it.
• ‘create xbutton /data/RUN -script “step
100”’
• This creates a run button that commands
‘step 100’ when pressed.
Scripting Genesis
•
•
•
•
•
•
•
Create a text file, ‘name.g’
Begin with ‘//genesis’
Cut and paste your code into it.
‘//’ or ‘/*…*/’ are used for comments
‘\’ continues a command on the next line
To run it, type ‘name’
To run genesis with the script, type ‘genesis name’
at the unix prompt.
Simulating a Soma
• Conventions:
– Put your functions at the start of the script
‘function <fname>(arg1, arg2,…)
type1 arg1
type2 arg2 /* like K&R C */
…
type_lv1 localvar1
<commands>
end’
Example Function
function print_area(length, diameter)
float length, diameter
float area
float PI = 3.14.15926
area = PI*diameter*length
echo The area is {area}
end
To Call
• ‘print_area 5 5’
• Results: ‘The area is 78.5397’
• Note how variables are initialized and how
{…} constructs are used to refer to
variables in print statements.
• ‘echo’ prints out its arguments
• “…” are optional for strings
Units
• Genesis has no implicit units. Stick to SI
(MKS) units to avoid confusion.
– Ohms, farads, volts, amperes, seconds, siemens,
and meters
• Often, however, physiological units are
used:
– Kilohm, microfarad, millivolt, microampere,
millisecond, millisiemen, centimeter
Cell Parameters
•
•
•
•
Rm—membrane resistance
Cm—membrane capacitance
Ra—axial resistance
Specific units, independent of cell dimensions, are
usually used.
• RM—units of ohm-meter2
• CM—units of farads/meter2
• RA—units of ohm-meter
A Squid Soma
‘float RM = 0.33333’
‘float CM = 0.01’
‘float RA = 0.3’
‘float soma_1 = 30e-6’
‘float soma_d = 30e-6’
‘float EREST_ACT = -0.070’
‘float Eleak = EREST_ACT + 0.0106’
‘float ENA = 0.045’
‘float EK = -0.082’
makecompartment
• ‘create neutral /cell’
• ‘makecompartment /cell/soma {soma_l}\
{soma_d} {Eleak}’
• ‘setfield /cell/soma inject 0.3e-9’