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

plot_model

Plot observed UMI counts and model


Description

Plot observed UMI counts and model

Usage

plot_model(
  x,
  umi,
  goi,
  x_var = x$arguments$latent_var[1],
  cell_attr = x$cell_attr,
  do_log = TRUE,
  show_fit = TRUE,
  show_nr = FALSE,
  plot_residual = FALSE,
  batches = NULL,
  as_poisson = FALSE,
  arrange_vertical = TRUE,
  show_density = FALSE,
  gg_cmds = NULL
)

Arguments

x

The output of a vst run

umi

UMI count matrix

goi

Vector of genes to plot

x_var

Cell attribute to use on x axis; will be taken from x$arguments$latent_var[1] by default

cell_attr

Cell attributes data frame; will be taken from x$cell_attr by default

do_log

Log10 transform the UMI counts in plot

show_fit

Show the model fit

show_nr

Show the non-regularized model (if available)

plot_residual

Add panels for the Pearson residuals

batches

Manually specify a batch variable to break up the model plot in segments

as_poisson

Fix model parameter theta to Inf, effectively showing a Poisson model

arrange_vertical

Stack individual ggplot objects or place side by side

show_density

Draw 2D density lines over points

gg_cmds

Additional ggplot layer commands

Value

A ggplot object

Examples

vst_out <- vst(pbmc, return_cell_attr = TRUE)
plot_model(vst_out, pbmc, 'EMC4')

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.