Given a fully binary phylogeny with per-node confidence scores stored in
tree$node.label, this helper collapses every internal node whose confidence
falls below conf, effectively pruning low-support clades while retaining
higher-confidence structure.
Arguments
- tree
A binary
phyloobject whosenode.labelvector stores posterior/confidence values for internal nodes.- conf
Numeric threshold in $0,1$. Internal nodes with confidence below this value are collapsed.
- collapse_trivial
Logical; if
TRUE, collapses the trivial root-adjacent singleton split (1 tip vs the rest) into a root polytomy.