call_genotypes: Call genotypes based on EM algorithm

View source: R/call_genotypes.R

call_genotypesR Documentation

Call genotypes 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). Probe-specific weights were used in the EM algorithm.

Usage

call_genotypes(
  RAI,
  pop,
  type,
  maxiter = 50,
  bayesian = FALSE,
  platform = "EPIC",
  verbose = 1
)

Arguments

RAI

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

pop

Population to be used to extract AFs. One of EAS, AMR, AFR, EUR, SAS, and ALL.

type

One of snp_probe, typeI_probe, and typeII_probe.

maxiter

Maximal number of iterations for the EM algorithm.

bayesian

Use the Bayesian approach to calculate posterior genotype probabilities.

platform

EPIC or 450K.

verbose

Verbose mode: 0/1/2.

Value

A list containing

RAI

Ratio of Alternative allele Intensity

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.