[Bioperl-l] graphing trees

Sean Davis sdavis2 at mail.nih.gov
Fri Nov 5 09:03:13 EST 2004

On Nov 5, 2004, at 8:50 AM, Guillaume Rousse wrote:

> Sean Davis wrote:
>> On Nov 5, 2004, at 7:53 AM, Guillaume Rousse wrote:
>>> Jason Stajich wrote:
>>>> On Nov 3, 2004, at 8:39 AM, Guillaume Rousse wrote:
>>>>> Hello.
>>>>> I have large trees to graph, the same way as phylogenetic trees 
>>>>> are usually drawn, with edges length expressing distances between 
>>>>> nodes.
>>>> Bio::TreeIO::svggraph generates SVG.
>>> Seems the most interesting right now.
>>> Actually, I currently build my tree by first computing a distance 
>>> matrix from my raw data, passing it to the Algorithm-Cluster module, 
>>> and building nodes from its ouput. So the most logical way would be 
>>> to implement a new Bio::TreeIO::cluster module, constructing a 
>>> Bio::Tree object from this output, and using Bio::TreeIO::svggraph 
>>> to output my graph. Would such piece of code eventually interest 
>>> bioperl maintainers ?
>>> Alternatively, if there was a way to construct the nodes list from 
>>> the matrix distance directly in BioPerl, so as to bypass 
>>> Algorithm-Cluster, I could also get interested. I am just effraid 
>>> that with a 3000 x 3000 matrix, a pure-perl implementation of the 
>>> clustering could have perfs issues.
>> Have you thought using R for the calculations/display?  If you have 
>> that much data, it might be worthwhile working with it in a 
>> computation environment.
> Is R usable from a perl program, and not in interactive way only ? And 
> this would only be a replacement for Algorithm-Cluster, which works 
> quite well (it is a wrapper around a C library), that wouldn't get me 
> rid of the task of building the Bio::Tree Object manually. I was just 
> asking if a clustering algorithm was available from bioperl itself.

As for what R can do, you can look at and do a search on the page for 
"phylo" or something like that....


As for combining with perl, there is RSperl that is fairly complex (I 
haven't gotten it to build).  There is also statistics-R 
(http://search.cpan.org/~gmpassos/Statistics-R-0.02/).  Folks have used 
R with 2-way pipes.  Finally, you can just use system calls to run R in 
batch mode (from perl, create a script file, run R->save results, read 

Let me say that I have not used R for phylogenetics of any kind, but I 
do use it for microarray data, etc. and find it a very nice addition to 
my own toolbox, even for perl-like data manipulation.


More information about the Bioperl-l mailing list