Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling Evolution in Excel

Similar presentations


Presentation on theme: "Modeling Evolution in Excel"— Presentation transcript:

1 Modeling Evolution in Excel
Mathematical models and computer simulations are tools used to explore the complexity of biological systems that might otherwise be difficult or impossible to study. You will build a spreadsheet that models how a gene pool changes from one generation to the next. The model is then modified, allowing you to explore parameters that that affect allele frequencies, such as selection and genetic drift.

2 Modeling Evolution in Excel
For the model, the dominant, or p allele, will be denoted by the letter ‘A’; recessive q will be represented by an ‘B’ (the formulas don’t work with lower case letters! ) • Recall that formulas are written just as in math, except with the equals sign in front of the equation. Type formulas, rather than copy and paste. • Fill cells by dragging down from the bottom right of the cell with the formula • To change the population size, modify rows in the middle of the model; formulas will change automatically

3 Setting up the Parent generation
Insert a frequency p into cell D2. Have Excel calculate the frequency of q by entering into cell D3 the following formula: =SUM(1-D2) Check your model: enter a new p frequency to verify that your q changes too, and the two new values = 1

4 Randomizing Gametes In cell E5, enter the function; +Rand()

5 Hit ‘return’ and the RAND command will generate a random number between 0 -1
Highlight the cell again, put the cursor after the formula in the formula bar, and hit return again. What happens? Using this function, our model simulates the “random” choosing of gametes from a gene pool.

6 =IF(RAND()<=D$2, “A”, “B”)
Modify the formula using the following function: =IF(RAND()<=D$2, “A”, “B”) A randomly chosen gamete will be entered in the cell Enter this formula for cell F5 too, to generate the second gamete for the offspring

7 Recalculate by putting the cursor at the end of the formula in the formula bar and clicking the mouse. What happens to the gametes?

8 Create the F1 generation
Copy the formulas in E5 and F5 down for 50 rows to randomly generate the gametes that will form the offspring of the next generation. Click and hold at the bottom right-hand corner of the cell; drag the downward to copy the formula into all cells + Grab the square with your changed cursor icon

9 It should look like this

10 Create the genotypes The next step is to put the zygote in cell G5. In cell G5, enter the function = CONCATENATE(E5,F5) copy this formula down as far as you have gametes

11 Summing the Data Use columns H, I and J to keep track of the quantity of each genotype. Enter the following functions for each column. The function in cell H is =IF(G5=”AA”,1,0) The function in cell J is =IF(G5=”BB”,1,0) In cell I5, enter this function: =IF(G5=”AB”,1,(IF(G5=”BA”,1,0))) Enter labels for the columns you have created

12 It should look like this:

13 Calculate the number of offspring of each genotype in a RESULTS table back at the top in cells M, N
Use the SUM button or enter a SUM command for each column: ex: =SUM(H6:H55) Find the frequency of each genotype from the sums: =SUM(H55/(H55+I55+J55)) Cells in color are examples – be sure to refer to the cells your data are in

14 Calculate the number of each allele via the following functions:
=COUNTIF(E7:F56, "A") for the A allele =COUNTIF(E7:F56, “B") for the B allele To calculate the allele frequency of the next generation: =M8/(M8+N8) for p and =N8/(M8+N8) for q (again, the cells in red must be customized according to where the gametes are located in your individual spreadsheet) No SUM in these frequency formulas!

15 Test the Model • Try recalculating a number of times to make sure everything is working as expected Double click on your initial p value cell and hit return to randomize Verify your formula calculations by hand; make sure they add up If you are using different cells than my model, make sure your formulas reflect your cells Do not use SUM in the frequency calculations • Try different values for p Each time, make sure the number of zygotes, alleles, genotypes and frequencies add up correctly


Download ppt "Modeling Evolution in Excel"

Similar presentations


Ads by Google