normalizeVariance: Identify overdispersed genes by normalizing counts per...

View source: R/normalize.R

normalizeVarianceR Documentation

Identify overdispersed genes by normalizing counts per million (CPM) gene expression variance relative to transcriptome-wide expectations (Modified from SCDE/PAGODA2 code)

Description

Normalizes gene expression magnitudes to with respect to its ratio to the transcriptome-wide expectation as determined by local regression on expression magnitude

Usage

normalizeVariance(
  cpm,
  gam.k = 5,
  alpha = 0.05,
  max.adjusted.variance = 1000,
  min.adjusted.variance = 0.001,
  verbose = TRUE,
  plot = FALSE,
  details = FALSE
)

Arguments

cpm

Counts per million (CPM) matrix. Rows are genes, columns are cells.

gam.k

Generalized additive model parameter; the dimension of the basis used to represent the smooth term (default: 5)

alpha

Significance threshold for overdispersed genes (default: 0.05)

max.adjusted.variance

Ceiling on maximum variance after normalization to prevent infinites (default: 1e3)

min.adjusted.variance

Floor on minimum variance after normalization (default: 1e-3)

verbose

Boolean for verbosity setting (default: TRUE)

plot

Boolean to plot mean variance plots before and after correction

details

Boolean to return detailed data frame or names of genes (default: FALSE)

Value

A list with two items: (1) an adjusted CPM matrix with the same dimensions as the input and (2) a dataframe with the summary statistics for each gene.

Examples

data(vel)
curr <- vel$current

normalizeDepth(curr)


JEFworks-Lab/veloviz documentation built on Sept. 14, 2022, 4:03 p.m.