collapse_rank
Collapse every monophyletic group at a selected taxonomic rank in a phylogenetic tree, with optional pre-coloring, to simplify rank-level views.
Instructions
Collapse all monophyletic groups at a rank (optionally auto-coloring at
a rank first) — reproduces figtreekit --collapse-rank.
Args: rank: Rank to collapse (class, phylum, ...). collapse_style: collapse | cartoon. auto_color_rank: Rank for the pre-collapse palette coloring (defaults to phylum, matching the CLI). strict: Fail when a monophyletic group cannot be collapsed. taxonomy_mapping_file: Optional taxonomy mapping table (whitelisted), for trees whose taxonomy is not embedded in tip labels.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rank | No | ||
| strict | No | ||
| run_name | No | ||
| tree_file | No | ||
| tree_content | No | ||
| collapse_style | No | collapse | |
| auto_color_rank | No | ||
| taxonomy_levels | No | ||
| taxonomy_mapping_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |