EM: Iterative phasing and theta_hat estimation

View source: R/EM.R

EMR Documentation

Iterative phasing and theta_hat estimation

Description

Iterative phasing and theta_hat estimation

Usage

EM(ref_table, alt_table, max_iter = max_iter, sub_cells = NULL, seed = 2020)

Arguments

ref_table

A SNP by cell read count matrix/ spare matrix for the reference alleles.

alt_table

A SNP by cell read count matrix/ spare matrix for the alternative alleles.

max_iter

An integer of maximum iteration number.

sub_cells

A vector of cell names for the cells used to estimate the phases.

seed

An integer of random seed number for EM initialization.

Value

A list of estimated indicators (I_hat) for each SNP and estimated major haplotype proportion (theta_hat) for each cell in one region. I_hat is the phasing result indicating whether reference allele is on the major haplotype for each SNP. Theta_hat represents the CNV states for each cell. A cell is considered as a CNV carrier if its theta_hat depart from 0.5.


seasoncloud/Alleloscope documentation built on March 17, 2023, 1:14 a.m.