frequency is q, then the HWE is a simple one-degree-of-freedom chi-square test of independence in which the observed genotype frequencies are compared with the expected frequencies given the frequencies for each allele, where the expected frequencies are given as p2, 2pq, and q2. Deviations from the expected frequencies provide some evidence of deviation from the assumption of random mating and also indicate SNPs that may have genotyping errors. This initial pruning was done in PLINK (Purcell et al. 2007), and 260,402 SNPs met these criteria (the full set of SNPs is available upon request).