XTG
XTG (the extensible TreeGraph format) is the XML-based native file format of TreeGraph 2, a graphical editor for phylogenetic trees developed by Ben C. Stöver and Kai F. Müller at the Institute for Evolution and Biodiversity, University of Münster. Introduced with version 2 of the program to replace the plain-text format of TreeGraph 1, XTG stores not only a tree's topology but also its complete graphical presentation and arbitrary user annotations in a single document. The current version, XTG 1.1, is the first formally specified by an XML Schema (published at bioinfweb.info/xmlns/xtg/1.1.xsd) and is used from TreeGraph 2.0.42 onward.
Structurally, an XTG document is a tree of nested XML elements that mirrors the phylogeny itself. Nodes contain an unlimited number of child nodes, each node carrying an automatically generated unique node name used for internal references, and two nodes are joined by a branch element. Branches expose graphical and metric attributes such as LineColor, LineWidth, Length, MinLength, ConstantWidth, MinSpaceAbove and MinSpaceBelow, while nodes and branches can carry rich label elements including TextLabel, IconLabel (drawing standard icons with explicit width and height) and PieChartLabel. Beyond visible labels, XTG can hold an unlimited number of hidden node/branch data columns, letting each element store named values (support values, posterior probabilities, distances) that formatting rules and mathematical expressions can reference.
This dual nature — an editable data model plus a full description of fonts, colors, line styles and page layout — is what distinguishes XTG from the interchange-oriented tree formats it interoperates with. TreeGraph 2 reads and writes Newick and Nexus (including BEAST annotations) and imports phyloXML, while topology-and-metadata-only exchange with those formats loses the presentation layer that XTG preserves. Final renderings are exported to SVG, PDF or PNG rather than back into a graph format, and the TreeGraph 2 application is effectively the reference reader and writer.
Its strengths are faithful round-tripping of publication-quality tree figures, arbitrary per-element data, and the mapping of support values across congruent nodes to visualize incongruence between analyses. The main limitations are ecosystem scope: XTG is tightly bound to a single desktop program, it models rooted/unrooted phylogenetic trees rather than general graphs, and few tools outside TreeGraph 2 parse it, so it functions best as a working and archival format rather than a broad interchange standard.
Alternative Names: XTG, extensible TreeGraph format
| Feature | eXtensible TreeGraph (XTG) |
|---|---|
| Multiple Graphs per Document | |
| Nodes | |
| Directed Edges | |
| Hyperedges | |
| Mixed-directionality Edges | |
| Parallel Edges | |
| Self-loops | |
| Edges on Edges | |
| Nested Graphs in Nodes | |
| Nested Graphs in Edges | |
| Nested Graphs in Graphs | |
| Node Labels | |
| Edge Labels | |
| Attributes on Nodes | |
| Attributes on Edges | |
| Typed Edges | |
Tools(Read & Write)
Frequently Asked Questions
What is a eXtensible TreeGraph (XTG) file?
A eXtensible TreeGraph (XTG) file stores a graph — its nodes, edges and attributes — in the eXtensible TreeGraph (XTG) format (also: XTG, extensible TreeGraph format). See the feature table above for what it supports.
How do I open a eXtensible TreeGraph (XTG) file?
Open it in a graph tool that supports eXtensible TreeGraph (XTG), or convert it to a format your tool reads. With GraphInOut you can convert eXtensible TreeGraph (XTG) to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a eXtensible TreeGraph (XTG) file to another format?
Use the Convert from eXtensible TreeGraph (XTG) link above: upload or paste your eXtensible TreeGraph (XTG) file (input preset to eXtensible TreeGraph (XTG)), choose a target format and download the result — free, no install.