HardyWeinberg1.7.8 package

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

af

Function to compute allele frequencies

AFtest

Exact test of equality of allele frequencies for males and females

afx

Function to compute X-chromosomal allele frequencies

agcounts

Calculate allele and genotype counts for X-chromosomal markers

alleles

Extract alleles

AllelesToTriangular

Calculate triangular genotype matrix for vector(s) of alleles.

dgraffelmanweir.bi

Calculate Graffelman-Weir exact density for bi-allelic X-chromosomal v...

dlevene.bi

Calculate Levene's density for a bi-allelic variant

dlevene

Calculate Levene's exact density for k alleles

EAFExact

Exact test for equality of allele frequencies in males and females

fisherz

Fisher's z transformation

fold

Fold a square matrix

GenerateSamples

Generate genotypic compositions

genlabels

Label genotype counts of a vector or matrix

HardyWeinberg-package

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

he

Calculate expected heterozygosity (He)

HWABO

Estimate allele frequencies and test for Hardy-Weinberg equilibrium wi...

HWAIC

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

HWAlltests

Perform all tests for Hardy-Weinberg equilibrium

HWAlr

Compute additive log-ratio transformation

HWAlrPlot

Plot genetic markers in additive log-ratio coordinates

HWChisq

Chi square tests for Hardy Weinberg equilibrium

HWChisqMat

Matrix version of HWChisq

HWChisqStats

Fast computation of chi-square statistics for Hardy-Weinberg equilibri...

HWClo

Convert genotype counts to compositions

HWClr

Compute the centred log-ratio transformation

HWClrPlot

Plot genetic markers in centred log-ratio coordinates

HWCondProbAB

Compute probability of a genotypic sample

HWD

Compute disequilibrium statistic D

HWData

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

HWEM

Estimation of contributions of two populations to a sample of genotype...

HWExact

Exact test for Hardy-Weinberg equilibrium

HWExactMat

Matrix version of HWExact

HWExactPrevious

Exact test for Hardy-Weinberg equilibrium

HWExactStats

Computation of Exact p-values for Hardy-Weinberg equilibrium for sets ...

HWf

Computation of inbreeding coefficient

HWGenotypePlot

Scatter plot of the genotype frequencies

HWIlr

Compute isometric log ratio coordinates.

HWIlrPlot

Plot bi-allelic genetic markers in isometric log ratio coordinates

HWLindley.cri

Calculate a credible interval for Lindley's alpha for HWE,

HWLindley

Calculate a posteriori density for Lindley's alpha

HWLRAllTests

Perform most relevant likelihood ratio test for Hardy-Weinberg equilib...

HWLratio

Likelihood ratio test for Hardy Weinberg equilibrium

HWLRtest

Perform likelihood ratio test comparing two nested scenarios for a bi-...

HWMissing

Test a bi-allelic marker for Hardy-Weinberg equilibrium in the presenc...

HWNetwork

Autosomal and X-chromosomal exact tests for HWE via a Network algorith...

HWPerm.mult

Permutation tests fo variants with multiple alleles

HWPerm

Permutation test for Hardy-Weinberg equilibrium

HWPosterior

Calculation of posterior probabilities and Bayes factors for Hardy-Wei...

HWPower

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

HWQqplot

A Q-Q plot for Hardy-Weinberg equilibrium

HWStr

Testing a set of microsatellites (STRs) for Hardy-Weinberg equilibrium

HWStrata

Asymptotic test for HWE across strata for a single biallelic marker

HWTernaryPlot

Ternary plot with the Hardy-Weinberg acceptance region

HWTriExact

Exact test for Hardy-Weinberg equilibrium and equality of allele frequ...

ifisherz

Inverse Fisher z transformation

is.mono

Detects autosomal and X-chromosomal monomorphic variants

mac

Compute the minor allele count.

maf

Function to compute minor allele frequencies

MakeCounts

Create genotype counts from bi-allelic marker data

MakeFactor

Make factors from genotyping data

n.alleles

Number of alleles

order.auto

Reordering of autosomal genotype counts

order.x

Reordering of X-chromosomal genotype counts

qqunif

Q-Q plot for a uniform distribution.

recode

Recode genotype information

shannon

Shannon index

strsort

Sort tokens of a set of strings

ThetatoF

Convert theta to an inbreeding coefficient

toTriangular

Convert a vector of genotype counts to triangular format

UniqueGenotypeCounts

Extract unique genotypic compositions from a matrix

vaf

Computes the sample variance of the allele frequency for a biallelic m...

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) <doi:10.1038/hdy.2016.20>, 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. The functionality of the package is explained in detail in a related JSS paper <doi:10.18637/jss.v064.i03>.

  • Maintainer: Jan Graffelman
  • License: GPL (>= 2)
  • Last published: 2024-04-06