Learn R Programming

fishtree (version 0.3.2)

fishtree_complete_phylogeny: Get complete (stochastically-resolved) phylogenies from the Fish Tree of Life

Description

Retrieves a complete, stochastically-resolved phylogeny via the Fish Tree of Life API. If neither `species` nor `rank` are specified, returns the entire phylogeny. WARNING: These phylogenies should generally not be used for downstream analyses of trait evolution. See Rabosky (2015) in the references for details.

Usage

fishtree_complete_phylogeny(
  species,
  rank,
  mc.cores = getOption("mc.cores", 1L)
)

Arguments

species

(Optionally) subset the results based on a vector of species names.

rank

(Optionally) subset the results based on the supplied taxonomic rank.

mc.cores

Number of cores to use in mclapply when subsetting the tree (default `1`)

Value

An object of class `"multiPhylo"` that should probably not be used for analyses of trait evolution, including (but not limited to) pic, ace, corBrownian, make.bisse, or hisse.

References

Rabosky, D. L. (2015). No substitute for real data: A cautionary note on the use of phylogenies from birth-death polytomy resolvers for downstream comparative analyses. Evolution, 69(12), 3207<U+2013>3216. doi:10.1111/evo.12817

Rabosky, D. L., Chang, J., Title, P. O., Cowman, P. F., Sallan, L., Friedman, M., Kashner, K., Garilao, C., Near, T. J., Coll, M., Alfaro, M. E. (2018). An inverse latitudinal gradient in speciation rate for marine fishes. Nature, 559(7714), 392<U+2013>395. doi:10.1038/s41586-018-0273-1

Enhanced polytomy resolution strengthens evidence for global gradient in speciation rate for marine fishes. https://fishtreeoflife.org/rabosky-et-al-2018-update/

Examples

Run this code
# NOT RUN {
tree <- fishtree_complete_phylogeny(rank = "Acanthuridae")
sampled_tips <- fishtree_phylogeny(rank = "Acanthuridae")$tip.label
all_tips <- tree[[1]]$tip.label
new_tips <- setdiff(all_tips, sampled_tips)
par(mfrow = c(2,2))
for (ii in 1:4) {
  plot(tree[[ii]], show.tip.label = FALSE, no.margin = TRUE)
  ape::tiplabels(pch = 19, col = ifelse(tree[[ii]]$tip.label %in% new_tips, "red", NA))
}
# }

Run the code above in your browser using DataLab