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

HWStrR Documentation

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, ...)

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.

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.

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

Author(s)

Jan Graffelman jan.graffelman@upc.edu

See Also

HWPerm.mult, HWChisq

Examples

data(NistSTRs)
## Not run: 
Results <- HWStr(NistSTRs,test="permutation")

## End(Not run)

HardyWeinberg documentation built on May 29, 2024, 6:17 a.m.