View source: R/params_functions.R View source: R/Package-Code5-Compiled.R
set_expression_gradient.colors | R Documentation |
Set and override the default colors to be used by myColorRamp5 when generating colors based on expression levels. Default values are c("blue","lightblue","gray","indianred","firebrick")
set_expression_gradient.colors(colors)
colors |
vector of five colors |
Storing the colors in the params list object allows them to be accessed by all functions to keep consistent across data analysis types. Utilized in scatterGenes and beeswarmGenes in particular as well as myPCA
Please see params for more information about accessing and setting up these variables.
Example code where these colors are used: cols <- myColorRamp5(params$expression_gradient.colors,genedat, percent.mad = percent.mad)
~~Alison Moss~~
myColorRamp5
##intiate parameters
initiate_params()
##check default values of expression gradient colors
params$expression_gradient.colors
scatterGenes(RAGP_norm, "Th","Chat", color.by = "Npy")
##change expression gradient colors to desired palette, must have length of 5
set_expression_gradient.colors(c("red","orange","yellow","green","blue"))
scatterGenes(RAGP_norm, "Th","Chat", color.by = "Npy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.