# load data and retrieve wnt pathway
data(biopaxexample)
pwid1 = "pid_p_100002_wntpathway"
mygraph1 = pathway2RegulatoryGraph(biopax, pwid1)
mygraph1 = layoutRegulatoryGraph(mygraph1)
# retrieve all nodes
nodes = nodes(mygraph1)
# random expression data for your nodes
values = rnorm(length(nodes), mean=6, sd=2)
# color nodes of the graph
mygraph1 = colorGraphNodes(mygraph1, nodes, values, colors="greenred")
# plot the now colored graph
plotRegulatoryGraph(mygraph1, layoutGraph=FALSE)
Run the code above in your browser using DataLab