getColoredPathway {rWikiPathways} | R Documentation

## Get Colored Pathway

### Description

Retrieve a pathway image file with specified nodes colored by specified colors

### Usage

    getColoredPathway(pathway, revision = 0, graphId = NULL,
      color = NULL, fileType = c("svg", "png", "pdf"))

### Arguments

`pathway` | WikiPathways identifier (WPID) for the pathway to download, e.g. WP4
`revision` | (`integer`, optional) Number to indicate a specific revision to download
`graphId` | A `character` string or `vector` indicating the nodes to color
`color` | (optional) String or vector indicating the highlighting color, e.g., #FF8855. Default is red. You can provide a single color for mutiple nodes; otherwise color list and graphId must be the same length.
`fileType` | (optional) Image file format, e.g., svg (default), png or pdf.

### Value

Image file

### Examples

    {
      svg = getColoredPathway(pathway="WP554", graphId="ef1f3")
      svg = getColoredPathway(pathway="WP554", graphId=c("ef1f3","e68e0"))
      svg = getColoredPathway(pathway="WP554", graphId=c("ef1f3","e68e0"),
                              color="00FF00")
      svg = getColoredPathway(pathway="WP554", graphId=c("ef1f3","e68e0"),
                              color=c("FF0000", "0000FF"))
      # writeLines(svg, "pathway.svg")
    }

[Package rWikiPathways version 1.2.1 Index]