EM: Iterative phasing and theta_hat estimation

Description Usage Arguments Value

View source: R/EM.R

Description

Iterative phasing and theta_hat estimation

Usage

1
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 June 18, 2021, 7:24 p.m.