Skip to contents

This allows you to set custom palettes individually for groups in the dataset

Usage

set_color_pal(moo, colname, palette = mosuite_palette)

Arguments

moo

multiOmicDataSet object (see create_multiOmicDataSet_from_dataframes())

colname

group column name to set the palette for

palette

Character vector of colors to assign. Defaults to mosuite_palette.

Value

moo with colors updated at moo@analyses$colors[[colname]]

Examples

moo <- create_multiOmicDataSet_from_dataframes(
  sample_metadata = as.data.frame(nidap_sample_metadata),
  counts_dat = as.data.frame(nidap_raw_counts)
)
moo@analyses$colors$Group
#>         A         B         C 
#> "#5954d6" "#e1562c" "#b80058" 
moo <- moo |> set_color_pal("Group", palette = RColorBrewer::brewer.pal(3, "Set2"))
moo@analyses$colors$Group
#>         A         B         C 
#> "#66C2A5" "#FC8D62" "#8DA0CB"