Hi all,
I have the bizarre experience of using ape to read.nexus() and load a BEAST tree which was is.ultrametric() = TRUE at first loading, but somehow without changing anything is now is.ultrametric() = FALSE on second loading. Tree was prepared in FigTree and exported as .nexus and also as .newick to test both - same error with both. I have no explanation for how this lack of reproducibility works, but I do have an equally baffled witness! Also just to head it off: yes, the tree is ultrametric visually.
From talking to others, it sounds like this could be down to how ape loads the branch lengths and/or posteriors, where each branch length is rounded at a given decimal place such that the total length of an extant tip might be 1.0000001 for one branch and 1.0000000 for another - or something like that? So ultimately it thinks they're not equal branch lengths to tips. As I understand, this is also what force.ultrametric() is for...
Rather than force.ultrametric(), I'd prefer to just find a way to load and export the tree in FigTree such that it's guaranteed to be read as ultrametric each time. Does anyone have experience with this issue? Does anyone have any ideas? Thanks!