6/25/2006

Hardy-Weinberg under stress

(Population Genetics)

You may recall that, a few posts back, I mentioned checking to see whether the Hardy-Weinberg frequencies still functioned in a genetically-drifting system. The answer would appear to be an unequivocal "yes".

I finally got round to rigging up a script [1] to calculate the actual and Hardy-Weinberg probabilities for a drifting system and export them to .csv (the most easily-manipulated spreadsheet format). When I plotted them (after working all the damn bugs out of the script, anyway), I was actually seriously impressed at what I saw:



This is with two allele types, 100 "organisms" (so 100 pairs of alleles), and 100 generations. I started off the two allele types on even frequencies - 50*AA and 50*BB genomes - which accounts for the spike at the beginning but, subsequently, the Hardy-Weinberg values followed the actual values almost perfectly. I'd expected that this would be the case, but there's a difference between expecting something and actually seeing it on a pretty graph.

Aren't computers wonderful?

[1] http://coalescent.freewebpage.org/popgen/gendrift3.py - this one was a complete bastard to get right so I hope you like it...

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home