Computation steering software for the in silico study of infection dynamics Richard Potter, Joanne Cable, Cock Van Oosterhout, Helen Wright

HERI Reference 0405/05

26 June 2006

Computational Steering Software for the in silico study of infection dynamics

Table of Contents

Table of Contents TABLE OF CONTENTS............................................................................................................................................ 1 INTRODUCTION....................................................................................................................................................... 2 THE MODEL .............................................................................................................................................................. 3 PARASITE MOVEMENT ............................................................................................................................................... 3 IMMUNE RESPONSE ................................................................................................................................................... 4 IMMUNE RESPONSE EFFECT ....................................................................................................................................... 5 EXECUTION STATES................................................................................................................................................... 6 THE SIMULATION ...................................................................................................................................................... 7 SOFTWARE DESIGN ............................................................................................................................................... 8 FUTURE DEVELOPMENT .................................................................................................................................... 10 USER MANUAL....................................................................................................................................................... 11 TABLE OF FIGURES.............................................................................................................................................. 14 TABLE OF EQUATIONS........................................................................................................................................ 14 REFERENCES.......................................................................................................................................................... 14

Page 1

Computational Steering Software for the in silico study of infection dynamics

Introduction

Introduction This collaborative study into the visualization of infection dynamics was proposed by van Oosterhout [2004] from the Biological Sciences department at the University of Hull. The study aims to create a predictive representation of parasite infrapopulation dynamics on live hosts, with the additional goal of reducing the need for animal testing through computer simulation. This study will provide an opportunity to develop a unique simulation based on a complex scientific model developed into a computationally steered scientific visualization. The simulation will generate a large quantity of positional data relating to the movement of parasitic organisms on a host over time; this provides future opportunities to investigate distributed computing in an effort to ensure near real-time user interaction and visualization response synchronisation. The model’s objective is to simulate the dynamics of Gyrodactylus ectoparasites on guppies, however, the model can simulate a wide range of host-parasite dynamics. This document reports the first stage in realising the study; van Oosterhout’s original model is modified and recreated in Microsoft C# resulting in a substantial execution speed increase. Alphanumeric data is produced and displayed in a table; future work will visualize this data allowing computational steering. The algorithms implemented and the software design are described, the ‘software design’ section targets audiences with some software engineering or object orientated programming knowledge. Descriptions of future work detail the tasks necessary to develop a robust computationally steerable visualization from this alphanumeric output solution. A user manual is also provided to aid use of the software.

Page 2

Computational Steering Software for the in silico study of infection dynamics

The model

The model A host is infected with a given number of ectoparasites which attach themselves at random positions on the surface of the host. A localised immune response is produced at infected locations on the host’s surface as time progresses. Each parasite accumulates damage until it dies; parasites attempt to flee immune locations and gather more resources. Each parasite gathers resources by feeding on the host and, at a predefined threshold, reproduce.

Parasite movement The algorithm for parasite movement, through discussion with van Oosterhout [2004], has been modified since the initial implementation. Parasites move along either the X or Y axis, the axis and direction is randomly chosen. The parasite moves a random distance within an upper limit. Host circumference

Possible movement directions + Maximum distance

Y axis

- Maximum distance

+ Maximum distance

- Maximum distance

0, 0 X axis

Host length

Figure 1: The bounds, direction and distance a parasite can travel in one time step The parasite cannot move beyond the width of the host, if the parasite tries it will simply not move during this time step. Should the parasite try to move beyond the circumference of the host, it will wrap around. This creates a cylindrical movement model which effectively simulates the movement of parasites over a 3 dimensional host.

Artificial join, where movement is wrapped around

Y axis

X axis Figure 2: The cylindrical movement model caused by Y axis wrap around

The parasite moves each time it is damaged or when an immune response to its current location is imminent.

Page 3

Computational Steering Software for the in silico study of infection dynamics

The model

Immune response The resting position of a parasite places it in one of a number of cells defined by a grid of equal size to the host; the grid is separated into a predefined number of rows and columns. The area of a cell represents the area affected by an immune response. All of the parasites whose position falls within an immuno-responsive cell are affected by that cell’s immune response. Host circumference Total number of rows ( j )

(i x j) -1

Y axis Row

18



12

13

14

15

16

17

6

7

8

9

10

11

1

2

3

4

5

0 0, 0

Immunoresponse area of effect

X axis Column

Host length Total number of columns ( i )

Figure 3: Areas-of-effect The cell on which the parasite resides is calculated using the algorithm:

⎛ y row = floor ⎜⎜ × ⎝ hostCircumference

⎞ j ⎟⎟ ⎠

Special case: When y = hostCircumferance then row = j − 1

⎛ ⎞ x column = floor ⎜⎜ × i ⎟⎟ ⎝ hostLength ⎠ Special case: When x = hostLength then column = i − 1

cell = row + (i * column) Where: i is the total number of columns. j is the total number of rows. x & y are the coordinate positions of the parasite on the host. floor represents the rounding down of a real number to the nearest integer. Equation 1: The algorithm to calculate the immune response cell in which a parasite resides A response weighting is recorded for each cell in the grid. When a parasite visits a cell the weighting is increased by one. When the response weighting reaches the predefined immuno-competence threshold the cell becomes immuno-responsive. A responsiveness decay is allocated to the host; as time progresses the response weighting is reduced by a predefined percentage. The cell is only immunoresponsive whilst the weighting exceeds the immuno-competence threshold.

Page 4

Computational Steering Software for the in silico study of infection dynamics

The model

Immune response effect As time progresses each parasite is affected by the host, the effect being dependent on the cell they occupy. If the cell the parasite resides in is not yet immune reactive then the parasite feeds off the host and, if the parasite has taken sufficient resources from the host, it gives birth. If the cell is becoming immune then the parasite feeds, possibly reproduces and moves to another position on the host. If the parasite is in an immune cell then the parasite is damaged and can take only minimal resources from the host before fleeing the site; again, the parasite reproduces only if it has sufficient resources.

Figure 4: The immune response effect on a parasite (UML Activity diagram) A tri-state variable is used to describe the immune response at a given cell; it is either immune, developing immunity or not immune.

Page 5

Computational Steering Software for the in silico study of infection dynamics

The model

Execution states Although the model is finite, simulating over a predefined number of time steps, the simulations could take a long time to complete. To allow users to pause, resume and stop execution, an execution state machine has been implemented. A transition from paused and running states, to the stopped state, exists to allow the immediate exit of the simulation; this may be required when the application fails or is forcibly terminated by the user.

Figure 5: The execution state model (UML state diagram) In preparation for adaptations of the model to provide a computationally steerable visualization, the simulation progresses on a separate thread to the rest of the application. This allows the model’s parameters to be changed during execution and prevents the processor intensive simulation from interfering with the user interface or visualization.

Page 6

Computational Steering Software for the in silico study of infection dynamics

The model

The simulation The simulation executes within three loops: the time loop, in which time progresses to a user defined limit or terminates if all of the parasites are dead, the simulation or repetition loop, which runs a user defined number of simulations, each with identical parameters, in order to create a set of results which can be compared for consistency and used to identify abnormalities in individual simulations. Finally there is a parasite loop, in which every living parasite, created prior to the current time step, is manipulated by the model.

[No further time steps]

[Next time step] [No further simulations]

[Next simulation]

[No futher parasites]

[Next parasite]

Execute host-parasite interactions

Figure 6: The simulation loops (UML Activity diagram)

Time steps Simulations Parasites

Execute host-parasite interactions

Figure 7: The simulation loops The order of these loops differs from van Oosterhout’s [2004] original model; the simulation repetitions loop has been given higher priority than the parasite loop to allow comparative results to be produced during the simulation, allowing valid results to be visualized during execution.

Page 7

Computational Steering Software for the in silico study of infection dynamics

Software design

Software design This section briefly describes the software’s object orientated design. Three factory classes have been created: the SimFactory, HostFactory and ParasiteFactory. These classes are responsible for storing the initial values of simulation objects, parasite objects and host objects respectively. When the ‘Create…’ method is called, these values will be used to create new simulation, parasite or host objects, with values identical to any previous or future objects of the same type. This approach reduces parameter passing and helps ensure that all objects of the same type have the same initial values, even between simulation repetitions. The user interface of this project is temporary; future development will produce a user interface that uses scientific visualization techniques to visualize the output. As such, it will be necessary to decouple the simulation model from the user interface as far as possible. To this end the simulation output is provided over a c# event. Any object that is interested in the output, such as the datagrid user interface component which displays the output to the user, may register with the event. The event will send these objects the output as it becomes available. This means that the compiled software’s user interface has to be aware of the model, but the model does not have to be aware of the user interface. This decoupling also allows the distribution of the application as two separate components, the model library and the user interface executable file. Further decoupling is achieved when processing the simulations by introducing an execution thread for each model. The user interface can produce multiple output displays, each displaying the output of a separate execution of the model with separate parameters. The execution threads allow these models to progress together in parallel. This technique allows a model to execute independently of the application which created it and independently of other executions of the model.

Page 8

Computational Steering Software for the in silico study of infection dynamics

Software design

Figure 8: The object structure for the model (UML class diagram)

Page 9

Computational Steering Software for the in silico study of infection dynamics

Future development

Future development This application is the precursor to a version which will use scientific visualization techniques to aid user extrapolation of meanings from the simulation output. This will be achieved over a number of developmental stages: The output from this application will be connected to a commercial visualization package, such as Iris Explorer, and visualized. The next stage will introduce computational steering and image interaction. This allows modification of the model’s parameters from the rendered image and updates the visualization in real time. The final stage creates a stand-alone application utilising the techniques employed in the prototype. Cable [2005] and van Oosterhout [2005] have identified that some parasites have preferred locations on the host. For example, Gyrodactylus turnbulli will always try to attach to the fish's caudal (tail) fin. If it starts elsewhere the parasite will migrate to the caudal fin. As the parasites multiply, the tail of the host becomes crowded and the parasite infrapopulation starts to migrate [Cable 2005]. The model could be extended to incorporate this behaviour and the behaviour of a metapopulation of parasites on multiple hosts.

Page 10

Computational Steering Software for the in silico study of infection dynamics

User manual

User manual Running the executable ‘BioSim.exe’ displays the simulation setup window. Here the parameters for the simulations can be entered.

I

A

B

J

C D

K

E F

G

L M

H

N

P

O

Q

R

A. B. C. D. E. F. G. H. I. J. K. L.

Enter the width of the host. This value must be greater than 0. Enter the height of the host. This value must be greater than 0. Enter the percent the immune response weighting is reduced by every time-step. Enter the threshold an immuno-area’s immune response weighting must reach for the immunoarea to become immune. Enter the number of rows the host is divided into to produce immuno-areas. This must be an integer of 1 or more. Enter the number of columns the host is divided into to produce immuno-areas. This must be an integer of 1 or more. Enter the minimum resources that can be gained in one time step. This value is used if a parasite is damaged this time-step. Enter the maximum resources that can be gained in one time step. This value is used if a parasite is not damaged this time-step. Enter the maximum distance a parasite may travel in a single time step. This value must be less than the host width value. Enter the damage sustained by a parasite if it is on an immune location. Enter the quantity of resources necessary for a parasite to reproduce. Enter the damage each parasite can sustain before it dies.

Page 11

Computational Steering Software for the in silico study of infection dynamics

User manual

M. Enter the initial resources each parasite has. This is likely to be 0. N. Enter the number of identically instantiated simulations to run. These repetitions can be compared for consistency. O. Enter the number of parasites attached to the host at random positions when the simulations start. P. Enter the maximum number of time steps that may be simulated. This might not be reached if all the parasites die. Q. Toggle the check box to activate or deactivate the seeding feature. The number entered is used to recall a set of random numbers allowing the experiments to be reproduced exactly. R. Run the model with the input values. Figure 9: An annotated simulation setup window Each time the run button is pressed the values displayed in the simulation setup window are saved as default values for the next time the application is run. A set of simulations are then run with the parameters entered and an output window is displayed. Any number of models may be run concurrently with output windows for each. D

E

F

G

H

I

A B C

K

L

M

Page 12

J

Computational Steering Software for the in silico study of infection dynamics

User manual

A. The export button saves the output simulation data to a user specified comma-delimited file. This file can then be loaded into a data analysis software package, such as Microsoft Excel. A second user specified comma-delimited file is then saved which summarises the output data to a number of living parasites on the host per time step, averaged over the number of simulations run. This button is only available when the simulation has stopped running. The export feature ensures that all data produced is saved; this cannot be ensured using copy and paste in the display. B. The pause and continue button allows the execution of the simulation to be paused whilst it is running and allows the user to resume the simulation when paused. The simulation will not pause until a full time step has been processed. C. The stop button allows the user to stop the simulation prematurely. This does not close the window. The execution of the simulation will not stop until a full time step has been processed. D. This column shows the number of the simulation from which the row of data came. E. This column shows the time step which was being processed for this row. F. This column shows the parasite which was being processed for this row. G. This column shows the horizontal position of the parasite on the host’s surface. H. This column shows the vertical position of the parasite on the host’s surface. I. This column shows the quantity of resources the parasite has at this time. J. This column shows the health of the parasite, when this reaches 0 the parasite will die. K. This shows the latest time step that has been processed in the simulations. L. This shows the total number of rows of data that have been produced from the simulation. Some of these rows may not yet be displayed. M. This shows the execution state of the simulation. Figure 10: An annotated output window Closing an output window will not terminate the application; this can be achieved by closing the simulation setup window.

Page 13

Computational Steering Software for the in silico study of infection dynamics

Table of figures

Table of figures FIGURE 1: THE BOUNDS, DIRECTION AND DISTANCE A PARASITE CAN TRAVEL IN ONE TIME STEP .................................. 3 FIGURE 2: THE CYLINDRICAL MOVEMENT MODEL CAUSED BY Y AXIS WRAP AROUND ................................................... 3 FIGURE 3: AREAS-OF-EFFECT ......................................................................................................................................... 4 FIGURE 4: THE IMMUNE RESPONSE EFFECT ON A PARASITE (UML ACTIVITY DIAGRAM) ............................................... 5 FIGURE 5: THE EXECUTION STATE MODEL (UML STATE DIAGRAM)............................................................................... 6 FIGURE 6: THE SIMULATION LOOPS (UML ACTIVITY DIAGRAM) ................................................................................... 7 FIGURE 7: THE SIMULATION LOOPS ................................................................................................................................ 7 FIGURE 8: THE OBJECT STRUCTURE FOR THE MODEL (UML CLASS DIAGRAM) .............................................................. 9 FIGURE 9: AN ANNOTATED SIMULATION SETUP WINDOW............................................................................................. 12 FIGURE 10: AN ANNOTATED OUTPUT WINDOW ............................................................................................................ 13

Table of equations EQUATION 1: THE ALGORITHM TO CALCULATE THE IMMUNE RESPONSE CELL IN WHICH A PARASITE RESIDES ............... 4

References

B. Ryan, B. Joiner, 1994, MiniTab handbook, 3rd Edition, Duxbury Press, California. C. Van Oosterhout, 2004, Personal communications. D. Grey, 2005, Personal communications. D. Roberts, ND, Some MTB commands by Roberts [online], Available: http://www.personal.psu.edu/users/d/m/dmr/minitab/comlist.htm [Accessed 17-Feb-05]. H. Wright, 2004, Personal communications. J. Cable, 2005, Personal communications. J. Webb, nd, Multi-threading in .Net: Introduction and suggestions [online], Available: http://www.yoda.arachsys.com/csharp/threads/printable.shtml [Accessed 23-May-05]. M. Clifton, 2004, Advanced unit testing [online], Available: http://www.codeproject.com/csharp/autp1.asp [Accessed 03-Dec-04]. Microsoft, nd, MSDN Library [online], Available: http://msdn.microsoft.com/library/default.asp [Accessed 02-Jun-05].

Page 14

Host-Parasite Dynamics Simulation

Jun 26, 2006 - Computational Steering Software for the in silico study of infection dynamics .... to develop a unique simulation based on a complex scientific model ..... file can then be loaded into a data analysis software package, such as ...

487KB Sizes 1 Downloads 64 Views

Recommend Documents

Host-Parasite Dynamics Simulation
Any object that is interested in the output, such as the datagrid user interface component which displays the output to the user, may register with the event.

Introduction to Molecular Dynamics Simulation
dynamics simulation, with particular emphasis on macromolecular systems. ... We carry out computer simulations in the hope of understanding the ..... space volume element, the rate of incoming state points should equal the rate of outflow.

Download System Dynamics: Modeling, Simulation ...
Download Best Book System Dynamics: Modeling, Simulation, and Control of Mechatronic Systems, PDF Download System Dynamics: Modeling, Simulation, and Control of Mechatronic Systems Free .... will find: New material and practical advice on the design

Molecular Dynamics Simulation Methods Revised
3.6 An example transformation of a simulation : : : : : : : : : : : : : 49. 3.7 Related Topics ..... For example, the equation of state (the p;T;V diagram) or transport ... data. Many of the physical properties mentioned are not derived from one syst

Download System Dynamics: Modeling, Simulation ...
Download Best Book System Dynamics: Modeling, Simulation, and Control of Mechatronic Systems, PDF Download System Dynamics: Modeling, Simulation, and Control of Mechatronic Systems Free .... art simulation tools such as MATLAB and bond graph software

[PDF] Download System Dynamics: Modeling, Simulation, and Control ...
Simulation, and Control of Mechatronic Systems, pdf read online System .... to model the flow of information and energy in all types of engineering systems. It.

An Efficient Parallel Dynamics Algorithm for Simulation ...
portant factors when authoring optimized software. ... systems which run the efficient O(n) solution with ... cated accounting system to avoid formulation singu-.

[PDF] System Dynamics: Modeling, Simulation, and ...
... John Wiley amp Sons Information Technology amp Software Development Adobe ... and components in the automotive, aerospace, and defense industries.

PDF Read Aircraft Control and Simulation: Dynamics ...
and Autonomous Systems, pdf free download Aircraft Control and Simulation: Dynamics, Controls Design, and Autonomous Systems, read online free Aircraft Control and Simulation: Dynamics, Controls Design, and Autonomous Systems, Aircraft .... With deta

A Molecular Dynamics Simulation Study of the Self ... - Springer Link
tainties of the simulation data are conservatively estimated to be 0.50 for self- diffusion .... The Einstein plots were calculated using separate analysis programs. Diffusion ... The results for the self-diffusion coefficient are best discussed in t

pdf-1451\system-dynamics-modeling-simulation-and-control-of ...
Try one of the apps below to open or edit this item. pdf-1451\system-dynamics-modeling-simulation-and-control-of-mechatronic-systems-5th-fifth-edition.pdf.

Read [PDF] Flight Dynamics, Simulation, and Control ...
... Olympiacos 2 0 Higuain entra e segna poi Web oficial de la Universidad de A ... Associated with Control Configured Elastic Aircraft A rapid rise in air travel in the past decade is driving the development of newer, more energy-efficient, and ...

[PDF]EPUB Aircraft Control and Simulation: Dynamics ...
... As noted Apparently after some infighting over building a fully autonomous car versus a semi autonomous car Apple pruned its .... instructor s solution manual.