datelife_use
gets secondary calibrations available for any
pair of given taxon names, mined from the opentree_chronograms object,
congruifies them, and uses them to date a given tree topology with the
algorithm defined in dating_method
. If no tree topology is provided,
it will attempt to get one for the given taxon names from Open Tree of Life
synthetic tree, using make_bold_otol_tree()
.
datelife_use(input = NULL, each = FALSE, dating_method = "bladj", ...)
A phylo
or multiPhylo
object with branch lengths proportional to time.
One of the following:
With taxon names as a single comma separated
starting or concatenated with c()
.
As a phylo
or
multiPhylo
object, OR as a newick character string.
datelifeQuery
objectAn output from make_datelife_query()
.
Boolean, default to FALSE
: all calibrations are returned in
the same data.frame
. If TRUE
, calibrations from each chronogram are returned
in separate data frames.
Tree dating algorithm to use. Options are "bladj" or "pathd8" (Webb et al., 2008, tools:::Rd_expr_doi("10.1093/bioinformatics/btn358"); Britton et al., 2007, tools:::Rd_expr_doi("10.1080/10635150701613783")).
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 with tnrs_match()
, a wrapper of rotl::tnrs_match_names()
.
get_spp_from_taxon
Whether to search ages for all species belonging to a
given taxon or not. Default to FALSE
. If TRUE
, it must have same length as input.
If input is a newick string with some clades it will be converted to a phylo
object, and the order of get_spp_from_taxon
will match phy$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".
The output object stores the used calibrations
and dating_method
as
attributes(output)$datelife_calibrations
and attributes(output)$dating_method
.
If input
is a vector of taxon names, the function will attempt to reconstruct a BOLD
tree with make_bold_otol_tree()
to get a tree with branch lengths. If it fails,
it will get an Open Tree of Life synthetic tree topology.
The function then calls use_calibrations()
.