powered by
Function he calculates the expected heterozygosity for a biallelic genetic variant.
he
he(x, bias.correct = TRUE)
a vector of expected heterozygosities.
a vector or matrix with genotype counts.
if bias.correct = TRUE a correction for bias will be applied.
bias.correct = TRUE
Jan Graffelman (jan.graffelman@upc.edu)
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.
x
af, maf.
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)
Run the code above in your browser using DataLab