he | R Documentation |
Function he
calculates the expected heterozygosity for a biallelic genetic variant.
he(x, bias.correct = TRUE)
x |
a vector or matrix with genotype counts. |
bias.correct |
if |
x
can be a vector of genotype counts for a single marker (AA,AB,BB) or a three-column matrix of
genotype counts for multiple markers.
a vector of expected heterozygosities.
Jan Graffelman (jan.graffelman@upc.edu)
af
, maf
.
#
# He for a single marker
#
x <- c(MM=298,MN=489,NN=213)
he(x)
#
# He for a matrix of rmarkers
#
set.seed(123)
X <- HWData(10,100)
he(X)
he(X,bias.correct = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.