PhyloLens is a VS Code extension focused on viewing phylogenetic trees across multiple common formats.
This project was developed with significant assistance from a large language model (GPT-5 / Codex).
- Adds an
Open Tree Viewerbutton in the editor title for supported tree files. - Adds
Open Tree Viewerto Explorer right-click for supported tree files. - Opens a dedicated tree viewer panel beside your text editor.
- Adds a keyboard shortcut:
Ctrl+Alt+P(Cmd+Alt+Pon macOS). - Tree/source sync: click node/branch in viewer -> reveal source in editor.
- Tree/source sync: move cursor in editor -> highlight corresponding node in viewer.
Where to find the Open Tree Viewer icon in the editor title area.
Main viewer layout with title row, controls, and status badges.
Radial layout variants and branch-length display.
Tree edit actions (rooting, unrooting, swap, collapse).
Search workflow (Prev/Next/Clear) and image export controls.
Compact menu mode used on smaller screens.
.nwk.newick.tree.tre.treefile.nex.nexus.phyloxml.xml(PhyloXML content).nexml
- Layouts:
Rectangular (lengths),Rectangular (equal),Radial (lengths, curved),Radial (lengths, straight),Radial (equal, curved),Radial (equal, straight). - Zoom and pan with
+,-, mouse wheel, and drag. Fitview control (centers/fits tree with overlays visible).- Scale indicator badge + optional scale bar in-canvas.
- Display toggles include branch lengths, scale bar, tip/internal labels, and node shapes.
- Selection-aware actions: root on selected branch, unroot, swap selected node child order, collapse/expand selected clade.
- Global undo (
Ctrl+Z/Cmd+Z) for tree edits and view changes, plus revert-to-original. - Save edited tree via
Save As...format dropdown in Newick/NEXUS/PhyloXML/NeXML. - Export rendered tree to
SVGorPNG. - Search taxon/node labels with
Prev/Next,Clear, and a match counter. - Branch hover details (length and descendant tip count).
- Rooted layouts render a short ancestral stem at the root.
- Large-tree guardrails:
- auto-disable expensive overlays for large trees
- auto-collapse very large trees to an overview
- optional
Safe modeprompt for extremely large trees
Title row badges show:
- source format
- edit sync status vs loaded source file
Bottom status strip badges show:
- rooted/unrooted
- bifurcating/non-bifurcating
- ultrametric/not ultrametric
- scale value
- performance (parse/render timing)
npm install
npm run compilePress F5 in VS Code to launch the Extension Development Host.
- See
CHANGELOG.mdfor release history and notable changes.
All example trees now live under examples/.
Small/base examples:
examples/comments.nwkexamples/sample.nexmlexamples/sample.nexusexamples/sample.nwkexamples/sample.phyloxmlexamples/sample.rooted.nwkexamples/polytomy.rooted.nwkexamples/polytomy.unrooted.nwkexamples/polytomy.unrooted.internal.nwkexamples/polytomy.sample.nexusexamples/ultrametric.nwk
Polytomy note:
- In unrooted mode, the required 3-way display root is not treated as a polytomy.
examples/polytomy.unrooted.nwkshows a top-level unrooted polytomy.examples/polytomy.unrooted.internal.nwkshows a clearly internal unrooted polytomy.
Rich metadata examples:
examples/rich.nexmlexamples/rich.nexusexamples/rich.phyloxml
Large examples:
examples/large.nexmlexamples/large.nexusexamples/large.nwkexamples/large.phyloxml





