powered by
Plot observed UMI counts and model
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 )
A ggplot object
The output of a vst run
UMI count matrix
Vector of genes to plot
Cell attribute to use on x axis; will be taken from x$arguments$latent_var[1] by default
Cell attributes data frame; will be taken from x$cell_attr by default
Log10 transform the UMI counts in plot
Show the model fit
Show the non-regularized model (if available)
Add panels for the Pearson residuals
Manually specify a batch variable to break up the model plot in segments
Fix model parameter theta to Inf, effectively showing a Poisson model
Stack individual ggplot objects or place side by side
Draw 2D density lines over points
Additional ggplot layer commands
# \donttest{ vst_out <- vst(pbmc, return_cell_attr = TRUE) plot_model(vst_out, pbmc, 'EMC4') # }
Run the code above in your browser using DataLab