get_prob_array | R Documentation |
This function will calculate the (log) probabilities for all genotype combinations at two loci given just the haplotype frequencies. This is under the assumptions of HWE.
get_prob_array(K, prob, log_p = TRUE)
K |
The ploidy of the species. |
prob |
Haplotype frequencies in the order of (ab, Ab, aB, AB). |
log_p |
A logical. Should we return the log-probabilities ( |
Element (i, j) is the (log) probability of genotype i-1 at locus 1 and genotype j-1 at locus 2.
David Gerard
get_prob_array(K = 6, prob = c(0.1, 0.2, 0.3, 0.4), log_p = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.