multi_clUMAP.A4: Plot multiple categorical variables in combined UMAPs

View source: R/Seurat.utils.less.used.R

multi_clUMAP.A4R Documentation

Plot multiple categorical variables in combined UMAPs

Description

Generates and saves multiple UMAP plots for clustering results, adjusting the layout and plot dimensions. Supports the generation of plots in different formats and customization of the visual appearance.

Usage

multi_clUMAP.A4(
  obj = combined.obj,
  idents = GetClusteringRuns(obj)[1:4],
  foldername = "clUMAPs_multi",
  plot.reduction = "umap",
  intersectionAssay = c("RNA", "integrated")[1],
  layout = c("tall", "wide", FALSE)[2],
  nr.Col = 2,
  nr.Row = 4,
  cex = round(0.1/(nr.Col * nr.Row), digits = 2),
  label = FALSE,
  legend = !label,
  subdir = TRUE,
  prefix = NULL,
  suffix = NULL,
  background_col = "white",
  aspect.ratio = c(FALSE, 0.6)[2],
  saveGeneList = FALSE,
  w = 8.27,
  h = 11.69,
  scaling = 1,
  format = c("jpg", "pdf", "png")[1],
  ...
)

Arguments

obj

The Seurat object containing clustering information. Default: combined.obj.

idents

A vector of cluster identities to plot. Default: GetClusteringRuns()[1:4].

foldername

The name of the folder to save plots. Default: substitute(ident).

plot.reduction

The dimensionality reduction technique to use for plotting. Default: "umap".

intersectionAssay

The assay to use for intersection. Default: "RNA".

layout

The layout orientation, either "tall", "wide", or FALSE to disable. Default: "wide".

nr.Col

Number of columns in the plot grid. Default: 2.

nr.Row

Number of rows in the plot grid. Default: 4.

cex

The character expansion size for plot text, automatically adjusted. Default: round(0.1 / (nr.Col * nr.Row), digits = 2).

label

Logical indicating if labels should be displayed on the plots. Default: FALSE.

legend

Logical indicating if a legend should be included in the plots. Default: !label.

subdir

Logical indicating if a subdirectory should be created for saving plots. Default: TRUE.

prefix

Optional prefix for plot filenames. Default: NULL.

suffix

Optional suffix for plot filenames. Default: NULL.

background_col

The background color of the plot. Default: "white".

aspect.ratio

The aspect ratio of the plot, FALSE to disable fixed ratio. Default: 0.6.

saveGeneList

Logical indicating if a list of genes should be saved. Default: FALSE.

w

The width of the plot in inches. Default: 8.27.

h

The height of the plot in inches. Default: 11.69.

scaling

The scaling factor to apply to plot dimensions. Default: 1.

format

The file format for saving plots. Default: "jpg".

...

Additional arguments passed to plotting functions.

Value

Invisible NULL. Plots are saved to files.

Examples

## Not run: 
multi_clUMAP.A4(idents = c("S1", "S2"), obj = YourSeuratObject)

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.