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: 52960
Status: resolved
Priority: 0/
Queue: Bio-Phylo

People
Owner: rutgeraldo [...] gmail.com
Requestors: singhal [...] berkeley.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: possible bug with prune_tips
Date: Mon, 21 Dec 2009 22:04:17 -0800
To: bug-Bio-Phylo [...] rt.cpan.org
From: Sonal Singhal <singhal [...] berkeley.edu>
using Bio-Phylo-0.17 on perl, v5.10.0 on Mac OSX Snow Leopard, 64bit starting with this: my $tree = (((cat:5,dog:5):10,cow:15):3,(human:6,chimp:6):12):4; my $forest = Bio::Phylo::IO->parse(-format => 'newick',-string => $tree); my $treeobj = $forest->first; my @taxa = ('cat','dog',); print $treeobj->prune_tips(\@taxa)->to_newick; Gives me this: ((:10.000000,cow:15.000000):3.000000,(human:6.000000,chimp:6.000000):12.000000):4.000000; Seems like the right taxa are being pruned, but their branches are not being pruned ... this is not acceptable Newick format. Is this user-error or something with the function? Thanks! Great set of modules...
Dear Sonal Singhal, thank you for reporting this issue. I have fixed it, the behaviour is now as you would expect. I am now preparing v.0.17 (you must have been using a 0.17_RC* version, right?) for upload to CPAN later today. This version includes the correct behaviour for prune_tips, and a regression test case (t/52960.t) to replicate this. Best wishes, Rutger Vos On Tue Dec 22 01:04:44 2009, singhal@berkeley.edu wrote: Show quoted text
> using Bio-Phylo-0.17 > on perl, v5.10.0 > on Mac OSX Snow Leopard, 64bit > > starting with this: > my $tree = (((cat:5,dog:5):10,cow:15):3,(human:6,chimp:6):12):4; > my $forest = Bio::Phylo::IO->parse(-format => 'newick',-string => > $tree); > my $treeobj = $forest->first; > my @taxa = ('cat','dog',); > print $treeobj->prune_tips(\@taxa)->to_newick; > > Gives me this: >
((:10.000000,cow:15.000000):3.000000,(human:6.000000,chimp:6.000 000):12.000000):4.000000; Show quoted text
> > Seems like the right taxa are being pruned, but their branches are not > being pruned ... this is not acceptable Newick format. Is this > user-error or something with the function? > > Thanks! > Great set of modules...