Pages Menu

Sunday, June 1, 2014

Adding selection to Monte Carlo drift model

Function evolve4() can model a population under the pressure of a non-neutral selective advantage. Without getting into the survival details or even the phenotypes involved, we again just track the frequency of one allele in a pair of alleles carried in each individual in the population. I've done this by adding Hardy-Weinberg expressions for population change to the realized frequency in the n'th generation and using this sum as the input probability in the binomial function that calculates the (n+1)'th generation.

I used simplified forms of the Hardy-Weinberg expressions for calculating the change of allele frequency (which I took from Falconer and Mackay 4th ed., p.29):


Figure 2 shows the evolution of an allele in a population of 100 individuals. The initial allele frequency is 5%, on average, at the start (10 of the 200 alleles). The allele has a survival advantage of 0.2. Sixty generations are shown. Arbitrarily we specify that this allele is not dominant. This model corresponds to the one used in an example in Falconer and Mackay, p. 29, and Fig. 2.3.
Figure 2.



Figure 3. Mean value of allele frequency (q) +/- 1 s.d. in the Monte Carlo model above.
 Lower solid curve is mean of q-squared.

Here's the same model over 100 generations:
Figure 4. Same model as in Fig. 2, over 100 generations.


The approximations of the Hardy-Weinberg relations in Falconer and Makay, Equations 2.7 and 2.8 are the differential form of the logistic equation, a standard model for population growth with finite carrying capacity. 

Figure 5. Initial allele frequency here is 0.005, corresponding to 10 alleles randomly distributed in the population of 1000 individuals. Each sample approximates a logistic function. 


Below is an example of negative survival advantage, with 1000 individuals, a starting allele frequency of 0.5,  and survival advantage -0.1.