U.S. flag

An official website of the United States government

Understanding Genotype Counts and HWE-P Calculation

This guide provides an example of how genotype counts are used in population genetics to perform chi-square calculations, ultimately assessing Hardy-Weinberg Equilibrium (HWE). Understanding these principles is essential for interpreting genetic variation data in population studies.

Table of Contents

Background

Genotype counts represent the number of individuals in a population with specific genetic combinations, such as homozygous dominant, heterozygous, or homozygous recessive. These counts can be tested against the Hardy-Weinberg Equilibrium (HWE), a principle that predicts how allele and genotype frequencies will distribute in a population under certain conditions (e.g., no selection, mutation, migration, or genetic drift).

The HWE equation provides expected genotype frequencies, and by comparing them to observed counts, we can assess whether a population deviates from equilibrium. This deviation can be evaluated using statistical tests, such as the chi-square test.

Example

Consider the following genotype counts in a population:

  • AA (Homozygous Dominant): 81 individuals
  • Aa (Heterozygous): 14 individuals
  • aa (Homozygous Recessive): 3 individuals

The goal is to assess whether this population is in Hardy-Weinberg Equilibrium.

Code Explanation

Using the HardyWeinberg R package, we can calculate the chi-square statistic and corresponding p-value to determine if the observed genotype counts deviate from HWE expectations. Here's a simple R code snippet:

library(HardyWeinberg)
example <- c(AA=81,Aa=14,aa=3); 
HW.test <- HWChisq(example,verbose=TRUE, cc=0); 
as.integer(-log(as.double(HW.test["pval"])))

Steps Performed by the Code:

Input Genotype Counts:

The genotype counts (AA = 81, Aa = 14, aa = 3) are defined in the example vector.

Chi-Square Test for HWE:

The HWChisq function calculates the chi-square value to assess how much the observed genotype counts deviate from the expected counts.

The result includes:

Chi2: 4.76

Degrees of Freedom: 1

P-Value: 0.029

Other parameters, like D and f, describe deviations and inbreeding coefficients, respectively.

Logarithmic Transformation:

The p-value is expressed as a negative logarithm for convenience in interpretation.

Interpretation

In this example, the p-value (0.029) suggests a significant deviation from Hardy-Weinberg Equilibrium at a 5% significance level. The chi-square statistic (4.76) further indicates that the observed genotype frequencies significantly differ from those expected under HWE. This suggests that the population might not be in equilibrium, which could be due to evolutionary factors like natural selection, genetic drift, or inbreeding.

Conclusion

The chi-square test is an effective method to assess whether observed genotype counts follow Hardy-Weinberg Equilibrium. In the example provided, the significant p-value indicates a deviation from equilibrium, suggesting underlying factors influencing allele frequencies in the population. Proper interpretation of these results is critical for understanding the genetic structure and evolutionary dynamics within the studied population.

Support Center

Last updated: 2024-12-17T19:54:35Z