Presentation is loading. Please wait.

Presentation is loading. Please wait.

CARDIAC ELECTROPHYSIOLOGY WEB LAB Developing your own protocol descriptions.

Similar presentations


Presentation on theme: "CARDIAC ELECTROPHYSIOLOGY WEB LAB Developing your own protocol descriptions."— Presentation transcript:

1 CARDIAC ELECTROPHYSIOLOGY WEB LAB Developing your own protocol descriptions

2 The structure of a protocol Protocol Inputs Default values given Plots Imports from protocol libraries Post-processing Functional array-based language Outputs N-d arrays (with units) Model Has inputs and outputs (n-d arrays with units) Can be simulated / run Nested simulation loop(s) Outputs are n-dimensional arrays Model Interface definition Library Variables & functions

3 Interfacing protocols and models Challenges arise from desire to apply a single experiment description to any model And need to compare results for different models There are variations in modelling conventions Different names for the same ‘thing’ We use consistent labels from ontologies Different ways of representing biology in mathematics An experiment may isolate a sub-component of the model (e.g. voltage clamp)

4 Units conversions Different models use different units Protocol declares the units it uses, and conversions applied automatically “Biology-aware” conversion rules can be defined for cases that aren’t simple scalings A unary function for converting a value from one dimension to another Can refer to model variables using ontology terms Fall-back to next rule if required variables don’t exist See also doi:10.1016/j.pbiomolbio.2011.06.002doi:10.1016/j.pbiomolbio.2011.06.002

5 Model modifications A model is viewed as a system of equations Protocol specifies which variables are inputs and outputs Inputs become parameters that can be set by the protocol e.g. a voltage clamp Only those equations required for the given outputs need be computed Equations may also be added or replaced e.g. to specify a stimulus current waveform The software tries to ‘do the right thing’

6 Simulations Basic case: timecourse solve of model equations An experiment may have ‘setup’ and ‘measurement’ phases  simulations should be able to run in sequence Nesting simulations supports parameter scans, repeated runs, distribution sampling, etc. Model outputs therefore become regular n-dimensional arrays Each simulation requires a range over which to iterate for generating output points Each simulation can also have a collection of modifiers

7 Post-processing Raw simulation results are rarely what we’re after Post-processing required to obtain markers of interest For a protocol exchange language, we need something more restrictive (and easier to implement) than general Matlab or similar But we still need the ability to describe complex operations e.g. maximum, interpolation, APD, … More on this tomorrow!

8 Referencing variables in a protocol Protocol Inputs Default values given Plots Imports from protocol libraries Post-processing Functional array-based language Outputs N-d arrays (with units) Model Has inputs and outputs (n-d arrays with units) Can be simulated / run Nested simulation loop(s) Outputs are n-dimensional arrays Model Interface definition Library Variables & functions

9 Name resolution General form of a variable reference is prefix:name Multiple prefixes may be chained, e.g. sim:oxmeta:name

10 Examples The protocols currently in the Web Lab have extensive tutorial-style comments to explain how they work. Regular 1Hz pacing Voltage clamp I-V curves Effects of drug blockdrug block S1-S2 and steady-state restitution S1-S2steady-state Effects of cell environmentcell environment You can work through these and other examples during the practical sessions.

11 Over to you! Practical session tasks are at https://goo.gl/jl62ghhttps://goo.gl/jl62gh Ask us if anything is unclear Please do record any feedback as you go

12 CARDIAC ELECTROPHYSIOLOGY WEB LAB Complex post-processing

13 The ‘post-processing’ language Primarily for performing mathematical computations on n- dimensional arrays Not just used in post-processing: expressions can appear as protocol inputs, in the ‘library’ section, when defining ranges, and for setting model variables in modifiers Expressions compute values Statements sequence operations Defining variables & functions, assertions

14 Operations on arrays Creating new arrays By listing elements By comprehensions Extracting sub-array views Regular steps along each dimension Map an n-ary function onto n arrays element-wise “fold” – collapse an array along a single dimension using a binary function Used to define sum, max, etc. Find indices where the operand array is non-zero And create a sub-array containing only the given indices Various options for avoiding irregular results

15 Miscellaneous features Accessor operation for testing values ( IS_ARRAY, SHAPE, NUM_DIMS, etc.) Functions can have default parameters, and the default can be asked for explicitly Can define tuples (pairs, triples, etc.), e.g. to return multiple values Location information for user-friendly error messages Tracing values with the ? post-fix operator

16 The standard libraries – BasicBasic Max Min Sum Product Mean Diff Grad Permute Sort SortBy Join Stretch Shift Window Localise Interp After Count Filter Transpose MakeArray AddDim DefaultDim MultiFold ArrayEq ShapeEq

17 The standard libraries – CardiacCardiac Apd ApdAndDi ApStartAndEnd

18 Reference material Looking at the comments in existing protocols and libraries is generally a good place to start There is a full reference manual for the protocol language at https://chaste.cs.ox.ac.uk/trac/wiki/FunctionalCuration/ProtocolSyntax https://chaste.cs.ox.ac.uk/trac/wiki/FunctionalCuration/ProtocolSyntax


Download ppt "CARDIAC ELECTROPHYSIOLOGY WEB LAB Developing your own protocol descriptions."

Similar presentations


Ads by Google