Building A Ultrametric Phylogenetic Tree With Integer Branch Length
3
1
Entering edit mode
9.5 years ago
Venky ▴ 10

Hi All,

I have been trying to use the tool CAFE 2.2: http://sites.bio.indiana.edu/~hahnlab/Software.html to look at gene family evolution. Now, the peculiar thing about CAFE 2.2 is that it asks for an ultrametric phylogenetic tree with integer branch lengths as input. I tried to just multiply my non-integer branch lengths with 100, 1000 etc to make them integer ones, but that does not seem to work with this program.

My Question: Are there any programs out there that allow you to build an ultrametric tree (UPGMA) and have the branch lengths displayed in integers?

P.S. I have tried MEGA, it does not seem to help!

Thanks

phylogenetics tree evolution • 7.3k views
3
Entering edit mode
9.5 years ago
David W 4.9k

This is a bit... hacky, but I think anything requiring you to create integer branch lengths is likely to be.

Using R:

library(ape)
library(phangorn)

#example dna object - use read.dna() to get yours in
data(woodmouse)

#count diferences between seqs, make a tree with upgma
dm <- dist.dna(woodmouse, model="N")
tr <- upgma(dm, method="complete")


That will give you the tree, but, because UPGMA will split the difference between two groups evenly when forming branch lengths any odd differences will end with a branch length ending with 0.5. If the scale of the the branch lengths isn't important (I guess not if you've been muliplying 100 or 1000) then you can just double them.

head(tr$edge.length) ##[1] 1.5 1.5 2.0 0.5 1.5 1.5 tr$edge.length = tr$edge.length * 2 head(tr$edge.length)

##[1] 3 3 4 1 3 3
write.tree(tr, "integer_brlens.tr")


note: most of the methods that can be passed to upgma will give other fractional branch lengths(i.e. not just an integer or an integer + 0.5) - you might prefer to use one of thse methods and round the resulting branches to create your final tree ).

2
Entering edit mode
9.5 years ago
Josh Herr 5.7k

Hi Venky, I have used to phytools R package to modify branch length in newick files. I think you can also do this at the command line in PhyML and then I am aware of the EEEP program which has a perl script to do this. See if any of these things work for you and let me know if I can be of any help.

0
Entering edit mode
9.5 years ago
Venky ▴ 10

Hi Josh,

I used the bmPlot command in the Phytools package, it was the only one that says that it rounds of branch lengths to integer value for simulating Brownian motion simulation. But i am unable to find if these values can be accessed. Are you talking about a specific package in Phytools?

No luck so far with the other two.

0
Entering edit mode

Hi Venky,

did you manage to build an ultrametric phylogenetic tree with integer branch lengths? I need to solve this same issue.

Thanks!