Description Usage Arguments Details Value References Examples
Computes a p-value for the exact test of Hardy–Weinberg proportions, for genotype counts for a biallelic locus, as described by Wiggington et al. (2005).
1 | snphweCounts(obs_hets, obs_hom1, obs_hom2)
|
obs_hets |
Observed count of the heterozygote genotype. |
obs_hom1 |
Observed count of one homozygote genotype. |
obs_hom2 |
Observed count of the other homozygote genotype. |
This is the original code of Wiggington et al. (see references below),
with minor modifications. The original (and perhaps counterintuitive)
order of arguments has been preserved. It is better to use the
snphwe
wrapper function.
The p-value.
The method and algorithm used are described by Wiggington, Cutler and Abecasis (2005; A Note on Exact Tests of Hardy-Weinberg Equilibrium. American Journal of Human Genetics. 76(5):887-893) available at http://www.ncbi.nih.gov/pmc/articles/PMC1199378. The code of Wiggington et al. that is used here was downloaded from http://www.sph.umich.edu/csg/abecasis/Exact. With appropriate citation, this code is freely available for use and can be incorporated into other programs.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.