Sorry for how this sounds, but using data is probably the best way if your
end goal is to do phylogenetically-controlled analyses (rather than just the
focused goal on minimizing branch length differences between the two trees):
download sequences and use them to infer branch lengths, perhaps with your
fixed topology. There are various ways to do this in R (phangorn and ape
come to mind).

Another option is to use info from http://timetree.org/ : for a pair of
species, it can give you their divergence time based on published estimates.
I don't know of anything that automates this process. [Note: it would be
fairly easy to write an R script to do this given TimeTree's RESTful
interface, but it probably violates TimeTree's terms of use, so I would talk
to that site's authors first. It'd be darn useful, if it is allowed.]

Finally, you can use some approaches that are supposed to create an
ultrametric tree while minimizing changes in evolutionary rate over the tree
(which will have the effect of tending to minimize changes in relative
branch lengths, though it is not exactly the same as doing this -- if the
way to have most similar branch lengths is to have evolutionary rates
changing radically on a few branches, something like penalized likelihood
will instead prefer a tree that implies rates changing more gradually across
several branches). See chronopl and chronoMPL in ape for such
implementations.

Hope this helps,
Brian


On Wed, Feb 9, 2011 at 2:16 PM, Scott Chamberlain
<myrmecocys...@gmail.com>wrote:

> Dear R users,
>
>
> I am curious the best way to ultrametricize a tree to retain the relative
> branch lengths among species. For example, in the below code I the table
> pairwisedists shows that the branch length distances differ between the
> non-ultrametric tree and the ultrametric tree. That is, distances between
> species A and B and A and C are the same in one tree, but in the other tree
> they are different. I want to use pairwise distances among each species pair
> for phylogenetically controlled analyses, but I am not sure which method is
> best for ultrametricizing trees.
>
>
>
> library(ape)
> library(reshape2)
>
> tree <- read.tree(text =
> "((Apis_mellifera:2,(Aedes_aegypti:1,(Drosophila_melanogaster:1,Oxyna_parietina:1):0.5):0.5):1,(((Homo_sapiens:2.5,(Lepus_europaeus:1,Mus_musculus:1):2):0.25,(((Gazella_dama:1,Gazella_dorcas:1):0.5,Odocoileus_virginanus:1):0.5,Equus_caballus:1):1):0.25,((Gambusia_holbrooki:1,Hoplosthethus_atlanticus:1):1,(((Oncorhynchus_mykiss:2,Oncorhynchus_clarki:2,Oncorhynchus_gorbuscha:2,Oncorhynchus_keta:2):1,Salvelinus_fontinalis:1):1,(Salmo_trutta:1,Salmo_salar:1):1):1):1):1):1;")
>
> tree2 <- compute.brlen(tree, method = "Grafen")
>
> # I used the 64 bit version, but in the 32 bit version the by column names
> are Var1 and Var2 for some reason
> pairwisedists <- merge(melt(cophenetic(tree)), melt(cophenetic(tree2)), by
> = c("X1", "X2"))
>
>
>
>
> Sincerely,
>
> Scott Chamberlain
> Rice University, EEB Dept.
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to