get_prob_array: Obtain the distribution of genotypes given haplotype frequencies under HWE
Description
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.
Usage
get_prob_array(K, prob, log_p = TRUE)
Value
Element (i, j) is the (log) probability of genotype i-1 at locus 1
and genotype j-1 at locus 2.
Arguments
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 (TRUE)
or the probabilities (FALSE). Defaults to TRUE.