Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_model_var

Return average variance under negative binomial model


Description

This is based on the formula var = mu + mu^2 / theta

Usage

get_model_var(
  vst_out,
  cell_attr = vst_out$cell_attr,
  use_nonreg = FALSE,
  bin_size = 256,
  verbosity = 2,
  verbose = NULL,
  show_progress = NULL
)

Arguments

vst_out

The output of a vst run

cell_attr

Data frame of cell meta data

use_nonreg

Use the non-regularized parameter estimates; boolean; default is FALSE

bin_size

Number of genes to put in each bin (to show progress)

verbosity

An integer specifying whether to show only messages (1), messages and progress bars (2) or nothing (0) while the function is running; default is 2

verbose

Deprecated; use verbosity instead

show_progress

Deprecated; use verbosity instead

Value

A named vector of variances (the average across all cells), one entry per gene.

Examples

vst_out <- vst(pbmc, return_cell_attr = TRUE)
res_var <- get_model_var(vst_out)

sctransform

Variance Stabilizing Transformations for Single Cell UMI Data

v0.3.2
GPL-3 | file LICENSE
Authors
Christoph Hafemeister [aut, cre] (<https://orcid.org/0000-0001-6365-8254>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.