bio-phylo-tree-visualization

Installation
SKILL.md

Version Compatibility

Reference examples tested with: BioPython 1.83+, matplotlib 3.8+. Rich-figure alternatives: ggtree 3.12+ / treeio 1.28+ / ggtreeExtra 1.14+ (Bioconductor), ete4 4.x (Python), iTOL v6 (web), FigTree (desktop).

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show biopython then help(Phylo.draw) to check signatures
  • R: packageVersion('ggtree') then ?ggtree to verify layout and geom arguments

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Bio.Phylo draw() renders rectangular layouts only and parses no BEAST/MrBayes annotation block; circular/fan/unrooted layouts and HPD bars require ggtree, ETE4, or iTOL. The ETE3->ETE4 migration changed APIs; introspect rather than assume ETE3 signatures.

Tree Visualization -- A Figure Is an Argument

"Draw and export my tree figure" -> Render a topology under a chosen layout and branch-length encoding, decide which support to show and how to label it, and export in a format that survives print.

  • Python quick look: Phylo.draw(tree, axes=ax) (Bio.Phylo + matplotlib)
  • Publication with metadata, rich support, or BEAST HPD bars: ggtree + treeio (R)
Installs
3
GitHub Stars
1.2K
First Seen
Jan 24, 2026