Team:Dundee/Software
From 2012.igem.org
(Difference between revisions)
Line 180: | Line 180: | ||
<div class="pic" style="border-color: black;"> | <div class="pic" style="border-color: black;"> | ||
<a href="https://static.igem.org/mediawiki/igem.org/b/bb/Dundee12flowformula.png"> | <a href="https://static.igem.org/mediawiki/igem.org/b/bb/Dundee12flowformula.png"> | ||
- | <img src="https://static.igem.org/mediawiki/igem.org/b/bb/Dundee12flowformula.png" width=" | + | <img src="https://static.igem.org/mediawiki/igem.org/b/bb/Dundee12flowformula.png" width="880px" |
alt="CellSim Flow Formula" /> | alt="CellSim Flow Formula" /> | ||
</a> | </a> |
Revision as of 11:48, 21 August 2012
Software Development
Lysis To Kill
Lysis To Kill is a game developed for the Android platform. The concept of the game was
inspired by Splashback which was a Flash game developed for the Cartoon Network [1].
The original concept involved adding drops of ‘goo’ to a playing board in order to burst ‘blobs’,
creating a cascade of bursts. The aim was to clear the playing board in as few clicks as possible.
In a similar fashion, Lysis To Kill draws on the same game concept with a twist to mirror the
iGEM project we have undertaken.
You start the game with 10 clicks. You are in charge of the friendly, synthetically engineered E-coli cells (in green), and each time you click a cell it shrinks and eventually bursts. Your goal is to destroy all the C.diff cells with φCD27 endolysin, which is fired from your E.coli cells whenever they burst. Each level grants you an extra click, and points are awarded for every C.diff cell destroyed. Bonus points are awarded if you finish a level with a clear board. The game is free to download, and the full source code is provided.
You start the game with 10 clicks. You are in charge of the friendly, synthetically engineered E-coli cells (in green), and each time you click a cell it shrinks and eventually bursts. Your goal is to destroy all the C.diff cells with φCD27 endolysin, which is fired from your E.coli cells whenever they burst. Each level grants you an extra click, and points are awarded for every C.diff cell destroyed. Bonus points are awarded if you finish a level with a clear board. The game is free to download, and the full source code is provided.
Lazy Scientist II
The Dundee iGEM team of 2011 created an Android application named the Lazy Scientist, and this
year we chose to follow up the application with a suite of useful tools for biology students.
The main goal was to provide some useful applications and to provide access to the source code
to enable developers to add, modify and change the application to suit their needs. The app is
free to download, and the full source code is provided.
The application currently contains the following tools:
The application currently contains the following tools:
- Ratio to Percentage/ Percentage to Ratio Convertor
- OD660 to Cell Count Estimator
- Simple Dilution Calculator
- Serial Dilution Checker
CellSim
From the onset of the project, the modelling team had to carry out investigative research to
understand the biological processes that were involved in the project to ascertain appropriate
modelling methodologies to adopt. Due to the unique combination of factors involved in the project,
it became evident that there were considerable quantities of mathematical variables that defined the
behaviour of the cellular interaction. From a software development perspective, it was attractive
to take the mathematical axioms of behaviour, and to wrap them within a bespoke modelling solution
to provide a visual representation of the project.
CellSim is a cross-platform, 2D, cellular automata [4] (CA) modelling tool that was developed to demonstrate, in a graphical manner, how the synthetically modified E-coli and C.diff cells could interact in a simulated environment. The application was designed to simulate the cellular interactions whilst also providing a customisable simulation environment that could enable the tool to be used in other, similar projects. CellSim was developed to enable it to be executed on either Linux or Windows based systems, and is released under the GNU GPL 3 license that permits copying, modification and redistribution of the program. The source code and full class diagram is provided within the download archives for educational purposes as well as encouraging others to build upon the initial release.
The current development version (1.0) provides an environment in which the following aspects can be simulated and defined by the user:
The program was developed around an MVC structural design pattern [3] with a subtle modification. The initial design adopted a classic MVC [3] architecture, whereby for each generation, each cell was updated within the model classes, and subsequently rendered within the view classes. Due to the large number of cells that the program is required to simulate, code profiling highlighted the inefficiency if iterating through all cells twice. Furthermore, the status of each cell is partly determined by neighbouring cells, and therefore a method was required to detect the presence of neighbouring cells and their status. To accomplish this through data provided solely within the model, for each cell, all other cells would require iteration and interrogation leading to a time complexity of at least O(n2). Due to the mitosis behaviour of cells, the source number of cells also increases in a quadratic manner. The quadratic mitosis behaviour cannot be alleviated, as it represents the real-world scenario, so a solution was sought to alleviate the compound quadratic time complexity that arose from the classic MVC [3] implementation.
The solution adopted was to carry out cell interrogation, cell update and rendering in a single pass, and establishing the presence of neighbouring cells by direct interrogation of the graphics memory as opposed to model data interrogation. By calculating the base address of the graphics memory in conjunction with the co-ordinates of the current cell, a direct memory address could be calculated and accessed to establish the presence of neighbouring cells, alleviating the need to iterate through all cells. By adopting these measures, the time complexity of the ‘cell evolution’ section of code was reduced to a constant, greatly improving the speed and number of cells that the program could comfortably emulate.
Cellular movement emulates fluid flow by imposing a circular pressure front that is circular in nature. This provides a simple model that affects each cell’s horizontal position by exerting a greater force on those nearest to the centre of fluid flow. To enable variable flow rates to be simulated, a normalised force was calculated from the cell’s co-ordinates (x, y) relative to the display screens height (Ymax), multiplied by a user adjustable force factor (f) and utilised to modify the horizontal position of the cell. By carrying out this calculation on each cell, a realistic, circular flow pressure is simulated. The new horizontal cell position is calculated from the following formula:
To provide a realistic and accurate movement of cells within CA environment, each cell contains co-ordinate members for the respective ‘x’ and ‘y’ position. These class members are defined as float data types as opposed to integers to permit gradual movements to be achieved. To render each cell, the co-ordinates are simply cast to integer types before being passed to the graphics interface. This permits cell movements to be calculable to fractions of a pixel, and provides an accurate representation of the behaviour required.
The application adopts the SDL (Simple Directmedia Layer) graphics API that was chosen primarily due to its flexibility, and is licensed under GNU LGPL version 2 [2]. Furthermore, the library provides binary compilations for a wide variety of operating systems including Windows, Linux and MacOS. To encourage development of the program, pre-developed Eclipse and Visual Studio 11 project files have been created, and are free to download and explore. Alternatively, the packages also include the pre-compiled binary versions of the application within the ‘Release’ folder of the download archive (ZIP) files.
CellSim is a cross-platform, 2D, cellular automata [4] (CA) modelling tool that was developed to demonstrate, in a graphical manner, how the synthetically modified E-coli and C.diff cells could interact in a simulated environment. The application was designed to simulate the cellular interactions whilst also providing a customisable simulation environment that could enable the tool to be used in other, similar projects. CellSim was developed to enable it to be executed on either Linux or Windows based systems, and is released under the GNU GPL 3 license that permits copying, modification and redistribution of the program. The source code and full class diagram is provided within the download archives for educational purposes as well as encouraging others to build upon the initial release.
The current development version (1.0) provides an environment in which the following aspects can be simulated and defined by the user:
- Cellular Mitosis Rates
- Strains
- Colony Size, Initial Positioning & Colouration
- Medium Flow Effects
- Mucus Wall Effects
- Time Calibrated Rendering
- Nutrient Availability, Supply & Absorption
- Low Nutrient Mitosis Suppression
The program was developed around an MVC structural design pattern [3] with a subtle modification. The initial design adopted a classic MVC [3] architecture, whereby for each generation, each cell was updated within the model classes, and subsequently rendered within the view classes. Due to the large number of cells that the program is required to simulate, code profiling highlighted the inefficiency if iterating through all cells twice. Furthermore, the status of each cell is partly determined by neighbouring cells, and therefore a method was required to detect the presence of neighbouring cells and their status. To accomplish this through data provided solely within the model, for each cell, all other cells would require iteration and interrogation leading to a time complexity of at least O(n2). Due to the mitosis behaviour of cells, the source number of cells also increases in a quadratic manner. The quadratic mitosis behaviour cannot be alleviated, as it represents the real-world scenario, so a solution was sought to alleviate the compound quadratic time complexity that arose from the classic MVC [3] implementation.
The solution adopted was to carry out cell interrogation, cell update and rendering in a single pass, and establishing the presence of neighbouring cells by direct interrogation of the graphics memory as opposed to model data interrogation. By calculating the base address of the graphics memory in conjunction with the co-ordinates of the current cell, a direct memory address could be calculated and accessed to establish the presence of neighbouring cells, alleviating the need to iterate through all cells. By adopting these measures, the time complexity of the ‘cell evolution’ section of code was reduced to a constant, greatly improving the speed and number of cells that the program could comfortably emulate.
Cellular movement emulates fluid flow by imposing a circular pressure front that is circular in nature. This provides a simple model that affects each cell’s horizontal position by exerting a greater force on those nearest to the centre of fluid flow. To enable variable flow rates to be simulated, a normalised force was calculated from the cell’s co-ordinates (x, y) relative to the display screens height (Ymax), multiplied by a user adjustable force factor (f) and utilised to modify the horizontal position of the cell. By carrying out this calculation on each cell, a realistic, circular flow pressure is simulated. The new horizontal cell position is calculated from the following formula:
To provide a realistic and accurate movement of cells within CA environment, each cell contains co-ordinate members for the respective ‘x’ and ‘y’ position. These class members are defined as float data types as opposed to integers to permit gradual movements to be achieved. To render each cell, the co-ordinates are simply cast to integer types before being passed to the graphics interface. This permits cell movements to be calculable to fractions of a pixel, and provides an accurate representation of the behaviour required.
The application adopts the SDL (Simple Directmedia Layer) graphics API that was chosen primarily due to its flexibility, and is licensed under GNU LGPL version 2 [2]. Furthermore, the library provides binary compilations for a wide variety of operating systems including Windows, Linux and MacOS. To encourage development of the program, pre-developed Eclipse and Visual Studio 11 project files have been created, and are free to download and explore. Alternatively, the packages also include the pre-compiled binary versions of the application within the ‘Release’ folder of the download archive (ZIP) files.
Downloads
NOTE: To run the program under Windows, the Visual C++ Redistributable Package must be installed.
This is free, and can be downloaded from
https://www.microsoft.com/en-us/download/details.aspx?id=30679
Select the file named ‘vcredist_x86.exe (6.2MB), and once downloaded, run the program to install
the Visual C++ libraries required prior to running the CellSim program.
Download Links:
Lysis To Kill APK
Lysis To Kill Eclipse Project Source
Lazy Scientist II APK
Lazy Scientist II Eclipse Project Source
CellSim Linux x86 Eclipse Project Source
CellSim Windows x86 Visual Studio 11 Project Source
MD5 Download Checksums:
dbed0061a9ae680368440b43dff8cecd CellSim Linux x86.zip
16b261b82de6a34d8ef8c479a87db760 CellSim Windows x86.zip
efa69777739cbffedc7a7f5055cff49e Lazy Scientist II.zip
fffdfd44da9b99c950f2f1ce137ec5cb Lysis To Kill.zip
Download Links:
Lysis To Kill APK
Lysis To Kill Eclipse Project Source
Lazy Scientist II APK
Lazy Scientist II Eclipse Project Source
CellSim Linux x86 Eclipse Project Source
CellSim Windows x86 Visual Studio 11 Project Source
MD5 Download Checksums:
dbed0061a9ae680368440b43dff8cecd CellSim Linux x86.zip
16b261b82de6a34d8ef8c479a87db760 CellSim Windows x86.zip
efa69777739cbffedc7a7f5055cff49e Lazy Scientist II.zip
fffdfd44da9b99c950f2f1ce137ec5cb Lysis To Kill.zip