Team:Newcastle/Modeling/Population/Pseudo

From 2009.igem.org

(Difference between revisions)
 
(15 intermediate revisions not shown)
Line 2: Line 2:
{{:Team:Newcastle/Header}}
{{:Team:Newcastle/Header}}
{{:Team:Newcastle/Left}}
{{:Team:Newcastle/Left}}
-
== Population modelling Pseudo code==
+
= Population modelling overview=
-
This page will provide an overview of the code which the Newcastle team has developed for thier population simulation model.
+
This page provides an overview of the [[:Image:Newcastle Distributed Microbase Population src.zip|code]] which the Newcastle team has developed for their population simulation model.
-
Due to the complexities of running the model, as it is designed for distributed systems, the full code for our population simulation model is available on request. Please email one of our advisors, <html><a href="mailto: m.taschuk@ncl.ac.uk">Morgan Taschuk</a></html>, for more information.
+
== Bacterial simulation overview ==
 +
[[Image:Newcastle Java Coding Example.png|thumb|An example of the Java programming in this project, showing the Subtilis.java class file.]]
 +
=== Bacterial cells classes ===
 +
: ''See [[Team:Newcastle/Modeling/Population/Pseudo/Bacteria Code|Bacteria Pseudo Code]]''.
 +
For the actual simulation of the bacterial life cycles, we decided to allow each bacterial cell to run as a separate thread. The phenotype of a bacterial cell changes depending on what state they are in, so we decided to have a number of different classes to represent these states. These classes have some common attributes, which can be represented as a superclass in object orientated computing. There is also an additional simple class for easily storing spacial coordinates, ie 3 number values.
 +
 
 +
[[Image:Newcastle 3d max 5.png|right|160px]]
 +
Superclass:
 +
* Cell - contains the common attributes, such as levels of cadmium and nutrients. The Cell class also provides access to the database.
 +
Subclasses:
 +
* Subtilis - represents vegetative cells. From here cells can make various life choices and enter other states accordingly. These can become Spores, Biofilm, Motile, and divide into two.
 +
* Spore - represents the spore stage of the life cycle. Note that in our project the cells have to choose whether they are going to become a "metal sequestering" spore which cannot germinate.
 +
* Biofilm - represents the biofilm phenotype of the cells.
 +
* Motile - represents motility of the cells
 +
 
 +
=== Bio-chemical model integration ===
 +
To split off the code that connects to the JSim application, which runs bio-chemical models, such as the ones that we have written in CellML, we put this code into it's own class, ModelSims. Currently this just uses the Sin Operon Model for influencing sporulation, but this can be easily expanded to cover other aspects of our project which have been modelled, such as metal intake.
 +
 
 +
This code calls a command line application, jsbatch, with parameters from the bacterial agent cell, parses the JSim output and returns a value which is used by the cell to make decisions. This code is run for each cell thread when it wants to run the appropriate model for the decision that it is currently making.
 +
 
 +
=== Database classes ===
 +
[[Image:Newcastle Amazon.png|thumb|The way in which the cell threads, the database and Microbase interact.]]
 +
There are a number of classes which deal with communicating with the central database, which stores all of the data about each run of the simulation cell and each cell in that simulation.
 +
* DAO - a data access object that provides an interface to the database.
 +
* PopulationDAO - communicates with the table that records data about the current simulation run. This includes all of the parameters such as chances of state changes such as sporulation and germination, various rates of import/export, environment size, etc.
 +
* BugLog - communicates with the table that records data about all the bacterial cells throughout all of it's life, recording every state change.
 +
* Bug - communicates with the table that records only the most recent data about all the bacterial cells in each run of the simulation. This includes what state it is in at the moment (eg spore), how much cadmium is contained within, if it can germinate, etc.
 +
* PendingBug - communicates with the table that records data about bugs that have been created as daughter cells. This is a class which Microbase uses to manage the running of bacterial cells or 'tasks' on many machines.
 +
 
 +
=== Microbase classes ===
 +
Classes written to interface with Microbase include the Responder Implementation. This class manages how the population simulation is run across a distributed system by Microbase.
 +
 
 +
== Appendix ==
 +
; Computing Definitions
Throughout this article some programming knowledge is assumed, but here are some selected definitions of terminology:
Throughout this article some programming knowledge is assumed, but here are some selected definitions of terminology:
* ''Class'' - In object orientated programming, such as Java, it is a collection of computer code which is dedicated to one idea or entity. For example a student class may contain information about a student such as their name, date of birth, etc.
* ''Class'' - In object orientated programming, such as Java, it is a collection of computer code which is dedicated to one idea or entity. For example a student class may contain information about a student such as their name, date of birth, etc.
-
* ''A Thread of Execution'' - Inside a computer program or process there may be two or more concurrently running tasks, these tasks, called Threads. These threads each compete for time on the computer processor and can communicate with shared objects.
+
* ''A Thread of Execution'' - Inside a computer program or process there may be two or more concurrently running tasks, these tasks, called threads. These threads each compete for time on the computer processor and can communicate with shared objects.
* ''Java'' - One of many object orientated programming languages. Java allows the same code to be run on lots of different types of machines (eg. Windows, Mac or Linux).
* ''Java'' - One of many object orientated programming languages. Java allows the same code to be run on lots of different types of machines (eg. Windows, Mac or Linux).
-
 
+
* ''Database'' - a collection of data managed by a computer, allowing data access and manipulation.
-
=== Bacterial simulation overview ===
+
* ''Agent-based model'' - a computational model for simulating the actions and interactions of autonomous individuals with a view to assessing their effects on the system as a whole.
-
For the actual simulation of the bacterial life cyles, we decided to allow each cell of bacteria to run as a thread. As the life processes of a bacterial cell change depending on what state they are in, we decided to have a number of different classes to represent these states. These classes have some common attributes, which can be represented as a superclass in object orientated computing.
+
-
 
+
-
Superclass:
+
-
* Cell - contains the common attributes, such as levels of cadmium and nutrients, and access to the database.
+
-
Subclasses:
+
-
* Subtilis - represents vegative cells. From here cells can make various life choices and enter other states accordingly.
+
-
* Spore - represents the spore stage of the life cycle. Note that for our project we have made it so that the cells have to choose whether they are going to become a "metal sequestering" spore, and thus cannot germinate.
+
-
* Biofilm - represents the biofilm state in the cells.
+
-
* Motile - represents motility in the cells.
+
{{:Team:Newcastle/Footer}}
{{:Team:Newcastle/Footer}}
{{:Team:Newcastle/Right}}
{{:Team:Newcastle/Right}}

Latest revision as of 03:01, 22 October 2009


Contents

Population modelling overview

This page provides an overview of the code which the Newcastle team has developed for their population simulation model.

Bacterial simulation overview

An example of the Java programming in this project, showing the Subtilis.java class file.

Bacterial cells classes

See Bacteria Pseudo Code.

For the actual simulation of the bacterial life cycles, we decided to allow each bacterial cell to run as a separate thread. The phenotype of a bacterial cell changes depending on what state they are in, so we decided to have a number of different classes to represent these states. These classes have some common attributes, which can be represented as a superclass in object orientated computing. There is also an additional simple class for easily storing spacial coordinates, ie 3 number values.

Newcastle 3d max 5.png

Superclass:

  • Cell - contains the common attributes, such as levels of cadmium and nutrients. The Cell class also provides access to the database.

Subclasses:

  • Subtilis - represents vegetative cells. From here cells can make various life choices and enter other states accordingly. These can become Spores, Biofilm, Motile, and divide into two.
  • Spore - represents the spore stage of the life cycle. Note that in our project the cells have to choose whether they are going to become a "metal sequestering" spore which cannot germinate.
  • Biofilm - represents the biofilm phenotype of the cells.
  • Motile - represents motility of the cells

Bio-chemical model integration

To split off the code that connects to the JSim application, which runs bio-chemical models, such as the ones that we have written in CellML, we put this code into it's own class, ModelSims. Currently this just uses the Sin Operon Model for influencing sporulation, but this can be easily expanded to cover other aspects of our project which have been modelled, such as metal intake.

This code calls a command line application, jsbatch, with parameters from the bacterial agent cell, parses the JSim output and returns a value which is used by the cell to make decisions. This code is run for each cell thread when it wants to run the appropriate model for the decision that it is currently making.

Database classes

The way in which the cell threads, the database and Microbase interact.

There are a number of classes which deal with communicating with the central database, which stores all of the data about each run of the simulation cell and each cell in that simulation.

  • DAO - a data access object that provides an interface to the database.
  • PopulationDAO - communicates with the table that records data about the current simulation run. This includes all of the parameters such as chances of state changes such as sporulation and germination, various rates of import/export, environment size, etc.
  • BugLog - communicates with the table that records data about all the bacterial cells throughout all of it's life, recording every state change.
  • Bug - communicates with the table that records only the most recent data about all the bacterial cells in each run of the simulation. This includes what state it is in at the moment (eg spore), how much cadmium is contained within, if it can germinate, etc.
  • PendingBug - communicates with the table that records data about bugs that have been created as daughter cells. This is a class which Microbase uses to manage the running of bacterial cells or 'tasks' on many machines.

Microbase classes

Classes written to interface with Microbase include the Responder Implementation. This class manages how the population simulation is run across a distributed system by Microbase.

Appendix

Computing Definitions

Throughout this article some programming knowledge is assumed, but here are some selected definitions of terminology:

  • Class - In object orientated programming, such as Java, it is a collection of computer code which is dedicated to one idea or entity. For example a student class may contain information about a student such as their name, date of birth, etc.
  • A Thread of Execution - Inside a computer program or process there may be two or more concurrently running tasks, these tasks, called threads. These threads each compete for time on the computer processor and can communicate with shared objects.
  • Java - One of many object orientated programming languages. Java allows the same code to be run on lots of different types of machines (eg. Windows, Mac or Linux).
  • Database - a collection of data managed by a computer, allowing data access and manipulation.
  • Agent-based model - a computational model for simulating the actions and interactions of autonomous individuals with a view to assessing their effects on the system as a whole.



News

Events

Social Net

  • Newcastle iGEM Twitter
  • Newcastle on Facebook
  • Newcastle Youtube Channel