Est_regions: Perform EM iterations on the filtered cells with barcodes,...

View source: R/Est_regions.R

Est_regionsR Documentation

Perform EM iterations on the filtered cells with barcodes, and plot the results for each region.

Description

Perform EM iterations on the filtered cells with barcodes, and plot the results for each region.

Usage

Est_regions(
  Obj_filtered = NULL,
  max_nSNP = 30000,
  plot_stat = TRUE,
  min_cell = 5,
  min_snp = 0,
  rds_path = NULL,
  cont = FALSE,
  max_iter = 50,
  phases = NULL,
  sub_cells = NULL,
  sub_region = NULL
)

Arguments

Obj_filtered

An Alleloscope object with allele and segment information for estimating cell major haplotype proportion (theta_hat) for each region.

max_nSNP

Integer. Maximum SNP number used for estimating theta_hat for a region.

plot_stat

Logical (TRUE/ FALSE). Whether or not to plot the statistics and EM results for each region.

min_cell

Integer. Filter out the cells with reads < min_cells.

min_snp

Integer. Filter out the SNPs with reads < min_snp.

rds_path

The path for saving the rds files for the estimated results for each region.

cont

Logical (TRUE/FALSE). Whether or not to skip the regions with the rds files in the specified rds_path.

max_iter

Integer. Maximum numbers of EM iterations.

phases

List. The estimated phase indicators (I_j) of each SNP across all regions.

sub_cells

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

sub_region

A region name (in the "chrr" column of the seg_table) for a region where the SNP phases and cell major haplotype proportion are updated.

Value

A "rds_list" of the estimated SNP phases (I_hat), estimated cell major haplotype proportion (theta_hat) for all regions.


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