GGenomics UI
Components/Viewers

Phylo Tree

@genomics/phylo-tree

Rectangular phylogram from Newick.

Preview

⌘/ctrl + scroll to zoom · drag to pan · 0 to fit
H_sapiensP_troglodytesM_musculusG_gallusX_laevisD_rerioD_melanogasterC_elegansS_cerevisiaeE_coliclade · 2 taxaclade · 3 taxaclade · 4 taxaclade · 5 taxaclade · 6 taxaclade · 7 taxaclade · 8 taxaclade · 2 taxa
10 taxa

About

Parses a Newick string and lays out a rectangular cladogram, honoring branch lengths when present. Taxa are their own entity space, so it exposes onSelectLeaf — the natural hook for linking a clade back to the rows of an msa-viewer.

Usage

import { PhyloTree } from "@/components/ui/phylo-tree"

<PhyloTree
  newick="((A:0.1,B:0.2):0.3,C:0.4);"
  onSelectLeaf={(name, additive) => {}}
/>
Source: components/ui/phylo-tree.tsx