peNodeRenderInfo: Extract node render information from a 'pePathway-class'...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/renderInfo-methods.R

Description

Extract node render information from a pePathway-class object

Usage

1
2
3
peNodeRenderInfo(x, y = "Pert", input.shape = "box",
  default.shape = "ellipse", pos.col = "red", neg.col = "blue",
  zero.col = "white")

Arguments

x

an object of class pePathway-class

y

a string representing the factor to be represented (Pert, Acc or input; see pePathway-class)

input.shape

shape of nodes that have measured expression change

default.shape

shape of all other nodes

pos.col

color of nodes with a positive y factor

neg.col

color of nodes with a negative y factor

zero.col

color of nodes with the y factor equal to zero

Value

a named list as expected by nodeRenderInfo

Author(s)

Calin Voichita and Sorin Draghici

See Also

nodeRenderInfo,par

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# load experiment
load(system.file("extdata/E-GEOD-21942.topTable.RData", package = "ROntoTools"))
fc <- top$logFC[top$adj.P.Val <= .01]
names(fc) <- top$entrez[top$adj.P.Val <= .01]
ref <- top$entrez

# load the set of pathways
kpg <- keggPathwayGraphs("hsa")
kpg <- setEdgeWeights(kpg)
kpg <- setNodeWeights(kpg, defaultWeight = 1)

# perform the pathway analysis
peRes <- pe(fc, graphs = kpg, ref = ref, nboot = 100, verbose = TRUE)

p <- peRes@pathways[[50]]
g <- layoutGraph(p@map, layoutType = "dot")
graphRenderInfo(g) <- list(fixedsize = FALSE)
edgeRenderInfo(g) <- peEdgeRenderInfo(p)
nodeRenderInfo(g) <- peNodeRenderInfo(p)
# notice the different type of nodes in the graph (box/circle)
# the color of each node represents the perturbation (red = positive, blue = negative)
# the shade represents the stregth of the perturbation 
renderGraph(g)

nodeRenderInfo(g) <- peNodeRenderInfo(p, "Acc")
# now, the color of each node represents the accumulation (red = positive, blue = negative)
# notice that square nodes with no parents have no accumulation
renderGraph(g)

ROntoTools documentation built on Nov. 8, 2020, 7:41 p.m.