qUMAP: Quick UMAP Visualization of Gene Expression and automatically...

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

qUMAPR Documentation

Quick UMAP Visualization of Gene Expression and automatically save the plot

Description

Generates a UMAP visualization for a specific feature from a Seurat object, and automatically saves it. Offers options for custom titles, subtitles, saving, and more. Assumes default options for custom titles, subtitles, saving, and more.

Usage

qUMAP(
  feature = "TOP2A",
  obj = combined.obj,
  title = feature,
  sub = NULL,
  reduction = "umap",
  splitby = NULL,
  prefix = NULL,
  suffix = make.names(sub),
  save.plot = MarkdownHelpers::TRUE.unless("b.save.wplots", v = FALSE),
  PNG = TRUE,
  h = 7,
  w = NULL,
  nr.cols = NULL,
  assay = c("RNA", "integrated")[1],
  axes = FALSE,
  aspect.ratio = c(FALSE, 0.6)[1],
  HGNC.lookup = TRUE,
  make.uppercase = FALSE,
  check_for_2D = TRUE,
  qlow = "q10",
  qhigh = "q90",
  caption = .parseBasicObjStats(obj, simple = TRUE),
  ...
)

Arguments

feature

Feature to visualize on the UMAP; Default: 'TOP2A'.

obj

Seurat object containing single-cell RNA-seq data; Default: combined.obj.

title

Title of the plot; Default: feature.

sub

Subtitle of the plot; Default: NULL.

reduction

Dimension reduction technique to be used ('umap', 'tsne', or 'pca'); Default: 'umap'.

splitby

Column in the metadata to split the cells by; Default: NULL.

prefix

Prefix added before the filename; Default: NULL.

suffix

Suffix added to the end of the filename; Default: sub.

save.plot

If TRUE, the plot is saved into a file; Default: TRUE.

PNG

If TRUE, the file is saved as a .png; Default: TRUE.

h

Height of the plot in inches; Default: 7.

w

Width of the plot in inches; Default: NULL.

nr.cols

Number of columns to combine multiple feature plots, ignored if split.by is not NULL; Default: NULL.

assay

Which assay to use ('RNA' or 'integrated'); Default: 'RNA'.

axes

If TRUE, axes are shown on the plot; Default: FALSE.

aspect.ratio

Ratio of height to width. If TRUE, the ratio is fixed at 0.6; Default: FALSE.

HGNC.lookup

If TRUE, HGNC gene symbol lookup is performed; Default: TRUE.

make.uppercase

If TRUE, feature names are converted to uppercase; Default: FALSE.

check_for_2D

If TRUE, checks if UMAP is 2 dimensional; Default: TRUE.

qlow

Lower quantile for the color scale; Default: 'q10'.

qhigh

Upper quantile for the color scale; Default: 'q90'.

caption

Adds a caption to the ggplot object; Default: dynamically generated from obj.

...

Additional parameters to pass to the internally called functions.

Examples

## Not run: 
if (interactive()) {
  qUMAP(feature = "nFeature_RNA", obj = yourSeuratObject)
  qUMAP(feature = "TOP2A", obj = yourSeuratObject, PNG = FALSE, save.plot = TRUE)
}

## End(Not run)


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