Learn R Programming

pathfindR (version 2.4.2)

color_kegg_pathway: Color hsa KEGG pathway

Description

Color hsa KEGG pathway

Usage

color_kegg_pathway(
  pw_id,
  change_vec,
  scale_vals = TRUE,
  node_cols = NULL,
  legend.position = "top"
)

Value

a ggplot object containing the colored KEGG pathway diagram visualization

Arguments

pw_id

hsa KEGG pathway id (e.g. hsa05012)

change_vec

vector of change values, names should be hsa KEGG gene ids

scale_vals

should change values be scaled? (default = TRUE)

node_cols

low, middle and high color values for coloring the pathway nodes (default = NULL). If node_cols=NULL, the low, middle and high color are set as 'green', 'gray' and 'red'. If all change values are 1e6 (in case no changes are supplied, this dummy value is assigned by input_processing), only one color ('#F38F18' if NULL) is used.

legend.position

the default position of legends ("none", "left", "right", "bottom", "top", "inside")

Examples

Run this code
if (FALSE) {
pw_id <- 'hsa00010'
change_vec <- c(-2, 4, 6)
names(change_vec) <- c('hsa:2821', 'hsa:226', 'hsa:229')
result <- pathfindR:::color_kegg_pathway(pw_id, change_vec)
}

Run the code above in your browser using DataLab