Wrapper function around Store_Misc_Info_Seurat
to store color palettes.
Store_Palette_Seurat(
seurat_object,
palette,
palette_name,
list_as_list = FALSE,
overwrite = FALSE
)
object name.
vector or list of vectors containing color palettes to store. If list of palettes
see list_as_list
parameter for control over data storage.
name to give the palette(s) in @misc
slot. Must be of equal length to the number
of data items being stored.
logical. If data_to_store
is a list, this dictates whether to store in @misc
slot
as list (TRUE) or whether to store each entry in the list separately (FALSE). Default is FALSE.
Logical. Whether to overwrite existing items with the same name. Default is FALSE, meaning
that function will abort if item with data_name
is present in misc slot.
Seurat Object with new entries in the @misc
slot.
library(Seurat)
clu_pal <- c("red", "green", "blue")
pbmc_small <- Store_Misc_Info_Seurat(seurat_object = pbmc_small, data_to_store = clu_pal,
data_name = "rd1_colors")
#> Seurat Object now contains the following items in @misc slot:
#> ℹ 'rd1_colors'