Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Bio-Phylo CPAN distribution.

Report information
The Basics
Id: 41088
Status: resolved
Priority: 0/
Queue: Bio-Phylo

People
Owner: rutgeraldo [...] gmail.com
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.17_RC6
Fixed in: (no value)



Subject: Large time discrepency between the clado and phylo mode in Treedrawer
Hi Rutger, I noticed that drawing trees using the clado mode instead of the phylo mode took much longer. This is not very noticeable for small tree, but the difference grows exponentially with larger trees. Attached is a test tree file and a script to time its drawing. At first I got results such as: Drawing the tree in PHYLO mode 1 times took 9 wallclock secs ( 9.21 usr + 0.00 sys = 9.21 CPU) Drawing the tree in CLADO mode 1 times took 168 wallclock secs (162.56 usr + 0.19 sys = 162.75 CPU) After modifying some code in Treedrawer.pm (attached), the time for drawing cladograms is much reduced: Drawing the tree in PHYLO mode 10 times took 47 wallclock secs (46.08 usr + 0.02 sys = 46.10 CPU) Drawing the tree in CLADO mode 10 times took 53 wallclock secs (51.84 usr + 0.06 sys = 51.90 CPU) Could you include these updates in your module Rutger? Thanks!
Subject: itol_newick.tre
Download itol_newick.tre
application/octet-stream 11.6k

Message body not shown because it is not plain text.

Subject: Treedrawer_updated.pm

Message body is not shown because it is too large.

Subject: phylo_clado_time.pl
use warnings; use strict; use Benchmark qw(:all); use Bio::Phylo::IO 'parse'; use Bio::Phylo::Treedrawer; # Read tree data my $file = 'itol_newick.tre'; my $tree = parse( -format => 'newick', -file => $file )->first; # Create SVG tree string my $treedrawer = Bio::Phylo::Treedrawer->new( -width => 800, -height => 600, -shape => 'CURVY', -format => 'SVG' ); my $nof_reps = 10; for my $mode ('PHYLO', 'CLADO') { $treedrawer->set_mode($mode); $treedrawer->set_tree($tree); my $start = new Benchmark; for my $i (0..$nof_reps-1) { my $svg_tree = $treedrawer->draw; } my $end = new Benchmark; my $time = timestr(timediff($end, $start)); print "Drawing the tree in $mode mode $nof_reps times took $time\n"; }
I have tried version 0.17 RC8. This bug is still valid in 017 RC8. Using the benchmark of Bug #43821, it took my machine ~50 seconds to draw a tree in 'phylo' mode, but ~18 minutes in 'clado' mode.
Dear Florent, thank for reporting this, and for doing it in such a detailed way. Also thanks for your patience, I know this bug has been languishing for far too long. I have just uploaded Bio::Phylo version 0.21, which fixes the issue. I actually did an implementation different from what you've suggested - one that I think is even more efficient. If you're still interested in the treedrawer, please have a look to see if this meets your approval. Thanks! Best wishes, Rutger
Dear Florent, thank for reporting this, and for doing it in such a detailed way. Also thanks for your patience, I know this bug has been languishing for far too long. I have just uploaded Bio::Phylo version 0.21, which fixes the issue. I actually did an implementation different from what you've suggested - one that I think is even more efficient. If you're still interested in the treedrawer, please have a look to see if this meets your approval. Thanks! Best wishes, Rutger
Subject: Re: [rt.cpan.org #41088] Large time discrepency between the clado and phylo mode in Treedrawer
Date: Tue, 09 Mar 2010 11:45:06 +1000
To: bug-Bio-Phylo [...] rt.cpan.org
From: Florent Angly <florent.angly [...] gmail.com>
Hi Rutger, Thanks for fixing the bug! This is great that you found the time to release a new version of Bio::Phylo. I will try this, and as usual, tell you if I have any issues. Cheers, Florent PS/ In case you're interested in knowing what people your Bio::Phylo for, that's what I did: http://sourceforge.net/projects/gaas/ http://dx.doi.org/10.1371/journal.pcbi.1000593 On 09/03/10 03:50, Rutger Vos via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=41088> > > Dear Florent, > > thank for reporting this, and for doing it in such a detailed way. Also thanks for your > patience, I know this bug has been languishing for far too long. I have just uploaded > Bio::Phylo version 0.21, which fixes the issue. I actually did an implementation different > from what you've suggested - one that I think is even more efficient. If you're still > interested in the treedrawer, please have a look to see if this meets your approval. > Thanks! > > Best wishes, > > Rutger >
Hi Florent, thanks for those links! I'm very interested to find out what people are using Bio::Phylo for so that was great. Cool research! I haven't changed anything that could negatively affect GAAS, but now that I've seen it I'll know to ensure that it'll keep working as intended. In the meantime, once you've done your testing, you might consider changing the required version number from 0.17_RC9 to 0.21. If you have any other suggestions/requests/bugs, please let me know as I'm happy to help out and make Bio::Phylo more useful. Also, would you mind at all writing a brief review on the CPAN reviews page? I'm sure other people considering whether to install would like to know how you are using it "in the wild". Thanks! Best wishes, Rutger p.s. If you want to respond to this message about anything other than the specific bug 41088, would you mind using my email address (rutgeraldo@gmail.com). This way I know that the ticket is closed :)