Dear Evan,
> I'm writing to find out if what I am currently trying to do is possible in
> Bio::Phylo or if it will require a bit more coding. I am trying to take a
> phylogenomics approach to analyzing gene trees that include sequences from
> three plant species where each gene tree is rooted with an outgroup sequence
> (the putative ortholog). Is it possible to calculate branch lengths for
> certain taxa on a tree (each sequence identifier was a four letter code as
> prefix to denote the species)? I can calculate the total length of the tree
> (i.e., my $tree_length = $tree->calc_tree_length) and I see there is a
> method to get nodes for certain taxa, but I am having a hard time trying to
> put these methods together.
I am a bit unclear about what you are trying to achieve, but certainly
you have many options for calculating lengths of paths along a tree.
For example, if you want the path to the root for a particular tip,
you might do something like:
my $node = $tree->get_by_name($node_name);
my $length = $node->calc_path_to_root;
Is this the direction in which you are thinking?
> Any help would be greatly appreciated. Thanks for your time and for writing
> Bio::Phylo.
You're welcome! Just FYI: I have added the mailing list as a CC to my
reply so that others might take advantage of this discussion as well.
Best wishes,
Rutger
--
Dr. Rutger A. Vos
Bioinformaticist
NCB Naturalis
Visiting address: Office A109, Einsteinweg 2, 2333 CC, Leiden, the Netherlands
Mailing address: Postbus 9517, 2300 RA, Leiden, the Netherlands
http://rutgervos.blogspot.com