set_expt_colors: Change the colors of an expt

View source: R/expt.R

set_expt_colorsR Documentation

Change the colors of an expt

Description

When exploring differential analyses, it might be useful to play with the conditions/batches of the experiment. Use this to make that easier.

Usage

set_expt_colors(
  expt,
  colors = TRUE,
  chosen_palette = "Dark2",
  change_by = "condition"
)

Arguments

expt

Expt to modify

colors

colors to replace

chosen_palette

I usually use Dark2 as the RColorBrewer palette.

change_by

Assuming a list is passed, cross reference by condition or sample?

Value

expt Send back the expt with some new metadata

See Also

[set_expt_conditions()] [set_expt_batches()] [RColorBrewer]

Examples

## Not run: 
unique(esmer_expt$design$conditions)
chosen_colors <- list(
   "cl14_epi" = "#FF8D59",
   "clbr_epi" = "#962F00",
   "cl14_tryp" = "#D06D7F",
   "clbr_tryp" = "#A4011F",
   "cl14_late" = "#6BD35E",
   "clbr_late" = "#1E7712",
   "cl14_mid" = "#7280FF",
   "clbr_mid" = "#000D7E")
esmer_expt <- set_expt_colors(expt = esmer_expt, colors = chosen_colors)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.