Returns the gamete frequencies for autopolyploids, allopolyploids, and segmental allopolyploids, accounting for the effects of double reduction and partial preferential pairing.
Usage
gamfreq(
g,
ploidy,
gamma = NULL,
alpha = NULL,
beta = NULL,
type = c("mix", "polysomic"),
add_dr = TRUE
)Arguments
- g
Parent genotype.
- ploidy
Parent ploidy. Should be even, and between 2 and 20 (inclusive). Let me know if you need the ploidy to be higher. I can update the package really easily.
- gamma
The mixture proportions for the pairing configurations. The proportions are in the same order the configurations in
seg. See Gerard et al (2018) for details on pairing configurations.- alpha
The double reduction rate(s) (if using). Defaults to 0's.
- beta
The double reduction adjustment for simplex markers if
type = "mix"andadd_dr = TRUE. Assumed to be 0 by default.- type
Either
"mix", meaning a mixture model of pairing configurations, or"polysomic"for polysomic inheritance.- add_dr
A logical. If
type = "polysomic", then the double double reduction rate ("alpha") will be used no matter the value ofadd_dr, so setalpha = 0if you don't want it. But iftype = "mix"then we will incorporate double reduction only in simplex markers (where it matters the most, and where preferential pairing does not operate).
Models
If type = "polysomic", then the gamete frequencies correspond
to those of Huang et al (2019). Those formulas are for general multiallelic
loci, so see also Appendix G of Gerard (2022) for special case of
biallelic loci. The relevant parameter is alpha, a vector of
length floor(ploidy / 4), where alpha[[i]] is the
probability that there are i pairs of double reduced alleles
in a gamete. The theoretical upper bound on alpha is given in
drbounds().
If type = "mix" and add_dr = FALSE, then the gamete
frequencies correspond to the pairing configuration model of
Gerard et al (2018). This model states that the gamete frequencies are
a convex combination of the disomic inheritance frequencies. The weights
of this convex combination are provided in the gamma parameter. The
total number of disomic segregation patterns is given by
n_pp_mix(). The order of these segregation patterns used is
the order in seg.
The model for type = "mix" and add_dr = TRUE is the same
as for type = "mix" and add_dr = FALSE except at
parental simplex loci. At such loci, there are no effects of preferential
pairing, and so the option add_dr = TRUE allows for the effects
of double reduction at simplex loci. The relevant parameter here is
beta. The first three gamete frequencies at simplex loci are
c(0.5 + beta, 0.5 - 2 * beta, beta), and the rest are 0. The
upper bound on beta for two different models are given by
beta_bounds().
References
Gerard, D. (2023). Double reduction estimation and equilibrium tests in natural autopolyploid populations. Biometrics, 79(3), 2143-2156. doi:10.1111/biom.13722
Gerard, D., Ferrão, L. F. V., Garcia, A. A. F., & Stephens, M. (2018). Genotyping polyploids from messy sequencing data. Genetics, 210(3), 789-807. doi:10.1534/genetics.118.301468
Huang, K., Wang, T., Dunn, D. W., Zhang, P., Cao, X., Liu, R., & Li, B. (2019). Genotypic frequencies at equilibrium for polysomic inheritance under double-reduction. G3: Genes, Genomes, Genetics, 9(5), 1693-1706. doi:10.1534/g3.119.400132
Examples
## Various duplex models
gamfreq(g = 2, ploidy = 4, gamma = c(0, 1), type = "mix")
#> [1] 0 1 0
gamfreq(g = 2, ploidy = 4, gamma = c(1, 0), type = "mix")
#> [1] 0.25 0.50 0.25
gamfreq(g = 2, ploidy = 4, gamma = c(0.5, 0.5), type = "mix")
#> [1] 0.125 0.750 0.125
gamfreq(g = 2, ploidy = 4, alpha = 0, type = "polysomic")
#> [1] 0.1666667 0.6666667 0.1666667
gamfreq(g = 2, ploidy = 4, alpha = 1/6, type = "polysomic")
#> [1] 0.2222222 0.5555556 0.2222222
## Various simplex models
gamfreq(g = 1, ploidy = 4, beta = 1/24, gamma = 1, type = "mix", add_dr = TRUE)
#> [1] 0.54166667 0.41666667 0.04166667
gamfreq(g = 1, ploidy = 4, alpha = 1/6, type = "polysomic")
#> [1] 0.54166667 0.41666667 0.04166667
gamfreq(g = 1, ploidy = 4, gamma = 1, type = "mix", add_dr = FALSE)
#> [1] 0.5 0.5 0.0
gamfreq(g = 1, ploidy = 4, alpha = 0, type = "polysomic")
#> [1] 0.5 0.5 0.0