View source: R/analysis_distance.R
inbreeding_mle | R Documentation |
Estimates the inbreeding coefficient between all pairs of samples by maximum likelihood.
inbreeding_mle(
x,
f = seq(0, 1, l = 11),
ignore_het = FALSE,
report_progress = TRUE
)
x |
object of class |
f |
values of f that are explored. |
ignore_het |
whether to ignore heterzygous comparisons, or alternatively call the major allele at every locus (see details). |
report_progress |
if |
The probability of seeing the same or different alleles at a locus
can be written in terms of the global allele frequency p and the inbreeding
coefficient f, for example the probability of seeing the same REF allele is
(1-f)*p^2 + f*p
. This formula can be multiplied over all loci to
arrive at the overall likelihood of each value of f, which can then be
chosen by maximum likelihood. This function carries out this comparison
between all pairwise samples, passed in as a matrix. The formula above only
applies when comparing homozygous calls - for homo/het or het/het
comparisons we can either ignore these loci (the default) or convert hets
to homo by calling the major allele at every locus.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.