Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 10, fig.height = 7 )
# Install from local source package install.packages("path/to/Rclade_1.0.0.tar.gz", repos = NULL, type = "source")
The simplest way to create a timetree visualization using the built-in example data:
library(Rclade) # Load built-in example tree (50 tips, GTDB-style labels) data(example_tree) # Plot with phylum-level collapsing (no timescale for speed) p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE) print(p)
Use main_title and sub_title to add centered titles:
p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE, main_title = "GTDB Bacterial Tree", sub_title = "50 taxa | Phylum-level collapsing") print(p)
Use summarize_timetree() to inspect the collapse metadata:
p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE) summarize_timetree(p)
# Save to PDF save_timetree(p, "output.pdf", width = 14, height = 10) # One-line pipeline # Note: the geological timescale requires an explicit branch-length unit # (Rclade does not infer units); pass unit = "Ma" or unit = "Ga". plot_timetree(example_tree, rank = "phylum", unit = "Ga", output = "output.pdf")
Before visualization, check how well your labels can be parsed:
summarize_taxonomy_quality(example_tree$tip.label, format = "GTDB")
Rclade builds on the ggtree and deeptime R packages. If you use Rclade in published research, please cite Rclade along with these key dependencies:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.