简体   繁体   中英

Normalizing a Phylogenetic Tree in R

When working with phylogenetic tree data in R (specifically when working with "phylo" or "phylo4" objects) it would be useful to normalize branch lengths so that certain taxa (the ones that evolve faster) do not contribute a disproportionate amount of branch length to the tree. This seems to be common in computing UniFrac values, as can be found in the discussion here: http://bmf2.colorado.edu/unifrac/help.psp . (I need more than just UniFrac values, however).

However, I cannot find a function that performs this normalization step. I have looked in ape, picante, adephylo, and phylobase. Could someone direct me to a package that includes this function, or a package that makes writing this kind of function straightforward?

Are you looking for a function to just scale the branch lengths of a tree? If so, compute.brlen() in ape will do it. There are built in options for Grafen's rho and all = 1. You can also supply your own function.

I don't know if UniFrac does some other kind of branch length scaling. But if so, you could write your function and pass it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM