Simulating electrophoresis

Comparison of virtual gels with different exposures and running times

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

AttachmentSize
simGel.txt6.44 KB

Comments

You are so clever.

xxx

Hi,
is the code available? it looks really interesting!
Have you considered contributing it to biopython?

thanks,
bjorn

Thanks Björn,

It's a while since I've looked at the code. I'll give it a quick check and make sure it still works as I expect, then I'll upload it here. I keep meaning to make an online version for people to play with, maybe for educational purposes.

I'm hadn't considered submitting it to BioPython. I'm not sure whether anyone would be that interested given that it's based on some equations I just made up, and from what I can tell, don't accurately model the actual rate of DNA movement through the gel.

Post new comment

The content of this field is kept private and will not be shown publicly.