jesstytam / honours

0 stars 0 forks source link

ultrametric trees #48

Closed jesstytam closed 3 years ago

jesstytam commented 3 years ago

@wcornwell how do we make a non-ultrametric tree ultrametric?

jesstytam commented 3 years ago

should we use phytools::force.ultrametric?

wcornwell commented 3 years ago

which tree is it?

wcornwell commented 3 years ago

depends why it's non-ultrametric...

jesstytam commented 3 years ago

the new trees from http://vertlife.org/data/mammals/

wcornwell commented 3 years ago

hmmm they say the trees are ultrametric. I've come across this before--i think it's a bug, possibly in ape's read in function. Maybe try phytools::read.newick or phytools::force.ultrametric?

jesstytam commented 3 years ago

ok i'll try and see if it works

jesstytam commented 3 years ago

phytools::force.ultrametric is working

itchyshin commented 3 years ago

@jessicatytam - but this is not a good solution? @wcornwell - this is what I first suggested - is it the best option?

I guess it was nearly an ultrametric tree so it does not really matter if you use any methods - even in forec.ultrametric() we can use 2 different methods

wcornwell commented 3 years ago

yeah should be fine.

They've already done the dating and smoothing thing on those trees, so they should be ultrametric to start with.

Why ape isn't reading them as ultrametric is an interesting question. It could be 1) a rounding issue on the branch lengths or 2) a weird bug in ape::read.tree, and for either issue phytools::force.ultrametric should be fine.

jesstytam commented 3 years ago

solved by phytools::force.ultrametric