consensus_tree
piqtree.consensus_tree(trees, *, min_support=0.5, support_aggregate='mean')
Build a consensus tree, defaults to majority-rule consensus tree.
The min_support parameter represents the proportion of trees a clade must appear in to be in the resulting consensus tree.
If min_support is 1.0, computes the strict consensus tree. If min_support is 0.0, computes the extended majority-rule consensus tree.
By default the input trees' own support values are transferred onto matching consensus clades.
| PARAMETER | DESCRIPTION |
|---|---|
trees
|
The trees to form a consensus tree from.
TYPE:
|
min_support
|
The minimum support for a clade to appear in the consensus tree, by default 0.5.
TYPE:
|
support_aggregate
|
How to combine the input trees' support for a shared clade. One of "mean" (default), "max", "min". If None, the consensus' own clade-frequency support is kept and the input support ignored.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PhyloNode
|
The constructed consensus tree. |
Source code in src/piqtree/iqtree/_tree.py
Usage
For usage, see "Construct a consensus tree from a collection of trees".