makeGOGraph internode distance
1
0
Entering edit mode
Loren Engrav ★ 1.0k
@loren-engrav-2040
Last seen 10.2 years ago
Greetings Newbie using MacOS10.4.10 R version 2.6.0 Patched (2007-11-09 r43408) Gostats 2.4.0 RGraphviz 1.16.0 Xcode X11 1.1.3 - XFree86 4.4.0 I want to make an induced GO tree from 1019 genes so I did > x <- scan(file="GeneIDsToBioconductor2.txt", sep=",") Read 1019 items > xc <- as.character(x) > xctree <- makeGOGraph(xc, Ontology="BP", removeRoot=FALSE) Then I did > plot (xctree) And it produces the tree but 1) the nodes are so close together that the GO term labels overlap, I moved them around with Illustrator but that was painful and we have several more trees to do, and 2) it produced bizillions of warnings like 1: In arrows(head_from[1], head_from[2], head_to[1], head_to[2], ... : zero-length arrow is of indeterminate angle and so skipped Then I did > plot (xctree, attrs=list(node=list(shape="box", nodesep=1))) This yielded only 2 warnings 1: In arrows(head_from[1], head_from[2], head_to[1], head_to[2], col = edgeColor, : zero-length arrow is of indeterminate angle and so skipped But the tree has not changed, still overlapping node labels three questions please 1) are the warnings related to content and I need worry about them or are they just graphical and I need not 2) is there a way to spread out the nodes to prevent label overlap 3) if the process cut warnings to 2, why no change in the graph Thank you Loren Engrav, MD Univ Washington Seattle
GO PROcess GO PROcess • 1.4k views
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.6 years ago
United States
Hi, Loren Engrav wrote: > Greetings > > Newbie using MacOS10.4.10 > R version 2.6.0 Patched (2007-11-09 r43408) > Gostats 2.4.0 > RGraphviz 1.16.0 > Xcode X11 1.1.3 - XFree86 4.4.0 please read the posting guide and use sessionInfo etc for reporting this sort of information > > I want to make an induced GO tree from 1019 genes so I did > >> x <- scan(file="GeneIDsToBioconductor2.txt", sep=",") > Read 1019 items >> xc <- as.character(x) >> xctree <- makeGOGraph(xc, Ontology="BP", removeRoot=FALSE) > > Then I did >> plot (xctree) > > And it produces the tree but > 1) the nodes are so close together that the GO term labels overlap, I moved > them around with Illustrator but that was painful and we have several more > trees to do, and > 2) it produced bizillions of warnings like > 1: In arrows(head_from[1], head_from[2], head_to[1], head_to[2], ... : > zero-length arrow is of indeterminate angle and so skipped > you probably have more nodes than you can easily render on the available plotting device. You could make it larger (and possibly look for a really big printer), or plot different parts of the graph separately. None of these warnings are of any consequence and mean just what they say. > Then I did >> plot (xctree, attrs=list(node=list(shape="box", nodesep=1))) > > This yielded only 2 warnings > 1: In arrows(head_from[1], head_from[2], head_to[1], head_to[2], col = > edgeColor, : zero-length arrow is of indeterminate angle and so skipped > > But the tree has not changed, still overlapping node labels > Clearly untrue. What may or may not be true is what you see looks the same, but even then, given that you have hundreds (at least) of nodes, how would you know? Graph layout is still an art, not a science, so you will need to manipulate the graph and try a number of different approaches to get what you want. It is unlikely that printing of long labels for lots of nodes will work well. You should read the Rgraphviz vignette, for some ideas (the one for devel is very different, as we have recently changed much of the interface). You may find that you would rather use graphviz directly (and it has lots of documentation). You could investigate the use of the imageMap function (geneplotter) which allows you to produce an HTML output with tooltips. That is sometimes a reasonable approach. best wishes Robert > three questions please > 1) are the warnings related to content and I need worry about them or are > they just graphical and I need not > 2) is there a way to spread out the nodes to prevent label overlap > 3) if the process cut warnings to 2, why no change in the graph > > Thank you > > Loren Engrav, MD > Univ Washington > Seattle > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
ADD COMMENT
0
Entering edit mode
Thank you I am learning two things, how to use R/Bioconductor and how to do the email Bear with me please, I will learn both David Bodanis in E=mc^2 when discussing geezers doing research said, geezers may have good ideas, that is not the problem, their problem is that they are afraid to take risk, entering the R/Bioconductor email fray demonstrates that I can take risk And I may have a work around that is better than any solution Save graph as postscript Open in Illustrator Scale 400% Rotate labels 45 degrees Set font to 6point And voila, a nice big induced GO tree Never mind if I will ever understand the tree, it is the process, not the result But as for the problem >you probably have more nodes than you can easily render on the available plotting device True length(go2tree.leaves) returned 428 nodes >You could make it larger I have tried this, but failed, am sorry Like I tried > par (pin = c(100,100)) > plot (xctree) It say Error in plot.new() : plot region too large So I try > par (pin = c(50,50)) > plot (xctree) It say Error in plot.new() : plot region too large Etc, etc, etc Till I choose > par (pin = c(10,10)) Which is pretty much where I started So I clearly do not know how to make it larger, am sorry > how would you know that the tree has changed? Open them in Illustrator at 400% scale and I cannot see significant difference >You should read the Rgraphviz vignette I have read that so much that I have almost memorized it, but I could not make it solve this problem, am sorry >You may find that you would rather use graphviz >You could investigate the use of the imageMap function (geneplotter) True but, I think the combo of makeGOGraph (from genes) and xctree.leaves [1:428] and GOGraph (from leaves trimmed of junk) and Illustrator is extremely powerful to make a big GO tree, is in fact pawerful enough, again never mind if I ever understand the biology, it is process not result I see you wrote both, cool, you might add to the documentation something about large trees and to finish the study for LARGE trees the user might do makeGOGraph, get the nodes, cull the junk, plot them up with GOGraph, and load them up into Illustrator to wrap it up which I will now do for MF Thank you Loren Engrav, MD Univ Washington
ADD REPLY
0
Entering edit mode
Continue to use MakeGOGraph and GOGraph and Illustrator for GO tree with 350 nodes and the problem of overlapping labels seems solved with postscript("file.ps", width = 100.0, height = 100.0, paper="special"); plot (xctree); dev.off() as suggested by thatsanicehatyouhave at mac.com, thank you This makes the system of makeGOGraph -> GOGraph -> Illustrator/Acrobat even better for large trees > From: Loren Engrav <engrav at="" u.washington.edu=""> > Date: Mon, 19 Nov 2007 19:50:53 -0800 > To: <bioconductor at="" stat.math.ethz.ch=""> > Conversation: [BioC] makeGOGraph internode distance > Subject: Re: [BioC] makeGOGraph internode distance > > Thank you > > I am learning two things, how to use R/Bioconductor and how to do the email > Bear with me please, I will learn both > > David Bodanis in E=mc^2 when discussing geezers doing research said, geezers > may have good ideas, that is not the problem, their problem is that they are > afraid to take risk, entering the R/Bioconductor email fray demonstrates > that I can take risk > > And I may have a work around that is better than any solution > > Save graph as postscript > Open in Illustrator > Scale 400% > Rotate labels 45 degrees > Set font to 6point > And voila, a nice big induced GO tree > Never mind if I will ever understand the tree, it is the process, not the > result > > But as for the problem > >> you probably have more nodes than you can easily render on the available > plotting device > > True > length(go2tree.leaves) returned 428 nodes > >> You could make it larger > > I have tried this, but failed, am sorry > Like I tried >> par (pin = c(100,100)) >> plot (xctree) > It say Error in plot.new() : plot region too large > So I try >> par (pin = c(50,50)) >> plot (xctree) > It say Error in plot.new() : plot region too large > Etc, etc, etc > Till I choose > par (pin = c(10,10)) > Which is pretty much where I started > So I clearly do not know how to make it larger, am sorry > >> how would you know that the tree has changed? > Open them in Illustrator at 400% scale and I cannot see significant > difference > >> You should read the Rgraphviz vignette > I have read that so much that I have almost memorized it, but I could not > make it solve this problem, am sorry > >> You may find that you would rather use graphviz >> You could investigate the use of the imageMap function (geneplotter) > > True but, I think the combo of makeGOGraph (from genes) and xctree.leaves > [1:428] and GOGraph (from leaves trimmed of junk) and Illustrator is > extremely powerful to make a big GO tree, is in fact pawerful enough, again > never mind if I ever understand the biology, it is process not result > > I see you wrote both, cool, you might add to the documentation something > about large trees and to finish the study for LARGE trees the user might do > makeGOGraph, get the nodes, cull the junk, plot them up with GOGraph, and > load them up into Illustrator to wrap it up > > which I will now do for MF > > Thank you > > Loren Engrav, MD > Univ Washington > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY

Login before adding your answer.

Traffic: 532 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