| Title: | Access to the 'Phylo-Species Atlas' of Empirical Phylogenies |
|---|---|
| Description: | Provides convenience functions to fetch standardized phylogenetic trees and per-tree provenance metadata from the 'Phylo-Species Atlas' <https://github.com/franciscorichter/phylo-species-atlas> directly from R. The atlas is a curated collection of empirical species-level trees covering Bacteria, Archaea, and Eukaryota, organized into 62 partitions of life with tip labels normalized against a shared dictionary of standardized species identifiers. Functions load any of the standardized trees with species labels resolved from the dictionary, list available trees, and inspect per-tree provenance. |
| Authors: | Francisco Richter [aut, cre] (ORCID: <https://orcid.org/0000-0002-0924-4613>) |
| Maintainer: | Francisco Richter <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-04 17:04:14 UTC |
| Source: | https://github.com/cran/phyloatlas |
The dictionary and metadata files are downloaded once per R session and cached. Call this if you want to force a re-download (for example after switching 'phyloatlas.base_url').
atlas_clear_cache()atlas_clear_cache()
Invisibly 'NULL'. Called for its side effect of emptying the internal cache environment.
Other atlas:
atlas_info(),
list_trees(),
load_atlas_tree()
# Safe to run unconditionally — just empties the in-session cache. atlas_clear_cache()# Safe to run unconditionally — just empties the in-session cache. atlas_clear_cache()
Get metadata for a single tree
atlas_info(name)atlas_info(name)
name |
Tree name without the '.nwk' extension (e.g. '"mammals"', '"birds"', '"seed_plants"'). Must be a length-1 non-'NA' character string. Use [list_trees()] to see all available names. |
A one-row data frame with all metadata columns from [list_trees()], or 'NULL' (with a warning) if no tree by that name exists. Also returns 'NULL' (with a diagnostic message, no warning) if the atlas metadata cannot be downloaded.
Other atlas:
atlas_clear_cache(),
list_trees(),
load_atlas_tree()
info <- atlas_info("mammals") if (!is.null(info)) infoinfo <- atlas_info("mammals") if (!is.null(info)) info
Returns a data frame describing every standardized tree in the atlas: name, study, number of tips, whether the tree is time-calibrated, plus provenance fields (year, journal, DOI, coverage) when available.
list_trees()list_trees()
A data frame with one row per tree, ordered by group, with columns 'name', 'group', 'study', 'ntips', 'dated', 'year', 'journal', 'doi', 'crown_ma', 'described_species', 'coverage_pct', 'data_source', 'download_url', 'methods_brief', 'notes', and 'study_full' (the long-form study citation from the provenance file). Returns 'NULL' with a single diagnostic message if the atlas metadata cannot be downloaded (e.g. no internet); never throws on network failure.
Other atlas:
atlas_clear_cache(),
atlas_info(),
load_atlas_tree()
trees <- list_trees() if (!is.null(trees)) { head(trees) subset(trees, dated & ntips > 1000) }trees <- list_trees() if (!is.null(trees)) { head(trees) subset(trees, dated & ntips > 1000) }
Downloads a standardized Newick tree from the atlas and resolves its integer tip IDs to species names using the shared dictionary.
load_atlas_tree(name, resolve_labels = TRUE)load_atlas_tree(name, resolve_labels = TRUE)
name |
Tree name without the '.nwk' extension (e.g. '"mammals"', '"birds"', '"seed_plants"', '"condamine_Vangidae"'). Use [list_trees()] to see all available names. |
resolve_labels |
If 'TRUE' (default) tip labels are replaced with standardized species names from 'dictionary.csv'. Set to 'FALSE' to keep the raw integer IDs (faster, avoids downloading the dictionary). |
An object of class '"phylo"' from the ape package. If 'resolve_labels = TRUE' (the default), tip labels are species names from the standardized dictionary; otherwise tip labels are integer IDs as character strings.
Other atlas:
atlas_clear_cache(),
atlas_info(),
list_trees()
# Offline demo using a small bundled tree (does not hit the network): demo_path <- system.file("extdata", "tree_demo.nwk", package = "phyloatlas") tree <- ape::read.tree(demo_path) tree # Live atlas fetch (requires internet): tree <- try(load_atlas_tree("mammals"), silent = TRUE) if (!inherits(tree, "try-error")) plot(tree, show.tip.label = FALSE) # Keep integer IDs to skip the 18 MB dictionary download: tree <- try(load_atlas_tree("birds", resolve_labels = FALSE), silent = TRUE)# Offline demo using a small bundled tree (does not hit the network): demo_path <- system.file("extdata", "tree_demo.nwk", package = "phyloatlas") tree <- ape::read.tree(demo_path) tree # Live atlas fetch (requires internet): tree <- try(load_atlas_tree("mammals"), silent = TRUE) if (!inherits(tree, "try-error")) plot(tree, show.tip.label = FALSE) # Keep integer IDs to skip the 18 MB dictionary download: tree <- try(load_atlas_tree("birds", resolve_labels = FALSE), silent = TRUE)