Produces the segregation probabilities for gamete dosages given parental dosages and the double reduction rate.
gsegmat(alpha, ploidy)
A numeric vector containing the double reduction parameter(s).
This should be a
vector of length floor(ploidy/4)
where alpha[i]
is the probability of exactly i
pairs of IBDR alleles
being in the gamete. Note that sum(alpha)
should be less than
1, as 1 - sum(alpha)
is the probability of no double reduction.
The ploidy of the species. This should be an even positive integer.
A matrix of dimension ploidy + 1
by ploidy / 2 + 1
.
Element (i, j) is the probability that a parent carrying dosage
j - 1 produces a gamete with dosage i - 1.
gsegmat(alpha = NULL, ploidy = 2)
#> 0 1
#> 0 1.0 0.0
#> 1 0.5 0.5
#> 2 0.0 1.0
gsegmat(alpha = 1/6, ploidy = 4)
#> 0 1 2
#> 0 1.00000000 0.0000000 0.00000000
#> 1 0.54166667 0.4166667 0.04166667
#> 2 0.22222222 0.5555556 0.22222222
#> 3 0.04166667 0.4166667 0.54166667
#> 4 0.00000000 0.0000000 1.00000000
gsegmat(alpha = 0.3, ploidy = 6)
#> 0 1 2 3
#> 0 1.000 0.000 0.000 0.000
#> 1 0.550 0.400 0.050 0.000
#> 2 0.260 0.500 0.220 0.020
#> 3 0.095 0.405 0.405 0.095
#> 4 0.020 0.220 0.500 0.260
#> 5 0.000 0.050 0.400 0.550
#> 6 0.000 0.000 0.000 1.000
gsegmat(alpha = c(0.35, 0.02), ploidy = 8)
#> 0 1 2 3 4
#> 0 1.0000000000 0.0000 0.0000000 0.0000 0.0000000000
#> 1 0.5487500000 0.4025 0.0487500 0.0000 0.0000000000
#> 2 0.2707142857 0.4850 0.2185714 0.0250 0.0007142857
#> 3 0.1146428571 0.3950 0.3744643 0.1075 0.0083928571
#> 4 0.0382857143 0.2440 0.4354286 0.2440 0.0382857143
#> 5 0.0083928571 0.1075 0.3744643 0.3950 0.1146428571
#> 6 0.0007142857 0.0250 0.2185714 0.4850 0.2707142857
#> 7 0.0000000000 0.0000 0.0487500 0.4025 0.5487500000
#> 8 0.0000000000 0.0000 0.0000000 0.0000 1.0000000000
gsegmat(alpha = c(0.4, 0.05), ploidy = 10)
#> 0 1 2 3 4 5
#> 0 1.0000000000 0.000000000 0.00000000 0.00000000 0.000000000 0.0000000000
#> 1 0.5500000000 0.400000000 0.05000000 0.00000000 0.000000000 0.0000000000
#> 2 0.2788888889 0.473333333 0.21777778 0.02888889 0.001111111 0.0000000000
#> 3 0.1270833333 0.387916667 0.35666667 0.11500000 0.012916667 0.0004166667
#> 4 0.0500000000 0.253571429 0.40238095 0.23809524 0.052380952 0.0035714286
#> 5 0.0158730159 0.132936508 0.35119048 0.35119048 0.132936508 0.0158730159
#> 6 0.0035714286 0.052380952 0.23809524 0.40238095 0.253571429 0.0500000000
#> 7 0.0004166667 0.012916667 0.11500000 0.35666667 0.387916667 0.1270833333
#> 8 0.0000000000 0.001111111 0.02888889 0.21777778 0.473333333 0.2788888889
#> 9 0.0000000000 0.000000000 0.00000000 0.05000000 0.400000000 0.5500000000
#> 10 0.0000000000 0.000000000 0.00000000 0.00000000 0.000000000 1.0000000000