Skip to contents

Loose() returns the loose consensus, also known as the semi-strict or combinable-component consensus (Bremer 1990) . It contains every split that is contradicted by none of the input trees; equivalently, every split that is compatible with each input tree.

Usage

Loose(trees)

Arguments

trees

A list of trees, or a multiPhylo object; all entries must share the same leaf labels.

Value

Loose() returns the consensus tree, an object of class phylo, rooted as in the first entry of trees.

Details

The loose consensus is always at least as resolved as the strict consensus (Strict()) and never includes a grouping that conflicts with any input tree. It is incomparable with the majority-rule consensus (Majority()): a split present in most trees may still be contradicted by a minority, and so excluded from the loose consensus, whereas a split occurring in a single tree is retained if no other tree contradicts it.

This implementation ports the asymptotically efficient looseConsensusFast algorithm of (Jansson et al. 2016) from their FACT toolkit (used with permission): the input trees are merged into a one-way compatible tree by repeated linear-time consecutive-range queries, the clusters that are compatible with every input are then marked, and the rest contracted away – avoiding the explicit pairwise compatibility matrix used previously.

References

Bremer K (1990). “Combinable component consensus.” Cladistics, 6(4), 369–372. doi:10.1111/j.1096-0031.1990.tb00551.x .

Jansson J, Shen C, Sung W (2016). “Improved algorithms for constructing consensus trees.” Journal of the ACM, 63(3), 1–24. doi:10.1145/2925985 .

Examples

trees <- ape::as.phylo(0:5, 8)
Loose(trees)
#> 
#> Phylogenetic tree with 8 tips and 5 internal nodes.
#> 
#> Tip labels:
#>   t1, t2, t8, t7, t6, t5, ...
#> 
#> Rooted; no branch length.