DNA, Genetics, and the Code of Life
Extract DNA from a strawberry, explore genetics with Punnett squares, and simulate inheritance in Python.
Materials for this lesson
- Strawberries (fresh or frozen)
- Dish soap (clear works best)
- Table salt
- Rubbing alcohol (91% isopropyl, chilled in freezer)
- Plastic zip-lock bags
- Clear cups or glasses
- Coffee filter or cheesecloth
- Wooden skewer or toothpick
- Measuring spoons
- Laptop (charged)
Warm-Up: You Are Part Banana
You share about 60% of your DNA with a banana. You share about 85% with a mouse and 96% with a chimpanzee. What does that actually mean? Does it mean you're 60% banana?
Take a minute to think about it, then reveal the answer.
Core Lesson: The Code of Life
What is DNA?
DNA stands for deoxyribonucleic acid. It is a molecule that carries the instructions for building and running every living thing on Earth โ from bacteria to blue whales. If you uncoiled all the DNA in a single human cell, it would stretch about 2 meters long. Your entire body contains enough DNA to stretch from the Earth to the Sun and back 600 times.
The Double Helix
DNA has a shape called a double helix โ imagine a twisted ladder. The "rails" of the ladder are made of sugar and phosphate molecules. The "rungs" are made of pairs of molecules called bases.
There are four bases:
| Base | Abbreviation | Always pairs with | |------|-------------|-------------------| | Adenine | A | T (Thymine) | | Thymine | T | A (Adenine) | | Cytosine | C | G (Guanine) | | Guanine | G | C (Cytosine) |
Base pairing rules: A always bonds with T, and C always bonds with G. This is called complementary base pairing. If you know one side of the DNA ladder, you can always figure out the other side.
So if one strand reads: A T C G G T A C
The other strand must be: T A G C C A T G
If a strand of DNA reads G-C-A-T-T-A, what does the complementary strand read?
From DNA to Traits: Genes and Chromosomes
- A gene is a segment of DNA that contains the instructions for building one specific protein (or doing one specific job). Humans have roughly 20,000โ25,000 genes.
- Chromosomes are tightly coiled bundles of DNA. Humans have 46 chromosomes (23 pairs). You get 23 from your mother and 23 from your father.
- Your complete set of DNA is called your genome. The human genome contains about 3.2 billion base pairs.
DNA, Chromosomes, Genes, and Traits โ Amoeba Sisters
Dominant and Recessive Alleles
Different versions of the same gene are called alleles. For many traits, you carry two alleles โ one from each parent.
- A dominant allele (written with a capital letter, like B) shows its effect even if you only have one copy.
- A recessive allele (written lowercase, like b) only shows its effect if you have two copies.
| Genotype | What it means | Phenotype (what you see) | |----------|---------------|--------------------------| | BB | Two dominant alleles (homozygous dominant) | Brown eyes | | Bb | One dominant, one recessive (heterozygous) | Brown eyes (dominant wins!) | | bb | Two recessive alleles (homozygous recessive) | Blue eyes |
Genotype = the alleles you carry (your genetic code). Phenotype = the trait you actually display (what people can see). Two organisms can have different genotypes but the same phenotype โ both BB and Bb produce brown eyes.
Punnett Squares
A Punnett square is a grid that helps predict the probability of offspring inheriting particular combinations of alleles. Let's cross two heterozygous brown-eyed parents (Bb x Bb):
| | B | b | |---|-------|-------| | B | BB | Bb | | b | Bb | bb |
Results: 1 BB : 2 Bb : 1 bb
- 75% chance of brown eyes (BB or Bb)
- 25% chance of blue eyes (bb)
Two parents are both Bb (heterozygous). What fraction of their offspring would you expect to be homozygous dominant (BB)?
A parent with genotype BB and a parent with genotype bb have offspring. What are the possible genotypes of the children?
Hands-On Lab Part 1: Kitchen DNA Extraction
We are going to extract real DNA from a strawberry using simple household materials. Yes โ you will be able to see DNA with your naked eye.
You will need: Strawberries, dish soap, table salt, rubbing alcohol (chilled in the freezer for 15+ minutes), zip-lock bag, clear cup, coffee filter, measuring spoons, wooden skewer.
Why strawberries?
Strawberries are perfect for DNA extraction because they are octoploid โ they have 8 copies of each chromosome (most organisms have only 2). That means 8 times as much DNA per cell, making it much easier to see.
Steps
-
Mash the strawberry. Place 2โ3 strawberries in a zip-lock bag and seal it. Squish and mash for 2 minutes until it is a smooth pulp. This breaks open the cells.
-
Make the extraction solution. In a cup, mix:
- 2 teaspoons of dish soap
- 1 teaspoon of salt
- 1/2 cup of warm water
Stir gently (avoid making bubbles).
-
Add the solution. Pour the extraction solution into the bag with the mashed strawberry. Seal and gently mix for 1 minute. The soap dissolves the cell membranes (which are made of fats). The salt causes the DNA to clump together.
-
Filter. Place a coffee filter over a clean cup and pour the mixture through. Let it drip for a few minutes. The liquid that passes through is your cell lysate โ it contains dissolved DNA.
-
Add cold alcohol. Tilt the cup and slowly pour chilled rubbing alcohol down the side so it forms a layer on top. Use about the same volume as the filtered liquid. Do not stir.
-
Watch the magic. Within 1โ2 minutes, you will see white, stringy, cloudy material forming at the boundary between the two layers. That is DNA. Use a wooden skewer to gently spool it up.
Why does this work? DNA is soluble in water but not soluble in alcohol. When you add the cold alcohol, the DNA comes out of solution and becomes visible. Each strand you see contains millions of DNA molecules bundled together.
Hands-On Lab Part 2: Punnett Squares in Python
Now let's move to the laptop and simulate genetics with code.
Program 1: Punnett Square Calculator
# Punnett Square Calculator
# Cross two heterozygous parents (Bb x Bb)
parent1 = "Bb"
parent2 = "Bb"
print(f"Crossing {parent1} x {parent2}")
print("-" * 30)
offspring = []
for allele1 in parent1:
for allele2 in parent2:
# Always write the dominant allele first
if allele1.isupper() or (allele1.islower() and allele2.islower()):
genotype = allele1 + allele2
else:
genotype = allele2 + allele1
offspring.append(genotype)
print("Possible offspring genotypes:")
for i, child in enumerate(offspring, 1):
print(f" {i}. {child}")
# Count each genotype
from collections import Counter
counts = Counter(offspring)
print(f"\nGenotype ratios:")
for genotype, count in sorted(counts.items()):
percentage = count / len(offspring) * 100
print(f" {genotype}: {count}/4 ({percentage:.0f}%)")
Program 2: Simulate 1,000 Offspring
import random
def simulate_inheritance(parent1, parent2, num_offspring):
"""Simulate genetic inheritance for many offspring."""
results = []
for _ in range(num_offspring):
# Each parent randomly passes one allele
allele1 = random.choice(parent1)
allele2 = random.choice(parent2)
# Sort so dominant allele comes first
genotype = "".join(sorted([allele1, allele2], key=lambda x: (x.lower(), x.islower())))
results.append(genotype)
return results
# Simulate!
parent1 = "Bb"
parent2 = "Bb"
num_trials = 1000
offspring = simulate_inheritance(parent1, parent2, num_trials)
# Count results
from collections import Counter
counts = Counter(offspring)
print(f"Simulation: {parent1} x {parent2} โ {num_trials} offspring")
print("=" * 45)
for genotype in sorted(counts.keys()):
count = counts[genotype]
percentage = count / num_trials * 100
bar = "#" * int(percentage / 2)
print(f" {genotype}: {count:4d} ({percentage:5.1f}%) {bar}")
# Determine phenotypes
dominant_trait = sum(counts[g] for g in counts if g[0].isupper())
recessive_trait = sum(counts[g] for g in counts if g[0].islower())
print(f"\nPhenotype results:")
print(f" Brown eyes (B_): {dominant_trait} ({dominant_trait/num_trials*100:.1f}%)")
print(f" Blue eyes (bb): {recessive_trait} ({recessive_trait/num_trials*100:.1f}%)")
print(f"\nExpected ratio: 75% / 25%")
print(f"Actual ratio: {dominant_trait/num_trials*100:.1f}% / {recessive_trait/num_trials*100:.1f}%")
Try changing num_trials to 10, 100, 10000, and 100000. Notice how the results get closer to the theoretical 75/25 ratio as you increase the number of trials? This is called the Law of Large Numbers โ one of the most important ideas in probability.
Challenge: The Blue-Eyed Child
The scenario: Both parents have brown eyes, but each carries one copy of the recessive blue-eye allele. Their genotypes are both Bb.
- Use a Punnett square to calculate the exact probability their child will have blue eyes.
- Modify the Python simulation to answer: If they have 4 children, what is the probability that at least one has blue eyes?
- Run the simulation 10,000 times to check your math.
Resources
- DNA from the Beginning โ interactive animated guide to genetics from Cold Spring Harbor Laboratory
- Amoeba Sisters: Heredity โ excellent overview of heredity and Punnett squares
- Learn Genetics โ University of Utah โ interactive tools for learning about DNA, heredity, and more
- Python
randommodule documentation โ reference for random number generation in Python - NHGRI: Talking Glossary of Genetic Terms โ definitions of every genetics term you might encounter