The itol.toolkit is an R package that provides helper functions for the Interactive Tree Of Life (iTOL). This package has been selected as a third-party tool in iTOL documentation and is recommended as one of the Top 40 New CRAN packages in January 2023 by the R Views channel of RStudio.
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.
install.packages("pak")
# from CRAN
::pak('itol.toolkit')
pak
# from GitHub
::pak('TongZhou2017/itol.toolkit') pak
pak
method, you can still use
the traditional installation 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")
::install("Biostrings")
BiocManager
# from CRAN
install.packages("itol.toolkit")
# from GitHub
# install.packages("devtools") # if you have not installed "devtools" package
::install_github("TongZhou2017/itol.toolkit") devtools
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
library(itol.toolkit)
# read data
<- system.file("extdata",
tree "tree_of_itol_templates.tree",
package = "itol.toolkit")
data("template_groups")
<- data.frame(id = unique(template_groups$group),
df_group data = unique(template_groups$group))
# create hub
<- create_hub(tree = tree)
hub
## create unit
<- create_unit(data = df_group,
unit key = "Quickstart",
type = "DATASET_COLORSTRIP",
tree = tree)
## add unit into hub
<- hub + unit
hub
## write template file
write_hub(hub,getwd())
We have documents for every single function and some important tips for users:
COLLAPSE: collapse branches by range id or node id.
PRUNE: drop out branches.
SPACING: adjust branch spacing.
TREE_COLORS: set branch style at range, clade, branch, label, and background level.
DATASET_STYLE: set branch style at branch and label level.
LABELS: change node name.
DATASET_TEXT: add text by HTML.
DATASET_COLORSTRIP: add color strip with text.
DATASET_BINARY: multi columns with one shape symbol.
DATASET_GRADIENT: one column heatmap.
DATASET_HEATMAP: heatmap with field tree.
DATASET_SYMBOL: internal tree one column with multi shape symbol.
DATASET_EXTERNALSHAPE: outside multi column with multi shape symbol.
DATASET_DOMAINS: strucutre with multi shape symbol.
DATASET_SIMPLEBAR: bar plot.
DATASET_MULTIBAR: multi bar plot.
DATASET_BOXPLOT: box plot.
DATASET_LINECHART: line plot.
DATASET_PIECHART: pie plot.
DATASET_ALIGNMENT: sequence alignment.
DATASET_CONNECTIONS: network between braches.
DATASET_IMAGE: add image.
POPUP_INFO: interactive external information.
Overview: overview for all functions.
Installation: FAQ about installation.
Datasets: overview of 5 example datasets for demo.
Colors: buildin color palette.
Data reproduction: learn data from template files.
VS table2itol: compare with the other iTOL helper tool, table2itol.
Tree construction: create a tree by different data and methods.
We collected reproducible plots into a gallery page.
Please open an issue to report bugs, propose new functions, or ask for help.