How to start: pick an organism above, choose a preset cross (or set each parent's alleles), then press Mix genes. Upper-case letters are dominant alleles, lower-case recessive. P = the parent generation, F1 = their offspring, F2 = the offspring of F1 × F1.

Generation P

Key facts to remember

  • Sickle cell disease is autosomal recessive. AS × AS: each pregnancy has a 1 in 4 chance of SS, 1 in 2 of AS (trait) and 1 in 4 of AA. An unaffected child of two carriers is a carrier with probability 2/3.
  • Kenya's Ministry of Health estimates about 14 000 babies are born with sickle cell disease each year (highest burden around Lake Victoria, in Western and on the Coast). HbAS carriers are about 90 % protected from severe falciparum malaria (Williams et al., 2005, Kilifi): heterozygote advantage.
  • G6PD deficiency is X-linked: a carrier mother passes it to half her sons; an affected father passes it to all his daughters (heterozygous carriers; through X-inactivation some have low enough activity to haemolyse) and none of his sons. Oxidant drugs such as primaquine, dapsone and nitrofurantoin, and fava beans, can trigger haemolysis.
  • WHO: single low-dose primaquine (0.25 mg/kg) for P. falciparum needs no G6PD test; the 14-day radical cure for P. vivax requires G6PD testing first.
  • ABO: Iᴬ and Iᴮ are codominant, i is recessive. Group O Rh-negative red cells are the emergency universal donor; group AB patients can receive red cells of any ABO group.
  • About 4 % of Kenyans are RhD-negative. An Rh-negative mother carrying an Rh-positive baby can be sensitised; anti-D immunoglobulin is given antenatally (around 28 weeks) and after delivery of an Rh-positive baby, ideally within 72 hours.
  • Hardy–Weinberg: if q² of births are SS, carriers are 2pq. With q² = 1 %, q = 0.1 and about 18 % of people carry HbS.

Sources: Kenya MoH; Williams et al., J Infect Dis 2005; Uyoga et al. 2015 (G6PD in Kilifi); WHO policy brief on single low-dose primaquine; Pan African Medical Journal 2025 (Rhesus isoimmunisation at KNH); Australian Red Cross Lifeblood guidance on anti-D. Educational summary: follow current national and hospital protocols and your supervisors.

1. Genes, alleles and genotypes

A gene sits at a fixed position (locus) on a chromosome. Diploid organisms carry two copies of each autosome, so they have two alleles of each autosomal gene, one from each parent. Two identical alleles make a homozygote (RR or rr); two different alleles a heterozygote (Rr). The genotype is the allele combination; the phenotype is the observable trait.

2. Mendel’s laws

  • Segregation: the two alleles of a gene separate during meiosis, so each gamete carries one allele, with probability ½ each.
  • Independent assortment: alleles of genes on different chromosomes (or far apart on one) are distributed to gametes independently. An individual heterozygous at $n$ such genes makes $2^n$ gamete types in equal proportions.
$$\text{gamete types}=2^n,\qquad \text{Punnett cells}=4^n,\qquad \text{monohybrid } 3{:}1,\ \text{dihybrid } 9{:}3{:}3{:}1,\ \text{trihybrid } 27{:}9{:}9{:}9{:}3{:}3{:}3{:}1$$

Probabilities multiply for independent events: from RrYy × RrYy, $P(\text{wrinkled, green}) = P(rr)\,P(yy) = \tfrac14\times\tfrac14 = \tfrac1{16}$.

3. Beyond simple dominance

ModeExample in the labTypical ratio
Complete dominancePea seed shape R > r3:1
Incomplete dominanceSnapdragon flower colour Cᴿ, Cᵂ (pink heterozygote)1:2:1
CodominanceABO blood groups: Iᴬ and Iᴮ both expressed (AB)1:1:1:1 for Iᴬi × Iᴮi
Multiple allelesABO: Iᴬ = Iᴮ > i4 phenotypes, 6 genotypes
Recessive epistasisLabrador: ee masks B/b (yellow)9:3:4
Lethal alleleGlimmerpuff curly tail K (KK dies)2:1 among survivors
X-linked recessiveFly white eyes; human colour blindnessdepends on sex
Linked genesFly black body b and vestigial wings vg (chromosome 2)parentals > recombinants

4. Sex linkage

Females are XX and males XY (in humans and Drosophila). A male has one X, inherited from his mother, so he is hemizygous for X-linked genes and expresses a recessive X allele. A carrier mother ($X^AX^a$) passes $X^a$ to half her sons, who are affected, and to half her daughters, who are carriers. An affected father passes his X to all daughters and to no sons (no male-to-male transmission).

5. Linkage and recombination

Genes close together on one chromosome tend to stay together. Crossing over in meiosis I produces recombinant gametes at a frequency that grows with distance:

$$RF = \frac{\text{recombinant offspring}}{\text{total offspring}}\times 100\%,\qquad 1\% \text{ RF} \approx 1\ \text{cM},\qquad 0 \le RF \le 50\%$$

With RF = $r$, a dihybrid in coupling (AB/ab) makes gametes AB and ab with frequency $(1-r)/2$ each and Ab, aB with $r/2$ each. In a test cross these frequencies appear directly in the offspring.

6. Testing a ratio: chi-square

Real batches never match a ratio exactly: 64 pea seeds rarely split exactly 36 : 12 : 12 : 4. The chi-square test asks whether the gap between what you observed and what you expected is small enough to be explained by chance.

$$\chi^2=\sum_i \frac{(O_i-E_i)^2}{E_i},\qquad \text{df}=k-1$$

$O_i$ and $E_i$ are observed and expected counts in each of $k$ classes, and df (degrees of freedom) is one less than the number of classes. A bigger $\chi^2$ means a bigger mismatch. The p-value is the probability of a deviation at least this large if the hypothesis is true. If $p > 0.05$, the data are consistent with the expected ratio (we do not reject it). Expected counts should be at least 5 for the test to be reliable.

7. Population genetics

In a large, randomly mating population with no selection, mutation or migration, allele and genotype frequencies stay constant (Hardy–Weinberg equilibrium). Here $p$ is the frequency of allele A and $q$ of allele a; with random mating, genotypes AA, Aa and aa appear at $p^2$, $2pq$ and $q^2$:

$$p+q=1,\qquad p^2+2pq+q^2=1$$

Fitness $w$ is the relative survival and reproduction of each genotype (1 = best). With fitnesses $w_{AA}, w_{Aa}, w_{aa}$, selection changes p each generation:

$$p' = \frac{p^2 w_{AA} + pq\,w_{Aa}}{\bar w},\qquad \bar w = p^2 w_{AA}+2pq\,w_{Aa}+q^2 w_{aa}$$

When heterozygotes are fittest ($w_{AA}=1-s$, $w_{Aa}=1$, $w_{aa}=1-t$), both alleles are kept at $\hat q = s/(s+t)$: the explanation for high HbS frequencies where malaria is common. In small populations, genetic drift adds random change with variance $pq/2N$ per generation, and eventually fixes or loses alleles.

Model notes: the Glimmerpuff is fictional but obeys real rules. Pea letters follow school convention (the genes are now known as R = SBEI, I = SGR for seed colour, A for flower colour, Le for stem length). Human traits are simplified: sickle-cell trait carriers are usually healthy, and colour vision involves several genes.

Example 1: Mendel’s dihybrid data

Mendel crossed RrYy × RrYy and counted 556 seeds: 315 round yellow, 108 round green, 101 wrinkled yellow, 32 wrinkled green.

  1. Expected 9:3:3:1 of 556: $312.75,\ 104.25,\ 104.25,\ 34.75$.
  2. $\chi^2 = \frac{2.25^2}{312.75}+\frac{3.75^2}{104.25}+\frac{3.25^2}{104.25}+\frac{2.75^2}{34.75} = 0.016+0.135+0.101+0.218 = 0.470$.
  3. df $=4-1=3$; $p = 0.925$. The data fit 9:3:3:1 very well. Load the dihybrid pea preset with 556 offspring and compare.

Example 2: a colour-blind son

Mother $X^BX^b$ (carrier, normal vision) × father $X^BY$.

  1. Mother’s eggs: $X^B$ or $X^b$ (½ each). Father’s sperm: $X^B$ or $Y$ (½ each).
  2. Daughters: $X^BX^B$ or $X^BX^b$: all normal vision, half carriers.
  3. Sons: $X^BY$ or $X^bY$: half colour-blind. Overall: ¼ of all children are colour-blind sons.

Example 3: ABO from two heterozygotes

$I^Ai \times I^Bi$ gives $I^AI^B$, $I^Ai$, $I^Bi$, $ii$ in equal proportions: blood groups AB, A, B and O, ratio 1:1:1:1. Parents with groups A and B can have a child of any group.

Example 4: Labrador coat colour (9:3:4)

  1. BbEe × BbEe gives 9 B_E_ : 3 bbE_ : 3 B_ee : 1 bbee.
  2. E_ dogs deposit pigment in the coat: B_E_ black, bbE_ chocolate.
  3. ee dogs are yellow whatever their B alleles: 3 + 1 = 4. Ratio 9 black : 3 chocolate : 4 yellow. B still shows in the nose: B_ee yellow dogs have black noses, bbee have liver noses.

Example 5: mapping two fly genes

Female $b^+vg^+/b\,vg$ × male $b\,vg/b\,vg$ (test cross), with RF = 17%:

  1. Female gametes: $b^+vg^+$ 41.5%, $b\,vg$ 41.5% (parental); $b^+vg$ 8.5%, $b\,vg^+$ 8.5% (recombinant). The male gives only $b\,vg$.
  2. In 1000 offspring expect ≈ 415 grey long, 415 black vestigial, 85 grey vestigial, 85 black long.
  3. RF = (85 + 85)/1000 = 17%: the genes are about 17 cM apart. (On the standard map they are 18.5 cM apart; double crossovers make RF underestimate long distances.)

Example 6: sickle-cell carriers in a population

If 1% of babies have sickle-cell disease (SS), $q^2 = 0.01$, so $q = 0.1$ and $p = 0.9$.

  1. Carriers: $2pq = 2(0.9)(0.1) = 0.18$, i.e. 18% of people.
  2. Chance two random parents are both carriers: $0.18^2 = 0.0324$; chance their child has SS: $0.0324 \times \tfrac14 = 0.0081$. That is most of the 1%; the rest comes from matings in which a parent has SS. Under random mating the total is exactly $q^2 = 0.01$.
  3. With heterozygote advantage $s=0.15$ (AA, malaria) and $t=0.8$ (SS), $\hat q = 0.15/0.95 = 0.158$. Try the preset in the Population view.

Guided experiments

  1. Mendel’s monohybrid. Pea: RR × rr. Breed two F1 plants together. What fraction of F2 seeds are wrinkled? Repeat with 1000 offspring and watch χ² behave. Expect about ¼ wrinkled (Rr × Rr gives 1 RR : 2 Rr : 1 rr); with more offspring the observed fraction settles closer to 0.25 and χ² for 3:1 usually stays small.
  2. Hidden alleles. Breed F2 round seeds with the recessive tester. Which round plants were Rr? Expect any round plant that gives even one wrinkled offspring to be Rr, and about ⅔ of the round F2 plants to be Rr, because among round seeds RR : Rr = 1 : 2.
  3. Morgan’s flies. Cross a red-eyed female with a white-eyed male, then breed the F1. Which sex are the white-eyed F2 flies? Now try the reciprocal cross. Expect white eyes only in F2 males (a quarter of all F2) in the first cross, because males have one X; the reciprocal cross gives white-eyed F1 sons and a 1 : 1 ratio in both sexes of the F2.
  4. Linkage. Fly test cross with b and vg. Set RF to 0, 17 and 50%. When do the four classes become equal, and why? Use Recombination frequency (b–vg) and a fixed Offspring in the batch. Expect only parental classes at 0 %, about 41.5 : 41.5 : 8.5 : 8.5 at 17 %, and four equal classes at 50 %, when the genes behave as if unlinked.
  5. Lethal ratios. Cross two curly-tailed Glimmerpuffs. Why 2:1 and not 3:1? Look for the hatched cells in the Punnett square. Expect curly : straight close to 2 : 1, because the curly homozygotes (a quarter of the zygotes) die, leaving 2 heterozygous curly to 1 straight.
  6. Drift vs size. Population view: run neutral drift with N = 10 and N = 500. How many replicate populations lose or fix A? Keep Starting p, Generations and Replicate populations the same for both sizes. Expect most N = 10 populations to lose or fix A within a few dozen generations and almost none at N = 500, because the random change in p each generation shrinks as N grows.

Auto-checked challenges

Ratios to recognise

CrossOffspring phenotype ratioWhy
Aa × Aa3 : 1complete dominance
Aa × aa1 : 1test cross
CᴿCᵂ × CᴿCᵂ1 : 2 : 1incomplete or codominance
AaBb × AaBb9 : 3 : 3 : 1two independent genes
AaBb × aabb1 : 1 : 1 : 1dihybrid test cross
AaBbCc × AaBbCc27 : 9 : 9 : 9 : 3 : 3 : 3 : 1three independent genes
BbEe × BbEe (Labrador)9 : 3 : 4recessive epistasis
Kk × Kk, KK lethal2 : 1lethal homozygote removed
Iᴬi × Iᴮi1 : 1 : 1 : 1 (A : B : AB : O)codominance + recessive i
XᴬXᵃ × XᴬYdaughters all dominant; sons 1 : 1X-linked recessive
AB/ab × ab/ab, RF = r(1−r)/2 : (1−r)/2 : r/2 : r/2linkage

Pedigree symbols

male female affected carrier sex not specified mating consanguineous Generations are numbered I, II, III…; individuals left to right.
Educational simulation, not a clinical tool. Crosses and risks are teaching examples. Genetic counselling, transfusion and antimalarial treatment follow current national guidelines, your blood bank's procedures and your supervisors.

Inheritance at the bedside

ConditionInheritanceKey crossPractice points
Sickle cell disease (HbSS)Autosomal recessive (HBB, chromosome 11)AS × AS: ¼ SS, ½ AS, ¼ AANewborn screening, penicillin prophylaxis, folic acid, hydroxyurea; offer carrier testing to partners
G6PD deficiencyX-linked (chromosome X)Carrier ♀ × normal ♂: ½ of sons deficient, ½ of daughters carriersAsk about dark urine after drugs; test before 14-day primaquine; avoid oxidant drugs in known deficiency
ABO blood groupsCodominant Iᴬ, Iᴮ; recessive i (chromosome 9)Iᴬi × Iᴮi: A, B, AB and O, ¼ eachGroup and crossmatch before transfusion; check identity at the bedside
Rhesus DD dominant to d (chromosome 1)dd ♀ × Dd ♂: ½ of babies Rh-positiveGroup every pregnant woman; anti-D for Rh-negative mothers as the protocol states
Red cell compatibility. A recipient makes antibodies against the ABO antigens they lack, so donor red cells must not carry those antigens. O has no A or B antigen (any ABO group can receive it); AB has both (only AB recipients can receive it). Rh-negative patients, especially girls and women who may become pregnant, should receive Rh-negative red cells.
Why the first Rh-positive baby is usually spared. Sensitisation mostly happens when fetal cells enter the mother's blood at delivery. Her first response is IgM, which does not cross the placenta; in a later pregnancy IgG anti-D crosses and destroys the baby's red cells (haemolytic disease of the fetus and newborn).