[Bioperl-l] Bio::TreeIO functions

Jason Stajich jason.stajich at duke.edu
Mon Mar 6 22:50:25 UTC 2006


On Mar 6, 2006, at 3:43 PM, Lucia Peixoto wrote:

> Hi
> I am trying to colapse nodes bellow a certain bootstrap cutoff  
> value, so I just
> work only with the most confident nodes on my trees.
> After getting the nodes bellow my cutoff (70, and with newick  
> format the
> bootstrap value is actually the _creation_id), I though that if I  
> just call

The bootstrap value is not the _creation_id, but it will be the $node- 
 >id - you shouldn't be using methods that start with _

You can move it to the bootstrap with $node->bootstrap($id) if you  
want but of course the newick format doesn't distinguish - you can  
set the flavor of your newick format bootstrap values for reading and  
writing when you init it with Bio::TreeIO.  If you use a format like  
NHX it will distinguish bootstrap from node Id although only ATV/ 
Forester will reliably read this format.

delete definitely removes a node completely to collapse nodes (and  
those remodel the parent/child relationship) you want to use the  
remove_Descendent and add_Descendent methods.

Please feel free to submit a 'collapse' function if you end up  
writing something that works.

-jason

> $tree->remove_Node($node) I will just get rid of the nodes and  
> update the
> ancestor relationships within the tree, however when I call it it  
> actually
> deletes those nodes and all its children.
> Anyone has any idea how can I just delete certain nodes so that the  
> children are
> preserved and the relationships are collpased to polytomies on the  
> confident
> nodes?
>
> thanks
>
>
> Lucia Peixoto
> Department of Biology,SAS
> University of Pennsylvania
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12





More information about the Bioperl-l mailing list