node_color {hipathia} | R Documentation

## Get colors of the nodes from a comparison file

### Description

Computes the colors of the nodes depending on the sign and p.value from the provided file. Significant up- and down-regulated nodes are depicted with the selected color, with a gradient towards the non-significant color depending on the value of the p-value. Smaller p-values give rise to purer colors than higher p-values.

### Usage

    node_color(comp, metaginfo, group_by = "pathway", colors = "classic",
      conf = 0.05, adjust = TRUE)

### Arguments

`comp` | Comparison file as returned by `do_wilcoxon`. Must include a column named "UP/DOWN" with the sign of the comparison coded as `UP` or `DOWN`, a column named "p.value" of raw p.values and a column named "FDRp.value" of adjusted p.values.
`metaginfo` | Object of pathways.
`group_by` | How to group the subpathways to be visualized. By default they are grouped by the pathway to which they belong. Available groupings include "uniprot", to group subpathways by their annotated Uniprot functions, "GO", to group subpathways by their annotated GO terms, and "genes", to group subpathways by the genes they include. Default is set to "pathway".
`colors` | Either a character vector with 3 colors (indicating, in this order, down-regulation, non-significance and up-regulation colors) or a key name indicating the color scheme to be used. Options are:
`conf` | Level of significance of the comparison for the adjusted p-value.
`adjust` | Boolean, whether to adjust the p.value from the comparison. Default is TRUE.

### Value

List of color vectors, named by the pathways to which they belong. The color vectors represent the differential expression of the nodes in each pathway.

### Slots

`classic`

  ColorBrewer blue, white and colorBrewer red.

`hipathia`

  Hipathia predefined color scheme: Green, white and orange. By default `classic` color scheme is applied.

### Examples

    data(results)
    data(brca)
    pathways_list <- c("hsa03320", "hsa04012")
    pathways <- load_pathways(species = "hsa", pathways_list)
    comp <- do_wilcoxon(results[["nodes"]], "group", "Tumor", "Normal")
    colors_de <- node_color(comp, pathways)

[Package hipathia version 2.4.0 Index]