Rename tree tips

Rename tip labels in a tree

Command identity

Canonical command:

rename_tree_tips

Handler:

rename_tree_tips

Aliases:

rename_tips, rename_tree

Standalone executables:

pk_rename_tree_tips, pk_rename_tips, pk_rename_tree

Categories:

Tree manipulation & utilities

Runtime interface

Synopsis

phykit rename_tree_tips <tree> [--idmap <idmap>] [--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

tree

true

str

required

any

-i, --idmap

false

str

none

any

-o, --output

false

str

none

any

--json

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

Renames tips in a phylogeny.

Renaming tips will follow the scheme of a tab-delimited file wherein the first column is the current tip name and the second column is the desired tip name in the resulting phylogeny.

phykit rename_tree_tips <tree> -i/--idmap <idmap.txt> [-o/--output <output_file>] [--json]

Options:
<tree>: first argument after function name should be a tree file
-i/--idmap: identifier map of current tip names (col1) and desired tip names (col2)
-o/--output: optional argument to write the renamed tree files to. Default output will have the same name as the input file but with the suffix ".renamed"
--json: optional argument to print results as JSON