polymapr_test {segtest} | R Documentation |
Run segregation distortion tests as implemented in the polymapR package.
Description
The polymapR package tests for segregation distortion by iterating through all
possible forms of disomic or polysomic inheritance from either parent,
tests for concordance of the offspring genotypes using a chi-squared
test, and returns the largest p-value. It sometimes chooses a different
p-value based on other heuristics. They also sometimes return NA.
When type = "segtest"
, we only look at patterns of the
given parent genotypes, choosing the largest p-value. When
type = "polymapR"
, we return what they use via their heuristics.
Usage
polymapr_test(x, g1 = NULL, g2 = NULL, type = c("segtest", "polymapR"))
Arguments
x |
Either a vector of genotype counts, or a matrix of genotype posteriors where the rows index the individuals and the columns index the genotypes. |
g1 |
Parent 1's genotype. |
g2 |
Parent 2's genotype. |
type |
Either my implementation which approximates that of
polymapR ( |
Value
A list with the following elements:
- p_value
The p-value of the test.
- bestfit
The best fit model, using the same notation as in
checkF1()
.- frq_invalid
The frequency of invalid genotypes.
Author(s)
David Gerard
See Also
checkF1()
.
Examples
g1 <- 0
g2 <- 1
x <- c(4, 16, 0, 0, 0)
polymapr_test(x = x, g1 = g1, g2 = g2, type = "segtest")