Learn R Programming

⚠️There's a newer version (1.7.8) of this package.Take me there.

HardyWeinberg (version 1.6.1)

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

Description

Contains tools for exploring Hardy-Weinberg equilibrium (Hardy, 1908; Weinberg, 1908) for bi and multi-allelic genetic marker data. All classical tests (chi-square, exact, likelihood-ratio and permutation tests) with bi-allelic variants are included in the package, as well as functions for power computation and for the simulation of marker data under equilibrium and disequilibrium. Routines for dealing with markers on the X-chromosome are included (Graffelman & Weir, 2016) , including Bayesian procedures. Some exact and permutation procedures also work with multi-allelic variants. Special test procedures that jointly address Hardy-Weinberg equilibrium and equality of allele frequencies in both sexes are supplied, for the bi and multi-allelic case. Functions for testing equilibrium in the presence of missing data by using multiple imputation are also provided. Implements several graphics for exploring the equilibrium status of a large set of bi-allelic markers: ternary plots with acceptance regions, log-ratio plots and Q-Q plots.

Copy Link

Version

Install

install.packages('HardyWeinberg')

Monthly Downloads

3,798

Version

1.6.1

License

GPL (>= 2)

Maintainer

Jan Graffelman

Last Published

May 29th, 2018

Functions in HardyWeinberg (1.6.1)

HWIlrPlot

Plot bi-allelic genetic markers in isometric log ratio coordinates
HardyWeinberg-package

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium
HWExactMat

Matrix version of HWExact
HWLratio

Likelihood ratio test for Hardy Weinberg equilibrium
HWLRtest

Perform likelihood ratio test comparing two nested scenarios for a bi-allelic genetic variant, distinguishing the two sexes.
HWTernaryPlot

Ternary plot with the Hardy-Weinberg acceptance region
HWTriExact

Exact test for Hardy-Weinberg equilibrium and equality of allele frequencies for tri-allelic variants.
JPTtriallelicsChrX

Tri-allelic variants on the X-chromosome of the Japanese (JPT) sample of the 1000 genomes project
HWData

Generate genetic marker data in or out of Hardy-Weinberg Equilibrium
HWLRAllTests

Perform most relevant likelihood ratio test for Hardy-Weinberg equilibrium and equality of allele frequencies
HWPerm

Permutation test for Hardy-Weinberg equilibrium
agcounts

Calculate allele and genotype counts for X-chromosomal markers
Markers

SNP data and intensities
HWf

Computation of inbreeding coefficient
MakeFactor

Make factors from genotyping data
HWPower

Compute the power of a test for Hardy-Weinberg equilibrium.
HWQqplot

A Q-Q plot for Hardy-Weinberg equilibrium
alleles

Extract alleles
HapMapCHBChr1

Genotype frequencies for 225 SNPs on chromosome 1 of the CHB population.
UniqueGenotypeCounts

Extract unique genotypic compositions from a matrix
HWGenotypePlot

Scatter plot of the genotype frequencies
MakeCounts

Create genotype counts from bi-allelic marker data
af

Function to compute allele frequencies
toTriangular

Convert a vector of genotype counts to triangular format
genlabels

Label genotype counts of a vector or matrix
JPTmultiallelicsChrX

Multi-allelic X-chromosomal variants of the Japanese population of the 1000 genomes project
HWIlr

Compute isometric log ratio coordinates.
ifisherz

Inverse Fisher z transformation
Mourant

Genotype frequencies for blood group locus MN
ThetatoF

Convert theta to an inbreeding coefficient
JPTmultiallelicsChr7

Multi-allelic autosomal variants of the Japanese population of the 1000 genomes project
strsort

Sort tokens of a set of strings
dlevene

Calculate Levene's exact density for k alleles
HWExactPrevious

Exact test for Hardy-Weinberg equilibrium
dgraffelmanweir.bi

Calculate Graffelman-Weir exact density for bi-allelic X-chromosomal variant
HWExactStats

Computation of Exact p-values for Hardy-Weinberg equilibrium for sets of SNPs
vaf

Computes the sample variance of the allele frequency for a biallelic marker.
HWPerm.mult

Permutation tests fo variants with multiple alleles
HWPosterior

Calculation of posterior probabilities and Bayes factors for Hardy-Weinberg tests at X-chromosomal variants.
JPTtriallelicsChr7

Tri-allelic variants on chromosome 7 of the Japanese (JPT) sample of the 1000 genomes project
dlevene.bi

Calculate Levene's density for a bi-allelic variant
fisherz

Fisher's z transformation
mac

Compute the minor allele count.
n.alleles

Number of alleles
maf

Function to compute minor allele frequencies
recode

Recode genotype information
GenerateSamples

Generate genotypic compositions
HWAlltests

Perform all tests for Hardy-Weinberg equilibrium
HWAIC

Compute Akaike's Information Criterion (AIC) for HWP and EAF models
HWChisq

Chi square tests for Hardy Weinberg equilibrium
HWABO

Estimate allele frequencies and test for Hardy-Weinberg equilibrium with a tri-allelic ABO system.
HWAlrPlot

Plot genetic markers in additive log-ratio coordinates
AFtest

Exact test of equality of allele frequencies for males and females
Alzheimer

Genotype frequencies for 70 SNPs related to Alzheimer's disease
HWAlr

Compute additive log-ratio transformation
HWExact

Exact test for Hardy-Weinberg equilibrium
HWD

Compute disequilibrium statistic D
HWClo

Convert genotype counts to compositions
EAFExact

Exact test for equality of allele frequencies in males and females
HWClr

Compute the centred log-ratio transformation
HWClrPlot

Plot genetic markers in centred log-ratio coordinates
HWChisqMat

Matrix version of HWChisq
HWCondProbAB

Compute probability of a genotypic sample
HWMissing

Test a bi-allelic marker for Hardy-Weinberg equilibrium in the presence of missing genotype information.
HWChisqStats

Fast computation of chi-square statistics for Hardy-Weinberg equilibrium