Sunday, 27th September 2009
I made a start on Pygame simulation of an agarose gel on which virtual DNA can be run. The simulation has a number of stages:
- A gel is made with a given concentration of agarose and size (length and number of lanes).
- Any of the lanes can be loaded with a solution of DNA. Solution are currently lists of DNA strand lengths and their concentrations, but this will have to improved allow for more complex experiments involving metabolites and proteins.
- The gel is then run for a number for a specified number of minutes and at a chosen voltage. This moves the position of the various lengths of DNA. At present, they move at a rate proportional to 1 / length, which isn’t a very good simulation.
- Finally, once the gel has been run, it can be exposed on a UV transilluminator for a certain length of time. The longer the exposure, the brighter the signal, but also the background.
In the gel image, the bottom band corresponds to 100 base pairs (bp) and the second band up to 200 bp. The 100 bp DNA has travelled twice as far as the 200 bp using my function, which is not a very realistic simulation. I have some ideas about how to improve it (and to take into account the agarose concentration), but I’m surprised how difficult it is to think of a sensible formula for movement [see the next post for a much better movement formula]. I have heard that the size separation actually only occurs because of the time it takes different lengths of DNA to line up in the gel, and that once lined up they travel the same speed regardless of length (hence why pulsed field gel electrophoresis can separate larger lengths of DNA), but I’m not convinced.
There is lots more I can do – adding noise, allowing magnification on the transilluminator, changing the aperture, adding diffusion, but first I should sort of the equation for determining how fast DNA of different lengths moves. The image produced is returned by the gel object, where it can be displayed or saved – perhaps to go into a virtual lab book.
Below is an updated version of the program based on an equation described at: http://www.petercollingridge.co.uk/science-simulation/gel-electrophoresis-mathematics