polymapr_test | R Documentation |
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.
polymapr_test(x, g1 = NULL, g2 = NULL, type = c("segtest", "polymapR"))
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 ( |
A list with the following elements:
The p-value of the test.
The genotype frequencies of the best fit model.
The frequency of invalid genotypes.
The p-value of the invalid proportion.
David Gerard
checkF1()
.
g1 <- 0
g2 <- 1
x <- c(4, 16, 0, 0, 0)
polymapr_test(x = x, g1 = g1, g2 = g2, type = "segtest")
polymapr_test(x = x, g1 = g1, g2 = g2, type = "polymapR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.