vaf | R Documentation |
Function vaf
computes the sample variance of the allele frequencies
of a single sample or a matrix of samples.
vaf(X, hw = FALSE)
X |
vector or matrix with genotype counts (AA,AB,BB) |
hw |
assume Hardy-Weinberg proportions ( |
For biallelic markers the variance of the minor allele frequency equals the variance of the major allele frequency.
a numeric vector of variances.
Jan Graffelman jan.graffelman@upc.edu
Weir, B.S. (1996) Genetic data analysis II. Sinauer Associates, Massachusetts. See Chapter 2.
af
, maf
x <- c(MM=298,MN=489,NN=213)
pA <- af(x)
vA <- vaf(x)
cat("allele frequency:",pA,"\n")
cat("sample variance allele frequency:",vA,"\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.