Skip to contents

Calculate allelic information over cells and bins

Usage

calc_allelic(
  snp,
  ncores = 1,
  bins = NULL,
  group_var = NULL,
  FUN = calc_ai,
  min_cov = 1
)

Arguments

snp

SNP SingleCellExperiment object with slots 'ref' and 'alt' per cell counts

ncores

Number of cores to speed up computation

bins

Bins over which to aggregate allele information. If not provided will calculate for each SNP

group_var

Column containing cell grouping information

FUN

A function which can take two values (or vectors) of reference and alternate counts to produce another value (or vector)

min_cov

Minumum coverage per SNP across pseudobulked cells to be included in the calculation

Value

a snp sce with slots:

  • snp - Containing the main result

  • tot_cov - Total SNP coverage in the bin for the set of cells after filtering for min_cov

  • n_snp - Number of SNPs remaining in the bin after filtering for min_cov