Create and Save plots for Gene list with Single Command

Iterate_VlnPlot_scCustom(
  seurat_object,
  features,
  gene_list = deprecated(),
  colors_use = NULL,
  pt.size = NULL,
  group.by = NULL,
  split.by = NULL,
  file_path = NULL,
  file_name = NULL,
  file_type = NULL,
  single_pdf = FALSE,
  raster = NULL,
  dpi = 600,
  ggplot_default_colors = FALSE,
  color_seed = 123,
  ...
)

Arguments

seurat_object

Seurat object name.

features

vector of features to plot.

gene_list

[Deprecated] soft-deprecated. See features.

colors_use

color palette to use for plotting. By default if number of levels plotted is less than or equal to 36 it will use "polychrome" and if greater than 36 will use "varibow" with shuffle = TRUE both from DiscretePalette_scCustomize.

pt.size

point size for plotting.

group.by

Name of one or more metadata columns to group (color) plot by (for example, orig.ident); default is the current active.ident of the object.

split.by

Feature to split plots by (i.e. "orig.ident").

file_path

directory file path and/or file name prefix. Defaults to current wd.

file_name

name suffix and file extension.

file_type

File type to save output as. Must be one of following: ".pdf", ".png", ".tiff", ".jpeg", or ".svg".

single_pdf

saves all plots to single PDF file (default = FALSE). `file_type`` must be .pdf.

raster

Convert points to raster format. Default is NULL which will rasterize by default if greater than 100,000 total points plotted (# Cells x # of features).

dpi

dpi for image saving.

ggplot_default_colors

logical. If colors_use = NULL, Whether or not to return plot using default ggplot2 "hue" palette instead of default "polychrome" or "varibow" palettes.

color_seed

random seed for the "varibow" palette shuffle if colors_use = NULL and number of groups plotted is greater than 36. Default = 123.

...

Extra parameters passed to VlnPlot.

Value

Saved plots

Examples

if (FALSE) {
Iterate_VlnPlot_scCustom(seurat_object = object, gene_list = DEG_list, colors = color_list,
file_path = "plots/", file_name = "_vln", file_type = ".jpg", dpi = 600)
}