Skip to contents

Test to evaluate deviation from the expected level of allelic variation for genes with similar expression. Performs a permutation test between H_0: gene's dispersion is the same as the common (expected) dispersion. H_1: The stabilized (shrunk) dispersion is not the same as the common dispersion.

Usage

bb_var(
  a1_counts,
  tot_counts,
  estimates,
  estimates_group = NULL,
  min_cells = 5,
  min_counts = 5,
  batch = NULL,
  metadata = NULL,
  n_pmt = 500,
  n_sim = 500
)

Arguments

a1_counts

Integer matrix (genes x cells): allele-1 counts.

tot_counts

Integer matrix (genes x cells): total counts (same dimenstions and rownames as a1_counts).

estimates

Data frame from correct_theta()

estimates_group

Optional object containing initial beta-binomial parameter estimates and correction performed on each batch separately

min_cells

Integer >= 1. Minimum number of cells per gene to fit (default 5). Genes with a number of cells less than min_cells are excluded from the estimation.

min_counts

Integer >= 0. Minimum reads per cell to include (default 0). Cells with a number of mapped reads less than min_counts are excluded from the estimation

batch

Optional string: column name in metadata identifying batches. (if batch correction is required)

metadata

Optional metadata object containing cell level information (batch identifier must be one of the column in the cell metadata)

n_pmt

Integer. Number of permutations (<= n_sim.)

n_sim

Integer. Number of simulated replicates.

Examples

bb_var()
#> Error in eval(assertion, env): argument "a1_counts" is missing, with no default