Consensus tree
Consensus tree from multiple trees
Command identity
- Canonical command:
consensus_tree- Handler:
consensus_tree- Aliases:
consensus, ctree
- Standalone executables:
pk_consensus_tree, pk_consensus, pk_ctree
- Categories:
Tree comparison & consensus
Runtime interface
Synopsis
phykit consensus_tree --trees <trees> [--method <method>] [--missing-taxa <missing_taxa>] [--json]
Arguments
This table is generated from the live command parser. It is the authoritative source for accepted spellings, required arguments, types, defaults, and choices.
Argument |
Required |
Type |
Default |
Choices |
|---|---|---|---|---|
|
true |
str |
required |
any |
|
false |
str |
majority |
strict, majority |
|
false |
str |
error |
error, shared |
|
false |
boolean |
false |
any |
Output and errors
--json provides the command's structured JSON representation. Unless the guidance below states otherwise, results are emitted as command output. Invalid command syntax exits with status 2. Input
validation and scientific limitations are described in the guidance below.
Guidance, interpretation, and examples
Infer a consensus tree from a collection of trees.
Input can be either: 1) a file with one Newick tree per line, or 2) a file with one tree-file path per line.
Consensus methods:
* majority: majority-rule consensus (default)
* strict: strict consensus
Missing taxa handling:
* --missing-taxa error (default): exits if trees do not share identical tip sets
* --missing-taxa shared: prunes all trees to the intersection of taxa before inferring consensus
phykit consensus_tree -t/--trees <trees> [-m/--method strict|majority] [--missing-taxa error|shared] [--json]
Options:
-t/--trees: file containing trees (one Newick per line) or tree-file paths (one per line)
-m/--method: consensus method (strict or majority; default: majority)
--missing-taxa: handling strategy for mismatched taxa (error or shared; default: error)
--json: optional argument to print results as JSON