plot_model: Plot observed UMI counts and model

View source: R/plotting.R

plot_modelR Documentation

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 documentation built on Oct. 19, 2023, 9:08 a.m.