HardyWeinberg-package {HardyWeinberg}R Documentation

Graphical tests for Hardy-Weinberg equilibrium

Description

The HardyWeinberg-package provides graphical tests for Hardy-Weinberg equilibrium (HWE) based on the ternary plot (de Finetti diagram). The package constructs ternary plots for genotypic compositions for bi-allelic marker data. The acceptance region for several statistical tests of HWE (Chisquare, Chisquare with continuity correction, Fisher exact) can be depicted inside the ternary plot with the routines of the package. Large numbers of bi-allelic markers (e.g. SNPs) can be represented in a single ternary diagram and the statistical (non)significance of a test for HWE can be inferred from the position of the marker in the plot.

Details

Package: HardyWeinberg
Type: Package
Version: 1.3
Date: 2008-04-22
License: GPL Version 2 or later.

The most important function of the package is HWTernaryPlot that can be used to create ternary plots with acceptance regions for HWE. Other routines implement statistical tests for HWE such as HWChisq and HWLratio.

Author(s)

Jan Graffelman

Maintainer: Jan Graffelman <jan.graffelman@upc.edu>

References

Weir, B.S. (1996) Genetic Data Analysis II. Sinauer Associates, Massachusetts.

Graffelman, J. and Morales, J. (2008) Graphical tests for Hardy-Weinberg equilibrium based on the ternary plot. Human Heredity 65(2):77-84.

Examples


library(HardyWeinberg)

# make random compositions that are in HWE

set.seed(123)

m <- 100 # number of markers
n <- 100 # sample size

out <- HWData(n,m)
Xc <- out$Xc
Xa <- out$Xt
out <- HWTernaryPlot(Xc,100,region=1,vertex.cex=2,signifcolour=TRUE,Xa=Xa)


[Package HardyWeinberg version 1.3 Index]