|
|
大气的木耳 · Querydsl 参考指南 - 南石 - 博客园· 1 年前 · |
|
|
乐观的甘蔗 · Mysql、MongoDB对比和使用场景 ...· 1 年前 · |
|
|
开心的遥控器 · 手把手教你用Django执行原生SQL-sq ...· 2 年前 · |
|
|
踢足球的松鼠 · PHP实现m3u8并发下载 - 简书· 2 年前 · |
|
|
深情的鞭炮 · Microsoft.UI.Xaml.2.8. ...· 2 年前 · |
Advanced users looking to automate their iTOL workflows can use the batch upload and export interfaces.
If you encounter any problems with the tree or dataset display, or have trouble understanding iTOL's functions, please contact us .
To upload a tree anonymously, click the Upload link in the header of any iTOL page. If you have an iTOL account , and are logged in, the upload link will be replaced with My trees . Click it to open your account page and upload a tree into one of your projects. More information about iTOL accounts and tree management is available below .
Trees should be in plain text files, and in one of supported formats ( Newick , Nexus , PhyloXML or Jplace ). When uploading Jplace files, make sure that the file extension is .jplace , or the format will not be recognised correctly.
iTOL can parse various metadata from MrBayes and NHX trees. All metadata values will be extracted, and available for visualization through the ' Bootstrap/metadata ' section in the advanced controls tab. In addition, NHX tag name can be used to specify internal node IDs (see examples below).
iTOL supports direct upload of QZA trees generated by QIIME 2 . After the initial upload, these trees can be further annotated using other QZA files. Simply drop a QZA file onto the tree display, or upload it through the button in the "Datasets" tab of the control panel.
The following QZA types are supported:
Overview of the different account functions (click the image to enlarge) :
iTOL viewer user interface
An overview of the main parts of iTOL's tree viewer user interface (click the image to enlarge) :
Click the icon in the control panel header to set the default position of various user interface panels, toggle the display of various user interface help hints and tree hover popups.
To switch the display mode, click the corresponding button in the Mode section on the top of the Basic controls tab.
Trees which contain branch length information will be displayed as phylograms by default. To display them as cladograms and ignore the branch length information, toggle the Branch lengths setting in the Mode options section to Ignore .
Slanted mode is a special variation of the rectangular display mode. To display a tree in slanted mode, first switch the display mode to Rectangular , and then toggle the Slanted setting in the Mode options section to Yes .
Tree display can be further customized through several options in the Basic and Advanced tabs of the control panel:
If a tree contains bootstrap information, or other metadata (such as various MrBayes metadata fields), these can be visualized by setting the Bootstraps / metadata option to Display . Select the desired metadata source using the Data source selector, and set the Display range values to select the range which should be displayed. By default, all values are included. If multiple metadata fields are defined, multiple threshold ranges can be defined simultaneously, by clicking the button.
Node metadata can be added or changed interactively through the metadata editor, which can be accessed via the functions menu . For bulk metadata updates, use iTOL annotation editor for spreadsheets , or the template file linked above.
The metadata can be visualized in 4 different ways:
Note that non-numeric metadata sources can only be visualized as branch colors or text labels.
If the metadata is visualized as symbols or branch colors, a corresponding legend can be added to the tree by setting the Legend toggle to On . Symbol size in the legend will exactly match the size in the tree at the current zoom level. If you change the tree zoom, you can update the legend by toggling its display off and back on.
If a tree contains branch length information, these values can be visualized by setting the Branch lengths option under the Branch metadata display section to Display . Values will be displayed as text labels directly on the branches. Position, size, color and numeric style of the labels can be adjusted.
To make the labels more readable, you can display a background box behind them by setting the Label background to 'On' . Background color can be changed, as well as the border width, color and corner radius of the box.
By selecting the Display as age option, node ages will be displayed instead of raw branch length values. Farthest leaf in the tree has the age zero, and the age increases towards the root of the tree.
In addition, an internal tree scale and axis can be displayed by setting the Internal tree scale option to Display . You can set the interval values, colors and widths for 2 different sets of the scale lines. In addition, a set of fixed lines can be defined in the 'Fixed' input box. Provide a comma delimited list of values, and scale lines will be displayed at each value starting from the tree root (or tree top, if the scale is inverted). Each set of lines can be displayed as dashed by selecting the corresponding checkbox. In time scale mode , you can customize the internal tree scale to display other values, and not the branch lengths directly. Simply provide a numeric value which should be used for the tree root (or tree top, if the scale is inverted), and the scaling factor for the branch lengths.
The Tree scale box section provides the options for the customization of the main tree scale indicator which is displayed in the top left corner of the tree display.
To quickly mark the positions of leaves or internal tree nodes with symbols, use the corresponding functions on the Advanced controls tab. The shape, size, fill color, border width and color can be independently set for leaves and internal nodes.
For the internal node symbols, you can set the node type to One child , which will restrict the display of symbols to nodes which have a single child node. This can be useful to quickly identify internal nodes which do not branch.
If your tree has internal node IDs defined, you can display them directly on the branches as text labels. If the IDs were not present in the original tree file, you can define them by using a LABELS annotation file , or by using the iTOL annotation editor for spreadsheets . Alternatively, you can edit the labels directly in the web interface, through the node functions menu (Editing → Labels → This node → Edit label). By default, node labels will be displayed next to the node. To display them above the branch itself, set the Next to node option to No .
To make the labels more readable, you can display a background box behind them by setting the Label background to 'On' . Background color can be changed, as well as the border width, color and corner radius of the box.
If node classes are defined in the tree, these can be used to limit the node ID display. You can select one or more classes through the Class filter option, and only these node ID will be displayed.
Click on any tree branch or leaf label to display the node functions menu. Depending on the node type and the current tree state, some menu options may be disabled.
Template file: collapse.txt
To collapse a clade, select Collapse clade from the node functions menu (1).
You can also use the template file collapse.txt to specify a list of nodes to collapse. Simply drop the file onto the tree display, and all listed clades will be collapsed. If your tree does not have internal node IDs, you can use the last common ancestor method to define the the nodes to collapse.
The Collapsed clades section of the Advanced controls tab contains various options related to the display of collapsed clades.
By default, collapsed clades will be displayed as triangles with two side lengths proportional to the distances to node's closest and furthest leaves. They can also be displayed as simple isosceles triangles or circles, whose size can be fixed or proportional to the number of leaves they contain.
To expand a collapsed clade, click on it and select Expand clade from the node functions menu.
iTOL also provides several functions for automatic collapsing of clades (2):
Template file: prune.txt
Pruning is a process of selecting one or mode clades and/or leaves from the original tree and creating a new, smaller tree.
To start pruning, select Add clade/leaf to pruned tree from the node functions menu . A small dialog will be displayed showing the total number of leaves selected. To remove clades or leaves from the selection, click them and select Remove clade/leaf from pruned tree .
When you have selected all nodes of interest, click the Prune tree button to display the new tree.
In addition to manually selecting the nodes of interest, you can also use the template file prune.txt to specify a list of nodes to prune. Simply drop the file onto the tree display, and all listed nodes will be included in the pruned tree.
Pruning information can be removed through the menu in the control panel footer.
Template file: spacing.txt
You can highlight individual leaves by increasing their vertical spacing to the neighbouring nodes. In the example on the right, Danio rerio has a vertical spacing factor of 3 , while Homo sapiens has a factor of 2 .
In addition to manually setting the vertical spacing for the nodes of interest, you can also use the template file spacing.txt to specify a list of nodes and their vertical spacing factors.
If the vertical spacing factor is smaller than 1, the spacing to the neighbouring nodes will be shrinked proportionally.
Vertical spacing information can be removed through the menu in the control panel footer, by selecting ' Reset all branch styles '.
Template file: auto_taxonomy.txt
For phylogenetic trees whose leaf node identifiers correspond to NCBI taxonomy numeric IDs (e.g. 9606 for Homo sapiens ) or GTDB accession numbers (e.g. GCF_001272835.1 for Mycoplasmoides pneumoniae ), you can use the automatic taxonomy assignment function which is available on the Advanced tab of the control panel.
Alternatively, you can specify the taxonomy IDs for each leaf node using the auto_taxonomy.txt annotation file. When using the annotation file for the automatic taxonomy assignment, you can also define the format for the new leaf labels, by using the LABEL_FORMAT option.
The following steps will be performed:
Note that this function only updates the node labels. The original node identifiers still have to be used for any annotation assignments.
To save a tree view, you must be logged into your iTOL account, and have an active subscription .
Click the button in the footer of the main control panel to access the functions related to tree views.
When saving a tree view in iTOL, the following information is stored:
Note that the zoom level and the position of the tree on screen are not saved. The views can be saved in several ways:
Keyboard shortcuts help
Several commonly used iTOL functions can be accessed directly via keyboard shortcuts. Hover the mouse cursor over the keyboard icon in the bottom left of the tree page to display the currently defined keys.
Individual keys can be customized or disabled through the keyboard shortcut editing panel, which is accessible via the control panel options menu (click the icon in the panel header).
General tree function keys can be used anywhere, while the node specific function keys work only while hovering the mouse cursor over a tree node. The following functions are available:
| Function | Default key |
|---|---|
| Node functions (while hovering) | |
| Collapse clade | c |
| Rotate clade | r |
| Prune node | p |
| Edit node label | l |
| New colored range | n |
| Add to colored range | b |
| Re-root at node | t |
| Tree functions | |
| Display: circular | 1 |
| Display: rectangular | 2 |
| Display: unrooted | 3 |
| Toggle panels | h |
| Midpoint root | m |
If you would find additional keyboard shortcuts useful, contact us .
iTOL supports several types of tree annotation:
The annotation can be done is various ways, depending on the annotation type:
Unsaved changes warning dialog
To save annotations, you must be logged into your iTOL account, and have an active standard subscription .
Whenever any tree annotation is added or changed, a warning dialog shown on the right will be displayed.
If you want to commit your newly added or updated annotations, simply click the button. This will store all the annotation data into the iTOL database. If you do not save them, all changes will be lost when the tree page is reloaded, or the web browser closed.
If you do not wish to store the changes, or do not have an active subscription, simply export the tree figure before closing the page.
Structure of an annotation template
iTOL supports tree annotation through the use of plain text files which are simply drag and dropped onto the tree display. You can drop multiple files at once, and they will be processed sequentially. In addition to the drag and drop, you can use the button on the Datasets tab of the control panel or in the header of the datasets legend box.
Template files for all available annotation types are available in the corresponding sections in this help page. You can also download a ZIP file with all available templates. All template files include comments and detailed instructions. If you have trouble understanding any of the template options, or encounter issues in annotating your trees, please contact the developer .
The image on the right shows a structure of an example annotation template. All lines in the file starting with a hash sign ( # ) are ignored. Annotation files start with an ID keyword (which identifies the annotation type) on line 1 , followed by the SEPARATOR keyword on line 2 . The selected separator (COMMA, SPACE or TAB) specifies which character is used to separate the fields in the file, and it has to be used throughout the file (ie. both in the options section, and to delimit the actual data). Most annotation files contain a few mandatory options (for example, DATASET_LABEL and COLOR ) and a set of optional settings. Most settings can be later adjusted in the web interface through the 'Datasets' options tab of the control panel.
The actual data associated to each tree node is added below the DATA keyword (lines 6 - 8 in the image on the right). We have prepared a ZIP archive ( example_data.zip ) which contains our Tree of Life (filename tree_of_life.tree.txt ) and various example annotation files, filled mostly with random data. Try uploading the tree, and then dropping some of the annotation files onto it to get an idea how to prepare the annotations for your own trees.
iTOL also supports QIIME 2 QZA feature/annotation files, which can be dropped onto the trees uploaded through a QIIME 2 QZA file. See the QIIME section above for details.
When using annotation files to assign data to the internal tree nodes, there are two possibilities:
In the example above, to add an annotation to the node INT1 , you would specify Gallus_gallus|Homo_sapiens as the node ID in the annotation file.
Depending on the dataset type, values associated to internal nodes will only be visible when the node is collapsed. However, such dataset types have an additional option " Display internal node values " (field SHOW_INTERNAL in the annotation file), which can force the display of internal node values even when these are not collapsed. Note that this could result in overlapping displays, if there are values for the leaf nodes present as well.
In addition to direct node ID matching, it is possible to assign a single annotation value to multiple nodes simultaneously.
To match multiple nodes, replace the node ID value in the annotation file with the keyword CONTAINS== , followed by the text to be matched. All node IDs which contain this text will be assigned the annotation specified.
Here is an example colored strip dataset :
DATASET_COLORSTRIP SEPARATOR COMMA DATASET_LABEL,multi ID matching example COLOR,#00ff00 CONTAINS==us,#ff0000In the example above, all node IDs which contain the text ' us ' (due to the ' CONTAINS==us ' definition) are assigned a red colored strip (' #ff0000 ').
This function is available in the following annotation file types: TREE_COLORS , Colored/labeled ranges , Branch and label styles dataset , Colored strip dataset , Branch/external symbols dataset and Text labels dataset . If you would find this feature useful in some other dataset type, please contact the developer .
Note for advanced users: the matching is performed using a Javascript RegExp, so any standard RegExp pattern/special character can be used in the text.
Template file: labels_template.txt
Supported by the iTOL annotation editor for spreadsheets
Internal node with defined name and class
To quickly change the text assigned to the leaf nodes, or to assign/change names for the internal tree nodes, use the LABELS annotation file. Label text can also be changed interactively through the node functions menu , by using the Edit label button from the Labels submenu.
Note that this function only changes the actual text of the labels, you will still need to use the original tree node IDs in any other annotation files.
In addition to the name/label, you can specify a custom class for internal tree nodes. Class can be any custom text value, and will be displayed in the node information popup together with the name ( 'genus' in the figure on the right).
More importantly, internal node classes can be used to automatically collapse clades .
Tree labels bulk editing functions
Use the Bulk edit button in the Other functions section of the advanced control panel tab to access several convenience functions. These will be applied to all leaf and internal labels at once, unless the filtering options are used. You can include or exclude labels containing any text by using the corresponding fields in the Filtering section.
The following functions are available:
Template file: label_multistyle.txt
Mixing multiple different styles (e.g. one word bold and another one italic) within regular tree labels can be accomplished in several ways:
Each tree label will be split into parts using a separator character provided ( space by default), and style rules defined will be applied to each part.
By default, the rules will be applied to all labels in the tree. Use the filtering options to select a subsets of labels, and apply different styles to them:
Separate style can be defined for each label part, consisting of the following attributes:
Use the Reset all button to remove all style definitions back to default.
Note that any label text changes (for example, by using the LABELS annotation file, or through the iTOL annotation editor ) are not automatically propagated to the multi-style labels. After updating the label text, you will have to re-apply the styles.
Template file: popup_info_template.txt
If you want to display additional information in the popup windows which appear when hovering mouse pointer over tree nodes or labels, you can use the POPUP_INFO annotation file.
For each tree node ID, you can define both the popup title and the content. Content can be plain text or any valid HTML (including links to external web sites, or IMG tags pointing to external images).
Embedding external videos or other media is possible as well, here is an example tree with embedded Youtube videos .
If you encounter problems with the popup display please contact the developer .
Interactively defining colors and styles
Colors and styles for the tree branches and leaf labels can be set by using the TREE_COLORS annotation file, or interactively through the node functions menu . Simply click on any node or label, and select the desired function from the 'Editing' section of the popup menu.
By using the TREE_COLORS annotation file, you can define the colors, styles and widths/sizes for each individual node or label in the tree. To assign styles to the internal tree nodes, check the relevant section above .In addition to setting the label text color, a separate background color can be specified for each label.
Note that most of the TREE_COLORS functionality is also available through the Branch/label styles dataset , which allows multiple color styles to be defined (by using several separate styles datasets). TREE_COLORS annotation should be used for static, permanent style annotations.
Additionally, when uploading phyloXML formatted trees, branch colors and width factors will be parsed from the corresponding phyloXML annotations, if these are present ( <color> and <width> within <clade> elements). Note that the colors must be specified via <red> , <green> , <blue> and <alpha> elements, as per the phyloXML schema .
Branches with color gradient lines
When the Color gradient option on the Basic tab of the control panel is set to On , branch lines will be colored with a gradient starting from the ancestor node color towards the actual node color.
This feature can be used regardless of the source of branch colors ( metadata based coloring , TREE_COLORS annotation file , Branch styles dataset or direct interactive color settings).
Working with colored ranges (legacy)
Please note that colored ranges have been superseded by the Colored/labeled ranges datasets , which provide many additional features. You can convert your existing legacy colored ranges to a dataset by clicking the button ( 3 ) in the colored ranges legend header.
Colored ranges provide a simple means of highlighting a set of tree leaf nodes or clades. Use the buttons in the colored ranges legend box to switch between the coverage modes:
Colored ranges can be defined by using the TREE_COLORS annotation file, or interactively through the node functions menu . Simply click on any node or label, and select the desired function from the 'Colored ranges' submenu. You can simply create new colored ranges or add nodes to existing ones.
By using the TREE_COLORS annotation file, you can define a large number of colored ranges without the need to use the interactive mode. Check the template file for details and instructions. To assign ranges to internal tree nodes, check the relevant section above . If you need the colored ranges legend 1 in the exported tree figures, click the icon in the ranges function box header 2 , and set the Draw legend option to On . Note that the colored ranges legend is sortable. Simply click a range label in the colored ranges function box, and drag the range to a new position.iTOL can annotate trees with several types of datasets, described in detail below . Datasets can be created in several ways:
The display of each dataset is controlled through the toggle button ( 1 ) next to each dataset label in the legend box.
Access the dataset options ( 4 ) by clicking the corresponding gear icon ( 2 ) in the legend box. Dataset options can also be quickly accessed by double clicking any dataset element in the tree display.
To delete a dataset, hover over its label in the legend box and a click the trashcan icon that appears ( 3 ).
The order of the datasets in the legend box can be changed by dragging the individual rows. The order is saved with tree views , or when saving the default tree view.
The number of datasets is limited only by the available memory, and they can all be displayed simultaneously. Datasets are displayed in the order they are switched on. You can adjust the dataset position by changing its Left margin option, which can be positive or negative.
Depending on the dataset type, use the buttons in the Editing functions section ( 5 ) to edit the dataset legend , scale or the data itself .
After changing any of the available dataset options, you can save the parameter changes ( 6 ) in the iTOL database. Note that this function requires an active standard subscription .
Web dataset editor interface
Some dataset types can be created or edited directly in through the iTOL web interface. Simply click the button in the 'Datasets' tab of the control panel or the icon in the datasets legend box.
Existing datasets, even if created from template files, can be edited at any time. Simply click the button in the Editing functions section of the dataset options.
The web dataset editor is suitable for simple datasets and smaller trees. For large amounts of data, please use annotation templates or the iTOL annotation editor for spreadsheets .
To add a new row, click the Add button ( 1 ). Double click any cell to edit it. Tree node column will provide an auto-complete popup showing the matching tree IDs. You can add values to internal nodes which do not have IDs assigned by using the last common ancestor method.
When working with dataset types which support multiple value fields for each node (e.g. Multi value bar charts , Pie charts or Binary datasets ), click the Add a field button ( 2 ) to define additional fields. Existing fields can be edited through the column option menu ( 3 ). Click and drag the column headers to change the field order.
To visualize your entered data, click the button ( 4 ). This will update the display, and keep the editor open. button will close the editor after updating the display.
Once the editing is complete, you can optionally save the dataset into the iTOL database.
iTOL annotation editor for spreadsheets
Full access to the iTOL annotation editor requires an active editor subscription .
The most convenient way of creating and editing datasets and other tree annotations is through the iTOL annotation editor for spreadsheets . It offers full access to your iTOL account though the familiar spreadsheet user interface of Microsoft Excel, LibreOffice Calc or Google Sheets. The following annotation functions are supported by the editor:
If you encounter any problems with the editor, please contact us . LEGEND_TITLE,Example legend LEGEND_SHAPES,1,1,3,2,OC LEGEND_COLORS,#ff0000,#0000ff,#00ff00,#8e7cc3,#ffff00 LEGEND_LABELS,value1,value2,value3,value4,value5 LEGEND_SHAPE_SCALES,1,0.5,1,1,1 LEGEND_SHAPE_INVERT,1,0,0,0,0
An example dataset legend
All datasets in iTOL can have an individual dataset legend, which will be displayed only when the dataset is visible, and will also be included in the exported tree figures.
When using dataset annotation files , the legend is defined using the fields LEGEND_TITLE , LEGEND_SHAPES , LEGEND_COLORS and LEGEND_LABELS .
Optionally, you can set the sizes of individual shapes by using the LEGEND_SHAPE_SCALES field. For each shape, set a scale from 0 to 1.
Using the LEGEND_SHAPE_INVERT field, you can invert each shape, so that its border color corresponds to the selected color, and there is no fill.
Legends can also be created or edited interactively by clicking the button in the Editing functions section of the dataset options. You can also double click any displayed legend to directly open the legend editor. When using the interactive legend editor, click the button to populate the fields automatically from the dataset information.
By default, legends will be automatically positioned one below the other on the left side of the tree. You can click and drag any legend to change its position, or use the LEGEND_POSITION_X and LEGEND_POSITION_Y values in the annotation file to set the legend position.
Individual legend entries are displayed vertically below each other. To order them horizontally instead, you can set the LEGEND_HORIZONTAL value to 1 .
To increase or decrease the size of the whole legend, use the LEGEND_SCALE parameter. If you do not want to visualize the legend, but still want to have it defined, set the LEGEND_VISIBLE parameter to zero. Visiblity can be later toggled through the interactive legend editor.
When displaying legends of various color gradients, you can set the LEGEND_GRADIENT value to 1 , and use the square shape for all fields. This will disable the shape borders, and display them without spacing.
LEGEND_SHAPES are defined with a number between 1 and 9, or with any domain shape code (e.g OC for the value 5 in the example on the right):
1square
2circle
3star
4right triangle
5left triangle
6checkmark
7solid line
8dashed line
9dotted line
Several dataset types support the display of custom scales: Simple bar chart , Multi value bar chart , Boxplot , Protein domains and MEME motifs . When using dataset annotation files , scales are defined through the DATASET_SCALE field.
Scales can also be created or edited by clicking the button in the Editing functions section of the dataset options.
You can simply provide a list of values which define where the scale lines will be displayed (Example 1 below and in the figure on the right). Optionally, it is possible to define the line color and a label to be displayed with each line, as well as the line style (Example 2 below and in the figure on the right). Label, color, width and style (normal or dashed) for a scale line are added after the value, separated with dashes (format: VALUE-LABEL-COLOR-WIDTH-DASHED-LABEL_SCALE_FACTOR):
All dataset types supported by iTOL are described below, with links to their corresponding template files . Many dataset types can be created through the web editor , or from Microsoft Excel / LibreOffice Calc / Google Sheets by using the iTOL annotation editor .
Templates are commented and contain one or more examples explaining the various dataset specific options. If you encounter any problems with using these templates, or do not understand some of the available options, please contact the developer .
A binary dataset with multiple columns
Binary datasets are visualized as outlined or filled symbols. Each tree node can have multiple fields, and each field can be represented by a different symbol (as defined in the FIELD_SHAPES line) with the corresponding color and label (as defined in the FIELD_COLORS and the FIELD_LABELS lines). Possible data values for each field are:
Shapes are defined in the FIELD_SHAPES line, with a number between 1 and 6:
1square
2circle
3star
4right triangle
5left triangle
6checkmark
A simple bar chart with values and custom labels displayed inside the bars
In simple bar chart datasets, each tree node is associated to a single numeric value which is displayed as a bar outside the tree.
The bar for the maximum value in the dataset will have the pixel size specified in the MAXIMUM_WIDTH field, with other bars proportionally smaller. The color of the bars is defined in the COLOR field. These values can be changed later through the dataset options tab.
The position and the width of the individual bars can be adjusted through the Left margin (MARGIN) , Bar thickness factor (HEIGHT_FACTOR) and Bar shift (BAR_SHIFT) options in the dataset options.
In addition to the numeric value, a custom label can be specified for each node, which can be displayed instead of the value (when SHOW_VALUE and/or SHOW_LABELS are set to 1). The position of the value or custom labels can be changed through the LABEL_POSITION parameter, and fine-tuned by using LABEL_SHIFT_X and LABEL_SHIFT_Y .
5 value bar chart dataset with (a) aligned and (b) side stacked fields and values displayed
In multi value bar charts, each tree node is associated to multiple numeric values, which are displayed as a stacked or aligned bar chart outside the tree. Fields are stacked horizontally by default, but they can also be stacked vertically next to each other ( (b) in the example on the right. When side stacking many fields, you can use the tree scaling factors on the advanced tab of the control panel to increase spacing between nodes (only in normal tree display mode).
The individual fields (values) must have a corresponding label and color, which are defined through the FIELD_LABELS and FIELD_COLORS lines in the template. The node with the maximum sum of field values will have the total pixel size specified in the MAXIMUM_WIDTH field, with other bars proportionally smaller.
The position and the width of the individual bars can be adjusted through the Left margin (MARGIN) , Bar thickness factor (HEIGHT_FACTOR) and Bar shift (BAR_SHIFT) options in the dataset options.
To display the numeric values as text labels inside the bars, set SHOW_VALUE to 1. The position of the value labels can be changed through the LABEL_POSITION parameter, and fine-tuned by using LABEL_SHIFT_X and LABEL_SHIFT_Y . Color of the label can be defined through BAR_LABEL_COLOR , or calculated automatically to match the darkness of the background by setting LABEL_AUTO_COLOR to 1.
Note about the scales: If a scale is defined in a multi value bar chart dataset, and its individual fields are aligned, the scale will be duplicated and shown in each individual field (like in the example on the right). If the fields are not aligned, only one scale will be shown.
Two pie chart datasets, one with internal and one with external pie charts. Internal dataset is displayed as a polar area diagram, instead of standard pie chart.
In the pie chart datasets, each tree node is associated to multiple numeric values, which are displayed as a pie chart directly on the node branch, or outside the tree. Individual fields (values) must have a corresponding label and color, which are defined through the FIELD_LABELS and FIELD_COLORS lines in the template.
The first field after each node ID in the DATA section specifies the pie chart position. If this value is -1 , pie chart will be external (ie. displayed outside the tree). Otherwise, it should be a number between 0 and 1 , specifying the ratio of the branch length where the pie chart should be positioned (ie. position 0 is exactly at the start of node branch, 0.5 is in the middle, and 1 is at the end).
The second field specifies the relative pie chart radius. The maximum radius value will be visualized using the pixel value specified in the dataset options, with other radii scaled proportionally.
In addition to standard pie charts (all slices have equal radius, and varying angles), data can be visualized as polar area diagrams (all slices have equal angle, and varying radii), by setting the POLAR_AREA_DIAGRAM option to 1 . An example is shown on the right, where internal charts are displayed as polar area diagrams.
Text labels with multiple styles
In the text label datasets, each tree node is associated to a single text label, which can be displayed directly on the node branch, or outside the tree.
For each label, the exact position, color, font style, size factor and degree of rotation can be specified.
If the position is set to -1 , the label will be external (ie. displayed outside the tree). Otherwise, it should be a number between 0 and 1 , specifying the ratio of the branch length where the center of the label should be positioned (ie. position 0 is exactly at the start of node branch, 0.5 is in the middle, and 1 is at the end).
External labels can be aligned to the tree, both in circular and rectangular display modes. This will ignore any other rotation parameters.
Labels are normally rotated to match the current tree rotation. The Straight labels option ( STRAIGHT_LABELS line in the template) will make all labels appear straight ( or rotated by their individual rotation angles), regardless of the current tree rotation.
Internal labels can be displayed above or below the branches, and shifted vertically be any amount of pixels. Through this feature, multiple labels can be assigned to a single branch (by using multiple text label datasets).
To apply multiple font styles to the original tree labels, please use the multi-style label creator or its associtated annotation template.
Text labels dataset can be used to create labels which contain a mixture of different styles. Multiple styles can be used only on external labels (ie. position is set to -1 ), and which are not aligned to the tree.
Styles are defined through different tags in the text label definition:
All parts of the label must be enclosed by one of the possible tags, including any space characters.
Each tag can be expanded with additional attributes :
Note that the tags ( n , b ...) and attribute keywords ( color , size , font ) must be written in lowercase .
Example (figure on the right): <n>Takifugu rubripes</n> <b>Danio </b><i>rerio</i> <b>Gallus </b><i>gallus</i><sub size='0.5' color='red'>subscript example</sub> <b color='red'>M</b><b color='blue'>u</b><b color='green'>s </b><i>musculus</i> <b>Rattus </b><i font='Courier' >norvegicus</i> <b>Pan </b><i>troglodytes</i> <bi color='#006600'>Homo </bi><i>sapiens</i><sup size='0.5' color='#999999'>citation</sup> Use the symbol datasets to display various shapes directly on the branches of the tree. For each tree node, one or more symbols can be defined. Each symbol's color, size and position along the branch can be specified. Symbols can be filled with color, or drawn as outlines. To fill the symbols with gradients instead of solid colors, use the GRADIENT_FILL option.Symbol's position can be:
Shapes are defined with a number between 1 and 5:
1square
2circle
3star
4right triangle
5left triangle
6checkmark
This dataset type allows the customization of the display styles for tree branches and leaf labels.
It has all the functionality of the
TREE_COLORS
annotation file, but acts as a dataset. Therefore, multiple separate style datasets can be
present on a tree, and you can switch between various branch/label styles interactively. If multiple styles datasets are turned
on simultaneously, only the last one will be applied.
Style definitions can be applied to single nodes/labels, or to the whole clades. Check the template file for details.
Use this dataset type to highlight various clades or leaf ranges by using colored boxes or brackets.
It has all the functionality of the colored ranges defined through a
TREE_COLORS
annotation file, but acts as a dataset. Therefore, multiple separate colored/labeled range datasets
can be present on a tree, each with a different style and individual options (e.g. image on the right has 6 different range datasets).
Ranges are defined with a START_NODE_ID and an END_NODE_ID . These can both point to the same node, and they can also be internal tree nodes. Multiple ranges can be created from a single definition line by using the CONTAINS== keyword in the START_NODE_ID field. In this case, END_NODE_ID is ignored, and ranges will be created for each node which matches the provided keyword.
Ranges can be visualized as colored boxes/polygons or as different types of brackets (square, curved or plain lines).
If both FILL_COLOR and GRADIENT_COLOR are defined, the range box will be filled with a color gradient or the bracket line color will be a gradient.
Each range can have a text label defined, which can be individually styled and positioned.
In the unrooted tree display mode, ranges will be displayed as polygons which can be simplified or smoothed through the parameter UNROOTED_SMOOTH . Label positioning is limited in unrooted display mode.
In colored strip datasets, each tree node is associated to a color definition which is displayed as a filled rectangle outside the tree, and can have an optional label (shown in the popup when hovering over the colored rectangle). Similar to all other color definitions in iTOL, the color can be specified in hexadecimal, RGB or RGBA notation (if transparency is required).Each colored strip can have a border of varying width and color. By default, the border will be displayed as a separator along the complete strip (ie. on the sides towards the tree and following datasets). Use the COMPLETE_BORDER option to draw the border around each individual strip box instead.
Individual strip labels (when defined) can be displayed inside the colored boxes by using the SHOW_STRIP_LABELS option. You can adjust the label position ( STRIP_LABEL_POSITION ), color ( STRIP_LABEL_COLOR ), size factor relative to the tree leaf labels ( STRIP_LABEL_SIZE_FACTOR ), label rotation ( STRIP_LABEL_ROTATION ; only applicable in the rectangular display mode), label shift ( STRIP_LABEL_SHIFT ) and the text outline width ( STRIP_LABEL_OUTLINE ; can be used to highlight transparent or similarly colored labels). Color of the labels can be calculated automatically to match the darkness of the color strip by setting STRIP_LABEL_AUTO_COLOR to 1.
By using the COLOR_BRANCHES template option, the colors of tree branches will match the colored strips above them. Ancestral branches whose children have identical colors will be colored as well, propagating the branch coloring towards the root of the tree.
A color gradient dataset
In color gradient datasets, each tree node is associated to a single numeric value, which is displayed as a colored rectangle outside the tree.
Dataset values are mapped to a color gradient defined in the annotation file (through the fields COLOR_MIN , COLOR_MAX and optionally COLOR_MID ). The colors can also be changed through the dataset options tab of the control panel.
If the option USE_MID_COLOR is set to 1 , a three color gradient is created, with the mid-point numeric value in the dataset represented by the COLOR_MID color.
Each color gradient can have a border of varying width and color.
An example connections dataset with arrow heads displayed
Connections datasets allow the drawing of straight or curved lines between any two nodes in the tree. Width, color, style (normal or dashed) and opacity can be set for each connection. Optionally, arrow heads can be displayed to denote the direction of the connection lines.
The connection lines will be straight by default, but the curvature angle can be adjusted through CURVE_ANGLE option. When the tree is displayed in circular or unrooted modes, you can use the Center curves option ( CENTER_CURVES in the template) to pull the connection lines towards the tree root, instead of using the curve angle.
Connections within a single node (ie. where source and destination nodes are the same) are displayed as loops, whose size can be changed through the LOOP_SIZE option.
If the Align to labels option is set, connection start and end points will be aligned to the outside of the tree labels, regardless of the actual position of the nodes in the tree (ie. even connections to or from internal tree nodes will be displayed outside the leaf labels).
Comparing similar trees through a tanglegram dataset
In tanglegram datasets, an additional tree is displayed next to the main tree, and their leaves/nodes linked with a set of connections.
The tree definition should be placed between the TANGLEGRAM_TREE and END_TANGLEGRAM_TREE fields in the template. The tree can be in Newick or Nexus format, with full support for additional metadata (including NHX and MrBayes metadata). All nodes with matching IDs will be linked automatically, and additional connections can be defined in the DATA section of the template.
As described in the template comments, the DATA section in the tanglegram dataset can be used to define two different annotation types, depending on the first field in each line:
A heatmap dataset with an additional tree
In heatmap datasets, each tree node is associated to multiple numeric values, which are displayed as a set of colored boxes. Dataset values are mapped to a color gradient defined in the annotation file (fields COLOR_MIN , COLOR_MAX and optionally COLOR_MID ), which can also be changed through the dataset options tab.
Individual fields are defined in the FIELD_LABELS line, and they will be displayed above the color matrix.
Optionally, an additional Newick formatted tree can be specified in the FIELD_TREE line. If present, this tree will be displayed above the dataset labels, and will be used to define the order of the fields in the matrix.
Empty data fields can be specified using the letter ' X ' instead of the numeric value. These will be colored using a separate color, defined using the option COLOR_NAN .
Original heatmap data can be normalized in several ways. First select the direction of normalization by setting the DATA_NORMALIZATION to 'rows' (which will normalize the data for each tree node), or 'columns' (which will normalize the data for each heatmap field). The following normalization types are available, and set through the NORMALIZATION_TYPE field:
Actual numeric values can be displayed in the heatmap boxes through the field DISPLAY_VALUES . Set it to 'original' to display the actual data values, or 'normalized' to display the normalized value (applicable only when data normalization is used). You can customize the style of the value label display by using VALUE_COLOR , VALUE_SHIFT , VALUE_ROTATION and VALUE_SIZE_FACTOR . Color of the label can be calculated automatically to match the darkness of the background by setting VALUE_AUTO_COLOR to 1.
Use VALUES_SCI_NOTATION to display values in scientific notation (e.g. 1e3 for 1000) and ROUND_VALUES to set the number of decimals.
An example protein domain architecture dataset, exported from SMART
Protein domain datasets are visualized as schematic representations of proteins, with a protein backbone and various shapes depicting the locations of individual domains. Even though its primary use is for the display of protein domain architectures, it can be used for various other purposes, as it offers a lot of flexibility.
Each tree node can have one protein definition assigned, with the total protein length defined in second field, followed by an unlimited number of domain definition fields. Each domain definition consists of 5 parts, separated with vertical lines:
SHAPE|START|END|COLOR|LABEL
Domain shape codes are as follows:
CodeShapeExample RErectangle
HHhorizontal hexagon
HVvertical hexagon
ELellipse
DIrhombus (diamond)
TRright pointing triangle
TLleft pointing triangle
PLleft pointing pentagram
PRright pointing pentagram
PUup pointing pentagram
PDdown pointing pentagram
OCoctagon
GPrectangle (gap)
In shape plots, each tree node has multiple numeric values associated with it. The values are displayed as geometric shapes of different sizes in consecutive columns outside the tree.
Highest value in the dataset will have the largest size, and all others will be scaled down proportionally.
Labels and colors for each column are defined in the FIELD_LABELS and FIELD_COLORS lines. Optionally, a grid can be rendered behind the columns and the actual values can be displayed above the shapes. The shapes can be either filled with the defined colors, or displayed as outlines.
Display shape is defined in the SHAPE_TYPE line, with a number between 1 and 5, and can be changed later through the dataset options control tab.
1square
2circle
3star
4right triangle
5left triangle
A boxplot dataset with a custom scale
Boxplots (box and whisker diagrams) display the distribution of data based on the five number summary: minimum, first quartile, median, third quartile, and maximum.
In addition to the five number box plot summary, each tree node can have an unlimited number of extremes defined, which will be displayed as crosses.
The largest value in the dataset (including extremes) will be at the position defined in the MAXIMUM_WIDTH field.
An example summary of phylogenetic placement data, with the full list of matching sequences in a branch
iTOL supports the visualization of .jplace files created by pplacer and RAxML . Simply upload a .jplace file as a any other standard tree. Note that the file extension must be .jplace , otherwise the file will not be correctly recognised.
iTOL will visualize the Newick tree contained in the file, and the phylogenetic placement information will be extracted as a separate dataset. Summary of placements will be automatically created, and can be visualized in various ways by changing the Summary type in the dataset options tab of the control panel.
When summaries are displayed as symbols, click any symbol to display a full list of sequences mapped to it. Clicking on a sequence name in the table will highlight all other branches where it was placed.
Individual sequences can be searched and highlighted through the Query placements form . In the search results list, simply click any sequence to highlight its placement positions. Highlight symbols will be positioned according to the distal_length and sized according to the like_weight_ratio values. Multiple sequences can be highlighted at the same time, using different symbols and colors. Use the Clear highlights button to remove all highlights from the tree.
An example multiple sequence alignment visualized on a tree, with 2 reference sequences highlighted
This dataset type allows the visualization of multiple sequence alignments directly next to the tree. The alignment should be in FASTA format, and must be placed below the DATA keyword in the template file.Consensus sequence (at 50% conservation) and residue conservation will be calculated automatically. The threshold for consensus calculation can be changed by using the CONSENSUS_THRESHOLD parameter. To ignore any gaps in the alignment when calculating the consensus, set IGNORE_GAPS to 1.
Residues in the alignment can be highlighted as dots, by using the HIGHLIGHT_TYPE field. When set to consensus , each residue will be displayed as a dot if it does not match the consensus sequence. By setting the HIGHLIGHT_DISAGREEMENTS field to 1, matching residues will be displayed as dots instead.
When HIGHLIGHT_TYPE is set to reference , residues will be compared to the reference sequences defined in the HIGHLIGHT_REFERENCES filed. HIGHLIGHT_REFERENCES is a list of one or more tree leaf IDs which will be used as references in the alignment. If only one reference is defined, all residues will be compared to it directly. If multiple references are defined, each sequence will be compared to the first reference sequence above it in the alignment. Note that the top leaf should also be included in the references in this case.
When defined, reference sequences can be marked with boxes by setting MARK_REFERENCES to 1 .
In addition to the most common alignment coloring schemes, it is possible to define custom schemes through the 'CUSTOM_COLOR_SCHEME' option in the dataset template. Multiple custom color schemes can be defined, and they will all be listed in the color scheme selection box in the dataset options tab.
Displaying large alignments (sequences with more than 1000 - 2000 residues) will severely impact performance, please be patient when manipulating the tree display. Due to internal browser limits, alignments blocks that can be displayed are limited to approximately 4000 residues.iTOL provides a set of very simple drawing tools which allow adding basic manual annotations to trees. These are not intended to be used for any complex drawing / annotation, you should use a proper vector graphics editor if required.
After creating the dataset through the button, click the in the dataset settings to open the tool panel, then click any of the tool buttons to select it. The following tools are available:
Note that all manual annotation positions and sizes are specific for the current tree display. If you change the display mode, or change the tree structure, the annotation positions will NOT change accordingly.
An example visualization of MEME suite analysis. Some motifs are displayed as MEME motif logos.
iTOL supports the visualization of .xml files created by the MEME suite . Simply drag and drop a MEME .xml result file onto the tree display. Note that the tree leaf IDs must match the sequence IDs in the MEME results.Motifs will be visualized similarly to the 'Motif Locations' section of the MEME HTML output files. If strand information is present, motifs will be visualized above and below the backbone line, depending on their strand.
Hover over any motif to display a popup window with basic information about it, including the sequence and other details. Click on any motif to switch between the simple box representation and the motif logo display. You can increase the height of the motif logo display through the dataset settings, so it spans both strands instead of just one.
Use this dataset template to add various external images onto the tree. Each node in the tree can be associated with a bitmap (any format supported by your browser) or a vector image (SVG).Images can be displayed internally on the tree branches, or outside the tree. In addition, each image's scale and position can be individually adjusted.
Image URL has to be specified in full (including the protocol, e.g. http:// ), and the images have to be accessible via that URL by your browser. They are not accessed by iTOL directly, unless you export the tree into any format other than SVG.
Use this dataset template to visualize line charts. Each node in the tree is associated with a series of points, defined with their X and Y coordinates. Line charts can be displayed horizontally or vertically next to the nodes. To increase the spacing between the tree leaves (and make more space available for the charts), use the tree Scaling factors on the Advanced controls tab. Custom axes grids can be defined through the fields AXIS_X and AXIS_Y . Each line's color and width can be separately defined. AXIS_X will draw horizontal lines (i.e. values correspond to Y values), while AXIS_X will draw vertical lines (i.e. values correspond to X values) Each line chart can be displayed using dots, lines or both. Default colors for dots and lines can be defined separately.In addition, a series of color ranges can be defined using the field LINE_COLORS (see below). Each range consists of a Y value and the color, separated using a vertical line. For each point in the dataset, the first LINE_COLORS color whose value is above the point's Y value will be used to color the dot and line extending from it
In the example below, Y value of -10 would correspond to red (#ff0000), Y value of 2 would be black (#000000) and a value of 10 would be green (#00ff00)
LINE_COLORS -4|#ff0000 4|#000000 100|#00ff00
Use the Export tab of the control panel to access the the tree export functions. Depending on the export format selected, several additional options are available:
When exporting bitmap or vector images (other than SVG), your job will be added to the export processing queue. Once the export is completed, the download will start automatically.
If you use the exported figures in a publication, please cite the latest iTOL paper if possible.
In addition to the standard figure export, you can click the Share button to create a shared export. The exported figure will be stored on the iTOL server and associated with the tree. Send the tree ID to your collaborators, and they can type it into the box on the top of the data sharing page to access all the shared exports for that tree.
To delete shared exports, visit the Export management page which will show all your shared exported figures.
Tree shared exports can also be accessed through a simple URL:
https://itol.embl.de/export/ treeID
iTOL supports batch tree upload and export through a simple CGI interface. We are providing it for advanced users who want to upload or export their trees directly from other scripts/programs. Please be considerate to other users if you're using this method to access iTOL. Make sure to wait at least a few seconds between requests, particularly if exporting to PNG.
Example uploader and downloader Perl scripts are available for download . Check the external tools section for alternative options.
URL : https://itol.embl.de/batch_uploader.cgi
To use the batch upload, you must have an active standard subscription .
iTOL batch uploader is a standard CGI script, available at https://itol.embl.de/batch_uploader.cgi . Use a standard POST request to submit your data. Available parameters are described below. The script will produce plain text output (Content-type text/plain), as follows:
a ZIP archive containing the tree and all other dataset and annotation files. Your tree file must have the extension .tree , .tree.txt or .jplace . All other files can be named as you wish. When the files are processed during upload, they will be sorted by name, allowing you to order the datasets (if required).
URL : https://itol.embl.de/batch_delete.cgi
Note that tree or project deletion cannot be undone.
iTOL batch delete is a standard CGI script, available at https://itol.embl.de/batch_delete.cgi . Use a standard POST request to submit your data. Available parameters are described below. You can delete individual trees (by using the tree parameter), or complete projects (by using the project parameter). The script will produce plain text output (Content-type text/plain), as follows:
URL : https://itol.embl.de/batch_downloader.cgi
A subscription is not required to use the batch downloader.
iTOL batch downloader is a standard CGI script, available at https://itol.embl.de/batch_downloader.cgi . Use a standard POST or GET request when submitting your download parameters. Available parameters are described below. The script will generate output as follows:
If you don't specify one of the optional parameters, values which are saved as the defaults for the tree will be used (or standard iTOL defaults, if none were saved). Apart from newick_format , all parameters are used only during export to graphical formats. If you require an option which is available in the iTOL web interface, but is missing from the list below, contact us .
A selection of iTOL related external tools / helper scripts:
Please contact the authors of these tools directly if you encounter any issues.