getOverdispersedGenes: Normalize gene expression variance relative to...

View source: R/import.R

getOverdispersedGenesR Documentation

Normalize 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

getOverdispersedGenes(
  counts,
  gam.k = 5,
  alpha = 0.05,
  plot = FALSE,
  use.unadjusted.pvals = FALSE,
  do.par = TRUE,
  max.adjusted.variance = 1000,
  min.adjusted.variance = 0.001,
  verbose = TRUE,
  details = FALSE
)

Arguments

counts

Read count matrix. The rows correspond to genes, columns correspond to individual cells

gam.k

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

alpha

Significance threshold (default: 0.05)

plot

Whether to plot the results (default: FALSE)

use.unadjusted.pvals

If true, will apply BH correction (default: FALSE)

do.par

Whether to adjust par for plotting if plotting (default: TRUE)

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

Verbosity (default: TRUE)

details

If true, will return data frame of normalization parameters. Else will return list of overdispersed genes. (default: FALSE)

Value

If details is true, will return data frame of normalization parameters. Else will return list of overdispersed genes.

Examples

data(mOB)
od <- getOverdispersedGenes(counts = mOB$counts, gam.k = 5, alpha = 0.05, details = FALSE)
head(od)

od <- getOverdispersedGenes(counts = mOB$counts, gam.k = 5, alpha = 0.05, details = TRUE)
head(od$mat)
head(od$ods)
head(od$df)


JEFworks-Lab/STdeconvolve documentation built on Nov. 14, 2024, 7:24 p.m.