14  Population Structure Analysis

14.1 Inbreeding Coefficients

# Pedigree-based
inb_ped <- inbreeding.exp(pop, gen = 5)

# Genomic
inb_gen <- inbreeding.emp(pop, gen = 5)

mean(inb_ped)
mean(inb_gen)

14.2 Kinship Matrices

# Expected (pedigree)
K_exp <- kinship.exp(pop, gen = c(5, 6))

# Empirical (genomic)
K_emp <- kinship.emp(pop, gen = c(5, 6))

# Average kinship
mean(K_emp[upper.tri(K_emp)])

14.3 PCA Analysis

# Visualize population structure
get.pca(pop, gen = 1:10, pca.color.breeding = TRUE)

14.4 Admixture Analysis

# K=3 ancestral populations
get.admixture(pop, gen = 5, K = 3, plot = TRUE)

14.5 Dendrograms

# Hierarchical clustering
get.dendrogram(pop, gen = 5, type = "kinship")

14.6 Effective Population Size

Ne <- get.effective.size(pop, gen = 5)
print(Ne)

14.7 Summary

  • Inbreeding and kinship analysis
  • PCA and admixture visualization
  • Effective population size

Continue to Chapter 15: Data Export/Import!