[Bioperl-l] Bio::TreeIO functions
jason.stajich at duke.edu
Mon Mar 6 17:50:25 EST 2006
On Mar 6, 2006, at 3:43 PM, Lucia Peixoto wrote:
> 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.
> $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
> 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
> Lucia Peixoto
> Department of Biology,SAS
> University of Pennsylvania
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
More information about the Bioperl-l