Skip to content

[BUG] TreeTools::Consensus() unexpectedly generates incorrect strict consensus trees, unlike ape::consensus #168

@HS6986

Description

@HS6986

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions