HWNetwork | R Documentation |
Program HWNetwork
implements a network algorithm for efficient calculation of exact test p-values in HWE tests with multiple alleles.
HWNetwork(a1, a2, ma = NULL, fe = NULL, gender = NULL, verbose = TRUE)
a1 |
the first allele (expressed as a number) |
a2 |
the second allele (expressed as a number; NA if the variant is X chromosomal) |
ma |
alternative format: vector of male X chromosomal allele counts. |
fe |
triangular matrix of female genotype counts |
gender |
gender of the individual (1=male; 2=female) |
verbose |
be silent ( |
Function HWNetwork
accepts data in two formats. Original genotype data (e.g. repeat numbers of microsatellites) can be supplied, or the data can be supplied in summarized form as a male genotype count vector and a female genotype count matrix. If one of the two male alleles is missing (NA) the variant will taken to be X-chromosomal. If all males have two alleles, the variant will taken to be autosomal.
the exact p-value of the test.
Jan Graffelman jan.graffelman@upc.edu
Aoki, S. (2003) Network algorithm for the Exact Test of Hardy-Weinberg Proportion for Multiple Alleles. Biometrical Journal 45(4), pp. 471-490.
Engels, W. R. (2009) Exact Tests for Hardy-Weinberg Proportions. Genetics 183, pp. 1431-1441.
Graffelman, J. (2015) Exploring Diallelic Genetic Markers: The HardyWeinberg Package. Journal of Statistical Software 64(3): 1-23. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v064.i03")}.
HWExact, HWExactStats
#
# From vectors with counts of genotypes
#
data(TSIXTriAllelics)
ma <- as.matrix(TSIXTriAllelics[1,2:4])
names(ma) <- c("A","B","C")
fe <- TSIXTriAllelics[1,5:10]
names(fe) <- c("AA","AB","AC","BB","BC","CC")
fe <- HardyWeinberg:::toTriangularfixed(fe)
HWNetwork(ma=ma,fe=fe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.