Relationships, mating and inbreeding

Quantitative Genetics Practical 9: Pairing parents with the same contributions

Learning objectives

Distinguish additive relationships from kinship; calculate offspring pedigree inbreeding; compare mating plans with identical parental contributions; and separate expected additive merit, inbreeding and observed heterozygosity.

Continue from Practical 8, with the relationship recursion introduced in Practical 3. This practical uses a small hypothetical pedigree and supplied predicted merit. It uses base R and the existing helper script, with no data downloads or model fitting. Keep the tutorials/ and scripts/ folder arrangement when running the source locally.

1. Define the ancestry and founder base

Two pairs of founders produce four candidates. M1 and F1 are full siblings; M2 and F2 are full siblings from the other pair. We assume the four founders are unrelated and noninbred. This assumption defines the pedigree reference base; missing founder ancestry does not prove unrelatedness in a real population.

Show R code
source("../scripts/mouse_practical_helpers.R")
pedigree <- data.frame(
  id=c("SA","DA","SB","DB","M1","F1","M2","F2"),
  sire=c(NA,NA,NA,NA,"SA","SA","SB","SB"),
  dam=c(NA,NA,NA,NA,"DA","DA","DB","DB"))
A <- mouse_relationship(pedigree)
F <- setNames(diag(A)-1,rownames(A))
stopifnot(all(F==0),A["M1","F1"]==.5,A["M2","F2"]==.5,
          A["M1","F2"]==0,A["M2","F1"]==0)
knitr::kable(pedigree,row.names=FALSE)
id sire dam
SA NA NA
DA NA NA
SB NA NA
DB NA NA
M1 SA DA
F1 SA DA
M2 SB DB
F2 SB DB
Show R code
knitr::kable(A[c("M1","M2","F1","F2"),c("M1","M2","F1","F2")],digits=3)
M1 M2 F1 F2
M1 1.0 0.0 0.5 0.0
M2 0.0 1.0 0.0 0.5
F1 0.5 0.0 1.0 0.0
F2 0.0 0.5 0.0 1.0

Each candidate has pedigree inbreeding zero, yet some candidate pairs are related. An individual’s inbreeding and its relationship to another individual are different quantities.

2. From parental kinship to offspring inbreeding

For two individuals \(s,d\), kinship \(\phi_{sd}\) is the probability that one randomly drawn allele from each is identical by descent relative to the founder base. The additive relationship convention is \(A_{sd}=2\phi_{sd}\). The child’s two copies come from its parents, giving

\[F_{\mathrm{child}}=\phi_{sd}=\frac{A_{sd}}{2}, \qquad A_{\mathrm{child},\mathrm{child}}=1+F_{\mathrm{child}}.\]

Thus mating these full siblings gives offspring \(F=0.25\). Pairing candidates from the two unrelated founder families gives \(F=0\) under this pedigree model.

A founder-copy check

Label the four distinct founder copies in family A. A random allele transmitted by either sibling is marginally uniform over these copies. With independent meioses producing and transmitting the siblings’ copies, enumerate all 16 equally likely pairs. Four pairs carry the same founder-copy identity.

Show R code
copies <- c("SA-copy1","SA-copy2","DA-copy1","DA-copy2")
draws <- expand.grid(sire_copy=copies,dam_copy=copies,
                     stringsAsFactors=FALSE)
F_fullsib <- mean(draws$sire_copy==draws$dam_copy)
stopifnot(F_fullsib==.25,F_fullsib==A["M1","F1"]/2)
F_fullsib
[1] 0.25

This is a probability over possible inheritance histories, not a statement that exactly one quarter of the genome in every offspring will be autozygous. Identity by descent refers to ancestral copy identity; identical nucleotide states can occur without shared descent within the declared base.

Question 1. Why is offspring inbreeding 0.25 rather than the full-sibling relationship 0.5?

The additive relationship is twice kinship. Offspring inbreeding equals parental kinship because the child’s paternal and maternal copies are drawn from the two parents. Confusing these conventions gives a factor-of-two error.

3. Hold contributions fixed and change pairings

Each plan has eight offspring and uses every selected parent four times. Only sire/dam pairings differ. Scores are hypothetical predicted additive merit in trait units on one fixed base, not phenotypes or known genetic truth.

Show R code
scores <- c(M1=12,M2=8,F1=10,F2=6)
within <- data.frame(animal=paste0("W",1:8),
  sire=rep(c("M1","M2"),each=4),dam=rep(c("F1","F2"),each=4))
between <- data.frame(animal=paste0("B",1:8),
  sire=rep(c("M1","M2"),each=4),dam=rep(c("F2","F1"),each=4))
all_pairs <- expand.grid(sire=c("M1","M2"),dam=c("F1","F2"),
                         stringsAsFactors=FALSE)
mixed <- all_pairs[rep(seq_len(4),each=2),]
mixed$animal <- paste0("X",1:8)
mixed <- mixed[,c("animal","sire","dam")]
plans <- list(Within=within,Between=between,Mixed=mixed)
parent_ids <- names(scores)
contributions <- lapply(plans,function(plan) {
  counts <- table(factor(c(plan$sire,plan$dam),levels=parent_ids))
  setNames(as.numeric(counts)/(2*nrow(plan)),parent_ids)
})
stopifnot(all(vapply(contributions,function(c) all(c==.25),logical(1))))
knitr::kable(data.frame(parent=parent_ids,score=scores,
  contribution=contributions$Within),row.names=FALSE)
parent score contribution
M1 12 0.25
M2 8 0.25
F1 10 0.25
F2 6 0.25

Under the additive model, the expected offspring merit based on predictions is

\[\widehat E(\overline H_{\mathrm{offspring}}\mid\mathrm{plan}) =\sum_j c_j\widehat H_j=9.\]

Equal contributions preserve this expectation across all three plans. Pairings still change the expected probability of autozygosity.

Show R code
assess_plan <- function(plan,label) {
  where <- cbind(match(plan$sire,rownames(A)),match(plan$dam,colnames(A)))
  stopifnot(!anyNA(where))
  offspring_F <- A[where]/2
  predicted <- (scores[plan$sire]+scores[plan$dam])/2
  data.frame(plan=label,offspring=nrow(plan),predicted_mean=mean(predicted),
    mean_F=mean(offspring_F),maximum_F=max(offspring_F))
}
comparison <- do.call(rbind,lapply(names(plans),function(label)
  assess_plan(plans[[label]],label)))
stopifnot(all(comparison$predicted_mean==9),
          identical(comparison$mean_F,c(.25,0,.125)))
knitr::kable(comparison,digits=3,row.names=FALSE)
plan offspring predicted_mean mean_F maximum_F
Within 8 9 0.250 0.25
Between 8 9 0.000 0.00
Mixed 8 9 0.125 0.25
Show R code
local({
  old <- par(mfrow=c(1,2)); on.exit(par(old))
  barplot(setNames(comparison$predicted_mean,comparison$plan),col="#247BA0",
          ylab="Predicted offspring merit",ylim=c(0,10))
  barplot(setNames(comparison$mean_F,comparison$plan),col="#D8A47F",
          ylab="Mean offspring pedigree F",ylim=c(0,.3))
})
Figure 1: Changing pairings preserves predicted mean additive merit under equal contributions, while changing offspring pedigree inbreeding.

This does not make between-family mating a general optimum. In larger pedigrees, family labels can conceal shared ancestors, contributions may differ, and capacity or logistical constraints can make some pairs unavailable. Here the explicit pedigree, not the labels alone, justifies the difference.

4. Verify offspring diagonals through the recursion

Add each plan to the pedigree and calculate the full relationship matrix. The helper requires parents before offspring and explicit NA for unknown parents. We reuse it without calling its data-download or model-fitting functions.

Show R code
extended <- lapply(plans,function(plan) {
  children <- data.frame(id=plan$animal,sire=plan$sire,dam=plan$dam)
  matrix <- mouse_relationship(rbind(pedigree,children))
  offspring_F <- diag(matrix)[plan$animal]-1
  expected_F <- A[cbind(match(plan$sire,rownames(A)),
                        match(plan$dam,colnames(A)))]/2
  stopifnot(max(abs(offspring_F-expected_F))<1e-12,
            isTRUE(all.equal(matrix,t(matrix))),
            min(eigen(matrix,symmetric=TRUE,only.values=TRUE)$values)>-1e-12)
  list(A=matrix,F=offspring_F)
})
knitr::kable(data.frame(offspring=within$animal,F=extended$Within$F),digits=3,
             row.names=FALSE)
offspring F
W1 0.25
W2 0.25
W3 0.25
W4 0.25
W5 0.25
W6 0.25
W7 0.25
W8 0.25

Question 2. Does the between-family plan eliminate inbreeding in every future generation?

No. Offspring share ancestors and become related even when their own inbreeding is zero. Future decisions need the updated pedigree and actual contributions. A zero value for this generation does not establish a sustainable long-term programme.

5. Distinguish pedigree inbreeding from marker heterozygosity

Pedigree \(F\) is an expectation about identity by descent on the founder base. Observed marker heterozygosity is a realized genotype statistic. At a biallelic locus, the model

\[P(AB)=2p(1-p)(1-F)\]

connects them only under a specified allele-frequency and identity-by-descent model. It does not turn any observed heterozygosity deficit into a pedigree inbreeding estimate.

Show R code
p <- .5
model <- data.frame(F=c(0,.125,.25),p=p)
model$expected_heterozygosity <- with(model,2*p*(1-p)*(1-F))
stopifnot(identical(model$expected_heterozygosity,c(.5,.4375,.375)))
knitr::kable(model,digits=4,row.names=FALSE)
F p expected_heterozygosity
0.000 0.5 0.5000
0.125 0.5 0.4375
0.250 0.5 0.3750

These are illustrative probabilities at a fixed locus-frequency model, not measured heterozygosity in the preceding mating plans. Allele-frequency differences among parents, population structure, finite marker samples and linked inheritance affect actual observations. Compare this distinction with the marker summaries in Practical 8.

Inbreeding depression also requires a model beyond additive values alone. With dominance or other nonadditive effects, increased autozygosity can change expected phenotype. The additive-only simulation in Practical 8 does not quantify such depression, so we cannot assign a phenotype cost from pedigree \(F\) alone.

Exercises

  1. Keep the four contributions equal but use only two within-family matings and six between-family matings. Find a plan and calculate mean offspring \(F\).
  2. Mate W1 and W2 from the within-family plan. Calculate their relationship and their offspring’s \(F\).
  3. Explain why a genomic relationship matrix standardized using current cohort frequencies cannot automatically replace this pedigree matrix in \(F=A_{sd}/2\).
Show R code
# One within-family child per family, three between-family children per pair.
plan2 <- data.frame(animal=paste0("C",1:8),
  sire=c("M1","M2",rep("M1",3),rep("M2",3)),
  dam=c("F1","F2",rep("F2",3),rep("F1",3)))
counts2 <- table(factor(c(plan2$sire,plan2$dam),levels=parent_ids))
check2 <- assess_plan(plan2,"Exercise")
stopifnot(all(counts2==4),check2$mean_F==.0625,check2$predicted_mean==9)
A_within <- extended$Within$A
F_next <- A_within["W1","W2"]/2
stopifnot(A_within["W1","W2"]==.75,F_next==.375)
F_next
[1] 0.375

W1 and W2 are full siblings from related parents; their additive relationship is 0.75, so their child’s pedigree inbreeding is 0.375. The familiar full-sibling relationship of 0.5 assumes unrelated, noninbred parents. A genomic kernel has its own allele-frequency reference, centering and normalization; its entries need an established kinship interpretation on a declared base before applying an identity-by-descent formula. Negative centered genomic entries are not negative IBD probabilities.

Package connection and next topic

gsel owns mating policies and contribution decisions. gsim can validate supplied parentage and simulate transmission from an explicit plan using its existing breeding interfaces. Random mating in gsim_mate() does not avoid relatives automatically. The dense relationship calculation here is a small teaching calculation, not a new gsim relationship estimator or a scalable allocation solver.

Continue with Practical 10: Validating predictions and selection decisions, with particular attention to related animals, information available at selection and the distinction between phenotype prediction and breeding-value accuracy.