Consensus trees
Inference: Consensus Trees¶
Build a majority-rule consensus tree from a set of trees that share the same tips, and visualize node supports.
In [ ]:
Copied!
import toytree
trees = [toytree.rtree.unittree(8, seed=i) for i in range(6)]
ctree = toytree.infer.get_consensus_tree(trees, min_freq=0.5)
c, a, m = ctree.draw(node_labels='support', node_sizes=12, tip_labels=True, scale_bar=True)
c
import toytree
trees = [toytree.rtree.unittree(8, seed=i) for i in range(6)]
ctree = toytree.infer.get_consensus_tree(trees, min_freq=0.5)
c, a, m = ctree.draw(node_labels='support', node_sizes=12, tip_labels=True, scale_bar=True)
c