em_li | R Documentation |
EM algorithm to estimate prior genotype probabilities from genotype likelihoods.
em_li(B, itermax = 100L, eps = 1e-05)
B |
Matrix of genotype log-likelihoods. The rows index the individuals and the columns index the genotypes. |
itermax |
The maximum number of iterations. |
eps |
The stopping criteria. |
A vector of log prior probabilities for each genotype.
David Gerard
Li, H. (2011). A statistical framework for SNP calling, mutation discovery, association mapping and population genetical parameter estimation from sequencing data. Bioinformatics, 27(21), 2987-2993. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bioinformatics/btr509")}
# Simulate some data
set.seed(1)
gl <- simgl(nvec = c(3, 2, 4, 1, 2))
# Run em
lprob <- em_li(B = gl)
# Exponentiate to get probabilities
prob <- exp(c(lprob))
prob
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.