polymapr_test: 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.
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 ("segtest") or the implementation
through polymapR ("polymapR"). Note that
polymapR needs to be installed for type = "polymapR".