Abstract
Background/Aims: Tests for whether observed genotype proportions fit Hardy Weinberg Equilibrium (HWE) are widely used in population genetics analyses, as well as to evaluate quality of genotype data. To date, all methods testing for HWE require subjects to be classified into discrete categories, yet it is becoming clear that the distribution of allele frequencies tends to be smooth over geographic regions. Methods: To evaluate the HWE assumption, we develop new approaches to model allele frequencies as functions of covariates, and use these models to test whether there is residual correlation between the two alleles of subjects; lack of residual correlation supports the null hypothesis of HWE, but conditional on how the covariates influence the allele frequencies. Results: By simulations, we illustrate that a simple statistical test of residual correlation of alleles adequately controls the type I error rate, while maintaining power that is comparable to standard tests for HWE. Conclusion: Our approach can be implemented in standard software, enabling more flexible and powerful ways to evaluate the association of covariates with allele frequencies and whether these associations ‘explain' departures from HWE when the covariates are ignored, opening new strategies to evaluate the quality of genotype data generated by next-generation sequencing assays.