-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description of the bug
When running TreeTools v1.13.0, I've discovered that TreeTools::Consensus() generates incorrect strict consensus trees on certain trees. I don't know the conditions of trees in which this bug occurs. This bug does not seem to occur with ape::consensus. This probably affects the analyses I have been conducting in my unpublished research, which frequently used TreeTools::ConsensusWithout().
How to reproduce the bug
Here are 4 subsampled jackknife trees of ones generated with my reduced version of the Dunn et al. (2022) dataset whose fossil taxa have been removed. Multiple topological constraints, including Staurozoa (in the trees, Calvadosia + Lucernaria + Haliclystus) and Myostaurida (in the trees, Lucernaria + Haliclystus) (Miranda et al., 2016), have been set. This is a code to reproduce the bug:
library("TreeTools")
library("ape")
trees4 <- read.tree("Trees4.trees")
par(mar = rep(0.25, 4), cex = 0.75)
cons3 <- consensus(trees4[1:3], p = 1)
plot(cons3)
Cons3 <- Consensus(trees4[1:3], p = 1)
plot(Cons3)
cons4 <- consensus(trees4, p = 1)
plot(cons4)
Cons4 <- Consensus(trees4, p = 1)
plot(Cons4)cons3, Cons3, and cons4 are correct strict consensus trees, but Cons4 is a incorrect strict consensus tree, in which the three staurozoans are unexpectedly resolved in a nonexistent polytomy.