Helper Functions for Interactive Tree Of Life (iTOL)


  • Support all 114 themes among all 23 template types in iTOL v6

  • High throughput generate templates in one command

  • Learn published template themes and use theme

  • Save all-in-one reproducible data locally


Based on the dependence packages from CRAN and Bioconductor source. We recommend to use pak to install itol.toolkit package automatically to avoid problems.


# from CRAN

# from GitHub
If you prefer not to use the pak method, you can still use the traditional installation method.
[Click to view] Traditional method

To install the stable versions, you can use the CRAN official repository. For development versions, you can use the GitHub repository. However, if you need to install packages from Bioconductor, you’ll need to use the BiocManager package.

# install Biostrings
# install.packages("BiocManager")

# from CRAN

# from GitHub
# install.packages("devtools") # if you have not installed "devtools" package
Please note that in order to use this software, you will need to manually install the required dependencies from Bioconductor. A complete list of the necessary packages and installation instructions can be found in the supplementary materials.

If you encounter any issues during the installation process, such as problems caused by other systems, R versions, or dependency packages, please refer to the supplementary materials for a solution.


# load package

# read data
tree <- system.file("extdata",
                    package = "itol.toolkit")
df_group <- data.frame(id = unique(template_groups$group), 
                       data = unique(template_groups$group))

# create hub
hub <- create_hub(tree = tree)

## create unit
unit <- create_unit(data = df_group, 
                    key = "Quickstart", 
                    type = "DATASET_COLORSTRIP", 
                    tree = tree)

## add unit into hub
hub <- hub + unit

## write template file


We have documents for every single function and some important tips for users:

Single functions (Updating 20+)

  • COLLAPSE: collapse branches by range id or node id.

Tips (Updating 5+)

  • Datasets: overview of 5 example datasets for demo.


Please open an issue to report bugs, propose new functions, or ask for help.


MIT License