set_expression_gradient.colors: Set Colors Used In Gene Expression Gradients

View source: R/params_functions.R View source: R/Package-Code5-Compiled.R

set_expression_gradient.colorsR Documentation

Set Colors Used In Gene Expression Gradients

Description

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")

Usage

set_expression_gradient.colors(colors)

Arguments

colors

vector of five colors

Details

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.

Note

Example code where these colors are used: cols <- myColorRamp5(params$expression_gradient.colors,genedat, percent.mad = percent.mad)

Author(s)

~~Alison Moss~~

See Also

myColorRamp5

Examples

##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")


axm323/dataVisEasy documentation built on Feb. 1, 2024, 11:53 p.m.