Collapse bipartitions

Collapse low-support bipartitions

Command identity

Canonical command:

collapse_branches

Handler:

collapse_branches

Aliases:

cb, collapse

Standalone executables:

pk_collapse_branches, pk_cb, pk_collapse

Categories:

Tree manipulation & utilities

Runtime interface

Synopsis

phykit collapse_branches <tree> --support <support> [--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

-s, --support

true

float

required

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

Collapse branches on a phylogeny according to bipartition support.

Bipartitions will be collapsed if they are less than the user specified value.

phykit collapse_branches <tree> -s/--support n [-o/--output <output_file>] [--json]

Options:
<tree>: first argument after function name should be a tree file
-s/--support: bipartitions with support less than this value will be collapsed
-o/--output: optional argument to name the outputted tree file. Default output will have the same name as the input file but with the suffix ".collapsed_(support).tre"
--json: optional argument to print results as JSON