plot_model: Plot observed UMI counts and model

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

Plot observed UMI counts and model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

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

sctransform documentation built on Jan. 13, 2021, 10:48 p.m.