Get a patristic matrix of time of lineage divergence data for a given set of taxon names
Source:R/datelife_result.R
get_datelife_result.Rd
get_datelife_result
takes as input a vector of taxon names, a newick string,
a phylo
object, or adatelifeQuery
object. It searches the chronogram
database specified in cache
for chronograms matching two or more given
taxon names. For each matching chronogram, it extracts time of lineage
divergence data and stores it as a patristic matrix. It then lists all
resulting patristic matrices. Each list element is named with the study
citation of the source chronogram.
Usage
get_datelife_result(
input = NULL,
partial = TRUE,
cache = "opentree_chronograms",
update_opentree_chronograms = FALSE,
...
)
Arguments
- input
One of the following:
- A character vector
With taxon names as a single comma separated starting or concatenated with
c()
.- A phylogenetic tree with taxon names as tip labels
As a
phylo
ormultiPhylo
object, OR as a newick character string.- A
datelifeQuery
object An output from
make_datelife_query()
.
- partial
Whether to return or exclude partially matching source chronograms, i.e, those that match some and not all of taxa given in
datelife_query
. Options areTRUE
orFALSE
. Defaults toTRUE
: return all matching source chronograms.- cache
A character vector of length one, with the name of the data object to cache. Default to
"opentree_chronograms"
, a data object storing Open Tree of Life's database chronograms and other associated information.- update_opentree_chronograms
Whether to update the chronogram database or not. Defaults to
FALSE
.- ...
Arguments passed on to
make_datelife_query
use_tnrs
Whether to use Open Tree of Life's Taxonomic Name Resolution Service (TNRS) to process input taxon names. Default to
TRUE
, it corrects misspellings and taxonomic name variations withtnrs_match()
, a wrapper ofrotl::tnrs_match_names()
.get_spp_from_taxon
Whether to search ages for all species belonging to a given taxon or not. Default to
FALSE
. IfTRUE
, it must have same length as input. If input is a newick string with some clades it will be converted to aphylo
object, and the order ofget_spp_from_taxon
will matchphy$tip.label
.reference_taxonomy
A character vector specifying the reference taxonomy to use for TNRS. Options are "ott", "ncbi", "gbif" or "irmng". The function defaults to "ott".