fit_beta_em: Estimate mixed beta distribution parameters based on EM...

View source: R/call_genotypes.R

fit_beta_emR Documentation

Estimate mixed beta distribution parameters based on EM algorithm

Description

The Expectation–maximization (EM) algorithm is used to fit a mixture of three beta distributions representing the three genotypes (AA, AB, and BB) and one uniform distribution representing the outliers (adapted from ewastools).

Usage

fit_beta_em(RAI, maxiter = 50, verbose = 1)

Arguments

RAI

A matrix of RAI (Ratio of Alternative allele Intensity) for probes. Provide probes as rows and samples as columns.

maxiter

Maximal number of iterations for the EM algorithm.

verbose

Verbose mode: 0/1/2.

Value

A list containing

shapes

Shapes of the mixed beta distributions

weights

Prior probabilities that the RAI values belong to one of the three genotypes

U

Overall probability of RAI values being outlier

outliers

Probability of each RAI value being outlier

logLik

Log-likelihood

GP

Genotype probabilities of the three genotypes


Yi-Jiang/MethyGenotyper documentation built on Sept. 4, 2024, 12:47 p.m.