Course 5.2Lesson 2 of 3
With two genes, each gamete carries one letter of each. itertools.product lists the four gametes of RrYy, and two of them meeting fill a 16-box square. Counting phenotypes gives Mendel's 9:3:3:1, and a test cross reveals a hidden genotype.
This lesson is free to read. Enroll free to keep your place and take the tests.
Try the code and the simulations beside the lesson.
Mendel also followed two traits together. Pea seeds can be:
A plant now carries four letters, two for each gene, such as RrYy. Each gamete carries one letter of each gene: one of R or r, and one of Y or y.
itertools.product makes every way to pick one item from each list:
It prints [('R', 'Y'), ('R', 'y'), ('r', 'Y'), ('r', 'y')]. Joining each pair gives the four gametes RY, Ry, rY and ry. For a plant RrYy, the first two letters are g[:2] and the last two are g[2:]:
This is Mendel's law of independent assortment in one line: the shape letter and the colour letter are chosen separately.
Each of four gametes from one parent can meet each of four from the other: boxes. The child's genotype sorts each gene on its own, so R comes before r and Y before y:
Counting the 16 boxes gives 9 round yellow, 3 round green, 3 wrinkled yellow and 1 wrinkled green. That is the 9:3:3:1 ratio. Mendel counted , , and seeds, out of , very close to it.
Each gene alone gives 3:1. Round is and yellow is , and the genes are chosen separately, so round and yellow together is . Round and green is , and so on. The program and the multiplication agree.
A round yellow plant may be RRYY, RRYy, RrYY or RrYy. You cannot tell by looking. The test cross crosses it with rryy, which shows every hidden small letter:
The program can try every candidate and print what each would give.
The program lists the gametes of RrYy, fills the 16 boxes, counts the four phenotypes from the most common down, and then does the test cross with rryy.
Rr.sorted("RrYy") mixes the genes into RYry. Sort each gene on its own.g[:2] is the shape gene and g[2:] is the colour gene. Swap them and round and yellow get muddled.product("Rr", "Yy") gives the four gametes of RrYy: RY, Ry, rY and ry.Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
list(product("Rr", "yy")) give, and how many different gametes is that?child sort each gene separately?Every lesson is open to read. Enrolling also lets you:
Log in to join the discussion.
Loading…