jackHWE: Hardy-Weinberg Equlibrium Jackknife

Description Usage Arguments Details Value Author(s) References See Also

View source: R/jackHWE.R

Description

Test influence of samples on Hardy-Weinberg equilibrium via jackknife.

Usage

1
2
3
4
5
6
7
8
jackHWE(g, exclude.num = 1, min.hwe.samples = 5, show.progress = TRUE, ...)

jackInfluential(jack.result, alpha = 0.05)

## S3 method for class 'jack.influential'
plot(x, main = NULL, ...)

.alleleFreqFormat(x, g)

Arguments

g

a gtypes object.

exclude.num

Number of samples to exclude at a time.

min.hwe.samples

minimum samples needed to calculate HWE.

show.progress

logical. Show progress of jackknife?

...

other arguments to be passed to hweTest.

jack.result

result from run of jackHWE.

alpha

critical value to determine if exclusion is "influential".

x

a matrix or data.frame where first column is sample id and second colum is locus name.

main

main title for influential sample plots from plot.jack.influential.

Details

jackHWE

performs a HWE jackknife where all combinations of exclude.num samples are left out and HWE is recalculated

jackInfluential

calculates odds.ratios between jackknife HWE and observed HWE and identifies "influential" samples. Samples are "influential" if the observed HWE p-value is < alpha, but is > alpha when the samples are not present

plot.jack.influential

creates a cumulative frequency plot of all odds-ratios from jack.influential. A vertical dashed line marks the smallest influential exclusion

Value

jackHWE returns a list with:

obs

a named vector of HWE p-values for each locus.

jack

a data.frame of HWE p-values where each row is an exclusion and columns are loci.

gtypes

the original gtypes object.


jackInfluential returns a list with:

influential

a data.frame of influential exclusions.

allele.freqs

a data.frame listing the allele frequencies of influential exclusions.

odds.ratio

a matrix of odds ratios between exclusions (rows) and loci (columns).

Author(s)

Eric Archer eric.archer@noaa.gov

References

Morin, P.A., R.G. LeDuc, F.I. Archer, K.K. Martien, R. Huebinger, J.W. Bickham, and B.L. Taylor. 2009. Significant deviations from Hardy-Weinberg equilibirum caused by low levels of microsatellite genotyping errors. Molecular Ecology Resources 9:498-504.

See Also

hweTest


strataG documentation built on Feb. 28, 2020, 9:07 a.m.