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?
This is a bit... hacky, but I think anything requiring you to create integer branch lengths is likely to be.
#example dna object - use read.dna() to get yours in
#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.
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 ).
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.
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?