flowchart TD A["Genotype data, frequencies and mating: PG 1–3"] --> B["Diversity and population change: PG 4–7"] A --> C["Quantitative traits and gene action: QG 1–2"] C --> D["Parameters and genetic evaluation: QG 3–5"] D --> E["Objectives and selection policies: QG 6–7"] E --> F["Inheritance and inbreeding: QG 8–9"] D --> G["Validation: QG 10"] F --> H["Programme comparison: QG 11"] G --> H B --> H B --> I["Linked selection: PG 14"] B --> J["Genealogies: PG 15"]
Course map
Population genetics, quantitative genetics and breeding decisions
Choose an entry point
The practicals connect three questions: how genetic variation is described, how genetic merit is predicted, and how breeding decisions change a population. PG denotes a population-genetics practical and QG a quantitative-genetics practical; each course has its own numbering.
Start with basic genetics, means and variances, and elementary R vectors, data frames and plots. Matrix notation becomes useful for genetic evaluation and selection indices. Each practical includes explanation, runnable examples, interpretation questions and suggested solutions.
Arrows show useful conceptual connections, not compulsory software dependencies. You can teach the short routes below without running every preceding analysis.
Population-genetics sequence
These fifteen practicals use base R and hypothetical inputs. They require no biological downloads or additional R packages.
| Practical | Main question | Useful preparation |
|---|---|---|
| PG 1: Understanding genotype data | What does an allele dosage encode, and what does it omit? | Genotypes, alleles and basic R |
| PG 2: Allele frequencies and HWE | How do observed counts differ from random-union expectations? | PG 1 |
| PG 3: Structure, mating and inbreeding | Can a heterozygosity deficit identify its cause? | PG 2; conditional probability |
| PG 4: Measuring genetic diversity | Which diversity measure matches the data and sampling model? | PG 1–3 |
| PG 5: Mutation, migration and LD | How do processes change allele and haplotype frequencies? | PG 2; phased haplotypes from PG 1 |
| PG 6: Genetic drift | Why do finite populations depart from deterministic expectations? | PG 2 and PG 4; binomial sampling |
| PG 7: Selection, fitness and dominance | How do genotype fitness and sampling change allele trajectories? | PG 2 and PG 6 |
| PG 8: Testing HWE proportions | What do approximate and exact tests establish? | PG 2–3; sampling and hypothesis testing |
| PG 9: Mutation, selection and drift at balance | How do equilibrium and stationary variation depend on the model? | PG 5–7; probability and simple recursions |
| PG 10: Conservation genetics and management choices | How do contributions, pairings and a budget affect conservation choices? | PG 3–4 and PG 6; QG 9 is helpful |
| PG 11: DNA profiles and match probabilities | Which assumptions connect genotype frequencies to match evidence? | PG 2–3 and PG 5; conditional probability |
| PG 12: Sequence divergence and the molecular clock | How do substitution and calibration assumptions turn differences into time? | PG 1, PG 4–5; probability and logarithms |
| PG 13: Disease alleles, penetrance and population risk | How do genotype frequencies and penetrance determine phenotype probabilities? | PG 2–3; conditional probability |
| PG 14: Selective sweeps and genetic hitchhiking | How do selection, recombination and initial backgrounds affect linked variation? | PG 4–5 and PG 7 |
| PG 15: Coalescent history and sampled variation | How do ancestry and mutations connect sampled diversity to demographic assumptions? | PG 4, PG 6 and PG 12; exponential waiting times |
Keep population-genetics slides alongside the practicals. In particular, HWE is a model expectation; identity by descent is defined on an ancestral base; and dosage alone does not identify phase.
Quantitative-genetics sequence
Practicals 1–5 follow the mouse analysis from observed traits to genetic evaluation. Later practicals use explicitly hypothetical examples to separate objectives, information, selection, inheritance and programme assessment.
| Practical | Main question | Useful preparation |
|---|---|---|
| QG 1: Quantitative traits | What variation is visible in the mouse records? | Means, variance and basic R |
| QG 2: Single-locus variation | How do additive and dominance effects contribute to variation? | QG 1; PG 1–2 |
| QG 3: Genetic parameters | How do pedigree relationships support variance estimation? | QG 1–2; linear models and matrix notation |
| QG 4: Pedigree breeding values | How do BLUP, shrinkage and reliability relate? | QG 3 |
| QG 5: Genomic breeding values | How do genomic information and held-out prediction enter evaluation? | QG 3–4; PG 1 |
| QG 6: Objectives and selection indices | What is valued, and how should information be weighted? | Covariance and linear models; QG 3–5 are helpful |
| QG 7: Selection policies and mating plans | How do rules and reproductive contributions turn scores into a plan? | QG 6 |
| QG 8: Simulating selection response | How do inheritance and a fixed reporting base reveal realized gain? | QG 7; PG 1 and PG 4 |
| QG 9: Relationships, mating and inbreeding | How can equal contributions produce different offspring inbreeding? | Relationship recursion from QG 3; PG 3; QG 7–8 |
| QG 10: Validating predictions and decisions | What do family splits, calibration and shortlist outcomes establish? | Regression; QG 5; genetic/environmental distinction |
| QG 11: Comparing breeding programmes | How do recording policies affect gain, diversity and resource use? | QG 6–10; PG 4 and PG 6 |
| QG 12: Genotype by environment and heritability | How does replication across environments define genetic variance and entry-mean heritability? | QG 2; variance and ANOVA; fits before QG 3 in the slide flow |
| QG 13: Association mapping | How do covariates, linked markers and multiple testing affect inference? | QG 2; PG 1, PG 5 and PG 8; linear regression |
Use the quantitative-genetics slides to connect trait variation, gene action, covariance, heritability and response to selection. Reading a predecessor can provide conceptual preparation without running its full code.
Coverage alongside the slides
The practicals cover the central flow, but some slide topics currently have explanation without a matching worked practical. Use this distinction when choosing exercises or assessing students.
| Slide theme | Current practical coverage |
|---|---|
| Genotype data, allele frequencies and HWE | PG 1–2 cover coding and expectations; PG 8 covers fitted chi-square and exact conditional tests |
| Mating, population structure and identity by descent | PG 3; QG 7 and QG 9 connect parentage to breeding decisions |
| Diversity, mutation, migration, LD, drift and selection | PG 4–7 and PG 9; finite realizations, equilibrium and mutation-model assumptions are explicit |
| Conservation genetics and management choices | PG 10; parental contributions, kinship, marker expectations and constrained choices |
| DNA forensics and probability interpretation | PG 11; multi-allelic genotype probabilities, population structure and source hypotheses |
| Sequence divergence and molecular clocks | PG 12; comparable sites, JC distance, rate units and conditional uncertainty |
| Population genetics in medicine | PG 13; penetrance, inbreeding, known-parent crosses and reverse conditioning |
| Selective sweeps and linked variation | PG 14; explicit haplotype recursion and interpretation limits |
| Coalescent genealogy and population-history assumptions | PG 15; neutral tree, branch mutations and a supplied two-epoch pair model |
| Quantitative variation, covariance and single-locus gene action | QG 1–2; worked mouse analysis and hypothetical checks |
| Genotype-by-environment interaction and broad-sense entry-mean heritability | QG 12; replicated genotypes, balanced ANOVA and observation-unit distinctions |
| Narrow-sense heritability and fitted genetic evaluation | QG 3–5; an additive relationship model, BLUP and held-out phenotype prediction |
| Selection response and programme design | QG 6–9 and QG 11; objectives, contributions, fixed bases and resources |
| Prediction validation | QG 5 and QG 10; the latter uses a synthetic phenotype predictor, not a fitted breeding-value evaluation |
| Association mapping, covariates and multiple testing | QG 13; a small synthetic scan, tagged signals and explicit testing families |
Further extensions
PG 10 now provides a conservation-genetics application. PG 11 adds DNA-profile probabilities and evidence interpretation. PG 12 adds sequence divergence and a simple calibrated clock. PG 13 adds the medicine theme using hypothetical genotype-specific penetrance and conditional probabilities. PG 9 provides a worked mutation–selection and mutation–drift synthesis, distinguishing equilibrium frequencies from stationary distributions. PG 14 adds linked selection and sweep interpretation; PG 15 adds a worked neutral coalescent model.
The current synthetic programme examples use phenotype scores. Replacing them with an externally fitted evaluation would be a further extension, requiring an information schedule and validation target. QG 12 now covers genotype-by-environment interaction and broad-sense heritability; teach it after QG 2 and before QG 3 when following the slide flow.
PG 8 now supplies formal HWE inference. Teach it after PG 2–3 when the aim includes hypothesis testing, keeping observed departures separate from explanations of their cause.
QG 13 now supplies a worked association scan. Its synthetic OLS model does not qualify a real GWAS in related animals; transfer to the mouse population requires an appropriate relatedness model.
Suggested teaching routes
Foundations of genetic variation
Read PG 1 → PG 2 → PG 3 → PG 4, then QG 1 → QG 2 → QG 12. Students move from allele coding and random-union expectations to sources of trait variation.
Checkpoint: explain why a heterozygosity deficit does not identify pedigree inbreeding, and why a locus’s dominance effect and average allele-substitution effect are different quantities.
Genetic evaluation and validation
Review PG 1–2, then work through QG 1 → QG 2 → QG 3 → QG 4 → QG 5 → QG 10. This route follows the mouse analysis and ends by examining what a validation split actually tests.
Checkpoint: distinguish predicted breeding values, phenotype predictions, model-based reliability and empirical validation. State which information is available at the prediction date and whether validation animals have relatives in training.
Population change and evolutionary selection
Work through PG 1 → PG 2 → PG 3 → PG 4 → PG 5 → PG 6 → PG 7 → PG 9. Use QG 2 as a bridge between gene action for a trait and genotype fitness.
Checkpoint: separate deterministic expectations from finite-population realizations. Fitness dominance in PG 7 is a different model quantity from phenotypic dominance in QG 2; economic weights in QG 6 describe another decision layer.
Linked selection and genealogical history
Review PG 4–7 → PG 14, then PG 6 → PG 12 → PG 15 for backwards ancestry. The coalescent example is neutral; it does not reuse the selected-locus genealogy implicitly.
Checkpoint: distinguish allele-frequency dynamics from a sampled genealogy, explain how recombination affects linked selection, and state why a diversity pattern alone does not identify either a sweep or a demographic event.
Disease alleles and phenotype probability
Review PG 2–3 → PG 13. Declare the phenotype observation window and penetrance vector before translating genotype frequencies into phenotype probabilities.
Checkpoint: state when prevalence equals q squared, and distinguish population averages, known-parent crosses and reverse conditioning.
Sequence divergence and dating
Review PG 1 → PG 4–5 → PG 12. Define the alignment denominator and substitution model before converting distance into time.
Checkpoint: distinguish a mismatch fraction from substitution distance, a per-lineage rate from a pairwise rate, and sequence common ancestry from a species split.
DNA-profile probability
Review PG 2–3 → PG 5 → PG 11. State the population and independence assumptions, then distinguish a fixed-profile probability, agreement between random profiles and a source likelihood ratio.
Checkpoint: explain why a match probability is not a posterior source probability and why shared population membership can induce dependence across loci.
Conservation management
Review PG 3–4 → PG 6 → PG 10, with QG 9 for pedigree relationships. Compare immediate offspring inbreeding, parental group coancestry and marker heterozygosity before imposing a budget.
Checkpoint: explain why equal contributions can produce different offspring inbreeding, and why a contributor concentration descriptor does not estimate effective population size.
Breeding-programme design
Review PG 3–4 and PG 6, plus the evaluation concepts in QG 3–5. Then use QG 6 → QG 7 → QG 8 → QG 9 → QG 10 → QG 11. For a shorter design session, focus on QG 6, 7, 9 and 11, reading the simulation and validation assumptions before the capstone.
Checkpoint: define the objective, candidate eligibility, information schedule, parent contributions, mating, genetic base, calendar horizon and budget before comparing outcomes. Higher score correlation alone does not select a programme.
Running the R examples
| Materials | Requirements and inputs |
|---|---|
| PG 1–15 | Base R; hypothetical data; no required downloads |
| QG 1–2 | Base R calculations; pinned public mouse data downloads |
| QG 3–5 | qgg; pinned public mouse data; the shared helper script |
| QG 6 | Base R; supplied hypothetical objective and covariance inputs |
| QG 7–8 | gsim; hypothetical candidates and synthetic phased input |
| QG 9 | Base R and the shared relationship helper; hypothetical pedigree; no downloads |
| QG 10 | Base R; synthetic records and separate genetic truth |
| QG 12 | Base R; synthetic replicated-genotype data; no downloads |
| QG 13 | Base R; synthetic markers and phenotypes; no downloads |
| QG 11 | gsim and the relationship helper; small synthetic paired runs; no downloads |
For QG 3–5, 9 and 11, retain the tutorials/ and scripts/ directory arrangement. The helper script supplies separate functions; loading it does not download data or fit a model until those functions are called. QG 9 and 11 use only its relationship recursion and do not require qgg.
Install qgg and gsim before the relevant session using the instructions in the practicals. The installed gsim must expose the breeding building blocks used in QG 7, 8 and 11. Data downloads in the mouse route need internet access. The website’s explanations and outputs can be read without installing R.
Package connections
| Owner | Role in the material |
|---|---|
gpop |
Population statistics, expectations and estimator assumptions; current practical links use teaching reference calculations |
gsel |
Objectives, selection policies and programme design; the practicals do not assume an exported scientific policy optimizer |
gsim |
Existing biological simulation, records, selection mechanics, parentage and persistent genetic values |
Estimation tools, including qgg in the mouse route |
Variance estimation and fitted genetic evaluations |
Course materials own the explanations and exercises. Package connections do not imply that every teaching calculation is an exported package function. Predictions, simulated truth and observed records remain distinct throughout the routes.
Using the course materials
During lectures, use the slides to introduce the biological question and the practical to connect it to a model and calculation. For independent study, read the assumptions, attempt the interpretation questions and exercises, then open the suggested solutions.
Treat R as a virtual laboratory: first reproduce the supplied example, then change one assumption or parameter and predict its consequences before rerunning. Keep the original population, units and reporting base explicit. For projects, distinguish exploratory teaching examples from an analysis that has been checked for the project’s data and sampling design.
For examination preparation, use the learning objectives as prompts: define the quantities, derive or explain the equation, interpret a worked result and name the assumptions needed for that interpretation. The course map supplies routes through the material; assessment requirements are set by the course instructor.
Evolutionary extensions and interactive resources
PG 14 explains hitchhiking and the interpretation of sweep signatures. PG 15 simulates a neutral nonrecombining genealogy and connects branch mutations to sampled variation. PG 12 supplies the complementary substitution-distance clock. These lessons do not qualify a genomic sweep detector or fit demographic history to biological data.
QG 3 explains regression on relatives, and QG 4 explains prediction from one information source. Those sections provide model checks for interactive exploration: shared environment can alter relative resemblance, and reliability is squared model-based accuracy. Use Heritability Estimation Using Different Types of Relatives with QG 3 and Breeding Value Estimation from a Single Information Source with QG 4.
Instructor preparation and assessment
Before a session, choose the route and check its package and input requirements. Run the selected examples, then ask students to explain the assumptions before interpreting their numerical outputs. Use the collapsible solutions after discussion.
A short assessment can ask students to:
- Identify the counted allele, phenotype units, missing-data rule and population denominator.
- Explain the model behind a frequency expectation, covariance or relationship matrix.
- State the evaluation target and training information, including family connections.
- Describe how parental contributions and pairings affect offspring expectations.
- Report gain and diversity on fixed references while keeping costs and time explicit.
For the capstone, assess the programme specification and interpretation alongside the code. Three synthetic runs illustrate paired comparisons; they do not establish a dependable real-world policy ranking. A broader experiment needs an agreed population, model, replication design and scope.
Return to the course homepage or the teaching-materials hub.