Closed phiweger closed 6 years ago
Hello,
Indeed your tree does not contain any branch of negative length and so the error message is a bit misleading. The problem though is that there are two branches of length zero, and also at least one multifurcation. You could fix these issues using the following code:
t <- read.tree('tree.nwk')
t <- multi2di(t) # remove multifurcations
t$edge.length <- pmax(t$edge.length,1/365) # use a day as minimum branch length
ptree <- ptreeFromPhylo(t, dateLastSample=2013.3)
record <- inferTTree(ptree, dateT=2014)
Note however that the tree should be a dated tree, so the output of FastTree of raxml is not acceptable, but the output of treetime should be fine.
Thank you very much for your (ultra-quick) response -- it did work and is now happily fitting the model.
Hi,
This is my input tree in newick format:
Then I run
However, the tree does not contain negative branch lengths and the format seems to be right compared to the simulated data in the tutorial.
I tried the output from FastTree, RAXML and Treetime, all w/ the same error. What could be the cause?
Thank you!