Skip to contents

This function is an equivalent of Seurat::DimPlot, adapted to a split.by representation with gray background.

Usage

plot_split_dimred(
  sobj = sobj,
  reduction = "umap",
  split_by = "orig.ident",
  group_by = NULL,
  color_by = NULL,
  bg_pt_size = 0.25,
  main_pt_size = 0.25,
  split_color = NULL,
  group_color = NULL,
  color_palette = NULL,
  bg_color = "gray92",
  order = FALSE
)

Arguments

sobj

A Seurat object (no default)

reduction

CHARACTER : name of a reduction present in the Seurat object (default to 'umap')

split_by

CHARACTER : name of a column in metadata, to split the representation by (default to 'orig.ident')

group_by

CHARACTER : name of a column in metadata, to group the color on split representation (default to NULL)

color_by

CHARACTER : name that can be retrieve using Seurat::FetchData, to color cells by on representation (default to NULL)

bg_pt_size

FLOAT : point size for the gray background (default to 0.25)

main_pt_size

FLOAT : point size for the cells (default to 0.25)

split_color

CHARACTER : named vector of colors for the levels of split_by, to color subplot titles (default to black)

group_color

CHARACTER : named vector of colors for the levels of group_color, to color cells in subplots (default to ggplot default colors)

color_palette

CHARACTER : a vector of colors to plot cells by color_by (default to aquarius::palette_GrOrBl palette)

bg_color

CHARACTER : the color for the gray background (default to 'gray92')

order

LOGICAL : whether to order cells by levels (group_by : first level on top) or by intensities (color_by : higher values on top), or not (default to FALSE)

Value

This function return a list of plots, that may be used in patchwork::wrap_plots function