Question: Building A Ultrametric Phylogenetic Tree With Integer Branch Length
1
gravatar for Venky
4.4 years ago by
Venky10
Venky10 wrote:

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 evolution tree • 3.6k views
ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by Venky10
3
gravatar for David W
4.4 years ago by
David W4.6k
New Zealand
David W4.6k wrote:

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 ).

ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by David W4.6k
2
gravatar for Josh Herr
4.4 years ago by
Josh Herr5.4k
University of Nebraska
Josh Herr5.4k wrote:

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.

ADD COMMENTlink written 4.4 years ago by Josh Herr5.4k
0
gravatar for Venky
4.4 years ago by
Venky10
Venky10 wrote:

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.

ADD COMMENTlink written 4.4 years ago by Venky10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1154 users visited in the last hour