Root tree
Root or reroot a tree
Command identity
- Canonical command:
root_tree- Handler:
root_tree- Aliases:
root, rt
- Standalone executables:
pk_root_tree, pk_root, pk_rt
- Categories:
Tree manipulation & utilities
Runtime interface
Synopsis
phykit root_tree <tree> --root <root> [--output <output>] [--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 |
|
true |
str |
required |
any |
|
false |
str |
none |
any |
|
false |
boolean |
false |
any |
Output and errors
--json provides the command's structured JSON representation. Output-file options: --output. Invalid command syntax exits with status 2. Input
validation and scientific limitations are described in the guidance below.
Guidance, interpretation, and examples
Roots phylogeny using user-specified taxa.
A list of taxa to root the phylogeny on should be specified using the -r argument. The root_taxa file should be a single-column file with taxa names. The output file will have the same name as the input tree file but with the suffix ".rooted".
phykit root_tree <tree> -r/--root <root_taxa> [-o/--output <output_file>] [--json]
Options:
<tree>: first argument after function name should be a tree file to root
-r/--root: single column file with taxa names to root the phylogeny on
-o/--output: optional argument to specify the name of the output file
--json: optional argument to print results as JSON