[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVNN6853E3B16TF496YPME":3,"skill-same:01M7CVNN6853E3B16TF496YPME":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":46},"01M7CVNN6853E3B16TF496YPME","bio-phylo-tree-visualization",null,"Draw and export phylogenetic trees with Bio.Phylo plus matplotlib, and route rich figures to ggtree, ETE4, or iTOL. Covers why a tree figure is an argument not a neutral picture, the cladogram-vs-phylogram-vs-chronogram choice that hides or reveals rate and time, how ladderization manufactures a false arrow of progress, why an unlabeled support number always flatters the result (bootstrap vs posterior vs SH-aLRT vs UFBoot are different scales), why Bio.Phylo silently drops BEAST HPD bars so annotated Bayesian trees must go through treeio plus ggtree, and the tip-count and raster-vs-vector thresholds for legible publication figures. Use when drawing a tree, choosing a layout, coloring branches, showing or labeling support, exporting vector figures, or deciding a drawing tool. Routes annotation-preserving reads to tree-io, and rooting and ladderizing to tree-manipulation.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-phylo-tree-visualization\ndescription: Draw and export phylogenetic trees with Bio.Phylo plus matplotlib, and route rich figures to ggtree, ETE4, or iTOL. Covers why a tree figure is an argument not a neutral picture, the cladogram-vs-phylogram-vs-chronogram choice that hides or reveals rate and time, how ladderization manufactures a false arrow of progress, why an unlabeled support number always flatters the result (bootstrap vs posterior vs SH-aLRT vs UFBoot are different scales), why Bio.Phylo silently drops BEAST HPD bars so annotated Bayesian trees must go through treeio plus ggtree, and the tip-count and raster-vs-vector thresholds for legible publication figures. Use when drawing a tree, choosing a layout, coloring branches, showing or labeling support, exporting vector figures, or deciding a drawing tool. Routes annotation-preserving reads to tree-io, and rooting and ladderizing to tree-manipulation.\ntool_type: python\nprimary_tool: Bio.Phylo\ngoal_approach_exempt: true\n---\n\n## Version Compatibility\n\nReference examples tested with: BioPython 1.83+, matplotlib 3.8+. Rich-figure alternatives: ggtree 3.12+ \u002F treeio 1.28+ \u002F ggtreeExtra 1.14+ (Bioconductor), ete4 4.x (Python), iTOL v6 (web), FigTree (desktop).\n\nggtree 3.14.0 with ggplot2 4.0.3 (checked 2026-09): rectangular, circular and fan layouts and `geom_range` work; `slanted`, `equal_angle`, `daylight` and `ape` layouts, `geom_tiplab(align = TRUE)` and `gheatmap()` fail (`could not find function \"is.waive\"`, `@mapping must be \u003Cggplot2::mapping>`). Fallbacks: `ape::plot.phylo(type = 'unrooted')` for unrooted views, `ggtreeExtra::geom_fruit` instead of `gheatmap`, or pin ggplot2 \u003C 4. ETE4 did not build from pip on Windows \u002F Python 3.12; ete3 renders headlessly only with PyQt5 and `QT_QPA_PLATFORM=offscreen` and then drew no tip text -- prefer ggtree for headless CI figures.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show biopython` then `help(Phylo.draw)` to check signatures\n- R: `packageVersion('ggtree')` then `?ggtree` to verify layout and geom arguments\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nBio.Phylo `draw()` renders rectangular layouts only and parses no BEAST\u002FMrBayes annotation block; circular\u002Ffan\u002Funrooted layouts and HPD bars require ggtree, ETE4, or iTOL. The ETE3->ETE4 migration changed APIs; introspect rather than assume ETE3 signatures.\n\n# Tree Visualization -- A Figure Is an Argument\n\n**\"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.\n- Python quick look: `Phylo.draw(tree, axes=ax)` (Bio.Phylo + matplotlib)\n- Publication with metadata, rich support, or BEAST HPD bars: ggtree + treeio (R)\n\nScope: drawing, styling, annotating, and exporting tree figures, and choosing the drawing tool. Reading\u002Fconverting files and preserving `[&...]` annotations before plotting -> tree-io. Rooting, ladderizing, pruning, collapsing low-support nodes -> tree-manipulation. ggplot2 grammar, themes, and `ggsave` underlying ggtree -> data-visualization\u002Fggplot2-fundamentals. Composing a tree plus aligned panels into one figure -> data-visualization\u002Fmultipanel-figures.\n\n## The Single Most Important Modern Insight\n\nA phylogenetic tree figure is a rhetorical and modeling artifact, not a neutral picture of the data. A Newick or Nexus file encodes a topology, optionally branch lengths, optionally one node label; it does NOT encode which child is drawn on top, whether the horizontal axis means evolutionary distance or just nesting depth, where the root sits, the aspect ratio, or which of several support measures a bare \"95\" refers to. Every one of those is supplied by the person drawing the tree, so the figure is the data filtered through a dozen interpretive choices the reader cannot see. Four argument-level decisions dominate, and the same file can be drawn to tell mutually contradictory stories that are all technically correct renderings of one topology:\n\n1. **The geometry is a claim about what the lengths mean.** A cladogram asserts only nesting; a phylogram asserts nesting plus amount of change (substitutions per site); a chronogram asserts timing and demands a clock model plus calibrations. Drawing a phylogram as a cladogram erases rate variation, the very signal that flags long-branch attraction; drawing untrusted branch lengths as a phylogram fabricates a quantitative claim.\n2. **Ladderization implies a directionality that is not there.** Sibling subclades are unordered, so any node rotation is the same tree, but the eye reads top-to-bottom ordering as a march of progress toward the bottom-most tip. Rotation can also bury non-monophyly: a paraphyletic group can be rotated to look contiguous, or a clean clade made to look scattered.\n3. **Which support is shown, and whether it is labeled, changes the conclusion.** Support is not accuracy, and the measures are not interchangeable: a posterior of 0.95 is generally weaker evidence than a bootstrap of 95 for the same data, and UFBoot 95, SH-aLRT 80, and TBE live on different scales. A bare integer with no legend is the quietest lie because the reader assumes bootstrap and the ambiguity always flatters the result.\n4. **The drawing tool is decided by the I\u002FO layer, not the surrounding language.** If the tree carries BEAST\u002FMrBayes HPD intervals and posteriors, only a tool whose data model can carry those annotations (treeio + ggtree) can plot them; Bio.Phylo flattens the tree to topology + length + one label and silently drops the uncertainty that was the result.\n\nThe skill's job is to make these choices conscious and DECLARE them in the caption, not to default into them. Default ladderization plus cladogram-ish rendering plus unlabeled nodes is the path of least resistance, and it is an argument the user did not intend to make.\n\n## Tool Taxonomy\n\nThe central decision is which drawing tool to reach for, and it is coupled to the I\u002FO decision: a tool that flattens the tree to topology plus one label cannot draw BEAST HPD bars or posteriors it cannot represent. The plotting path through treeio + ggtree is the same I\u002FO choice made in tree-io.\n\n| Tool (lang) | Citation | Layouts and annotation power | When to choose |\n|-------------|----------|------------------------------|----------------|\n| Bio.Phylo + matplotlib (Py) | Talevich 2012 | rectangular phylogram\u002Fcladogram only; one label per node via `label_func`\u002F`branch_labels`; no circular\u002Funrooted, no BEAST-block parse | a fast scripted look inside a Python pipeline; headless\u002FCI rendering of simple trees; NOT publication figures with metadata or HPD bars |\n| ggtree + treeio + ggtreeExtra (R) | Yu 2017; Wang 2020; Xu 2021 | rectangular, slanted, circular, fan, radial\u002Funrooted; `%\u003C+%` attaches a data.frame, `geom_tiplab`\u002F`geom_nodelab`\u002F`geom_cladelab`, `gheatmap`, `geom_facet` (Cartesian) or `geom_fruit` rings (circular); treeio reads BEAST\u002FMrBayes\u002FIQ-TREE so HPD bars and posterior plot directly | the publication standard whenever a figure integrates metadata, rich\u002Fdual support, HPD bars, or aligned panels; the only clean path for BEAST HPD bars and posterior |\n| ETE4 (Py; ETE3 paper) | Huerta-Cepas 2016 | rectangular and circular; programmatic per-node `NodeStyle`\u002Ffaces and layout functions; integrated NCBI taxonomy | styling thousands of nodes by rule, taxonomy-driven annotation, or rendering many trees headlessly in Python |\n| iTOL v6 (web) | Letunic 2024 | rectangular, circular, unrooted, very large trees; tab-delimited dataset templates for color strips, heatmaps, bars, binary symbols, clade collapse; SVG\u002FPDF\u002FPNG\u002FEPS export | large trees and template-based metadata with no code; collaborative web-driven polished figures |\n| FigTree (desktop GUI) | Rambaut (software) | rectangular, polar, radial; reads BEAST NEXUS node annotations to display HPD bars and posterior on screen; manual rotate\u002Fcollapse\u002Fcolor | interactive inspection of a single BEAST\u002FMrBayes tree before scripting the final figure; not reproducible, use for exploration not the pipeline |\n\nDecision rule: large tree or no-code web annotation -> iTOL v6. Publication figure with metadata, dual support, HPD bars, or aligned heatmaps -> ggtree + treeio (+ ggtreeExtra for circular rings). Programmatic styling of thousands of nodes or NCBI-taxonomy annotation -> ETE4. Fast topology look from a Python script -> Bio.Phylo. Interactive rooting\u002Finspection of one BEAST tree -> FigTree, then move the reproducible figure to ggtree. The recurring mistake is defaulting to Bio.Phylo because the pipeline is Python, then discovering it cannot draw a circular layout, place a heatmap, or show the BEAST HPD bars that are the whole point.\n\n## What Each Layout Reveals and Hides\n\n| Layout | Reveals | Hides or distorts | Good for | Bad for |\n|--------|---------|-------------------|----------|---------|\n| Rectangular phylogram | branch lengths read directly off a linear axis; honest distance comparison | tip labels overplot past a few hundred tips; uses vertical space | the default when length matters and tip count is moderate (\u003C~150) | very large trees |\n| Slanted \u002F triangular | compactness; quick topology read | the diagonal implies a ladder\u002Fprogression; imprecise length reading | quick schematic topology views | precise branch-length comparison |\n| Circular \u002F fan | hundreds to thousands of tips in one panel; metadata rings | radial distortion -- the same length subtends a larger arc near the rim, so distance is perceptually compressed near the root; near-root structure cramped | big trees where the message is broad structure plus aligned metadata | quantitative branch-length comparison |\n| Unrooted \u002F radial | honestly shows NO assumed root or time direction; overall shape and long-branch outliers | no time direction; clade membership harder to trace; clusters over-read as clades | exploratory views, \"no root committed\" | directional stories; any \"basal\u002Fearly-diverging\" claim |\n| Chronogram (time-tree) | node timing on a time axis | requires a clock model and calibrations the reader must trust; without HPD bars timing looks falsely precise | dated BEAST\u002FtreePL\u002FMCMCtree trees where timing is the message | any tree lacking a clock; never draw without age uncertainty bars |\n\nCircular is still a ROOTED tree bent into a ring (center = root = past); unrooted\u002Fradial explicitly refuses a root. Presenting an unrooted radial tree and narrating \"X is basal\" is a contradiction.\n\n## Bio.Phylo + matplotlib Recipes\n\nQuick text and ASCII inspection, no figure needed:\n\n```python\nfrom Bio import Phylo\n\ntree = Phylo.read('tree.nwk', 'newick')\nprint(tree)                  # indented text summary\nPhylo.draw_ascii(tree)       # ASCII-art diagram, useful in a terminal or log\n```\n\nDraw to a vector file (always pass an axes and `do_show=False` for headless\u002Fscripted use):\n\n```python\nfrom Bio import Phylo\nimport matplotlib.pyplot as plt\n\ntree = Phylo.read('tree.nwk', 'newick')\ntree.ladderize()             # legibility only; ordering carries NO phylogenetic meaning -- say so in the caption\n\nfig, ax = plt.subplots(figsize=(10, 8))\nPhylo.draw(tree, axes=ax, do_show=False)\nax.set_title('Phylogenetic tree (phylogram, branch length = subs\u002Fsite)')\nfig.savefig('tree.pdf', bbox_inches='tight')   # vector: text and lines stay sharp at any size\nplt.close(fig)\n```\n\nLabel tips, and show support with its measure named (never a bare integer):\n\n```python\ndef tip_only(clade):\n    return clade.name if clade.is_terminal() else ''\n\nimport re\n\nfor clade in tree.get_nonterminals():            # IQ-TREE -B + --alrt: '88.5\u002F92' stays in clade.name, confidence None\n    if clade.confidence is None and clade.name and re.fullmatch(r'[\\d.]+\u002F[\\d.]+', clade.name):\n        clade.sh_alrt, clade.ufboot = (float(v) for v in clade.name.split('\u002F'))   # SH-aLRT \u002F UFBoot (last)\n        clade.name = None                        # otherwise the default label_func prints the raw string\n\ndef support_label(clade):\n    # the measure MUST be stated in the legend\u002Fcaption\n    if clade.is_terminal():\n        return ''\n    if getattr(clade, 'ufboot', None) is not None:\n        return f'{clade.sh_alrt:.0f}\u002F{clade.ufboot:.0f}'\n    return f'{clade.confidence:.0f}' if clade.confidence is not None else ''\n\nif not any(support_label(c) for c in tree.get_nonterminals()):\n    print('WARNING: no internal clade has readable support -- the figure will show none')\nfig, ax = plt.subplots(figsize=(12, 10))\nPhylo.draw(tree, axes=ax, do_show=False, label_func=tip_only, branch_labels=support_label)\nax.set_title('Node support: SH-aLRT (%) \u002F UFBoot (%)')   # name the measure(s) the file actually holds\nfig.savefig('supported_tree.svg', bbox_inches='tight')\nplt.close(fig)\n```\n\nColor branches by group (set `.color` on the MRCA clade; descendants inherit it):\n\n```python\ntree.common_ancestor({'name': 'Homo_sapiens'}, {'name': 'Pongo_abelii'}).color = 'red'   # works on a Newick-read tree\n\nfig, ax = plt.subplots(figsize=(10, 8))\nPhylo.draw(tree, axes=ax, do_show=False)       # as_phyloxml() is needed only to EXPORT colors to phyloXML\nfig.savefig('colored_tree.pdf', bbox_inches='tight')\nplt.close(fig)\n```\n\nScale the panel to tip count so labels stay legible, keeping the branch-length axis (Bio.Phylo has no scale-bar artist, so the x axis IS the scale):\n\n```python\nn_tips = len(tree.get_terminals())\nif n_tips > 150:\n    print('>~150 tips: switch to a circular layout or strips\u002Frings (ggtree, iTOL) instead of a taller panel')\nheight = min(max(8, n_tips * 0.25), 40)         # ~0.25 in\u002Ftip keeps ~6-8 pt labels from colliding; capped\n\nfig, ax = plt.subplots(figsize=(10, height))\nPhylo.draw(tree, axes=ax, do_show=False)\nax.set_yticks([])                               # hide only the meaningless y ticks and spines\nax.spines[['left', 'top', 'right']].set_visible(False)\nfig.savefig('scaled_tree.pdf', bbox_inches='tight')\nplt.close(fig)\n```\n\nFor circular\u002Ffan\u002Funrooted layouts, metadata heatmaps, dual support, or BEAST HPD bars, Bio.Phylo cannot help -- route to ggtree + treeio (R), ETE4, or iTOL.\n\n## Per-Method Failure Modes\n\n### Drawing Meaningless Branch Lengths as a Phylogram\n**Trigger:** Rendering a constraint tree, a supertree, or a tree whose lengths are non-comparable with the horizontal axis proportional to length.\n**Mechanism:** The phylogram geometry asserts a quantitative claim about evolutionary distance that the lengths do not support.\n**Symptom:** A topology-only or arbitrary-length tree appears to make precise distance statements.\n**Fix:** Draw as a cladogram and SAY so (`branch.length='none'` in ggtree); or, if lengths are real, keep them and state the unit (subs\u002Fsite vs time) plus a scale bar.\n\n### Unlabeled or Mislabeled Support\n**Trigger:** A node shows \"98\" with no legend, or two measures are printed without saying which is which.\n**Mechanism:** The reader defaults to assuming bootstrap, but it may be a posterior (much weaker for the same number), an SH-aLRT (cutoff 80), a UFBoot (cutoff 95, not the BP-70 scale), or a TBE.\n**Symptom:** A weakly resolved bush reads as a confident comb because the displayed number is over-read.\n**Fix:** Always state the measure(s) and their order (e.g. \"SH-aLRT\u002FUFBoot\" at each node); collapse nodes below threshold into polytomies rather than drawing fake resolution, since bootstrap, posterior, SH-aLRT, and UFBoot sit on different scales. Support belongs to a branch but is stored on a node: after Bio.Phylo `root_with_outgroup` about half the labels sit on the wrong bipartition while the figure looks plausible. Re-attach support by bipartition after rerooting in Bio.Phylo, or root in R with `treeio::root(..., edgelabel = TRUE)` \u002F `ape::root(..., edgelabel = TRUE)`, and verify one split by hand.\n\n### Tip-Label Overplotting on Large Trees\n**Trigger:** A rectangular layout past a few hundred tips.\n**Mechanism:** Horizontal labels collide into an unreadable black band; authors then shrink the font to illegibility or silently drop labels.\n**Symptom:** Tip labels are unreadable or missing.\n**Fix:** Rotate labels, switch to circular\u002Ffan with radial labels, collapse uninformative clades, annotate by colored strips\u002Frings (ggtreeExtra, iTOL datasets) instead of text, or move to iTOL which is built for large trees.\n\n### Non-Monophyly Hidden by Ladderization or Rotation\n**Trigger:** Rotating nodes to make a paraphyletic or polyphyletic group look contiguous (or a clade look scattered).\n**Mechanism:** Node rotation is information-free with respect to the tree, but the eye reads contiguity as a clade and ordering as direction.\n**Symptom:** A group that is not monophyletic appears unified, or a directional narrative is implied.\n**Fix:** Color by group and let the topology speak; never narrate ordering as meaning; state \"tips ladderized for legibility, ordering carries no phylogenetic meaning.\"\n\n### Chronogram Without Age Uncertainty\n**Trigger:** Drawing a BEAST\u002FMrBayes time-tree with point-estimate node ages and no HPD bars.\n**Mechanism:** The 95% HPD intervals on node heights ARE the result; omitting them asserts false precision.\n**Symptom:** Node ages look known to the day; a reviewer asks where the credible intervals went.\n**Fix:** Draw the HPD bars via treeio `read.beast()` -> ggtree `geom_range('height_0.95_HPD', center = 'height')` (introspect the column name; it varies by source program and treeio version). The default `center = 'auto'` keeps the bar width but centres it on the node age, misplacing asymmetric HPDs; check one drawn bar against the annotation. Or enable node bars in FigTree; never draw an annotated Bayesian tree with Bio.Phylo, which drops the annotations silently.\n\n### Raster Export for Publication\n**Trigger:** Saving a tree as a 150-dpi PNG for a paper.\n**Mechanism:** Raster pixelates thin branches and small tip labels at print size.\n**Symptom:** Fuzzy labels and pixelated branches; journal rejection or blurry print.\n**Fix:** Export SVG\u002FPDF\u002FEPS (vector) so text and lines stay sharp at any scale; only if forced to rasterize, do so at final size with >=600 dpi for line art.\n\n## Quantitative Thresholds\n\nThese are operational defaults for a standard portrait panel with ~6-8 pt labels; adapt to font, page, and journal specs.\n\n| Quantity | Threshold | Rationale \u002F source |\n|----------|-----------|--------------------|\n| Tips, rectangular horizontal labels comfortable | \u003C=~50 | labels do not collide at legible font |\n| Tips, start rotating\u002Fshrinking labels | ~50-150 | label height x tip count approaches panel height |\n| Tips, switch to circular\u002Ffan or collapse clades | ~150-500 | rectangular labels collide; radial labels recover space |\n| Tips, per-tip text impractical; use strips\u002Frings | >~500-1000 | annotate by color\u002Fgroups (iTOL, ggtreeExtra); iTOL is built for large trees |\n| Publication export | vector (SVG\u002FPDF\u002FEPS) | text and lines stay sharp at any scale; the default |\n| Forced raster, line-art\u002Ftree | >=600 dpi (many journals 600-1200) | ~300 dpi is the photo floor but too coarse for thin branches and small labels |\n| Scale bar on any phylogram | mandatory (subs\u002Fsite or a time axis) | without it the reader cannot recover true distances under aspect-ratio distortion |\n| Bootstrap strong | >=95 (>=70 moderate) | Hillis-Bull heuristic; state the measure (Felsenstein 1985) |\n| UFBoot strong | >=95 (not the BP-70 scale) | recalibrated; IQ-TREE joint rule SH-aLRT>=80 AND UFBoot>=95 |\n| SH-aLRT strong | >=80 | IQ-TREE recommendation |\n| Posterior probability strong | >=0.95, but WEAKER than bootstrap 95 | PP systematically higher for the same data; do not equate |\n\nLock the branch-length scale; do not let the figure engine non-uniformly stretch a phylogram to fill a fixed panel, which distorts the lengths the figure exists to communicate.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| BEAST HPD bars absent from a Python figure | drew an annotated tree with Bio.Phylo | route through treeio `read.beast` + ggtree `geom_range` |\n| Figure not saving \u002F blank | `do_show=True` opens a window instead of writing | pass `do_show=False`, then `fig.savefig(...)` |\n| Branch colors not appearing | color set on a tip or the wrong clade | set `clade.color` on the MRCA clade (inherits to descendants); `as_phyloxml()` is only needed for phyloXML export |\n| Support labels missing on an IQ-TREE tree | `SH-aLRT\u002FUFBoot` label kept in `clade.name`, `confidence` None | parse `clade.name` as in the support recipe; warn when no clade has support |\n| HPD bars shifted off the annotated interval | ggtree `geom_range` default `center = 'auto'` | `geom_range('height_0.95_HPD', center = 'height')` |\n| Labels overlap into a black band | too many tips for rectangular layout | increase panel height, rotate labels, or switch to circular\u002FiTOL |\n| \"Basal\" claim on a radial tree | narrated an unrooted layout as if rooted | root explicitly (tree-manipulation) and show the root before any directional claim |\n| Support number misread | bare integer with no measure stated | label the measure(s) and order; collapse sub-threshold nodes to polytomies |\n| `Phylo.draw` has no circular option | Bio.Phylo is rectangular-only | use ggtree `layout='circular'`, ETE4, or iTOL |\n\n## References\n\nTalevich E, Invergo BM, Cock PJA, Chapman BA. 2012. Bio.Phylo: a unified toolkit for processing, analyzing and visualizing phylogenetic trees in Biopython. *BMC Bioinformatics* 13:209.\nYu G, Smith DK, Zhu H, Guan Y, Lam TT-Y. 2017. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. *Methods in Ecology and Evolution* 8(1):28-36.\nYu G. 2020. Using ggtree to visualize data on tree-like structures. *Current Protocols in Bioinformatics* 69(1):e96.\nWang L-G, Lam TT-Y, Xu S, Dai Z, Zhou L, Feng T, Guo P, Dunn CW, Jones BR, Bradley T, Zhu H, Guan Y, Jiang Y, Yu G. 2020. treeio: an R package for phylogenetic tree input and output with richly annotated and associated data. *Molecular Biology and Evolution* 37(2):599-603.\nXu S, Dai Z, Guo P, Fu X, Liu S, Zhou L, Tang W, Feng T, Chen M, Zhan L, Wu T, Hu E, Jiang Y, Bo X, Yu G. 2021. ggtreeExtra: compact visualization of richly annotated phylogenetic data. *Molecular Biology and Evolution* 38(9):4039-4042.\nHuerta-Cepas J, Serra F, Bork P. 2016. ETE 3: reconstruction, analysis, and visualization of phylogenomic data. *Molecular Biology and Evolution* 33(6):1635-1638.\nLetunic I, Bork P. 2024. Interactive Tree of Life (iTOL) v6: recent updates to the phylogenetic tree display and annotation tool. *Nucleic Acids Research* 52(W1):W78-W82.\nFelsenstein J. 1985. Confidence limits on phylogenies: an approach using the bootstrap. *Evolution* 39(4):783-791.\n\n## Related Skills\n\n- tree-io - parsing and preserving BEAST\u002FMrBayes\u002FIQ-TREE annotations so they survive into the figure; the tightest coupling\n- tree-manipulation - rooting, ladderizing, pruning, and collapsing low-support nodes before drawing\n- data-visualization\u002Fggplot2-fundamentals - the grammar, themes, and ggsave vector export underlying ggtree\n- data-visualization\u002Fmultipanel-figures - composing a tree plus aligned metadata panels into one figure\n","## Version Compatibility\n\nReference examples tested with: BioPython 1.83+, matplotlib 3.8+. Rich-figure alternatives: ggtree 3.12+ \u002F treeio 1.28+ \u002F ggtreeExtra 1.14+ (Bioconductor), ete4 4.x (Python), iTOL v6 (web), FigTree (desktop).\n\nggtree 3.14.0 with ggplot2 4.0.3 (checked 2026-09): rectangular, circular and fan layouts and `geom_range` work; `slanted`, `equal_angle`, `daylight` and `ape` layouts, `geom_tiplab(align = TRUE)` and `gheatmap()` fail (`could not find function \"is.waive\"`, `@mapping must be \u003Cggplot2::mapping>`). Fallbacks: `ape::plot.phylo(type = 'unrooted')` for unrooted views, `ggtreeExtra::geom_fruit` instead of `gheatmap`, or pin ggplot2 \u003C 4. ETE4 did not build from pip on Windows \u002F Python 3.12; ete3 renders headlessly only with PyQt5 and `QT_QPA_PLATFORM=offscreen` and then drew no tip text -- prefer ggtree for headless CI figures.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show biopython` then `help(Phylo.draw)` to check signatures\n- R: `packageVersion('ggtree')` then `?ggtree` to verify layout and geom arguments\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nBio.Phylo `draw()` renders rectangular layouts only and parses no BEAST\u002FMrBayes annotation block; circular\u002Ffan\u002Funrooted layouts and HPD bars require ggtree, ETE4, or iTOL. The ETE3->ETE4 migration changed APIs; introspect rather than assume ETE3 signatures.\n\n# Tree Visualization -- A Figure Is an Argument\n\n**\"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.\n- Python quick look: `Phylo.draw(tree, axes=ax)` (Bio.Phylo + matplotlib)\n- Publication with metadata, rich support, or BEAST HPD bars: ggtree + treeio (R)\n\nScope: drawing, styling, annotating, and exporting tree figures, and choosing the drawing tool. Reading\u002Fconverting files and preserving `[&...]` annotations before plotting -> tree-io. Rooting, ladderizing, pruning, collapsing low-support nodes -> tree-manipulation. ggplot2 grammar, themes, and `ggsave` underlying ggtree -> data-visualization\u002Fggplot2-fundamentals. Composing a tree plus aligned panels into one figure -> data-visualization\u002Fmultipanel-figures.\n\n## The Single Most Important Modern Insight\n\nA phylogenetic tree figure is a rhetorical and modeling artifact, not a neutral picture of the data. A Newick or Nexus file encodes a topology, optionally branch lengths, optionally one node label; it does NOT encode which child is drawn on top, whether the horizontal axis means evolutionary distance or just nesting depth, where the root sits, the aspect ratio, or which of several support measures a bare \"95\" refers to. Every one of those is supplied by the person drawing the tree, so the figure is the data filtered through a dozen interpretive choices the reader cannot see. Four argument-level decisions dominate, and the same file can be drawn to tell mutually contradictory stories that are all technically correct renderings of one topology:\n\n1. **The geometry is a claim about what the lengths mean.** A cladogram asserts only nesting; a phylogram asserts nesting plus amount of change (substitutions per site); a chronogram asserts timing and demands a clock model plus calibrations. Drawing a phylogram as a cladogram erases rate variation, the very signal that flags long-branch attraction; drawing untrusted branch lengths as a phylogram fabricates a quantitative claim.\n2. **Ladderization implies a directionality that is not there.** Sibling subclades are unordered, so any node rotation is the same tree, but the eye reads top-to-bottom ordering as a march of progress toward the bottom-most tip. Rotation can also bury non-monophyly: a paraphyletic group can be rotated to look contiguous, or a clean clade made to look scattered.\n3. **Which support is shown, and whether it is labeled, changes the conclusion.** Support is not accuracy, and the measures are not interchangeable: a posterior of 0.95 is generally weaker evidence than a bootstrap of 95 for the same data, and UFBoot 95, SH-aLRT 80, and TBE live on different scales. A bare integer with no legend is the quietest lie because the reader assumes bootstrap and the ambiguity always flatters the result.\n4. **The drawing tool is decided by the I\u002FO layer, not the surrounding language.** If the tree carries BEAST\u002FMrBayes HPD intervals and posteriors, only a tool whose data model can carry those annotations (treeio + ggtree) can plot them; Bio.Phylo flattens the tree to topology + length + one label and silently drops the uncertainty that was the result.\n\nThe skill's job is to make these choices conscious and DECLARE them in the caption, not to default into them. Default ladderization plus cladogram-ish rendering plus unlabeled nodes is the path of least resistance, and it is an argument the user did not intend to make.\n\n## Tool Taxonomy\n\nThe central decision is which drawing tool to reach for, and it is coupled to the I\u002FO decision: a tool that flattens the tree to topology plus one label cannot draw BEAST HPD bars or posteriors it cannot represent. The plotting path through treeio + ggtree is the same I\u002FO choice made in tree-io.\n\n| Tool (lang) | Citation | Layouts and annotation power | When to choose |\n|-------------|----------|------------------------------|----------------|\n| Bio.Phylo + matplotlib (Py) | Talevich 2012 | rectangular phylogram\u002Fcladogram only; one label per node via `label_func`\u002F`branch_labels`; no circular\u002Funrooted, no BEAST-block parse | a fast scripted look inside a Python pipeline; headless\u002FCI rendering of simple trees; NOT publication figures with metadata or HPD bars |\n| ggtree + treeio + ggtreeExtra (R) | Yu 2017; Wang 2020; Xu 2021 | rectangular, slanted, circular, fan, radial\u002Funrooted; `%\u003C+%` attaches a data.frame, `geom_tiplab`\u002F`geom_nodelab`\u002F`geom_cladelab`, `gheatmap`, `geom_facet` (Cartesian) or `geom_fruit` rings (circular); treeio reads BEAST\u002FMrBayes\u002FIQ-TREE so HPD bars and posterior plot directly | the publication standard whenever a figure integrates metadata, rich\u002Fdual support, HPD bars, or aligned panels; the only clean path for BEAST HPD bars and posterior |\n| ETE4 (Py; ETE3 paper) | Huerta-Cepas 2016 | rectangular and circular; programmatic per-node `NodeStyle`\u002Ffaces and layout functions; integrated NCBI taxonomy | styling thousands of nodes by rule, taxonomy-driven annotation, or rendering many trees headlessly in Python |\n| iTOL v6 (web) | Letunic 2024 | rectangular, circular, unrooted, very large trees; tab-delimited dataset templates for color strips, heatmaps, bars, binary symbols, clade collapse; SVG\u002FPDF\u002FPNG\u002FEPS export | large trees and template-based metadata with no code; collaborative web-driven polished figures |\n| FigTree (desktop GUI) | Rambaut (software) | rectangular, polar, radial; reads BEAST NEXUS node annotations to display HPD bars and posterior on screen; manual rotate\u002Fcollapse\u002Fcolor | interactive inspection of a single BEAST\u002FMrBayes tree before scripting the final figure; not reproducible, use for exploration not the pipeline |\n\nDecision rule: large tree or no-code web annotation -> iTOL v6. Publication figure with metadata, dual support, HPD bars, or aligned heatmaps -> ggtree + treeio (+ ggtreeExtra for circular rings). Programmatic styling of thousands of nodes or NCBI-taxonomy annotation -> ETE4. Fast topology look from a Python script -> Bio.Phylo. Interactive rooting\u002Finspection of one BEAST tree -> FigTree, then move the reproducible figure to ggtree. The recurring mistake is defaulting to Bio.Phylo because the pipeline is Python, then discovering it cannot draw a circular layout, place a heatmap, or show the BEAST HPD bars that are the whole point.\n\n## What Each Layout Reveals and Hides\n\n| Layout | Reveals | Hides or distorts | Good for | Bad for |\n|--------|---------|-------------------|----------|---------|\n| Rectangular phylogram | branch lengths read directly off a linear axis; honest distance comparison | tip labels overplot past a few hundred tips; uses vertical space | the default when length matters and tip count is moderate (\u003C~150) | very large trees |\n| Slanted \u002F triangular | compactness; quick topology read | the diagonal implies a ladder\u002Fprogression; imprecise length reading | quick schematic topology views | precise branch-length comparison |\n| Circular \u002F fan | hundreds to thousands of tips in one panel; metadata rings | radial distortion -- the same length subtends a larger arc near the rim, so distance is perceptually compressed near the root; near-root structure cramped | big trees where the message is broad structure plus aligned metadata | quantitative branch-length comparison |\n| Unrooted \u002F radial | honestly shows NO assumed root or time direction; overall shape and long-branch outliers | no time direction; clade membership harder to trace; clusters over-read as clades | exploratory views, \"no root committed\" | directional stories; any \"basal\u002Fearly-diverging\" claim |\n| Chronogram (time-tree) | node timing on a time axis | requires a clock model and calibrations the reader must trust; without HPD bars timing looks falsely precise | dated BEAST\u002FtreePL\u002FMCMCtree trees where timing is the message | any tree lacking a clock; never draw without age uncertainty bars |\n\nCircular is still a ROOTED tree bent into a ring (center = root = past); unrooted\u002Fradial explicitly refuses a root. Presenting an unrooted radial tree and narrating \"X is basal\" is a contradiction.\n\n## Bio.Phylo + matplotlib Recipes\n\nQuick text and ASCII inspection, no figure needed:\n\n```python\nfrom Bio import Phylo\n\ntree = Phylo.read('tree.nwk', 'newick')\nprint(tree)                  # indented text summary\nPhylo.draw_ascii(tree)       # ASCII-art diagram, useful in a terminal or log\n```\n\nDraw to a vector file (always pass an axes and `do_show=False` for headless\u002Fscripted use):\n\n```python\nfrom Bio import Phylo\nimport matplotlib.pyplot as plt\n\ntree = Phylo.read('tree.nwk', 'newick')\ntree.ladderize()             # legibility only; ordering carries NO phylogenetic meaning -- say so in the caption\n\nfig, ax = plt.subplots(figsize=(10, 8))\nPhylo.draw(tree, axes=ax, do_show=False)\nax.set_title('Phylogenetic tree (phylogram, branch length = subs\u002Fsite)')\nfig.savefig('tree.pdf', bbox_inches='tight')   # vector: text and lines stay sharp at any size\nplt.close(fig)\n```\n\nLabel tips, and show support with its measure named (never a bare integer):\n\n```python\ndef tip_only(clade):\n    return clade.name if clade.is_terminal() else ''\n\nimport re\n\nfor clade in tree.get_nonterminals():            # IQ-TREE -B + --alrt: '88.5\u002F92' stays in clade.name, confidence None\n    if clade.confidence is None and clade.name and re.fullmatch(r'[\\d.]+\u002F[\\d.]+', clade.name):\n        clade.sh_alrt, clade.ufboot = (float(v) for v in clade.name.split('\u002F'))   # SH-aLRT \u002F UFBoot (last)\n        clade.name = None                        # otherwise the default label_func prints the raw string\n\ndef support_label(clade):\n    # the measure MUST be stated in the legend\u002Fcaption\n    if clade.is_terminal():\n        return ''\n    if getattr(clade, 'ufboot', None) is not None:\n        return f'{clade.sh_alrt:.0f}\u002F{clade.ufboot:.0f}'\n    return f'{clade.confidence:.0f}' if clade.confidence is not None else ''\n\nif not any(support_label(c) for c in tree.get_nonterminals()):\n    print('WARNING: no internal clade has readable support -- the figure will show none')\nfig, ax = plt.subplots(figsize=(12, 10))\nPhylo.draw(tree, axes=ax, do_show=False, label_func=tip_only, branch_labels=support_label)\nax.set_title('Node support: SH-aLRT (%) \u002F UFBoot (%)')   # name the measure(s) the file actually holds\nfig.savefig('supported_tree.svg', bbox_inches='tight')\nplt.close(fig)\n```\n\nColor branches by group (set `.color` on the MRCA clade; descendants inherit it):\n\n```python\ntree.common_ancestor({'name': 'Homo_sapiens'}, {'name': 'Pongo_abelii'}).color = 'red'   # works on a Newick-read tree\n\nfig, ax = plt.subplots(figsize=(10, 8))\nPhylo.draw(tree, axes=ax, do_show=False)       # as_phyloxml() is needed only to EXPORT colors to phyloXML\nfig.savefig('colored_tree.pdf', bbox_inches='tight')\nplt.close(fig)\n```\n\nScale the panel to tip count so labels stay legible, keeping the branch-length axis (Bio.Phylo has no scale-bar artist, so the x axis IS the scale):\n\n```python\nn_tips = len(tree.get_terminals())\nif n_tips > 150:\n    print('>~150 tips: switch to a circular layout or strips\u002Frings (ggtree, iTOL) instead of a taller panel')\nheight = min(max(8, n_tips * 0.25), 40)         # ~0.25 in\u002Ftip keeps ~6-8 pt labels from colliding; capped\n\nfig, ax = plt.subplots(figsize=(10, height))\nPhylo.draw(tree, axes=ax, do_show=False)\nax.set_yticks([])                               # hide only the meaningless y ticks and spines\nax.spines[['left', 'top', 'right']].set_visible(False)\nfig.savefig('scaled_tree.pdf', bbox_inches='tight')\nplt.close(fig)\n```\n\nFor circular\u002Ffan\u002Funrooted layouts, metadata heatmaps, dual support, or BEAST HPD bars, Bio.Phylo cannot help -- route to ggtree + treeio (R), ETE4, or iTOL.\n\n## Per-Method Failure Modes\n\n### Drawing Meaningless Branch Lengths as a Phylogram\n**Trigger:** Rendering a constraint tree, a supertree, or a tree whose lengths are non-comparable with the horizontal axis proportional to length.\n**Mechanism:** The phylogram geometry asserts a quantitative claim about evolutionary distance that the lengths do not support.\n**Symptom:** A topology-only or arbitrary-length tree appears to make precise distance statements.\n**Fix:** Draw as a cladogram and SAY so (`branch.length='none'` in ggtree); or, if lengths are real, keep them and state the unit (subs\u002Fsite vs time) plus a scale bar.\n\n### Unlabeled or Mislabeled Support\n**Trigger:** A node shows \"98\" with no legend, or two measures are printed without saying which is which.\n**Mechanism:** The reader defaults to assuming bootstrap, but it may be a posterior (much weaker for the same number), an SH-aLRT (cutoff 80), a UFBoot (cutoff 95, not the BP-70 scale), or a TBE.\n**Symptom:** A weakly resolved bush reads as a confident comb because the displayed number is over-read.\n**Fix:** Always state the measure(s) and their order (e.g. \"SH-aLRT\u002FUFBoot\" at each node); collapse nodes below threshold into polytomies rather than drawing fake resolution, since bootstrap, posterior, SH-aLRT, and UFBoot sit on different scales. Support belongs to a branch but is stored on a node: after Bio.Phylo `root_with_outgroup` about half the labels sit on the wrong bipartition while the figure looks plausible. Re-attach support by bipartition after rerooting in Bio.Phylo, or root in R with `treeio::root(..., edgelabel = TRUE)` \u002F `ape::root(..., edgelabel = TRUE)`, and verify one split by hand.\n\n### Tip-Label Overplotting on Large Trees\n**Trigger:** A rectangular layout past a few hundred tips.\n**Mechanism:** Horizontal labels collide into an unreadable black band; authors then shrink the font to illegibility or silently drop labels.\n**Symptom:** Tip labels are unreadable or missing.\n**Fix:** Rotate labels, switch to circular\u002Ffan with radial labels, collapse uninformative clades, annotate by colored strips\u002Frings (ggtreeExtra, iTOL datasets) instead of text, or move to iTOL which is built for large trees.\n\n### Non-Monophyly Hidden by Ladderization or Rotation\n**Trigger:** Rotating nodes to make a paraphyletic or polyphyletic group look contiguous (or a clade look scattered).\n**Mechanism:** Node rotation is information-free with respect to the tree, but the eye reads contiguity as a clade and ordering as direction.\n**Symptom:** A group that is not monophyletic appears unified, or a directional narrative is implied.\n**Fix:** Color by group and let the topology speak; never narrate ordering as meaning; state \"tips ladderized for legibility, ordering carries no phylogenetic meaning.\"\n\n### Chronogram Without Age Uncertainty\n**Trigger:** Drawing a BEAST\u002FMrBayes time-tree with point-estimate node ages and no HPD bars.\n**Mechanism:** The 95% HPD intervals on node heights ARE the result; omitting them asserts false precision.\n**Symptom:** Node ages look known to the day; a reviewer asks where the credible intervals went.\n**Fix:** Draw the HPD bars via treeio `read.beast()` -> ggtree `geom_range('height_0.95_HPD', center = 'height')` (introspect the column name; it varies by source program and treeio version). The default `center = 'auto'` keeps the bar width but centres it on the node age, misplacing asymmetric HPDs; check one drawn bar against the annotation. Or enable node bars in FigTree; never draw an annotated Bayesian tree with Bio.Phylo, which drops the annotations silently.\n\n### Raster Export for Publication\n**Trigger:** Saving a tree as a 150-dpi PNG for a paper.\n**Mechanism:** Raster pixelates thin branches and small tip labels at print size.\n**Symptom:** Fuzzy labels and pixelated branches; journal rejection or blurry print.\n**Fix:** Export SVG\u002FPDF\u002FEPS (vector) so text and lines stay sharp at any scale; only if forced to rasterize, do so at final size with >=600 dpi for line art.\n\n## Quantitative Thresholds\n\nThese are operational defaults for a standard portrait panel with ~6-8 pt labels; adapt to font, page, and journal specs.\n\n| Quantity | Threshold | Rationale \u002F source |\n|----------|-----------|--------------------|\n| Tips, rectangular horizontal labels comfortable | \u003C=~50 | labels do not collide at legible font |\n| Tips, start rotating\u002Fshrinking labels | ~50-150 | label height x tip count approaches panel height |\n| Tips, switch to circular\u002Ffan or collapse clades | ~150-500 | rectangular labels collide; radial labels recover space |\n| Tips, per-tip text impractical; use strips\u002Frings | >~500-1000 | annotate by color\u002Fgroups (iTOL, ggtreeExtra); iTOL is built for large trees |\n| Publication export | vector (SVG\u002FPDF\u002FEPS) | text and lines stay sharp at any scale; the default |\n| Forced raster, line-art\u002Ftree | >=600 dpi (many journals 600-1200) | ~300 dpi is the photo floor but too coarse for thin branches and small labels |\n| Scale bar on any phylogram | mandatory (subs\u002Fsite or a time axis) | without it the reader cannot recover true distances under aspect-ratio distortion |\n| Bootstrap strong | >=95 (>=70 moderate) | Hillis-Bull heuristic; state the measure (Felsenstein 1985) |\n| UFBoot strong | >=95 (not the BP-70 scale) | recalibrated; IQ-TREE joint rule SH-aLRT>=80 AND UFBoot>=95 |\n| SH-aLRT strong | >=80 | IQ-TREE recommendation |\n| Posterior probability strong | >=0.95, but WEAKER than bootstrap 95 | PP systematically higher for the same data; do not equate |\n\nLock the branch-length scale; do not let the figure engine non-uniformly stretch a phylogram to fill a fixed panel, which distorts the lengths the figure exists to communicate.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| BEAST HPD bars absent from a Python figure | drew an annotated tree with Bio.Phylo | route through treeio `read.beast` + ggtree `geom_range` |\n| Figure not saving \u002F blank | `do_show=True` opens a window instead of writing | pass `do_show=False`, then `fig.savefig(...)` |\n| Branch colors not appearing | color set on a tip or the wrong clade | set `clade.color` on the MRCA clade (inherits to descendants); `as_phyloxml()` is only needed for phyloXML export |\n| Support labels missing on an IQ-TREE tree | `SH-aLRT\u002FUFBoot` label kept in `clade.name`, `confidence` None | parse `clade.name` as in the support recipe; warn when no clade has support |\n| HPD bars shifted off the annotated interval | ggtree `geom_range` default `center = 'auto'` | `geom_range('height_0.95_HPD', center = 'height')` |\n| Labels overlap into a black band | too many tips for rectangular layout | increase panel height, rotate labels, or switch to circular\u002FiTOL |\n| \"Basal\" claim on a radial tree | narrated an unrooted layout as if rooted | root explicitly (tree-manipulation) and show the root before any directional claim |\n| Support number misread | bare integer with no measure stated | label the measure(s) and order; collapse sub-threshold nodes to polytomies |\n| `Phylo.draw` has no circular option | Bio.Phylo is rectangular-only | use ggtree `layout='circular'`, ETE4, or iTOL |\n\n## References\n\nTalevich E, Invergo BM, Cock PJA, Chapman BA. 2012. Bio.Phylo: a unified toolkit for processing, analyzing and visualizing phylogenetic trees in Biopython. *BMC Bioinformatics* 13:209.\nYu G, Smith DK, Zhu H, Guan Y, Lam TT-Y. 2017. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. *Methods in Ecology and Evolution* 8(1):28-36.\nYu G. 2020. Using ggtree to visualize data on tree-like structures. *Current Protocols in Bioinformatics* 69(1):e96.\nWang L-G, Lam TT-Y, Xu S, Dai Z, Zhou L, Feng T, Guo P, Dunn CW, Jones BR, Bradley T, Zhu H, Guan Y, Jiang Y, Yu G. 2020. treeio: an R package for phylogenetic tree input and output with richly annotated and associated data. *Molecular Biology and Evolution* 37(2):599-603.\nXu S, Dai Z, Guo P, Fu X, Liu S, Zhou L, Tang W, Feng T, Chen M, Zhan L, Wu T, Hu E, Jiang Y, Bo X, Yu G. 2021. ggtreeExtra: compact visualization of richly annotated phylogenetic data. *Molecular Biology and Evolution* 38(9):4039-4042.\nHuerta-Cepas J, Serra F, Bork P. 2016. ETE 3: reconstruction, analysis, and visualization of phylogenomic data. *Molecular Biology and Evolution* 33(6):1635-1638.\nLetunic I, Bork P. 2024. Interactive Tree of Life (iTOL) v6: recent updates to the phylogenetic tree display and annotation tool. *Nucleic Acids Research* 52(W1):W78-W82.\nFelsenstein J. 1985. Confidence limits on phylogenies: an approach using the bootstrap. *Evolution* 39(4):783-791.\n\n## Related Skills\n\n- tree-io - parsing and preserving BEAST\u002FMrBayes\u002FIQ-TREE annotations so they survive into the figure; the tightest coupling\n- tree-manipulation - rooting, ladderizing, pruning, and collapsing low-support nodes before drawing\n- data-visualization\u002Fggplot2-fundamentals - the grammar, themes, and ggsave vector export underlying ggtree\n- data-visualization\u002Fmultipanel-figures - composing a tree plus aligned metadata panels into one figure\n",{"name":5,"tool_type":24,"description":7,"primary_tool":25,"goal_approach_exempt":26},"python","Bio.Phylo",true,"main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":26},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-tree-visualization",{"tool":40,"command":41},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-tree-visualization",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-tree-visualization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002FSKILL.md",[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"examples\u002Fascii_tree.py","SCRIPT","脚本",381,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002Fexamples\u002Fascii_tree.py",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"examples\u002Fbasic_tree_plot.py",911,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002Fexamples\u002Fbasic_tree_plot.py",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"examples\u002Flabeled_tree.py",2037,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002Fexamples\u002Flabeled_tree.py",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"usage-guide.md","REFERENCE","参考文档",5429,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-tree-visualization\u002Fusage-guide.md",[68,75,82,89,96,103],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]