After midpoint rooting a tree, ggtree failes, with the getRoot function reporting 'multiple roots founded'. However, getRoot only returns one root when it is called on the tree passed to the plotting function.
require(ape)
require(phangorn)
require(ggtree)
x<-rtree(10) # a random tree
getRoot(x) # correctly returns
ggtree(x) # succeeds
y<-midpoint(x) # phangorn midpoint rooting function
getRoot(y) # succeeds, returning one root
ggtree(y) # fails, reporting 'error in getRoot(tr) multiple roots founded (I think this should read 'found')
I'm lost as to why this should be
- Any suggestions?
Thank you
David