27
Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

Embed Size (px)

Citation preview

Page 1: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

Cell Modeling in Genesis

COMM2M

Harry R. Erwin, PhD

University of Sunderland

Page 2: 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.

Page 3: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 4: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 5: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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?”

Page 6: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 7: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 8: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

How and When to Model

• A stepwise process:– Single neurons or networks?– Individual modeling steps

Page 9: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 10: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 11: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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’

Page 12: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 13: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 14: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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’

Page 15: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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’

Page 16: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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 name-label-color

Page 17: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

Running the Simulation

• ‘reset’

• ‘step 100’

Page 18: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 19: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 20: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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.

Page 21: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

Simulating a Soma

• Conventions:– Put your functions at the start of the script

‘function <fname>(arg1, arg2,…)type1 arg1type2 arg2 /* like K&R C */…type_lv1 localvar1<commands>end’

Page 22: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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

Page 23: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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

Page 24: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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

Page 25: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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

Page 26: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

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’

Page 27: Cell Modeling in Genesis COMM2M Harry R. Erwin, PhD University of Sunderland

makecompartment

• ‘create neutral /cell’

• ‘makecompartment /cell/soma {soma_l}\ {soma_d} {Eleak}’

• ‘setfield /cell/soma inject 0.3e-9’