Mendel and Inheritance
Genetics and Heredity Fundamentals π
Course 1 Β· Chapter 1 Β· Mendel and Inheritance
Children resemble their parents, but not exactly, and a trait can skip a generation. For thousands of years breeders used that knowledge without understanding it. In the 1850s and 1860s a monk named Gregor Mendel, working in a monastery garden in Brno (then BrΓΌnn, in the Austrian Empire), counted thousands of pea plants and found that inheritance follows rules that can be written as simple arithmetic. This course follows that arithmetic into modern genetics. Because the rules are arithmetic, we will test them with short Python 3 programs.
Mendel's Experiment
Garden peas suited the job. They grow quickly, have clearly different forms (round or wrinkled seeds, tall or short plants, purple or white flowers), and a gardener can control which plant fertilises which. Mendel studied seven such traits. He first made sure his plants were true-breeding: when crossed with themselves for generations, they always gave the same form. Then he crossed plants that differed in one trait, for example round-seeded with wrinkled-seeded.
The first generation of offspring (called F1) were all round. The wrinkled form seemed to have vanished. When he let the F1 plants fertilise themselves, the wrinkled form came back in the next generation (F2), in about one plant in four. For seed shape his counts are usually quoted as 5,474 round and 1,850 wrinkled (check).
| Generation | How produced | What Mendel saw (seed shape) |
|---|---|---|
| P (parents) | true-breeding round x true-breeding wrinkled | two clearly different forms |
| F1 | offspring of the parents | all round |
| F2 | F1 plants crossed with each other | round and wrinkled, about 3 : 1 |
Alleles, Dominant and Recessive
Mendel's explanation was that each plant carries two copies of the factor for a trait, one from each parent, and passes on only one of them to each offspring, chosen at random. Today we call the factors genes and the versions of a gene alleles (the word "gene" was coined later, and was not Mendel's; check the date, often given as 1909).
We write alleles as letters. Use A for the round allele and a for the wrinkled one. A plant's pair of letters is its genotype; the visible result is its phenotype. The round allele is dominant: one copy is enough to show the trait. The wrinkled allele is recessive: it shows only when both copies are a.
| Genotype | Name | Phenotype |
|---|---|---|
| AA | homozygous dominant | round |
| Aa | heterozygous | round |
| aa | homozygous recessive | wrinkled |
This explains everything above. True-breeding round plants are AA, wrinkled are aa. Every F1 plant gets A from one parent and a from the other, so all are Aa and all look round. The wrinkled allele is hidden, not lost.
The Punnett Square as Code
A Punnett square (devised by Reginald Punnett in the early 1900s; check) lists every pairing of one allele from each parent. That is exactly what itertools.product does, so we can write it in a few lines. Each pairing is equally likely, so counting pairings gives the probabilities.
Output:
The sorting in "".join(sorted(a + b)) makes aA and Aa the same genotype. Three of the four squares contain at least one A, so three-quarters of the offspring look round and one quarter look wrinkled. That is the 3 : 1 ratio.
The second line shows a heterozygous plant crossed with a wrinkled one: half the offspring are round and half wrinkled. Breeders use this to find out whether a round plant is AA or Aa.
Chance and Sample Size
A 3 : 1 ratio is a probability, not a promise. Each offspring independently has a three-in-four chance of looking round. Simulating it shows how counts behave:
With 10 offspring the share of round plants was 0.7; with 10,000 it was 0.751, close to the expected 0.75. Using a fixed seed makes the run repeatable. Mendel's habit of counting thousands of plants is a large part of why his ratios were so clear.
Challenges
Using cross, work out the offspring genotypes and the dominant : recessive appearance counts for Aa x aa, AA x aa and AA x Aa. Predict each result on paper first.
Taking Mendel's seed-shape counts as 5,474 round and 1,850 wrinkled, compute the total, the round : wrinkled ratio, the counts expected under an exact 3 : 1 split, and the difference.
π View solutionWrite dominant_fraction(n, seed) that simulates n offspring of an Aa x Aa cross. For n = 8, 80, 800, 8000 and 80000, run five seeds each and report the largest miss from 0.75. Describe the pattern.
Quick Reference
- Gene: a unit of inheritance; allele: a version of a gene
- Genotype: the alleles carried; phenotype: the visible trait
- Dominant shows with one copy; recessive needs two
- Aa x Aa gives 1 AA : 2 Aa : 1 aa, so 3 dominant : 1 recessive
- Each offspring is an independent draw; ratios emerge only in large samples
- Check: the pea counts, the date "gene" was coined, the Punnett date