multiSingleClusterHighlightPlots.A4: Generate Cluster Highlight UMAPs compiled into A4 pages

View source: R/Seurat.Utils.Visualization.R

multiSingleClusterHighlightPlots.A4R Documentation

Generate Cluster Highlight UMAPs compiled into A4 pages

Description

This function generates and saves cluster highlight plots for both single and multiple clusters using UMAP or other dimensionality reduction techniques. It supports saving plots in various formats and allows customization of plot appearance and layout.

Usage

multiSingleClusterHighlightPlots.A4(
  obj = combined.obj,
  ident = GetClusteringRuns(obj)[1],
  foldername = ident,
  plot.reduction = "umap",
  intersectionAssay = DefaultAssay(combined.obj),
  layout = c("tall", "wide", FALSE)[2],
  colors = c("grey", "red"),
  nr.Col = 2,
  nr.Row = 4,
  cex = round(0.1/(nr.Col * nr.Row), digits = 2),
  sizes.highlight = 1,
  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

A Seurat object combining multiple datasets. Default: combined.obj.

ident

The name of the metadata column in the Seurat object obj to use for identifying clusters.

foldername

Name of the folder to save the plots in. Default: Value of ident.

plot.reduction

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

intersectionAssay

The assay to use when calculating intersections. Default: "RNA".

layout

Plot layout, can be "tall", "wide", or FALSE for no specific layout. Default: "wide".

colors

A vector of colors to use for non-highlighted and highlighted clusters. Default: c("grey", "red").

nr.Col

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

nr.Row

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

cex

Size of the text in the plot, calculated based on the number of rows and columns. Default: Calculated value.

sizes.highlight

Size of highlighted cells; Default: 1.

subdir

Logical flag indicating whether to create a subdirectory for the plots. Default: TRUE.

prefix

Optional prefix for the plot file names. Default: NULL.

suffix

Optional suffix for the plot file names. Default: NULL.

background_col

Background color of the plots. Default: "white".

aspect.ratio

Aspect ratio of the plots, can be FALSE for default ratio or a numeric value. Default: 0.6.

saveGeneList

Logical flag indicating whether to save the list of genes used in the plots. Default: FALSE.

w

Width of the plots, in inches. Default: 8.27.

h

Height of the plots, in inches. Default: 11.69.

scaling

Scaling factor for adjusting the size of the plots. Default: 1.

format

Format to save the plots in, can be "jpg", "pdf", or "png". Default: "jpg".

...

Additional arguments passed to lower-level plotting functions.

Value

Invisible. This function primarily saves plots to files.

Examples

multiSingleClusterHighlightPlots.A4(ident = "cluster_id", obj = yourSeuratObject)


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