prob.hwe: Exact SNP test of Hardy-Weinberg Equilibrium
Description
This code calculates an exact probability of departure from Hardy-Weinberg Equilibrium
as described in Wigginton, JE, Cutler, DJ, and Abecasis, GR (2005) A Note on Exact Tests of
Hardy-Weinberg Equilibrium. American Journal of Human Genetics. 76:887-893.
Usage
prob.hwe(obs_hets, obs_hom1, obs_hom2)
Arguments
obs_hets
-- count of heterozygotes by locus
obs_hom1
-- count of homozygotes, reference state
obs_hom2
-- count of homozygotes, alternate state
Value
Exact probability of agreement with HWE
Details
Note: return code of -1.0 signals an error condition; return code of NA signals that
all alleles are NA for a locus