dim_plot: Tailored dimensional reduction plot

View source: R/utils_plot.R

dim_plotR Documentation

Tailored dimensional reduction plot

Description

This function extends the DimPlot Seurat function by providing additional plotting options.

Usage

dim_plot(
  seu,
  reduction = "umap",
  group.by = "active.ident",
  split.by = NULL,
  ncol = NULL,
  legend.position = "right",
  col_pal = NULL,
  dims_plot = c(1, 2),
  pt.size = 1.4,
  label = FALSE,
  label.size = 7,
  combine = TRUE,
  pt.shape = 21,
  pt.stroke = 0.05,
  pt.alpha = 1,
  ...
)

Arguments

seu

Seurat object (required).

reduction

Which dimensionality reduction to use (required).

group.by

Name of metadata column to group (color) cells by (required).

split.by

Name of a metadata column to split plot by.

ncol

Number of columns for display when combining plots.

legend.position

Position of legend, default "right" (set to "none" for clean plot).

col_pal

Discrete colour palette to use, default is Hue palette (hue_pal) from 'scales' package. Should be of equal length to number of groups in 'group.by'.

dims_plot

Dimensions to plot, must be a two-length numeric vector specifying x- and y-dimensions.

pt.size

Adjust point size for plotting.

label

Whether to label the clusters in 'plot_reduction' space.

label.size

Sets size of labels.

combine

Combine plots into a single patchworked ggplot object. If FALSE, return a list of ggplot objects

pt.shape

Adjust point shape for plotting.

pt.stroke

Stroke value for each point.

pt.alpha

Adjust alpha value for each point.

...

Additional parameters passed to Seurat's DimPlot.

Value

A ggplot2 object.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk


andreaskapou/SeuratPipe documentation built on Nov. 22, 2022, 4:16 p.m.