12
doi: 10.1098/rsif.2011.0616 published online 5 October 2011 J. R. Soc. Interface Thomas A. Nielsen, Henrik Nilsson and Tom Matheson observations, experiments and analyses A formal mathematical framework for physiological Supplementary data l http://rsif.royalsocietypublishing.org/content/suppl/2011/10/04/rsif.2011.0616.DC1.htm "Data Supplement" References ref-list-1 http://rsif.royalsocietypublishing.org/content/early/2011/10/04/rsif.2011.0616.full.html# This article cites 44 articles, 13 of which can be accessed free P<P Published online 5 October 2011 in advance of the print journal. Email alerting service here right-hand corner of the article or click Receive free email alerts when new articles cite this article - sign up in the box at the top publication. Citations to Advance online articles must include the digital object identifier (DOIs) and date of initial online articles are citable and establish publication priority; they are indexed by PubMed from initial publication. the paper journal (edited, typeset versions may be posted when available prior to final publication). Advance Advance online articles have been peer reviewed and accepted for publication but have not yet appeared in http://rsif.royalsocietypublishing.org/subscriptions go to: J. R. Soc. Interface To subscribe to This journal is © 2011 The Royal Society on October 6, 2011 rsif.royalsocietypublishing.org Downloaded from

A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

Embed Size (px)

Citation preview

Page 1: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

doi: 10.1098/rsif.2011.0616 published online 5 October 2011J. R. Soc. Interface

 Thomas A. Nielsen, Henrik Nilsson and Tom Matheson observations, experiments and analysesA formal mathematical framework for physiological  

Supplementary data

l http://rsif.royalsocietypublishing.org/content/suppl/2011/10/04/rsif.2011.0616.DC1.htm

"Data Supplement"

Referencesref-list-1http://rsif.royalsocietypublishing.org/content/early/2011/10/04/rsif.2011.0616.full.html#

This article cites 44 articles, 13 of which can be accessed free

P<P Published online 5 October 2011 in advance of the print journal.

Email alerting service hereright-hand corner of the article or click Receive free email alerts when new articles cite this article - sign up in the box at the top

publication. Citations to Advance online articles must include the digital object identifier (DOIs) and date of initial online articles are citable and establish publication priority; they are indexed by PubMed from initial publication.the paper journal (edited, typeset versions may be posted when available prior to final publication). Advance Advance online articles have been peer reviewed and accepted for publication but have not yet appeared in

http://rsif.royalsocietypublishing.org/subscriptions go to: J. R. Soc. InterfaceTo subscribe to

This journal is © 2011 The Royal Society

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

Page 2: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

J. R. Soc. Interface

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

*Author for c

Electronic sup10.1098/rsif.2

doi:10.1098/rsif.2011.0616Published online

Received 2 SeAccepted 15 S

A formal mathematical frameworkfor physiological observations,

experiments and analysesThomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,*

1Department of Biology, University of Leicester, University Road, Leicester LE1 7RH, UK2School of Computer Science, University of Nottingham, Jubilee Campus,

Nottingham NG8 1BB, UK

Experiments can be complex and produce large volumes of heterogeneous data, which maketheir execution, analysis, independent replication and meta-analysis difficult. We propose amathematical model for experimentation and analysis in physiology that addresses these pro-blems. We show that experiments can be composed from time-dependent quantities, and beexpressed as purely mathematical equations. Our structure for representing physiologicalobservations can carry information of any type and therefore provides a precise ontologyfor a wide range of observations. Our framework is concise, allowing entire experiments tobe defined unambiguously in a few equations. In order to demonstrate that our approachcan be implemented, we show the equations that we have used to run and analyse twonon-trivial experiments describing visually stimulated neuronal responses and dynamicclamp of vertebrate neurons. Our ideas could provide a theoretical basis for developingnew standards of data acquisition, analysis and communication in neurophysiology.

Keywords: neuroinformatics; bio-ontologies; functional programming;insect vision, dynamic clamp

1. INTRODUCTION

Reproducibility and transparency are cornerstones ofscientific methodology. As scientific experiments andanalysis become increasingly complex, become relianton computer code and produce larger volumes of data,the feasibility of independent verification and replica-tion has—in practice—been undermined. Primarydata sharing are now standard in applications of highthroughput biology, but not in the many fields thatproduce heterogeneous observations [1,2]. Even whenraw data and code used for experiments and analysisare fully disclosed, only a minority of findings can bereproduced without discrepancies [3–5]. It is often notrealistic to verify that computer code used in analysescorrectly implements an intended mathematical algor-ithm, yet errors can undermine a large body of work[6]. The combination of bias, human error and unveri-fied software has led to the suggestion that manypublished research findings are flawed [7,8].

Some of these problems may be mitigated bydeveloping explicit models of experimentation, evidencerepresentation and analysis. A good model should simul-taneously: (i) introduce a system of categorizationdirectly relevant to the scientific field, such that scientistscan define experiments and reason about observations infamiliar terms, (ii) be machine executable; therefore

orrespondence ([email protected]).

plementary material is available at http://dx.doi.org/011.0403 or via http://rsif.royalsocietypublishing.org.

ptember 2011eptember 2011 1

unambiguous and practically useful, and (iii) consistexclusively of terms that directly correspond to math-ematical entities, enabling algebraic reasoning about,and manipulation of, procedures. Experiments aredifficult to formalize in terms of relations between math-ematical objects because they produce heterogeneousdata [2], and because they interact with the physicalworld. In creating a mathematical framework for exper-iments, we take advantage of progress in embeddinginput and output [9,10] into programming languageswhere the only mechanism of computation is the evalu-ation of mathematical functions [11].

Here, we define a formal framework for physiologythat satisfies the earlier-mentioned criteria. We showthat there is a large conceptual overlap between physio-logical experimentation and functional reactiveprogramming (FRP; [12,13]), a concise and purely func-tional formulation of time-dependent reactive computerprograms. Consequently, physiological experiments canbe concisely defined in the vocabulary of signals andevents introduced by FRP. Such a language does notdescribe the physical components of biological organ-isms; it has no concept of networks, cells or proteins.Instead, it describes the observation and calculation ofthe mathematical objects that constitute physiologicalevidence (‘observations’).

Our framework provides:

— an explicitly defined ontology of physiological obser-vations. Physiological databases have not been

This journal is q 2011 The Royal Society

Page 3: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

2 Framework for experiments in physiology T. A. Nielsen et al.

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

widely adopted [14,15] despite many candidatesbeing available [16–19]. This contrasts with bio-informatics and neuroanatomy, where databasesare routinely used [20,21]. We suggest that a flexible,concise and simple structure for physiological quan-tities can remedy some of the shortcomings [1,15]of existing databases and thus facilitate the sharingof physiological data and metadata [22];

— a concise language for describing complex experimentsand analysis procedures in physiology using only math-ematical equations. Experimental protocols can becommunicated unambiguously, highlighting differ-ences between studies and facilitating replication andmeta-analysis. The provenance [23–25] of any obser-vation can be extracted as a single equation thatincludes postacquisition processing and censoring. Inaddition, analysis procedures in languages with aclear mathematical denotation are verifiable as theirimplementation closely follows their specification [26];

— the theoretical basis for new tools that are practical,powerful and generalize to complex and multi-modalexperiments. In order to demonstrate this, we haveimplemented our framework as a new programminglanguage and used it for non-trivial neurophysiologi-cal experiments and data analyses. A strength of ourapproach is that its individual elements could, alter-natively, be adopted separately or in different waysto suit different demands.

2. RESULTS

In order to introduce the calculus of physiological evi-dence (CoPE), we first define some terminology andbasic concepts. We assume that time is global and isrepresented by a real number, as in classical physics.An experiment is an interaction between an observerand a number of organisms for a defined time period.An experiment consists of one or more trials: non-overlapping time periods during which the observer isrunning a program—instructions for manipulatingthe environment and for constructing mathematicalobjects, the observations. The analyses are further pro-grams to be run during or after the experiment thatconstruct other mathematical objects pertaining tothe experiment. In the following sections, we giveprecise definitions of these concepts using termsfrom programming language theory and type theory,while providing an introduction to the terms for ageneral audience.

2.1. Type theory for physiological evidence

What kinds of mathematical objects can be used asphysiological evidence? We answer this questionwithin simple type theory [27,28], which introduces anintuitive classification of mathematical objects byassigning to every object exactly one type. Thesetypes include base types, such as integers Z, text stringsString and the Boolean type Bool with the two valuesTrue and False, as well as the real numbers R (whichcan be approximated in a programming language withFloat). These base types are familiar to the users of

J. R. Soc. Interface

most programming languages. In addition, moderntype systems, including simple type theory, allowtypes to be arbitrarily combined in several ways. Forinstance, if a and b are types, the type a � b is thepair formed by one element of a and one of b; [a] is alist of as; a! b is the type of functions that calculatea value in the type b from a value in a. The ability towrite flexible type schemata and generic functions con-taining type variables (a, b,. . .), which can later besubstituted with any concrete type, is called ‘para-metric polymorphism’ [27] (or ‘templates’ and‘generics’ in the programming languages Cþþ andJava, respectively) and is essential to the simplicityand flexibility of CoPE.

We distinguish three type schemata in which physio-logical evidence can be values. These differ in themanner in which measurements appear in a temporalcontext, but all derive their flexibility from parametricpolymorphism. Signals capture the notion of quantitiesthat change in time. In physiology, observed time-varying quantities often represent scalar quantities,such as membrane voltages or muscle force, but thereare also examples of non-scalar signals such as thetwo- or three-dimensional location of an animal or ofa body part. Here, we generalize this notion such thatfor any type a, a signal of a is defined as a functionfrom time to a value in a, written formally as

Signal a ¼ Time! a:

For instance, the output of a differential voltage ampli-fier might be captured in a Signal Float.

In order to model occurrences pertaining to specificinstances in time, FRP defines events as a list of pairsof time points and values in a type a, called the ‘tags’:

Event a ¼ ½Time� a �:

For example, an event can be constructed from anumber-valued signal that represents the time of thelargest amplitude value of the signal, with that ampli-tude in the tag. Events that do not have a value ofinterest to associate with the time point at which itoccurred can be tagged with the unit type () that hasonly one element (i.e. no information). Events cantherefore represent measurements where the principalinformation is when something happened, or measure-ments that concern what happened.

A third kind of information describes the propertiesof whole time periods. We define a duration of type a

as a list of pairs, of which the first component is apair denoting a start time and an end time. The lastcomponent is again a value of any type a:

Duration a ¼ ½Time� Time� a�:

Durations are useful for manipulating informationabout a whole trial or a single annotation of an entireexperiment, but could also be observations in theirown right, such as open times of individual ion chan-nels, or periods in which activity of a system exceedsa set threshold (e.g. during bursts of action potentials).Lastly, durations could be used for information thatspans multiple trials—for instance, the presence orabsence of a drug.

Page 4: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

Table 1. Representation of physiological observations andquantities in the calculus of physiological evidence.

quantity type

voltage across the cell membrane Signal Floation concentration Signal Floatanimal location in two-dimensional

spaceSignal

(Float � Float)action potential Event ()action potential waveforms Event (Signal Float)spike detection threshold Duration Floatspike interval Duration ()synaptic potential amplitude Event Floatdrug present Duration ()trial with parameter a Duration a

visual stimulus Signal Shapelaboratory notebook Event String

Framework for experiments in physiology T. A. Nielsen et al. 3

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

As signals, events and durations can be instantiatedfor any type, they form a simple but flexible frameworkfor representing many physiological quantities. Weshow a list of such examples primarily drawn fromneurophysiology in table 1. A framework in any typesystem that does not support parametric polymorphismwould have to represent these quantities fundamentallydifferently, thus removing the possibility of re-usingcommon analysis procedures. Although parametricpolymorphism is conceptually simple and the distinctionswe are introducing are intuitive, common biomedicalontologies [29] cannot accommodate these definitions.

2.2. Calculating with signals and events

From direct observations, one often needs to processevents and signals, create new events from signals, filterdata and calculate statistics. Here, we formulate thesetransformations in terms of the lambda calculus [11], afamily of formal languages for computation based solelyon evaluating functions. These languages, unlike conven-tional programming languages, retain an importantcharacteristic of mathematics: a term can freely bereplaced by another term with identical meaning. Thisproperty (referential transparency; [30]) facilitates alge-braic manipulation of and reasoning about programs[26]. The lambda calculus allows functions to be used asfirst-class entities: that is, they can be referenced by vari-ables and passed as arguments to other functions. On theother hand, the lambda calculus disallows changing thevalue of variables or global states. These propertiestogether mean that the lambda calculus combines verifi-able correctness with a high level of abstraction, leadingto programs that are in practice more concise [31] thanthose written in conventional programming languages.The lambda calculus or variants thereof has been usedas a foundation for mathematics [32], classical [33] andquantum mechanics [34], evolutionary biochemistry[35], mechanized theorem provers [36,37] and functionalprogramming languages [38].

In the lambda calculus, calculations are performedby function abstraction and application. lx! edenotes the function with argument x and body e,and f e the application of the function f to the

J. R. Soc. Interface

expression e (more conventionally written f(e)). Forinstance, the function add2¼ lx! xþ 2, which canbe written more conveniently as add2 x¼ x þ 2, addstwo to its argument; hence, add2 3¼ (lx! x þ 2) 3 ¼3 þ 2 by substituting arguments in the function body.

We now present the concrete syntax of CoPE, inwhich we augment the lambda calculus with constructsto define and manipulate signals and events. This calcu-lus borrows some concepts from earlier versions of FRP,but focuses exclusively on signals and events as math-ematical objects and their relations. It does not haveany control structures for describing sequences ofsystem configurations, where a signal expressiondepends on the occurrence of events [12,13], althoughsuch constructs may be useful for simulations. As aresult, CoPE is quite different from conventionalFRP, which is also reflected in its implementation.

Let the construct f: e :g denote a signal with thevalue of the expression e at every time point, and letthe construct k: s :l denote the current value of thesignal s in the temporal context created by the sur-rounding f: . . . :g braces. For instance,

f: 1 :g

denotes the signal that always has the value 1; and thefunction smap defined as

smap f s ¼ f: f k: s :l :g

transforms, for any two types a and b, the signal s ofa into a signal of b by applying the function f of typea! b to the value of the signal at every time point.

The differential operator D differentiates a real-valued signal with respect to time, such that D sdenotes its first derivative and D D s the second deriva-tive of the signal s. When the differential operatorappears on the left-hand side of a definition, it intro-duces a differential equation (see §2.5).

Events and durations can be manipulated as lists.Thus, a large number of transformations can be definedwith simple recursive equations, including filters, foldsand scans that are pivotal in functional programminglanguages [31]. In addition, we have added a specialconstruct to detect events from existing signals. Forinstance, a threshold detector generates an occurrenceof an event whenever the value of a signal crosses aspecific level from below. Here, we generalize thethreshold detector to an operator ?? that takes a pre-dicate (i.e. a function of type a! Bool), applies it tothe instantaneous value of a signal and generates anevent whenever the predicate becomes true. For instance,

ðlx ! x . 5Þ ?? s

denotes the event that occurs whenever the value of thesignal s starts to satisfy the predicate lx! x . 5; thatis, whenever it becomes greater than 5 after havingbeen smaller. The expression (lx! x . 5)??s thusdefines a threshold detector restricted to thresholdcrossings with a positive slope.

Table S1 in the electronic supplementary materialpresents an informal overview of the syntax of CoPE;table S2 in the electronic supplementary material

Page 5: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

4 Framework for experiments in physiology T. A. Nielsen et al.

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

details the types and names of some of the functions wehave defined using these definitions.

2.3. Interacting with the physical world

In the previous examples, signals, events and durationsexist as purely mathematical objects. In order todescribe experiments, however, it must also be possibleto observe particular values from real-world systems,and to create controlled stimuli to perturb these sys-tems. For this purpose, we introduce sources andsinks that act as a bridge between purely mathematicalequations and the physical world.

A source is an input port through which the value ofsome external quantity can be observed during thecourse of an experiment by binding it to a variable. Ifthe quantity is time-varying, then the bound variablewill denote a signal. For instance, binding a variableto source denoting a typical analogue-to-digital conver-ter yields a signal of real numbers. However, a sourcemay also refer to a time-invariant quantity.

The construct

identifier ,� source

binds the value or signal resulting from the observationof the source during the course of an experiment to thevariable identifier. For a concrete example, the follow-ing code defines a simple experiment:

v ,� ADC 0 ðkHz 20Þ

where kHz x ¼ 1000 . x. This describes the observationof the voltage signal on channel 0 of an analogue-to-digital converter at 20 kHz, binding the whole signalto the variable v. We have also used sources to samplevalues from probability distributions (see the electronicsupplementary material).

In addition to making appropriate observations, anexperiment may also involve a perturbation of theexperimental preparation. For example, the manipu-lation could control the amount of electric currentinjected into a cell. Alternatively, non-numeric signalsare used below to generate visual stimuli on a computerscreen. Such manipulations require the opposite of asource, a sink: an output port connected to a physicaldevice capable of effecting the desired perturbation.The value at the output at any point in time duringan experiment is defined by connecting the correspond-ing sink to a signal. This is performed through thefollowing construct, mirroring the source constructintroduced earlier:

signal �. sink:

As a concrete example, suppose we wish to output asinusoidal stimulus. We first construct a time-varyingsignal describing the desired shape of the stimulus. Inthis case, we read a clock source that yields a signalcounting the number of seconds since the experimentstarted:

seconds ,� clock

J. R. Soc. Interface

The sine wave can now be defined as

sineWave ¼ f: A � sin ð f � k: seconds :lþ pÞ :g

where A, f and p are Float-valued constants specifyingthe amplitude, frequency and phase, respectively. Wethen write

sineWave �. DAC 0 ðkHz 20Þ

to send the sineWave signal to channel 0 of a digital-to-analogue converter at 20 kHz.

We have implemented this calculus as a new pro-gramming language and used this software to defineand run two detailed experiments in neurophysiology.

2.4. Example 1

In locusts, the descending contralateral movementdetector (DCMD) neuron signals the approach of loom-ing objects to a distributed nervous system [39]. Wehave constructed several experiments in CoPE torecord the response of DCMD to visual stimuli thatsimulate objects approaching with different velocities.In order to generate these stimuli, we augmentedCoPE with primitive three-dimensional geometricshapes. Let the expression

cube l

denote a cube centred on the origin, with side length l,

translate ðx; y; zÞ s

represent the shape that results from translating theshape s by the vector (x,y,z) and

colour ðr; g; bÞ s

indicate the shape identical to s except with the colourintensity red r, green g and blue b. These primitivesare sufficient for the experiments reported here. Morecomplex stimuli can alternatively be defined in, andloaded from, external files; for instance, the sourcetexture loads an image, such that

tx ,� texture 0image:tga0

loads the binary image in image.tga and creates anew function tx, which—when applied to a shape—returns a similar but appropriately textured shape.Thus,

tx ðcube 1Þ

denotes a textured cube. Sources for loading complexpolygons could be defined similarly.

As signals in CoPE are polymorphic, they can carrynot just numeric values but also shapes; so we representvisual stimuli as values in Signal Shape. The loomingstimulus consists of a cube of side length l approachinga locust with constant velocity v. The time-varyingdistance from the locust to the cube in real-worldcoordinates is a real-valued signal:

distance ¼ f: v � ðk: seconds :l� 5Þ :g

The distance signal is the basis of shape-valuedsignal loomingSquare representing the approaching

Page 6: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

2 sdist

ance

(m

)

50

25

0

volta

ge

0.01

0.04

fre

quen

cy (

s–1)

0

100

200

spik

esl/|

| (

s)

Figure 1. Diagram of an experiment to record the looming response from a locust descending contralateral movement detector(DCMD) neuron, showing the first five recorded trials from one animal. Experiment design: blue lines, simulated object size-to-approach speed ratio (l/|v|) for given approach trial, red lines, simulated object distance, red triangles, apparent collisiontime. Observed signal: black lines, recorded extracellular voltage. The largest amplitude deflections are DCMD spikes. Analysis:green dots, DCMD spikes, with randomly jittered vertical placement for display, thin black line, spike rate histogram with 50 msbin size. The inter-trial interval of 4 min is not shown.

Framework for experiments in physiology T. A. Nielsen et al. 5

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

square:

loomingSquare ¼f: colour ð0; 0; 0Þ

ðtranslate ð0; 0; k: distance :lÞðcube lÞÞ :g

loomingSquare differs from conventional protocols [40]for stimulating DCMD in that it describes an objectthat passes through the physical screen and the obser-ver, and when displayed would thus disappear fromthe screen just before collision. In order not to evoke alarge OFF response [41] at this point, the object isfrozen in space as it reaches the plane of the surfaceonto which the animation is projected [42]. In order toachieve this effect, we define a new signal that has alower bound of the distance from the eye to the visualdisplay screen zscreen

distance0 ¼ f:max zscreen k: distance :l :g;

where max x y returns the larger of the two numbers xand y. loomingSquare0 is identical to loomingSquareexcept for the use of distance0.

Finally, loomingSquare0 is connected to a screensignal sink that represents a visual display unit capableof projecting three-dimensional shapes onto a two-

J. R. Soc. Interface

dimensional surface

loomingSquare0 �. screen:

In our experiments, the extracellular voltage fromthe locust nerve (connective), in which the DCMDforms the largest amplitude spike, was amplified, fil-tered (see methods and listing 1 in the electronicsupplementary material) and digitized:

voltage ,� ADC 0 ðkHz 20Þ

loomingSquare0 and voltage thus define a single objectapproach and the recording of the elicited response.This approach was repeated every 4 min, with differentvalues of l/jvj. Figure 1 shows l/jvj as values with typeDuration Float, together with the distance 0 and voltagesignals for the first five trials of one experiment on acommon time scale.

The simplest method for detecting spikes from a rawvoltage trace is to search for threshold crossings, whichworks well in practice for calculating DCMD activityfrom recordings of the locust connectives [40]. (Wehave also implemented in CoPE a spike identificationalgorithm based on template matching; see the elec-tronic supplementary material.) If the thresholdvoltage for spike detection is vth, then the event spike

Page 7: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

50

100

150

200

250

300

0 1 2 3 4 5

spik

e ra

te (

s–1)

time (s)

(a)

40

60

80

100

120

0.01 0.02 0.03 0.04 0.05

spik

es p

er tr

ial

(b)

100

150

200

250

300

350

0.01 0.02 0.03 0.04 0.05

peak

spi

ke r

ate

(s–1

)

(c)l/| | (s)

l/| | (s)

Figure 2. (a) Spike rate histograms for approaches with l/|v| of0.01 (small-dashed line), 0.02 (large-dashed line) and 0.04 s(solid line), with 50 ms bin size, with collision time indicatedby a black triangle. (b) Scatter plot of number of countedspikes against approach l/|v| for individual trials. (c) Scatterplot of the maximum rate of spiking against l/|v| for individualtrials. n ¼ 1 animal, 272 approaches.

6 Framework for experiments in physiology T. A. Nielsen et al.

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

can be calculated with

spike ¼ tag ðÞ ððlv ! v . vthÞ ?? voltageÞ;

where tag replaces every tag in some event with a fixedvalue, so that spike has type Event (). The spike eventdetected by threshold crossing is displayed on thecommon time scale in figure 1. The top row displaysthe spike rate histogram

Hspike ¼f: length ð filter ðbetween k: delay seconds :l

k: seconds :l W fstÞspikesÞ :g

for each trial. This definition exploits the list semanticsof events by using the generic list-processing functionfilter that takes as arguments predicate p and a listxs, and returns the list of elements in xs for which thepredicate holds. Here, the predicate is fst (which returnsthe first element of a pair; here, the occurrence time)composed (W) with the function between ¼ lx! ly!lz! z . x ^ z � y, which tests whether the last ofthree numbers lies between the first two.

J. R. Soc. Interface

We examined how the DCMD spike response variedwith changes in l/jvj. The average of Hspike for threedifferent values of l/jvj is shown in figure 2a; whereasfigure 2b,c shows the total number of spikes (lengthspike) and largest value of Hspike, for each approach,plotted against the value of l/jvj [42]. The code thatdescribes and executes these trials is given in the elec-tronic supplementary material, listing 1. This codeincludes a description, captured in CoPE variablesand with appropriate temporal context, of the exper-imental context that is not machine-executable. Thisdescription is based on proposed standards for minimalinformation about electrophysiological experiments[43]. Correspondences between these standards andCoPE variables is given in electronic supplementarymaterial, table S3.

This experiment demonstrates that the calculus ofphysiological evidence can adequately and conciselydescribe visual stimuli, spike recording and relevantanalyses for activation of a locust looming detection cir-cuit. In order to demonstrate the versatility of thisframework, we next show that it can be used toimplement dynamic clamp in an in vivo patch-clamprecording experiment.

2.5. Example 2

Dynamic clamp experiments [44,45] permit the obser-vation of real neuronal responses to added simulatedionic conductances; for instance, a synaptic conductanceor an additional Hodgkin–Huxley type voltage-sensitivemembrane conductance. A dynamic clamp experimentrequires that the current injected into a cell is calculatedat every time point based on the recorded membranepotential. Here, we use CoPE to investigate theeffect of an A-type potassium conductance [46] on theresponse of a zebrafish spinal motor neuron tosynaptic excitation.

The output current i is calculated at each time-stepfrom the simulated conductance g and the measuredmembrane voltage Vm:

Vm ,� ADC 0 ðkHz 20Þi ¼ : k:Vm :l� Eð Þ � k:g :l :gf

i �. DAC 0 ðkHz 20Þ

The experiment is thus characterized by theconductance signal g (for clarity, here we omit theamplifier-dependent input and output gains).

In the simplest case, g is independent of Vm—forinstance, when considering linear synaptic conduc-tances [47]. We first consider the addition of asimulated fast excitatory synaptic conductance to areal neuron. Simple models of synapses approximatethe conductance waveform with an alpha function [48]:

alphaf amp t ¼

:amp � t2 � k:seconds :l � exp �k:seconds :l � tð Þ :� �

:

In order to simulate a barrage of synaptic input to acell, this waveform is convolved with a simulated pre-synaptic spike train. The spike train itself is firstbound from a source representing a random probability

Page 8: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

–75

–70

–65

–60

–55

–50

1.70 1.71 1.72 1.73 1.74 1.75 1.76 1.77

Vm

(m

V)

(a)

–70

–60

–50

–40

–30

1.20 1.25 1.30 1.35 1.40 1.45

Vm

(m

V)

time (s)

(b)

10

20

30

0 20 40 60 80 100post

syna

ptic

rat

e (s

–1)

presynaptic rate (s–1)

(c)

Figure 3. (a) Recorded intracellular voltage following conduc-tance injections of a unitary simulated synaptic conductance,in the presence of A-type potassium conductances of increas-ing magnitude (values given are for the maximal conductancegA; 0, solid line; 10, large-dashed line; 40, small-dashed line;100 nS; small-dashed line). (b) Similar to (a), but with a simu-lated presynaptic spike train with inter-spike intervals drawnfrom a Poisson distribution (here a mean of 120s21; the spiketrains used to test the different levels of A-type conductanceare identical). (c) The postsynaptic spike rate plotted againstthe rate of simulated presynaptic inputs, with gA as in (b).

Framework for experiments in physiology T. A. Nielsen et al. 7

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

distribution—in this case, series of recurrent events oftype Event () for which the inter-occurrence intervalis Poisson distributed. Our standard library contains afunction convolveSE, which convolves an impulseresponse signal with a numerically tagged event suchthat the impulse response is multiplied by the tagbefore convolution.

preSpike ,� poissonTrain rate

gsyn ¼ convolveSE ðalphaf amp tÞðtag 1 preSpikeÞ;

where the signal gsyn could be used directly in adynamic clamp experiment using the above template(i.e. g ¼ gsyn). Here, we will examine other conductancesthat modulate the response of the cell to synapticexcitation.

Both the subthreshold properties of a cell and itsspiking rate can be regulated by active ionic conduc-tances, which can also be examined with the dynamicclamp. In the Hodgkin–Huxley formalism for ion chan-nels, the conductance depends on one or more statevariables, for which the forward and backward rate con-stants depend on the membrane voltage. We show theequations for the activation gate of an A-type potass-ium current ([46]; following [49], but usingInternational System of Units and absolute voltages).The equations for inactivation are analogous (see listing2 in the electronic supplementary material).

We write the forward and backward rates as func-tions of the membrane voltage

aa v ¼ kaa1ðv þ kaa2Þexpðð�kaa2 � vÞ=kaa3Þ � 1

;

and

ba v ¼ kba1ðv þ kba2Þexp v þ kba2

� �=kba3

� �� 1

;

where with kaa1 ¼ inverseVolts 2 2.0 � 105, kaa2 ¼ volts0.0469, kaa3 ¼ kba3 ¼ volts 0.01, kba1 ¼ inverseVolts1.75 � 105 and kba2 ¼ volts 0.0199, volts ¼inverseVolts ¼ lx! x. The time-varying state of theactivation gate is given by a differential equation. Weuse the notation D x ¼ f:f (x, k: seconds :l):g to denotethe ordinary differential equation that is conventionallywritten as dx/dt ¼ f(x,t), with starting conditions expli-citly assigned to the variable x0. The differentialequation for the activation variable a is

D a ¼ f: aak:Vm :l � 1� k:a :lð Þ� bak:Vm :l � k:a :l :g

a0 ¼ 0:

The inactivation state signal b is defined similarly.The current signal from this channel is calculated

from Ohm’s law:

iA ¼ f: gA � k:a :l � k:b :l � ðk:Vm :l� EÞ :g:

This is added to the signal i defined above to give theoutput current, thus completing the definition of thisexperiment:

Vm � gsyn þ iA �. DAC 0 ðkHz 20Þ

J. R. Soc. Interface

Figure 3a,b shows the voltage response to a unitarysynaptic conductance and a train of synaptic inputs,respectively, with gA ranging from 0 to 100 nS. By vary-ing the value of rate, we can examine the input–outputrelationship of the neuron by measuring the frequencyof postsynaptic spikes. Spikes were detected from thefirst derivative of the Vm signal with

spike ¼ tag ðÞððlv ! v . vthÞ ?? DVmÞ;

and the spike frequency calculated with thefrequencyDuring function. This relationship betweenthe postsynaptic spike frequency and the simulatedsynaptic input rate is plotted in figure 3c for four differ-ent values of gA. The code for example 2 is given in theelectronic supplementary material, listing 2.

3. DISCUSSION

We present a new approach to performing and commu-nicating experimental science. Our use of typed,functional and reactive programming overcomes at

Page 9: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

8 Framework for experiments in physiology T. A. Nielsen et al.

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

least two long-standing issues in bioinformatics: theneed for a flexible ontology to share heterogeneousdata from physiological experiments [15] and a languagefor describing experiments and data provenanceunambiguously [23,50].

The types we have presented form a linguistic frame-work and an ontology for physiology. Thanks to theflexibility of parametric polymorphism, our ontologycan form the basis for the interchange of physiologicaldata and metadata without imposing unnecessary con-straints on what can be shared. The ontology is non-hierarchical and would be difficult to formulate in thevarious existing semantic web ontology frameworks(web ontology language, [29], or resource descriptionframework), which lack parametric polymorphism andfunctional abstraction. Nevertheless, by specifying thecategories of mathematical objects that constitute evi-dence, it is an ontology in the classical sense ofcataloguing the categories within a specific domain,and providing a vocabulary for that domain. Weemphasize again that it is an ontology of evidence,not of the biological entities that give rise to this evi-dence. It is unusual as an ontology for scientificknowledge in being embedded in a computational fra-mework, such that it can describe not onlymathematical objects but also their transformationsand observations. Recent work on metadata represen-tation [51] has focused on delineating the informationneeded to repeat an experiment [43,52], but in practiceit is often not clear a priori what aspects of an exper-iment could influence its outcome. With CoPE, ourmain goal was to describe unambiguously machine-executable aspects of the metadata of an experiment.Nevertheless, any information that can be captured ina type can be represented in the temporal contexts pro-vided by CoPE, i.e. it can exist as signals, events ordurations, as we have demonstrated in the code listingsin the electronic supplementary material. Here, wemake no fundamental distinction between the represen-tation of data and metadata. All relevant informationabout an experiment is indexed by time and thuslinked by overlap on a common time scale.

Parametric polymorphism and first-class functions aregenerally associated with research-oriented languagessuch as Haskell and ML rather than mainstream pro-gramming languages such as Cþþ or Java. It is likelythat much of CoPE could be implemented in Cþþ,where template metaprogramming implements a staticform of parametric polymorphism, and template functorscan be used to represent functions. These must all beresolved at compile-time, however; so it is difficult touse dynamically calculated or arbitrarily complex func-tions. The importance of true first-class functionsand parametric polymorphism is becoming increasinglywell recognized, and these features are now beingimplemented in the mainstream programming languagesCþþ, C# and Java. We therefore expect that it willsoon be possible to implement the formalism we are pro-posing in a wide range of programming languages.

Our mathematical definitions are unambiguous andconcise, unlike typical definitions written in naturallanguage, and are more powerful than those specifiedby graphical user interfaces or in formal languages

J. R. Soc. Interface

that lack a facility for defining abstractions. Our frame-work is not only a theoretical formalism, but we showthat it can also be implemented as a very practicaltool. This tool consists of a collection of computer pro-grams for executing experiments and analyses, and forcarrying out data management. By using programsthat share data formats, experimentation and analysiscan be controlled in a highly efficient manner, andmany sources of human error eliminated. Existingtools use differential equations to define dynamicclamp experiments (model reference current injection;[53]) or simulations (X-Windows phase plane; [54]).Here, we show that a general (polymorphic) definitionof signals and events, embedded in the lambda calculus,can define a much larger range of experiments and theevidence that they produce. Our experiment definitionshave the further advantage that they compose; that is,more complex experiments can be formulated by joiningtogether elementary building blocks.

Our full approach is particularly relevant tothe execution of very complex and multi-modalexperiments, which may need to be dynamicallyreconfigured based on previous observations, or to dis-ambiguate difficult judgements about evidence [55].Even if used separately, however, individual aspects ofCoPE can make distinct contributions to scientificmethodology. For instance, our ontology for physiologi-cal evidence can be used within more conventionalprogramming languages or web applications that facili-tate data sharing. In a similar way, the capabilities ofCoPE for executing and analysing experiments couldprovide a robust core for innovative graphical userinterfaces. We expect the formalism presented here tobe applicable outside neurophysiology. Purely temporalinformation from other fields could be represented usingsignals, events and durations, or other kinds of temporalcontext formalized in type theory. In addition, theconcepts of signals, events and durations could begeneralized to allow not just temporal but also spatialor spatio-temporal contexts to be associated withspecific values. Such a generalization is necessary forCoPE to accommodate data from the wider neurosciencecommunity, including functional neuroanatomy andmicroscopy, and other scientific disciplines that observeand manipulate spatio-temporal data.

We have argued that observational data, experimen-tal protocols and analyses formulated in CoPE(or similar frameworks) are less ambiguous andmore transparent than those described using manycurrent formulations. The structure of CoPE presentsadditional opportunities for mechanically excludingsome types of procedural errors in drawing inferencesfrom experiments. For instance, CoPE could incorpor-ate an extension to simple type theory [56] that addsnot only a consistency check for dimensional units,but also powerful aspects of dimensional analysis,such as the Buckingham’s p-theorem. Furthermore,in our formulation, experimentally observed valuesexist as mathematical objects within a computationalframework that can be used to define probability distri-butions. Hierarchical probabilistic notation [57] permitsthe construction of flexible statistical models for thedirectly observed data. This means that CoPE could

Page 10: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

Framework for experiments in physiology T. A. Nielsen et al. 9

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

in principle be used to turn such probabilistic modelsinto powerful data analysis tools accessible fromwithin the CoPE formalism. Such data analysis pro-cedures can largely be automated, for instance bycalculating parameter estimates using statisticalpackages such as WinBUGS [58] or Mlwin [59]. Alterna-tively, it would be possible to compile descriptions ofprobabilistic models in CoPE to the specificationformat used by the AutoBayes [60] system, whichwould then be used to generate efficient code forstatistical inference. When run, this code would returndata to CoPE. This analysis workflow could be inte-grated seamlessly into an implementation of CoPEsuch that both the hierarchical model structure andthe returned parameters would be defined by, andtagged with, the appropriate temporal contexts. Thismethodology could be used to quantify differentaspects of uncertainty in the measurements, takinginto account all available information, while largelyavoiding ad hoc transformations of data. Integratingwell-developed statistical tools with data acquisitionand manipulation within CoPE would create apowerful platform for validating inferences drawn fromphysiological experiments.

4. EXPERIMENTAL PROCEDURES

4.1. Language implementation

We have used two different implementation strategiesfor reasons of rapid development and execution effi-ciency. For experimentation and simulation, we haveimplemented a prototype compiler that can executesome programs that contain signals and events definedby mutual recursion, as is necessary for the experimentsin this study. The program is transformed by the com-piler into a normal form that is translated to animperative program that iteratively updates variablescorresponding to signal values, with a time step thatis set explicitly. The program is divided into a seriesof stages, where each stage consists of the signals andevents defined by mutual recursion, subject to the con-straints of input–output sources and sinks. This ensuresthat signal expressions can reference values of othersignals at arbitrary time points (possibly in thefuture) as long as referenced signals are computed inan earlier stage.

In order to calculate a new value from existing obser-vations after data acquisition, we have implemented thecalculus of physiological evidence as a domain-specificlanguage embedded in the purely functional program-ming language Haskell.

For hard real-time dynamic clamp experiments, wehave built a compiler back-end targeting the LXRT(user-space) interface to the real-time application inter-face (RTAI; http://rtai.org) extensions of the Linuxkernel, and the Comedi (http://comedi.org) interfaceto data acquisition hardware. Geometric shapes wererendered using OpenGL (http://opengl.org).

All the codes used for experiments, data analysis andgenerating figures are available at http://github.com/glutamate/bugpan under the GNU general public licence(http://www.gnu.org/licenses/gpl.html).

J. R. Soc. Interface

4.2. Locust experiments

Locusts were maintained at 1600 m23 in 50 � 50 � 50 cmcages under a standard light and temperature regimeof 12 h light at 368C : 12 h dark at 258C. They werefed ad libitum with fresh wheat seedlings and branflakes. Recordings from locust DCMD neurons were per-formed as described previously [61]. Briefly, locusts werefixed in plasticine, with their ventral side facingupwards. The head was fixed with wax and the connec-tives were exposed through an incision in the soft tissueof the neck. A pair of silver wire hook electrodes wereplaced underneath a connective, and the electrodesand connective enclosed in petroleum jelly. The elec-trode signal was amplified 1000� and bandpassfiltered between 50 and 5000 Hz, before analogue-to-digital conversion at 18 bits and 20 kHz with a NationalInstruments PCI-6281 board. The locust was placed infront of a 2200 CRT monitor running with a verticalrefresh rate of 160 Hz. All aspects of the visual stimulusdisplayed on this monitor and of the analogue-to-digitalconversion performed by the National Instrumentsboard were controlled by programs written in CoPErunning on a single computer.

The code for running the trials described inexample 1, including relevant metadata, is given inthe electronic supplementary material, listing 1.

4.3. Zebrafish experiments

Zebrafish were maintained according to established pro-cedures [62] in approved tank facilities, in compliancewith the Animals (Scientific Procedures) Act 1986and according to University of Leicester guidelines.Intracellular patch-clamp recordings from motor neur-ons in the spinal cord of a 2-days old zebrafishembryo were performed as described previously [63].We used a National Instruments PCI-6281 board torecord the output from a BioLogic patch-clamp ampli-fier in current-clamp mode, filtered at 3 kHz anddigitized at 10 kHz, with the output current calculatedat the same rate by programs written in CoPE targetedto the RTAI back-end (see earlier text). The measuredjitter for updating the output voltage was 6s and wassimilar to that measured with the RTAI latency testtool for the experiment control computer.

The code for the Zebrafish experiment trials, includ-ing relevant metadata, is given in the electronicsupplementary material, listing 2.

We thank Jonathan McDearmid for help with the Zebrafishrecordings and Angus Silver, Guy Billings, AntoniaHamilton, Nick Hartell and Rodrigo Quian Quiroga forcritical comments on the manuscript. This work was fundedby a Human Frontier Science Project fellowship to T.N., aBiotechnology and Biological Sciences Research Councilgrant to T.M. and T.N., a BBSRC Research DevelopmentFellowship to T.M., and Engineering and Physical SciencesResearch Council grants to H.N. The author contributionswere as follows: T.N. designed and implemented CoPE,carried out the experiments and data analyses, and wrotethe draft of the paper. H.N. contributed to the languagedesign, helped clarify the semantics and wrote severalsections of the manuscript. T.M. contributed to the designof the experiments and the data analysis, and made

Page 11: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

10 Framework for experiments in physiology T. A. Nielsen et al.

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

extensive comments on drafts of the manuscript. All authorsobtained grant funding to support this project.

REFERENCES

1 Gardner, D., Abato, M., Knuth, K. H. & Robert, A. 2005Neuroinformatics for neurophysiology: the role, design,and use of databases. In Databasing the brain: from datato knowledge (eds S. H. Koslow & S. Subramaniam),p. 47–68. Hoboken, NJ: Wiley.

2 Tukey, J. W. 1962 The future of data analysis. Ann. Math.Stat. 33, 1–67. (doi:10.1214/aoms/1177704711)

3 Ioannidis, J. P. et al. 2008 Repeatability of publishedmicroarray gene expression analyses. Nat. Genet. 41,149–155. (doi:10.1038/ng.295)

4 Baggerly, K. A. & Coombes, K. R. 2009 Deriving chemo-sensitivity from cell lines: forensic bioinformatics andreproducible research in high-throughput biology. Ann.Appl. Stat. 3, 1309–1334. (doi:10.1214/09-AOAS291)

5 McCullough, B. D. 2007 Got replicability? J. Money,Credit Bank Arch. Econ. J. Watch 4, 326–337.

6 Chang, G., Roth, C. B., Reyes, C. L., Pornillos, O.,Chen, Y. & Chen, A. P. 2006 Retraction. Science 314,1875. (doi:10.1126/science.314.5807.1875b)

7 Ioannidis, J. P. 2005 Why most published research find-ings are false. PLoS Med. 2, e124. (doi:10.1371/journal.pmed.0020124)

8 Merali, Z. 2010 Computational science: error. Nature 467,775–777. (doi:10.1038/467775a)

9 Peyton Jones, S. 2002 Tackling the awkward squad:monadic input–output, concurrency, exceptions, andforeign-language calls in Haskell. In Engineeringtheories of software construction (eds T. Hoare, M. Broy &R. Steinbruggen), p. 47–96. Amsterdam, The Netherlands:IOS Press.

10 Wadler, P. 1995 Monads for functional programming.Lect. Notes Comput. Sci. 925, 24–52.

11 Church, A. 1941 The calculi of lambda-conversion.Princeton, NJ: Princeton University Press.

12 Elliott, C. & Hudak, P. 1997 Functional reactive anima-tion. Int. Conf. Funct. Program. 32, 263–273.

13 Nilsson, H., Courtney, A. & Peterson, J. 2002 Functionalreactive programming, continued. In Proc. 2002 ACMSIGPLAN workshop on Haskell, Pittsburgh, PA, USA,3 October 2002, pp. 51–64. New York, NY: ACM Press.

14 Herz, A. V., Meier, R., Nawrot, M. P., Schiegel, W. &Zito, T. 2008 G-Node: an integrated tool-sharing plat-form to support cellular and systems neurophysiology inthe age of global neuroinformatics. Neural Netw. 21,1070–1075. (doi:10.1016/j.neunet.2008.05.011)

15 Amari, S. et al. 2002 Neuroinformatics: the integration ofshared databases and tools towards integrative neuro-science. J. Integr. Neurosci. 1, 117–128. (doi:10.1142/S0219635202000128)

16 Jessop, M., Weeks, M. & Austin, J. 2010 CARMEN: apractical approach to metadata management. Phil.Trans. R. Soc. A 368, 4147–4159. (doi:10.1098/rsta.2010.0147)

17 Teeters, J. L., Harris, K. D., Millman, K. J., Olshausen,B. A. & Sommer, F. T. 2008 Data sharing for compu-tational neuroscience. Neuroinformatics 6, 47–55.(doi:10.1007/s12021-008-9009-y)

18 Frishkoff, G., LePendu, P., Frank, R., Liu, H. & Dou, D.2009 Development of neural electromagnetic ontologies(NEMO): ontology-based tools for representation and

J. R. Soc. Interface

integration of event-related brain potentials. Nat. Preced-ings. (doi:10.1038/npre.2009.3458.1)

19 Katz, P. S. et al. 2010 NeuronBank: a tool for catalogingneuronal circuitry. Front. Syst. Neurosci. 4, 9. (doi:10.3389/fnsys.2010.00009)

20 Rodriguez-Tome, P. 1996 The European BioinformaticsInstitute (EBI) databases. Nucleic Acids Res. 24, 6–12.(doi:10.1093/nar/24.1.6)

21 Ascoli, G. A., Donohue, D. E. & Halavi, M. 2007 NeuroMor-pho.Org: a central resource for neuronal morphologies.J. Neurosci. 27, 9247–9251. (doi:10.1523/JNEUROSCI.2055-07.2007)

22 Insel, T. R., Volkow, N. D., Li, T., Battey, J. F. & Landis,S. C. 2003 Neuroscience networks: data-sharing in aninformation age. PLoS Biol. 1, E17. (doi:10.1371/journal.pbio.0000017)

23 Pool, R. 2002 Bioinformatics: converting data to knowl-edge, workshop summary. Washington, DC: NationalAcademy Press.

24 Mackenzie-Graham, A. J., Van Horn, J. D., Woods, R. P.,Crawford, K. L. & Toga, A. W. 2008 Provenance inneuroimaging. NeuroImage 42, 178–195. (doi:10.1016/j.neuroimage.2008.04.186)

25 Van Horn, J. D. & Toga, A. W. 2009 Is it time to re-prior-itize neuroimaging databases and digital repositories?NeuroImage 47, 1720–1734. (doi:10.1016/j.neuroimage.2009.03.086)

26 Bird, R. & Moor, O. D. 1996 The algebra of programming.London, UK: Prentice Hall.

27 Pierce, B. C. 2002 Types and programming languages.Cambridge, MA: MIT Press.

28 Hindley, J. R. 2008 Basic simple type theory. Cambridge,UK: Cambridge University Press.

29 Bechhofer, S. 2007 OWL web ontology language reference.W3C Recommendation. See http://www.w3.org/TR/owl-ref/

30 Whitehead, A. N. & Russell, B. 1927 Principia mathema-tica. Cambridge, UK: Cambridge University Press.

31 Hughes, J. 1989 Why functional programming matters?Comp. J. 32, 98. (doi:10.1093/comjnl/32.2.98)

32 Martin-Lof, P. 1985 Intuitionistic type theory. Naples,Italy: Prometheus Books.

33 Sussman, G. J. & Wisdom, J. 2001 Structure and interpret-ation of classical mechanics. Cambridge, MA: MIT Press.

34 Karczmarczuk, J. 2003 Structure and interpretation ofquantum mechanics: a functional framework. In Proc.2003 ACM SIGPLAN workshop on Haskell, Uppsala,Sweden, 28 August 2003, p. 50–61. New York, NY:ACM Press.

35 Fontana, W. & Buss, L. W. 1994 What would be con-served if “the tape were played twice”? Proc. Natl Acad.Sci. USA 91, 757–761. (doi:10.1073/pnas.91.2.757)

36 de Bruijn, N. G. 1968 The mathematical language AUTO-MATH, its usage and some of its extensions. Lect. NotesMath. 125, 29–61.

37 Harrison, J. 2009Handbookof practical logic and automatedreasoning. Cambridge, UK: Cambridge University Press.

38 McCarthy, J. 1960 Recursive functions of symbolicexpressions and their computation by machine, Part I.Commun. ACM 3, 184–195. (doi:10.1145/367177.367199)

39 Rind, F. C. & Simmons, P. J. 1992 OrthopteranDCMD neuron: a reevaluation of responses to movingobjects. I. Selective responses to approaching objects.J. Neurophysiol. 68, 1654–1666.

40 Gabbiani, F., Mo, C. & Laurent, G. 2001 Invariance ofangular threshold computation in a wide-field looming-sensitive neuron. J. Neurosci. 21, 314–329.

Page 12: A formal mathematical framework for physiological ... · for physiological observations, experiments and analyses Thomas A. Nielsen1, Henrik Nilsson2 and Tom Matheson1,* 1Department

Framework for experiments in physiology T. A. Nielsen et al. 11

on October 6, 2011rsif.royalsocietypublishing.orgDownloaded from

41 O’Shea, M. & Rowell, C. H. 1976 The neuronal basis of asensory analyser, the acridid movement detector system.II. Response decrement, convergence, and the nature ofthe excitatory afferents to the fan-like dendrites of theLGMD. J. Exp. Biol. 65, 289–308.

42 Hatsopoulos, N., Gabbiani, F. & Laurent, G. 1995 Elemen-tary computation of object approach by wide-field visualneuron. Science 270, 1000–1003. (doi:10.1126/science.270.5238.1000)

43 Gibson, F. et al. 2008 Minimum information about aneuroscience investigation (MINI) electrophysiology. Nat.Precedings. (doi:10.1038/npre.2008.1720.1)

44 Robinson, H. P. & Kawai, N. 1993 Injection of digitallysynthesized synaptic conductance transients to measurethe integrative properties of neurons. J. Neurosci. Methods49, 157–165. (doi:10.1016/0165-0270(93)90119-C)

45 Sharp, A. A., O’Neil, M. B., Abbott, L. F. & Marder, E.1993 Dynamic clamp: computer-generated conductancesin real neurons. J. Neurophysiol. 69, 992–995.

46 Connor, J. A. & Stevens, C. F. 1971 Voltage clamp studiesof a transient outward membrane current in gastropodneural somata. J. Physiol. 213, 21–30.

47 Mitchell, S. J. & Silver, R. A. 2003 Shunting inhibitionmodulates neuronal gain during synaptic excitation.Neuron 38, 433–445. (doi:10.1016/S0896-6273(03)00200-9)

48 Carnevale, N. T. & Hines, M. L. 2006 The NEURON book.Cambridge, UK: Cambridge University Press.

49 Traub, R. D., Wong, R. K., Miles, R. & Michelson, H. 1991A model of a CA3 hippocampal pyramidal neuron incor-porating voltage-clamp data on intrinsic conductances.J. Neurophysiol. 66, 635–650.

50 Murray-Rust, P. & Rzepa, H. S. 2002 Scientific publi-cations in XML: towards a global knowledge base. DataSci. 1, p84–98. (doi.org/10.2481/dsj.1.84)

51 Bower, M. R., Stead, M., Brinkmann, B. H., Dufendach, K. &Worrell, G. A. 2009 Metadata and annotations for multi-scale electrophysiological data. Conf. Proc. IEEE Eng.Med. Biol. Soc. 2009, 2811–2814. (doi:10.1109/IEMBS.2009.5333570)

J. R. Soc. Interface

52 Taylor, C. F. et al. 2007 The minimum information abouta proteomics experiment (MIAPE). Nat. Biotechnol. 25,887–893. (doi:10.1038/nbt1329)

53 Raikov, I., Preyer, A. & Butera, R. J. 2004 MRCI: a flex-ible real-time dynamic clamp system for electrophysiologyexperiments. J. Neurosci. Methods 132, 109–123. (doi.org/10.1016/j.jneumeth.2003.08.002)

54 Ermentrout, B. 1987 Simulating, analyzing, and animatingdynamical systems: a guide to xppaut for researchers and stu-dents. Philadelphia, PA: Society for Industrial Mathematics.

55 Kriegeskorte, N., Simmons, W. K., Bellgowan, P. S. &Baker, C. I. 2009 Circular analysis in systems neuroscience:the dangers of double dipping. Nat. Neurosci. 12,535–540. (doi:10.1038/nn.2303)

56 Kennedy, A. J. 1997 Relational parametricity and units ofmeasure. Proc. Symp. Princ. Program. Lang. 25, 442–455.

57 Gelman, A. & Hill, J. 2006 Data analysis using regressionand multilevel/hierarchical models. Cambridge, UK:Cambridge University Press.

58 Gilks, W. R., Thomas, A. & Spiegelhalter, D. J. 1994A language and program for complex Bayesian modelling.The Statistician 43, 169. (doi:10.2307/2348941)

59 Goldstein, H., Browne, W. & Rasbash, J. 2002 Multilevelmodelling of medical data. Stat. Med. 21, 3291–315.(doi:10.1002/sim.1264)

60 Fischer, B. & Schumann, J. 2003 AutoBayes: a systemfor generating data analysis programs from statisticalmodels. J. Funct. Program. 13, 483–508. (doi:10.1017/S0956796802004562)

61 Matheson, T., Rogers, S. M. & Krapp, H. G. 2004Plasticity in the visual system is correlated with achange in lifestyle of solitarious and gregarious locusts.J. Neurophysiol. 91, 1–12. (doi:10.1152/jn.00795.2003)

62 Westerfield, M. 1994 The zebrafish book: a guide for thelaboratory use of zebrafish (Danio Rerio). Eugene, OR:University of Oregon Press.

63 McDearmid, J. R., Liao, M. & Drapeau, P. 2006 Glycinereceptors regulate interneuron differentiation duringspinal network development. Proc. Natl Acad. Sci. USA103, 9679–9684. (doi:10.1073/pnas.0504871103)