Standard and modified version of LIGER's plotByDatasetAndCluster
DimPlot_LIGER(
liger_object,
group_by = NULL,
split_by = NULL,
colors_use_cluster = NULL,
colors_use_meta = NULL,
pt_size = NULL,
shuffle = TRUE,
shuffle_seed = 1,
reduction_label = "UMAP",
aspect_ratio = NULL,
label = TRUE,
label_size = NA,
label_repel = FALSE,
label_box = FALSE,
label_color = "black",
combination = FALSE,
raster = NULL,
raster.dpi = c(512, 512),
num_columns = NULL,
ggplot_default_colors = FALSE,
color_seed = 123
)
liger
liger_object. Need to perform clustering before calling this function
Variable to be plotted. If NULL
will plot clusters from liger@clusters
slot.
If combination = TRUE
will plot both clusters and meta data variable.
Variable to split plots by.
colors to use for plotting by clusters. By default if number of levels plotted is
less than or equal to 36 will use "polychrome" and if greater than 36 will use "varibow" with shuffle = TRUE
both from DiscretePalette_scCustomize
.
colors to use for plotting by meta data (cell.data) variable. By default if number of levels plotted is less than or equal to 36 it will use "polychrome" and if greater than 36 will use "varibow" with shuffle = TRUE both from DiscretePalette_scCustomize.
Adjust point size for plotting.
logical. Whether to randomly shuffle the order of points. This can be useful for crowded plots if points of interest are being buried. (Default is TRUE).
Sets the seed if randomly shuffling the order of points.
What to label the x and y axes of resulting plots. LIGER does not store name of technique and therefore needs to be set manually. Default is "UMAP".
Control the aspect ratio (y:x axes ratio length). Must be numeric value; Default is NULL.
logical. Whether or not to label the clusters. ONLY applies to plotting by cluster. Default is TRUE.
size of cluster labels.
logical. Whether to repel cluster labels from each other if plotting by
cluster (if group_by = NULL
or group_by = "cluster
). Default is FALSE.
logical. Whether to put a box around the label text (uses geom_text
vs geom_label
).
Default is FALSE.
Color to use for cluster labels. Default is "black".
logical, whether to return patchwork displaying both plots side by side. (Default is FALSE).
Convert points to raster format. Default is NULL which will rasterize by default if greater than 200,000 cells.
Pixel resolution for rasterized plots, passed to geom_scattermore(). Default is c(512, 512).
Number of columns in plot layout. Only valid if split.by != NULL
.
logical. If colors_use = NULL
, Whether or not to return plot using
default ggplot2 "hue" palette instead of default "polychrome" or "varibow" palettes.
random seed for the "varibow" palette shuffle if colors_use = NULL
and number of
groups plotted is greater than 36. Default = 123.
A ggplot/patchwork object
if (FALSE) {
DimPlot_LIGER(liger_object = obj_name, reduction_label = "UMAP")
}