Lesson 13

A

Locked — confirm your name above to begin.

Things that make more of themselves become more common. The statement is a tautology. It has to be true, a biological necessity, in that it just says itself. However, it can also be expressed mathematically. The mathematics of it, the equation, called the Price equation, is also a tautology; it's an identity. It's as if saying one equals one. But it is useful nonetheless to break things down in this way, so that you can understand what is going on in any given system.

So "things that make more" can be expressed mathematically as the covariance between fitness and a trait. Fitness is w, and we'll just use z for the trait. "Of themselves" is to what extent the traits are copied. To what extent are the replications similar? This is a general issue. We're going to express this as the expectation of fitness and the change in the trait. This one is a little hinky, in that the expectation of fitness multiplied by the change is itself a bias. So being small, close to 0, means that you are copying yourself perfectly. Being large, high variation, means that you are copying yourself in some biased direction. So a perfect clone would have an expected w times Δz of zero. No difference. So that all that was mattering was the covariance of fitness and the trait. So things that make more are making more of themselves because the expected bias is zero. The "becoming more common" is the change in the trait, the Δz.

This first activity is going to look at those two parts in isolation. First, you're going to see what happens if you only vary who makes more of themselves, and each individual is making perfect copies. And so you will click on flowers of different colors and control how many copies of themselves they make: the covariance between the trait, color, and fitness, the number of copies they make. Each offspring is a perfect replica of the parent in this case. And you can see how this produces change in the population. And you will try to hit a few targets using only perfect copying replicators.

After you've done that, we're then going to hold fitness constant. Every individual is going to make the exact same number of copies. Every individual in the population will have 2 offspring. However, what you're going to then vary is what those offspring look like. How associated is the parent trait, the color of the parent flower, with the offspring color? Do offspring always match the parent, or do they always look similar? That is, how much information about the offspring does the parent have? And we're going to change the frequency of a trait in the population that way.

These 2 things, the covariance between fitness and the trait, selection, and the expected transmission bias, E(wΔz), are both always happening. The first activity here is just breaking them apart.

  • 10 flowers of different colors, ranging from dark orange to dark purple. Above each flower, the offspring that individual makes.
  • Who makes more of themselves? For this activity, every individual produces perfect clones, and the only thing that varies is which individuals make clones. Click the flowers above each parent and control how many clones each individual produces.
  • Make more of themselves. For these activities, every individual produces the same number of offspring, but how the offspring resemble the parent for the trait, color, will be different.
  • Start the targets when you are ready.

R code


      

Predict

Controls

To open Stage B

  • Five targets: every one you hit counts. 0 of 5 attempts
Prions are folded proteins. They encounter other proteins, fold them into the same shape. Ones that fold more quickly become more common. Ones that fold with higher fidelity become more common.
Stage B is open.

B

Solve Stage A to unlock this section.

Now, we're going to revisit an expanded version of an activity from the prior lesson. There is a field of flowers, and the flowers vary in their colors. Here, the color of a flower is going to be determined by a large number of loci, each with multiple alleles, and the colors are going to range continuously from orange to purple. Each individual flower has some genotype, and then when the traits are added together, additive genetic variation, VA, a particular phenotype, flower color, is produced.

Just as before, hummingbirds and bees will have preferences for different flower colors, and you will control that preference and the abundance of the bees and hummingbirds. But now we're also going to add butterflies. Butterflies are going to be a little different. They're going to have a particular color they prefer, a mean color, and a strength of that preference, a spread. As before, you can also control the number of butterflies, and both the mean and the spread.

These will be represented as a fitness surface in the Predict panel. You will see the starting population of flowers visually. You'll see a bar graph representing the frequencies of different colors, and in the Predict panel, you'll see dots representing the number of flowers at each particular color, sitting on a fitness surface. You will adjust the fitness surface, a function of the color, by futzing with the abundance and preferences of the pollinators, and then you will run the simulation to try and produce final color frequencies within the target. The change due to who reproduced, cov(w, z), and the bias of inheritance, E(wΔz), are shown as bars beneath the color frequency plot, as well as the net change each generation of your run.

  • Flower color is a continuous trait driven by additive genetic variation at a large number of loci.
  • Fitness is determined by the frequency with which different kinds of pollinators visit flowers of a particular color, as well as the abundance of those pollinators.
  • Use the control panel to adjust abundance and preference of pollinators to shape a fitness surface, so that a starting population ends up evolving to a particular target.

Predict

Controls

R code

# a meadow with room for 200: color 0 (dark orange) to 10 (dark purple)L <- 100                                    # genes, each with a purple and an orange alleleg <- matrix(rbinom(200 * 2 * L, 1, 0.5), 200)   # 1 = a purple copycolor <- function(g) pmin(10, pmax(0, 5 + 0.08 * (2 * rowSums(g) - 2 * L) + rnorm(nrow(g), 0, 0.5)))ramp <- function(d) 0.1 + 0.9 * pmin(1, pmax(0, d / 2))   # chosen 1, fading to 0.1 over 2 colorsnH <- 5; tH <- 10                     # hummingbirds: colors 0 to tHnB <- 5; tB <- 0                     # bees: colors tB to 10nF <- 0; mu <- 5; sp <- 1.5            # butterflies: around mu, give or take spfor (gen in 1:20) {  z <- color(g); n <- nrow(g)  v <- cbind(rpois(n, 8 * nH * ramp(tH - z + 2)),        # visits, by kind             rpois(n, 8 * nB * ramp(z - tB + 2)),             rpois(n, 8 * nF * (0.1 + 0.9 * exp(-(z - mu)^2 / (2 * sp^2)))))  kids <- min(200, rbinom(1, sum(v), 1/16))   # one seed in 16 grows; room for 200  if (kids == 0) break                        # no seedlings: the meadow is gone  s   <- sample(length(v), kids, TRUE, v)     # a seed: which flower, which kind set it  mom <- (s - 1) %% n + 1; kind <- (s - 1) %/% n + 1  dad <- sapply(kind, function(k) sample(n, 1, prob = v[, k]))   # pollen from that kind's calls  kid <- matrix(0, kids, 2 * L)  for (l in 1:L) {                            # one copy of each gene from each parent    kid[, 2*l - 1] <- g[cbind(mom, 2*l - rbinom(kids, 1, 0.5))]    kid[, 2*l]     <- g[cbind(dad, 2*l - rbinom(kids, 1, 0.5))] }  zk <- color(kid)  w  <- tabulate(c(mom, dad), n)              # offspring each flower left  zs <- sapply(1:n, function(i) sum(zk[mom == i]) + sum(zk[dad == i]))  sel <- mean((w - mean(w)) * (z - mean(z))) / mean(w)     # cov(w, z) / w-bar  off <- mean(zs - w * z) / mean(w)                        # E(w dz) / w-bar  print(c(kids, sel, off, sel + off, mean(zk) - mean(z)))   # the last two agree  g <- kid}

To open Stage C

  • Five targets: every one you hit counts. 0 of 5 attempts
Stage C is open.

C

Solve Stage B to unlock this section.

In part A, we explored the selection and transmission bias terms of the Price equation on their own, explicitly. In part B, you set up a little intuitive set of selectors with a known genetic system and let it run, to explore how to hit your target under different parameter sets.

For this part, we are again going to have a meadow of flowers. But now we're actually going to explore what goes into the two terms of selection and transmission bias. In some ways, this is like the birth and death rates that we saw before. The only two ways to change the number of individuals in a population is by changing the number of births or changing the number of deaths. Likewise, the only two ways to change a trait is by changing who makes more, and how much of themselves gets passed on: the transmission bias, and the fitness, the selection.

Just like a lot of things go into controlling births, and a lot of things go into controlling deaths, a lot of different things go into controlling selection and transmission bias. We're going to explore that with another one of our directed acyclic graphs. In this, there will be a number of parameters you'll be able to control for a given trait, and this time the trait will be the stem height: how high off the ground does the flower grow? You'll have a starting population, you'll be able to control how much each individual factor influences the change, and you will attempt to hit various targets, looking at a change in stem height over time as a function of how you set up the simulation in the causal diagram, the directed acyclic graph.

  • A field of 400 plants, and we're monitoring the trait of stem height.
  • The causal diagram is how you control the influence of stem height on the various population parameters. Click an arrow and drag it. Some arrows cannot be altered.
  • Predict: your goal is to produce some target result. However, instead of showing how the arrows influence the target directly, the effect of the arrows on the two components of change, selection, cov(w, z), and transmission bias, E(wΔz), are shown. The goal is to manipulate the arrows to set the two components of trait change in such a way that the trait changes to reach the target.

Predict

Controls

R code


      

To open Stage D

  • Five targets: every one you hit counts. 0 of 5 attempts
Stage D is open.

D

Solve Stage C to unlock this section.

What we did in part C was break the components of selection, cov(w, z), and the transmission bias term, E(wΔz), into a few individual parts, so you could look at how each separate factor influenced the two terms that drive the net change. This is the value of having this Price equation. Just like population change could be broken into births and deaths, and we could look at what influences births and deaths separately, the net change can be broken into the net change due to selection and the net change due to transmission bias, and we can think about what factors influence each of those separately to understand how we would predict the change in the frequency of some transmittable trait.

In part C, you did this for one trait, the stem height. Now we're going to add a second trait, the flower size. As we do this, we will be able to vary more factors; more things can change. This is essentially a repeat of the above, but now with two traits. The same goals apply, however.

  • A field of 400 plants, and we're monitoring two traits, stem height and flower size.
  • The causal diagram is how you control the influence of stem height and flower size on the various population parameters. Click an arrow and drag it. Some arrows cannot be altered.
  • Predict: your goal is to produce some target result. However, instead of showing how the arrows influence the target directly, the effect of the arrows on the two components of change, selection, cov(w, z), and transmission bias, E(wΔz), are shown. The goal is to manipulate the arrows to set the two components of trait change in such a way that the traits change to reach the target.

Predict

Controls

R code


      

To finish

  • Ten targets: every one you hit counts. 0 of 10 attempts
That is all of Lesson 13.

Good job!

That is all of Lesson 13. Your completion code is below — copy it and hand it in.