Learn R Programming

strataG (version 1.0.3)

jackHWE: Hardy-Weinberg Equlibrium Jackknife

Description

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

Usage

jackHWE(g, exclude.num = 1, min.hwe.samples = 5, show.progress = TRUE,
  use.genepop = FALSE, ...)

jackInfluential(jack.result, alpha = 0.05)

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

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?
use.genepop
logical. Use GENEPOP to calculate HWE p-values? If FALSE then hw.test is used.
...
other arguments to be passed to GENEPOP.
jack.result
result from run of jackHWE.
alpha
critical value to determine if exclusion is "influential".
x
result from a call to jackInfluential.
main
main title for influential sample plots from plot.jack.influential.

Value

  • jack.hwe returns a list with:
  • obsa named vector of HWE p-values for each locus.
  • jacka data.frame of HWE p-values where each row is an exclusion and columns are loci.
  • gtypesthe original gtypes object.
  • jack.influential returns a list with:
  • influentiala data.frame of influential exclusions.
  • allele.freqsa data.frame listing the allele frequencies of influential exclusions.
  • odds.ratioa matrix of odds ratios between exclusions (rows) and loci (columns).

Details

ll{ jack.hwe performs a HWE jackknife where all combinations of exclude.num samples are left out and HWE is recalculated. jack.influential 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. }

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