| Type: | Package |
| Title: | A Self-Contained Widget for Interactive Phylogenetic Tree Visualization |
| Version: | 0.3.1 |
| Maintainer: | Zachary Foster <zacharyfoster1989@gmail.com> |
| Description: | Creates self-contained widgets for interactive phylogenetic tree visualization. This package wraps the 'JavaScript' 'heat-tree' package using the 'htmlwidgets' R package. |
| URL: | https://grunwaldlab.github.io/heattree/ |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.3 |
| Depends: | R (≥ 3.5) |
| Imports: | ape, htmlwidgets |
| Suggests: | testthat (≥ 3.0.0), knitr |
| Config/Needs/website: | rmarkdown |
| NeedsCompilation: | no |
| Packaged: | 2026-04-29 17:55:45 UTC; fosterz |
| Author: | Zachary Foster |
| Repository: | CRAN |
| Date/Publication: | 2026-05-04 11:30:08 UTC |
Isolate metadata from Bansal et al. 2021
Description
Isolate metadata from Bansal et al. 2021 (doi:10.1016/j.ygeno.2021.09.021) included for use as an example data set. This is the parsed version of the included "bansal_2021_metadata.tsv" file.
Format
data.frame
Source
Bansal, K., Kumar, S., Kaur, A., Singh, A. and Patil, P.B., 2021. Deep phylo-taxono genomics reveals Xylella as a variant lineage of plant associated Xanthomonas and supports their taxonomic reunification along with Stenotrophomonas and Pseudoxanthomonas. Genomics, 113(6), pp.3989-4003.
A phylogeny from Bansal et al. 2021
Description
A core gene phylogeny from Bansal et al. 2021 (doi:10.1016/j.ygeno.2021.09.021) included for use as an example data set. This is the parsed version of the included "bansal_2021_tree.nwk" file.
Format
ape::phylo
Source
Bansal, K., Kumar, S., Kaur, A., Singh, A. and Patil, P.B., 2021. Deep phylo-taxono genomics reveals Xylella as a variant lineage of plant associated Xanthomonas and supports their taxonomic reunification along with Stenotrophomonas and Pseudoxanthomonas. Genomics, 113(6), pp.3989-4003.
Create an interactive phylogenetic tree
Description
Create an interactive phylogenetic tree using the javascript heat-tree package
Usage
heat_tree(
tree = NULL,
metadata = NULL,
aesthetics = NULL,
width = NULL,
height = NULL,
elementId = NULL,
...
)
Arguments
tree |
One or more trees to plot. Can be a raw newick-formatted string,
a |
metadata |
Metadata associated with |
aesthetics |
A named character vector defining which metadata columns are initially used to color/size tree parts. If there are multiple trees (a list), then a list of equal length is required. |
width |
Width of the widget (CSS units or number). |
height |
Height of the widget (CSS units or number). |
elementId |
Optional element ID for the widget. |
... |
Options passed to options parameter of the underlying |
Value
An htmlwidget object of class heat_tree that renders an interactive
phylogenetic tree visualization. The object contains:
-
x: A list with tree data and options passed to JavaScript -
width,height: Dimensions of the widget -
elementId: Optional DOM element ID
The widget can be displayed in R Markdown, Quarto, or using and IDE like RStudio.
Examples
# Create an empty tree viewer for loading data interactively
heat_tree()
# Create a tree viewer with example data included with the package
data(weisberg_2020_metadata)
data(weisberg_2020_mlsa)
heat_tree(
tree = weisberg_2020_mlsa,
metadata = weisberg_2020_metadata,
aesthetics = c(tipLabelColor = 'host_type')
)
Shiny bindings for heat_tree
Description
Output and render functions for using heat_tree within Shiny applications and interactive Rmd documents.
Usage
heat_treeOutput(outputId, width = "100%", height = "400px")
renderheat_tree(expr, env = parent.frame(), quoted = FALSE)
Arguments
outputId |
output variable to read from |
width, height |
Must be a valid CSS unit (like |
expr |
An expression that generates a heat_tree |
env |
The environment in which to evaluate |
quoted |
Is |
Value
heat_treeOutput() returns an output function that creates a Shiny UI element
for displaying a heat_tree widget. Used in the UI definition of a Shiny app.
renderheat_tree() returns a render function that can be assigned to an output
element in the server function of a Shiny app. It returns a Shiny render binding.
A BEAST phylogeny from Weisberg et al. 2020
Description
A BEAST phylogeny from Weisberg et al. 2020 (doi:10.1126/science.aba5256) included for use as an example data set. This is the parsed version of the included "weisberg_2020_beast.tre" file.
Format
ape::phylo
Source
Alexandra J. Weisberg et al., Unexpected conservation and global transmission of agrobacterial virulence plasmids.Science368,eaba5256(2020)
Isolate metadata from Weisberg et al. 2020
Description
Isolate metadata from Weisberg et al. 2020 (doi:10.1126/science.aba5256) included for use as an example data set. This is the parsed version of the included "weisberg_2020_metadata.tsv" file.
Format
data.frame
Source
Alexandra J. Weisberg et al., Unexpected conservation and global transmission of agrobacterial virulence plasmids.Science368,eaba5256(2020)
A MLSA phylogeny from Weisberg et al. 2020
Description
A MLSA phylogeny from Weisberg et al. 2020 (doi:10.1126/science.aba5256) included for use as an example data set. This is the parsed version of the included "weisberg_2020_mlsa.tre" file.
Format
ape::phylo
Source
Alexandra J. Weisberg et al., Unexpected conservation and global transmission of agrobacterial virulence plasmids.Science368,eaba5256(2020)