Learn R Programming

HardyWeinberg (version 1.7.8)

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

Description

Function HWStr is a wrapper function arount HWPerm.mult and HWChisq in order to test a set of STRs for Hardy-Weinberg equilibrium.

Usage

HWStr(X, test = "permutation", verbose = FALSE, ...)

Value

A data frame with the

strnames

STR name

N

sample size

Nt

number of alleles

MinorAF

minor allele frequency

MajorAF

major allele frequency

Ho

observed heterozygosity

He

expected heterozygosity (without bias correction)

Hp

Shannon index of allele frequencies

pval

p-value of the HWE test

Arguments

X

A data matrix with STRs in columns, with there two alleles coded in successive columns.

test

permutation for a permutation test, or "chisq" for a chisquare test

verbose

be silent if set to FALSE or print info for each STR if TRUE.

...

possible extra parameters to be passed on to HWPerm.mult such as nperm or eps.

Author

Jan Graffelman jan.graffelman@upc.edu

Details

It is recommended to test by a permutation test. By default, 17.000 permutations are used. Exact testing is not implemented. Missing genotypes are excluded on a per STR basis.

See Also

HWPerm.mult, HWChisq

Examples

Run this code
data(NistSTRs)
if (FALSE) {
Results <- HWStr(NistSTRs,test="permutation")
}

Run the code above in your browser using DataLab