Skip to contents

Get minimum, median, mean, midpoint, and maximum summary chronograms from a summary matrix of a datelifeResult object.

Usage

summary_matrix_to_phylo_all(
  summ_matrix,
  datelife_query = NULL,
  target_tree = NULL,
  total_distance = TRUE,
  ...
)

Arguments

summ_matrix

Any summary patristic distance matrix, such as the ones obtained with datelife_result_sdm_matrix() or datelife_result_median_matrix().

datelife_query

A datelifeQuery object, usually an output of make_datelife_query().

target_tree

A phylo object. Use this in case you want a specific backbone for the output tree.

total_distance

Whether the input summ_matrix stores total age distance (from tip to tip) or distance from node to tip. Default to TRUE, divides the matrix in half, if FALSE it will take it as is.

...

Arguments passed on to get_otol_synthetic_tree

otol_version

Version of Open Tree of Life to use

resolve

Defaults to TRUE. Whether to resolve the tree at random or not.

input

Optional. A character vector of names or a datelifeQuery object.

ott_ids

If not NULL, it takes this argument and ignores input. A numeric vector of ott ids obtained with rotl::taxonomy_taxon_info() or rotl::tnrs_match_names() or tnrs_match().

Value

A multiPhylo object of length 5. It contains min, mean, median, midpoint, and max summary chronograms.

Details

With this function users can choose the minimum, mean or maximum ages from the summary matrix as calibration points to get a single summary chronogram. Users get all three summary chronograms in a multiPhylo object.