Skip to contents

EM phasing of SNPs

Usage

phase_snps(
  snp,
  bins,
  max_iter = 50,
  sub_cells = NULL,
  phases = NULL,
  ncores = 1,
  min_snp_cov = 5,
  min_bin_snps = 5,
  tol = 0.001
)

Arguments

snp

SingleCellExperiment object containing hetSNPs as generated by read_vartrix

bins

GenomicRanges object containing bins (or segments) over which to perform phasing

max_iter

Maximum number of iterations for the EM

sub_cells

Subset cells when phasing

phases

Named vector of SNP phases.

ncores

Number of cores to parallelize over bins

min_snp_cov

Minimum total coverage per SNP to be used in phasing.

min_bin_snps

Minimum number of covered SNPs within a bin to be used.

tol

maximum liklihood stopping tolerance

Value

SingleCellExperiment object containing EM phased SNPs. Per bin values are stored in altExp(snp, 'em'). Per SNP results are appended to rowRanges(snp)