Meta_Highlight_Plot {scCustomize} | R Documentation |
Meta Highlight Plot
Description
Create Plot with meta data variable of interest highlighted
Usage
Meta_Highlight_Plot(
seurat_object,
meta_data_column,
meta_data_highlight,
highlight_color = NULL,
background_color = "lightgray",
pt.size = NULL,
aspect_ratio = NULL,
figure_plot = FALSE,
raster = NULL,
raster.dpi = c(512, 512),
label = FALSE,
split.by = NULL,
split_seurat = FALSE,
ggplot_default_colors = FALSE,
...
)
Arguments
seurat_object |
Seurat object name. |
meta_data_column |
Name of the column in |
meta_data_highlight |
Name of variable(s) within |
highlight_color |
Color to highlight cells (default "navy"). |
background_color |
non-highlighted cell colors. |
pt.size |
point size for both highlighted cluster and background. |
aspect_ratio |
Control the aspect ratio (y:x axes ratio length). Must be numeric value; Default is NULL. |
figure_plot |
logical. Whether to remove the axes and plot with legend on left of plot denoting
axes labels. (Default is FALSE). Requires |
raster |
Convert points to raster format. Default is NULL which will rasterize by default if greater than 200,000 cells. |
raster.dpi |
Pixel resolution for rasterized plots, passed to geom_scattermore(). Default is c(512, 512). |
label |
Whether to label the highlighted meta data variable(s). Default is FALSE. |
split.by |
Variable in |
split_seurat |
logical. Whether or not to display split plots like Seurat (shared y axis) or as individual plots in layout. Default is FALSE. |
ggplot_default_colors |
logical. If |
... |
Extra parameters passed to |
Value
A ggplot object
Examples
library(Seurat)
pbmc_small$sample_id <- sample(c("sample1", "sample2"), size = ncol(pbmc_small), replace = TRUE)
Meta_Highlight_Plot(seurat_object = pbmc_small, meta_data_column = "sample_id",
meta_data_highlight = "sample1", highlight_color = "gold", background_color = "lightgray",
pt.size = 2)