brranching

knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  warning = FALSE,
  message = FALSE,
  fig.path="tools/img/"
)

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R-check codecov.io cran checks rstudio mirror downloads cran version R-CMD-check

Description

Brranching is an interface to many different sources of phylogenetic data (currently only from Phylomatic (http://phylodiversity.net/phylomatic/), but more sources to come) that allows users to query for phylogenetic data using taxonomic names.

For brranching::phylomatic_names() function you should get an NCBI Entrez API key. NCBI Entrez doesn't require that you use an API key, but you get higher rate limit with a key, from 3 to 10 requests per second, so do get one. Run taxize::use_entrez() or see https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/ for instructions.

Installation

Stable CRAN version

install.packages("brranching")

Or dev version

remotes::install_github("ropensci/brranching")
library("brranching")

Phylomatic

taxa <- c("Poa annua", "Phlox diffusa", "Helianthus annuus")
tree <- phylomatic(taxa=taxa, get = 'POST')
plot(tree, no.margin=TRUE)

You can pass in up to about 5000 names. We can use taxize to get a random set of plant species names.

library("taxize")
spp <- names_list("species", 200)
out <- phylomatic(taxa = spp, get = "POST")
plot(out, show.tip.label = FALSE)

Bladj

library("phylocomr")
ages_df <- data.frame(
  a = c('malpighiales','eudicots','ericales_to_asterales','plantaginaceae',
        'malvids', 'poales'),
  b = c(81, 20, 56, 76, 47, 71)
)
phylo_file <- system.file("examples/phylo_bladj", package = "phylocomr")
phylo_str <- readLines(phylo_file)
x <- rbladj(tree = phylo_str, ages = ages_df)
library(ape)
plot(x)

Meta



ropensci/brranching documentation built on Dec. 6, 2022, 10:47 a.m.