[Bioperl-l] Nearest neighbor from newick format tree

Jason Stajich jason.stajich at duke.edu
Wed Apr 20 12:25:36 EDT 2005


Bio::TreeIO parses trees.

If you want to find the sister nodes you get the ancestor for a node 
and then look at all the children for the ancestor node.

This finds sister species in your clade (in same level)
my @sisters = grep { $node->internal_id != $_->internal_id } 
$node->ancestor->each_Descendent

You can use get_all_Descendents to do recursive grab of all nodes 
descendent from a certain node.

-jason
--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/

On Apr 20, 2005, at 12:14 PM, Goel, Manisha wrote:

> Hi,
>
> I need to parse the phylogenetic trees in newick format to get the
> nearest neighbors for a given gi.
> I havn't found any such parser in Bio::Tree module yet.
> Is something like this available in any other related Bio-Perl module ?
>
> Thanks for any suggestions.
> -Manisha
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list