Learn R Programming

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.

First version published in Bioinformatics journal, Please cite:

Tong Zhou, Kuidong Xu, Feng Zhao et. al. itol.toolkit accelerates working with iTOL (Interactive Tree Of Life) by an automated generation of annotation files, Bioinformatics, 2023;, btad339, https://doi.org/10.1093/bioinformatics/btad339

Features

  • 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

Installation

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::pak('itol.toolkit')

# from GitHub
pak::pak('TongZhou2017/itol.toolkit')

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")
BiocManager::install("Biostrings")

# from CRAN
install.packages("itol.toolkit")

# from GitHub
# install.packages("devtools") # if you have not installed "devtools" package
devtools::install_github("TongZhou2017/itol.toolkit")

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.

Quickstart

# load package
library(itol.toolkit)

# read data
tree <- system.file("extdata",
                    "tree_of_itol_templates.tree",
                    package = "itol.toolkit")
data("template_groups")
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
write_hub(hub,getwd())

Documents

We have documents for every single function and some important tips for users. We also provided a ChatBot to help users learn the package interactively on Chat Thing.

Single functions

Tips

Video

Gallery

We collected reproducible plots into a gallery page.

Support

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

License

MIT License

Copy Link

Version

Install

install.packages('itol.toolkit')

Monthly Downloads

321

Version

1.1.7

License

MIT + file LICENSE

Maintainer

Tong Zhou

Last Published

November 18th, 2023

Functions in itol.toolkit (1.1.7)

learn_legend

Learn legend
learn_field

Learn field
file_to_unit

Create itol.unit Object from file
learn_theme_align

Learn align
learn_theme_alignment

Learn alignment
learn_theme_linechart

Learn linechart
learn_theme_piechart

Learn piechart
learn_theme_specific_themes

Learn specific themes
learn_df

Learn from tree
head_line

head line
learn_theme_bar

Learn bar
learn_data_from_file

Learn object data from file
learn_theme_binary

Learn binary
learn_theme_basic_theme

Learn basic theme
learn_theme_strip_label

Learn strip label
learn_theme_connection

Learn connection
learn_data_from_unit_list

Learn object data from units
learn_data

Learn data from template file
hub_to_unit

Create itol.unit Object from object
learn_theme_border

Learn border
learn_theme_basic_plot

Learn basic plot
unite_rows

Paste rows
learn_theme_common_themes

Learn common themes
learn_theme_domain

Learn domain
template_groups

template groups
show,itol.hub-method

show method for S4 class itol.hub
use.theme

Extract theme from inbuilt_themes
learn_subdf

Learn sub data frame
get_color

get_color
learn_theme_externalshape

Learn externalshape
fa_read

Read fasta file
fa_write

Write fasta file
learn_separator

Learn separator
write_hub

Write all data object into files
line_split

Split lines into two parts
learn_theme_heatmap

Learn heatmap
learn_data_from_unit

Learn object data from unit
write_raw

Write raw data into files
learn_data_from_files

Learn object data from files
learn_theme_label

Learn label
learn_theme_image

Learn image
+,itol.hub,itol.unit-method

plus method add method for S4 class itol.hub and itol.unit
learn_profile

Learn profile
learn_line

Learn paramter
search_tree_file

Search tree file
merge_unit

Merge units
train_theme

Train inbuilt theme
learn_type

Learn template type
write_unit

Write unit object into file
template_parameters_count

template parameters count
line_clean

Filter out comments and empty lines
correct_get_color

correct_get_color
complex_html_text

Complex HTML text
count_to_tree

Calculate tree based on count matrix
convert_range_to_node

Convert range to node id
create_unit

Create itol.unit
df_merge

Merge two data frame
create_theme

Create itol.theme Object
create_hub

Create itol.hub Object
convert_01

Convert character data to 0/1
convert_01_to_connect

Convert 0/1 data to connection pairs
file_get_name

Get file name
itol.hub-class

The itol.hub Class
file_get_dir

Get file dir
inbuilt_themes

inbuilt themes
itol.theme-class

The itol.theme Class
itol.unit-class

The itol.unit Class