GOstats: Coloring nodes in the induced GO graph
1
0
Entering edit mode
Tim Smith ★ 1.1k
@tim-smith-1532
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20071002/ c98d42b1/attachment.pl
• 637 views
ADD COMMENT
0
Entering edit mode
@deepayan-sarkar-1436
Last seen 13 months ago
United States
On 10/2/07, Tim Smith <tim_smith_666 at="" yahoo.com=""> wrote: > Hi, > > I looked at the documentation for GOstats and wanted to replicate the graph where different nodes are colored differently depending on their p-values. > > With the following code segment I can get the GO graph, but how do I color the nodes? > > ----------------------------------------------------------------- > library(Rgrahviz) > library(GOstats) > > g4 <- GOGraph(c("GO:0003680", "GO:0003701"), GOMFPARENTS) > plot(g4) > -------------------------------------------------------------------- ----------------- > > Also, is it possible to get the descriptive term (e.g.'AT binding' instead of "GO:0003680") in the graph? > Here's one way (adapting code from http://www.bioconductor.org/pub/docs/mogr/): node.attrs <- makeNodeAttrs(g4, shape="ellipse", label = substr(nodes(g4), 6, 10), fillcolor = sample(colors(), length(nodes(g4)))) plot(agopen(g4, recipEdges="distinct", layoutType="dot", nodeAttrs = node.attrs, name = "foo")) You would of course use more meaningful labels and colors in the call to makeNodeAttrs(). -Deepayan
ADD COMMENT

Login before adding your answer.

Traffic: 537 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6