[BioC] makeGOGraph internode distance
Robert Gentleman
rgentlem at fhcrc.org
Tue Nov 20 00:45:59 CET 2007
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
More information about the Bioconductor
mailing list