View source: R/Seurat.Utils.Visualization.R
clUMAP | R Documentation |
Generates a UMAP visualization based on clustering results 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.
clUMAP(
ident = NULL,
obj = combined.obj,
title = ident,
sub = NULL,
prefix = NULL,
suffix = make.names(sub),
caption = .parseBasicObjStats(obj, simple = TRUE),
reduction = "umap",
splitby = NULL,
label.cex = 7,
h = 7,
w = NULL,
nr.cols = NULL,
plotname = ppp(toupper(reduction), ident),
cols = NULL,
palette = c("alphabet", "alphabet2", "glasbey", "polychrome", "stepped")[4],
max.cols.for.std.palette = 7,
highlight.clusters = NULL,
cells.highlight = NULL,
cols.highlight = "red",
sizes.highlight = 1,
label = TRUE,
repel = TRUE,
legend = !label,
legend.pos = NULL,
MaxCategThrHP = 200,
axes = NULL,
aspect.ratio = c(FALSE, 0.6)[2],
save.plot = MarkdownHelpers::TRUE.unless("b.save.wplots", v = FALSE),
PNG = TRUE,
check_for_2D = TRUE,
...
)
ident |
Cluster identity for visualization; Default: 'integrated_snn_res.0.5'. |
obj |
Seurat object containing single-cell data; Default: |
title |
Main title of the plot; Default: |
sub |
Subtitle of the plot; optional; Default: NULL. |
prefix |
Prefix for saved filename; optional; Default: NULL. |
suffix |
Suffix for saved filename; defaults to plot subtitle; Default: NULL. |
caption |
Plot caption; optional; Default: dynamically generated from |
reduction |
Dimension reduction method ('umap', 'tsne', 'pca'); Default: 'umap'. |
splitby |
Metadata column to split cells by; optional; Default: NULL. |
label.cex |
Size of cluster labels; Default: 7. |
h |
Height of plot in inches; Default: 7. |
w |
Width of plot in inches; optional; Default: NULL. |
nr.cols |
Number of columns for facet wrap if |
plotname |
Custom plot name for saving; Default: dynamically generated from |
cols |
Custom color vector for clusters; optional; Default: NULL. |
palette |
Color palette for generating cluster colors; Default: 'glasbey'. |
highlight.clusters |
Specific clusters to be highlighted; optional; Default: NULL. |
cells.highlight |
Specific cells to be highlighted; optional; Default: NULL. |
cols.highlight |
Color for highlighted cells; Default: 'red'. |
sizes.highlight |
Size of highlighted cells; Default: 1. |
label |
Show cluster labels; Default: |
repel |
Repel labels to avoid overlap; Default: |
legend |
Show legend; Default: opposite of |
legend.pos |
Position of legend; Default: 'NULL'. |
MaxCategThrHP |
Maximum number of categories before simplification; Default: 200. |
axes |
Show axes; Default: |
aspect.ratio |
Fixed aspect ratio for the plot; Default: |
save.plot |
Save plot to file; Default: |
PNG |
Save as PNG (TRUE) or PDF (FALSE); Default: |
check_for_2D |
Ensure UMAP is 2D; Default: |
... |
Additional parameters for |
## Not run:
clUMAP(ident = "integrated_snn_res.0.5", obj = yourSeuratObj)
clUMAP(ident = "integrated_snn_res.0.5", obj = yourSeuratObj, cols = RColorBrewer::brewer.pal(8, "Dark2"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.