For a genetic locus that is at Hardy-Weinberg equilibrium in a
particular population, the population allele frequencies at
the locus determine the population genotype frequencies; see Sections 1.2 and
1.3 of (Lange, 2002) for the unphased version of this law. When a genetic
locus is at Hardy-Weinberg equilibrium, the maternal and paternal alleles of a
random person from the population are independent. A phased genotype at a
genetic locus is an ordered pair consisting of a maternal
and paternal allele at the locus. So to any heterozygous unphased genotype,
there are two corresponding phased genotypes, and these two phased genotypes
have equal frequencies under Hardy-Weinberg equilibrium.
Given a vector p_alleles
containing the allele frequencies,
this function returns the frequencies of the possible phased genotypes,
in a particular order that can be viewed by setting annotate
to TRUE
.
If the alleles are named 1:length(p_alleles)
, so that p_alleles[i]
is
the frequency of allele i
, then the phased genotypes are of the form
1|1, 1|2, ...
, where a|b
means the maternal allele is a
and the
paternal allele is b
. Note that if the output of this function is to be
used as the geno_freq
argument of pedigree_loglikelihood
then the annotate
option must be set to FALSE
.