After one generation of random mating, update the genotype frequencies.
freqnext(freq, alpha, segmat = NULL, more = FALSE, check = TRUE)If more = FALSE, then returns a vector of length
length(freq) that contains the updated genotype frequencies
after one generation of random mating. If more = TRUE, then
returns a list with these genotype frequencies (q) as well as the
parental gamete frequencies (p).
The current genotype frequencies. This should be a
vector of length K+1, where K is the ploidy of the species.
freq[i] could contain the proportion of individuals
that have genotype i-1.
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.
You can provide your own segregation matrix.
segmat[i, j] is the probability that a parent with
dosage i-1 produces a gamete with dosage j-1.
A logical. Should we return more output (TRUE) or
less (FALSE). See the Value section for details.
Should we correct for minor numerical issues? Defaults
to TRUE.
David Gerard
freq <- c(0.5, 0, 0, 0, 0.5)
freqnext(freq = freq, alpha = 0)
Run the code above in your browser using DataLab