Package: datelife 0.6.9

Luna L. Sanchez Reyes

datelife: Scientific Data on Time of Lineage Divergence for Your Taxa

Methods and workflows to get chronograms (i.e., phylogenetic trees with branch lengths proportional to time), using open, peer-reviewed, state-of-the-art scientific data on time of lineage divergence. This package constitutes the main underlying code of the DateLife web service at <https://www.datelife.org>. To obtain a single summary chronogram from a group of relevant chronograms, we implement the Super Distance Matrix (SDM) method described in Criscuolo et al. (2006) <doi:10.1080/10635150600969872>. To find the grove of chronograms with a sufficiently overlapping set of taxa for summarizing, we implement theorem 1.1. from Ané et al. (2009) <doi:10.1007/s00026-009-0017-x>. A given phylogenetic tree can be dated using time of lineage divergence data as secondary calibrations (with caution, see Schenk (2016) <doi:10.1371/journal.pone.0148228>). To obtain and apply secondary calibrations, the package implements the congruification method described in Eastman et al. (2013) <doi:10.1111/2041-210X.12051>. Tree dating can be performed with different methods including BLADJ (Webb et al. (2008) <doi:10.1093/bioinformatics/btn358>), PATHd8 (Britton et al. (2007) <doi:10.1080/10635150701613783>), mrBayes (Huelsenbeck and Ronquist (2001) <doi:10.1093/bioinformatics/17.8.754>), and treePL (Smith and O'Meara (2012) <doi:10.1093/bioinformatics/bts492>).

Authors:Brian O'Meara [aut], Jonathan Eastman [aut], Tracy Heath [aut], April Wright [aut], Klaus Schliep [aut], Scott Chamberlain [aut], Peter Midford [aut], Luke Harmon [aut], Joseph Brown [aut], Matt Pennell [aut], Mike Alfaro [aut], Luna L. Sanchez Reyes [aut, cre], Emily Jane McTavish [ctb]

datelife_0.6.9.tar.gz


datelife_0.6.9.tar.gz(r-4.5-noble)datelife_0.6.9.tar.gz(r-4.4-noble)
datelife_0.6.9.tgz(r-4.4-emscripten)
datelife.pdf |datelife.html
datelife/json (API)
NEWS

# Install 'datelife' in R:
install.packages('datelife', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/phylotastic/datelife/issues

Datasets:
  • birds_and_cats - A multiPhylo object with trees resulting from a datelife search of some birds and cats species
  • contributor_cache - Information on contributors, authors, study ids and clades from studies with chronograms in Open Tree of Life
  • felid_gdr_phylo_all - DatelifeSummary of a datelifeResult object of all Felidae species.
  • felid_sdm - SDM tree of a datelifeResult object of all Felidae species.
  • opentree_chronograms - Chronogram database
  • plant_bold_otol_tree - Some plants chronogram
  • problems - Problematic chronograms from Open Tree of Life.
  • some_ants_datelife_result - DatelifeResult object of some ants
  • subset2_search - A list with datelifeQuery and datelifeResult objects from a search of taxon names from subset2_taxa
  • subset2_taxa - Long list of >2.7k virus, bacteria, plant and animal taxon names
  • threebirds_dr - 'datelifeResult' object of three birds "Rhea americana", "Pterocnemia pennata", and "Struthio camelus"
  • treebase_cache - Information on contributors, authors, study ids and clades from studies with chronograms in Open tree of Life

On CRAN:

softwaredating-softwareevolutionphylogeneticsreproducible-research

6.54 score 13 stars 55 scripts 238 downloads 104 exports 162 dependencies

Last updated 6 months agofrom:0311e7ce8d. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKSep 12 2024
R-4.5-linuxNOTESep 12 2024

Exports:build_grove_listbuild_grove_matrixcheck_ott_inputchoose_clusterclassification_paths_from_taxonomyclean_ott_chronogramclean_taxon_info_childrenclean_tnrscluster_patristicmatrixcongruify_and_mrca_multiPhylocongruify_and_mrca_phylodate_with_pbdbdatelife_authors_tabulatedatelife_result_mediandatelife_result_median_matrixdatelife_result_sdm_matrixdatelife_result_sdm_phylodatelife_result_variance_matrixdatelife_searchdatelife_usedatelife_use_datelifequeryextract_calibrations_dateliferesultextract_calibrations_phyloextract_ott_idsfilter_for_groveforce_ultrametricget_all_calibrationsget_all_descendant_speciesget_best_groveget_biggest_multiphyloget_bold_dataget_calibrations_datelifequeryget_calibrations_vectorget_dated_otol_induced_subtreeget_datelife_resultget_datelife_result_datelifequeryget_fossil_rangeget_goodmatricesget_mrbayes_node_constraintsget_opentree_chronogramsget_opentree_speciesget_otol_chronogramsget_otol_synthetic_treeget_ott_childrenget_ott_cladeget_ott_lineageget_taxon_summaryget_tnrs_namesget_valid_childreninput_processis_datelife_queryis_datelife_result_emptyis_good_chronogramis_n_overlapmake_bladj_treemake_bold_otol_treemake_contributor_cachemake_datelife_querymake_datelife_query2make_mrbayes_runfilemake_mrbayes_treemake_overlap_tablemake_sdmmake_treebase_cachemap_nodes_ottmatrices_to_tablematrix_to_tablemissing_taxa_checkmrca_calibrationspatristic_matrix_to_newickpatristic_matrix_to_phylopatristic_matrix_unpadphylo_checkphylo_generate_uncertaintyphylo_get_node_numbersphylo_has_brlenpick_groverecover_mrcaottrelevant_curators_tabulaterunrun_mrbayessample_treessummarize_congruifiedCalibrationssummarize_datelife_resultsummarize_fossil_rangesummary_matrix_to_phylosummary_matrix_to_phylo_alltnrs_matchtree_add_nodelabelstree_add_outgrouptree_checktree_fix_brlentree_from_taxonomytree_get_node_datatree_get_singleton_outgrouptree_node_tipsupdate_datelife_cacheuse_all_calibrationsuse_calibrationsuse_calibrations_bladjuse_calibrations_bladj.matchedCalibrationsuse_calibrations_eachuse_calibrations_pathd8use_calibrations_treePL

Dependencies:abindade4apeaskpassassertthatbackportsbase64encbibtexBiocManagerbitbit64bitopsboldbslibcachemcheckmateclicliprclusterclusterGenerationcodacodetoolscolorspacecombinatcomparecpp11crayoncrulcurldata.tableDEoptimdeSolvedigestdoParalleldplyrevaluateexpmfansifarverfastmapfastmatchfontawesomeforeachforeignFormulafsgeigergenericsggplot2gluegridExtragtablehighrHmischmshtmlTablehtmltoolshtmlwidgetshttpcodehttrigraphipsisobanditeratorsjquerylibjsonliteknitcitationsknitrlabelinglatticelazyevallifecyclelubridatemagrittrmapsMASSMatrixmemoisemgcvmimemnormtmunsellmvtnormnatservncbitnlmennetnumDerivopenssloptimParallelpaleotreepbapplyphangornphylobasephylocomrphytoolspillarpixmappkgconfigplyrpngprettyunitsprogresspurrrquadprogR6rappdirsratelimitrRColorBrewerRcppRcppArmadilloRCurlreadrRefManageRrentrezreshape2rexritisrlangrmarkdownrnclRNeXMLrotlrpartrredlistrstudioapisassscalesscatterplot3dsolriumspstringistringrsubplexsystaxizetibbletidyrtidyselecttimechangetinytextreebasetriebeardtzdburltoolsutf8uuidvctrsviridisviridisLitevroomWikidataQueryServiceRWikidataRWikipediRwikitaxawithrworrmsxfunXMLxml2yamlzoo

Case study: the true finches

Rendered fromfringiliidae.Rmdusingknitr::rmarkdownon Sep 12 2024.

Last update: 2024-04-26
Started: 2022-01-14

Getting started

Rendered fromGetting_started_with_datelife.Rmdusingknitr::rmarkdownon Sep 12 2024.

Last update: 2024-04-26
Started: 2021-12-09

Making a DateLife query

Rendered frommake_datelife_query.Rmdusingknitr::rmarkdownon Sep 12 2024.

Last update: 2024-04-26
Started: 2022-12-13

Estimating initial branch lengths

Rendered frommaking_bold_trees.Rmdusingknitr::rmarkdownon Sep 12 2024.

Last update: 2022-12-26
Started: 2022-12-26

Readme and manuals

Help Manual

Help pageTopics
Get the lineage of a set of taxa. '.get_ott_lineage' uses 'rotl::taxonomy_taxon_info()' with 'include_lineage = TRUE'..get_ott_lineage
A multiPhylo object with trees resulting from a datelife search of some birds and cats speciesbirds_and_cats
Build grove listbuild_grove_list
Find the grove for a group of chronograms and build a matrix.build_grove_matrix
Check for conflicting calibrations.check_conflicting_calibrations
Check input for usage in other 'datelife' functionscheck_ott_input
Choose an ultrametric phylo object from 'cluster_patristicmatrix()' obtained with a particular clustering method, or the next best tree. If there are no ultrametric trees, it does not force them to be ultrametric.choose_cluster
Gets classification paths for a vector of taxaclassification_paths_from_taxonomy
Clean up some issues with Open Tree of Life chronograms For now it 1) checks unmapped taxa and maps them with tnrs_match.phylo, 2) roots the chronogram if unrootedclean_ott_chronogram
Identify, extract and clean taxonomic children names from a 'taxonomy_taxon_info()' output.clean_taxon_info_children
Eliminates unmatched (NAs) and invalid taxa from a 'rotl::tnrs_match_names()' or 'tnrs_match()' output Useful to get ott ids to retrieve an induced synthetic Open Tree of Life. Needed because using 'include_suppressed = FALSE' in 'rotl::tnrs_match_names()' does not drop all invalid taxa.clean_tnrs
Cluster a patristic matrix into a tree with various methods.cluster_patristicmatrix
Congruify and Check.congruify_and_check
Congruify nodes of a tree topology to nodes from a source chronogram, and find the mrca nodescongruify_and_mrca_multiPhylo
Congruify nodes of a tree topology to nodes from a source chronogram, and find the mrca nodescongruify_and_mrca_phylo
Information on contributors, authors, study ids and clades from studies with chronograms in Open Tree of Life (Open Tree)contributor_cache
Date with Paleobiology Database and paleotree.date_with_pbdb
Return the relevant authors for a set of studies.datelife_authors_tabulate
Get a median summary chronogram from a 'datelifeResult' object.datelife_result_median
Compute a median matrix of a 'datelifeResult' object.datelife_result_median_matrix
Get a numeric vector of MRCAs from a 'datelifeResult' object. Used in 'summarize_datelife_result()'.datelife_result_MRCA
Go from a 'datelifeResult' object to a Super Distance Matrix (SDM) using weighting = "flat"datelife_result_sdm_matrix
Reconstruct a supertree from a 'datelifeResult' object using the Super Distance Matrix (SDM) method.datelife_result_sdm_phylo
Find the index of relevant studies in a cached chronogram database.datelife_result_study_index
Compute a variance matrix of a 'datelifeResult' object.datelife_result_variance_matrix
Get scientific, peer-reviewed information on time of lineage divergence openly available for a given set of taxon namesdatelife datelife_search
Generate one or multiple chronograms for a set of given taxon names.datelife_use
Generate one or multiple chronograms for a set of taxon names given as a 'datelifeQuery' object.datelife_use_datelifequery
Use congruification to extract secondary calibrations from a 'datelifeResult' object.extract_calibrations_dateliferesult
Use congruification to extract secondary calibrations from a 'phylo' or 'multiPhylo' object with branch lengths proportional to time.extract_calibrations_phylo
Extract numeric OTT ids from a character vector that combines taxon names and OTT ids.extract_ott_ids extract_ott_ids.default
datelifeSummary of a datelifeResult object of all Felidae species.felid_gdr_phylo_all
SDM tree of a datelifeResult object of all Felidae species.felid_sdm
Filter a 'datelifeResult' object to find the largest grove.filter_for_grove
Force a non-ultrametric 'phylo' object to be ultrametric with 'phytools::force.ultrametric()'.force_ultrametric
Get secondary calibrations from a chronogram database for a set of given taxon namesdatelife_calibrations get_all_calibrations
Quickly get all species belonging to a taxon from the Open Tree of Life Taxonomy (OTT)get_all_descendant_species
Get grove from a 'datelifeResult' object that can be converted to phylo from a median summary matrixget_best_grove
Get the tree with the most tips from a multiPhylo object: the biggest tree.get_biggest_multiphylo
Get genetic data from the Barcode of Life Database (BOLD) for a set of taxon names.get_bold_data
Search and extract available secondary calibrations for taxon names in a given 'datelifeQuery' objectget_calibrations_datelifequery
Search and extract secondary calibrations for a given character vector of taxon namesget_calibrations_vector
Get a dated OpenTree induced synthetic subtree from a set of given taxon names, from blackrim's FePhyFoFum service.get_dated_otol_induced_subtree
Get a patristic matrix of time of lineage divergence data for a given set of taxon namesget_datelife_result
Get a list of patristic matrices from a given 'datelifeQuery' objectget_datelife_result_datelifequery
Get the ages for a taxon from PBDBget_fossil_range
Get indices of good matrices to apply Super Distance Matrix (SDM) method with 'make_sdm()'.get_goodmatrices
Makes a block of node constraints and node calibrations for a MrBayes run file from a list of taxa and ages, or from a dated treeget_mrbayes_node_constraints
Get all chronograms from Open Tree of Life database using direct call from Open Tree APIget_opentree_chronograms get_otol_chronograms
Get all chronograms from Open Tree of Life databaseget_opentree_chronograms_slow
Get all species belonging to a taxon from the Open Tree of Life Taxonomy (OTT)get_opentree_species
Get an Open Tree of Life synthetic subtree of a set of given taxon names.get_otol_synthetic_tree
Use this instead of 'rotl::tol_subtree()' when taxa are not in synthesis tree and you still need to get all species or an induced OpenTree subtreeget_ott_children
Get the Open Tree of Life Taxonomic identifiers (OTT ids) and name of one or several given taxonomic ranks from one or more input taxa.get_ott_clade
Get the Open Tree of Life Taxonomic identifier (OTT id) and name of all lineages from one or more input taxa.get_ott_lineage
Figure out which subset function to use.get_subset_array_dispatch
Get a taxon summary of a 'datelifeResult' object.get_taxon_summary
Process a character vector of taxon names with TNRSget_tnrs_names
Extract valid children from given taxonomic name(s) or Open Tree of Life Taxonomic identifiers (OTT ids) from a taxonomic source.get_valid_children
Process a phylo object or a character string to determine if it's correct newickinput_process
Check if input is a 'datelifeQuery' objectis_datelife_query
Check if we obtained an empty search with the given taxon name(s).is_datelife_result_empty
Check if a tree is a valid chronogram.is_good_chronogram
Function for computing n-overlap for two vectors of names (ie., phy1$tip.label, phy2$tip.label) and seeing if they have n overlapis_n_overlap
Find all authors and where they have deposited their treesmake_all_associations
Use the BLADJ algorithm to get a chronogram from a tree topology for which you have age data for some of its nodes.make_bladj_tree
Use genetic data from the Barcode of Life Database (BOLD) to reconstruct branch lengths on a tree.make_bold_otol_tree
Create a cache from Open Tree of Lifemake_contributor_cache
Go from taxon names to a 'datelifeQuery' objectmake_datelife_query
Go from taxon names to a 'datelifeQuery' objectmake_datelife_query2
Make a mrBayes run block file with a constraint topology and a set of node calibrations and missing taxamake_mrbayes_runfile
Take a constraint tree and use mrBayes to get node ages and branch lengths given a set of node calibrations without any data.make_mrbayes_tree
Associate Open Tree of Life authors with studiesmake_otol_associations
Create an overlap tablemake_overlap_table
Make a Super Distance Matrix (SDM) from a list of good matrices obtained with 'get_goodmatrices()'make_sdm
Associate TreeBase authors with studiesmake_treebase_associations
Create a cache from TreeBasemake_treebase_cache
Add Open Tree of Life Taxonomy to tree nodes.map_nodes_ott
Match calibrations to nodes of a given treematch_all_calibrations
Go from a list of patristic distance matrix to a table of node agesmatrices_to_table
Go from a patristic distance matrix to a node ages tablematrix_to_table
Message for a 'multiPhylo' inputmessage_multiphylo
Checks that missing_taxa argument is ok to be used by make_mrbayes_runfile inside tree_add_dates functions.missing_taxa_check
Identify nodes of a tree topology that are most recent common ancestor (mrca) of taxon pairs from a 'calibrations' objectmrca_calibrations
Chronogram databaseopentree_chronograms
'patristic_matrix_array_congruify' is used for patristic_matrix_array_subset_both and patristic_matrix_array_congruify.patristic_matrix_array_congruify
Congruify a patristic matrix array from a given 'phylo' object.patristic_matrix_array_phylo_congruify
Split a patristic matrix array Used inside: patristic_matrix_array_congruifypatristic_matrix_array_split
Subset a patristic matrix arraypatristic_matrix_array_subset
Are all desired taxa in the patristic matrix array?patristic_matrix_array_subset_both
Convert list of patristic matrices to a 3D array.patristic_matrix_list_to_array
Get time of MRCA from patristic matrix. Used in 'datelife_result_MRCA()'.patristic_matrix_MRCA
Test the name order of a patristic matrix so that row and column labels are in alphabetical order.patristic_matrix_name_order_test
Reorder a matrix so that row and column labels are in alphabetical order.patristic_matrix_name_reorder
Fill in empty cells in a patristic matrix for missing taxa.patristic_matrix_pad
Are all desired taxa in the patristic matrix?patristic_matrix_taxa_all_matching
Convert patristic matrix to a newick string. Used inside: summarize_datelife_result.patristic_matrix_to_newick
Convert a patristic matrix to a 'phylo' object.patristic_matrix_to_phylo
Function to remove missing taxa from a 'datelifeResult' object.patristic_matrix_unpad
Checks if 'phy' is a 'phylo' object and/or a chronogram.phylo_check
Congruify a reference tree and a target tree given as 'phylo' objects.phylo_congruify
Generate uncertainty in branch lengths using a lognormal.phylo_generate_uncertainty
Gets node numbers from any phylogenyphylo_get_node_numbers
Get a subset array from a 'phylo' objectphylo_get_subset_array
Get a congruified subset array from a 'phylo' objectphylo_get_subset_array_congruify
Check if a tree has branch lengthsphylo_has_brlen
Prune missing taxa from a 'phylo' object Used inside phylo_get_subset_array and phylo_get_subset_array_congruify.phylo_prune_missing_taxa
Subset a reference and a target tree given as 'phylo' objects.phylo_subset_both
Convert spaces to underscores in trees.phylo_tiplabel_space_to_underscore
Convert underscores to spaces in trees.phylo_tiplabel_underscore_to_space
Get a patristic matrix from a 'phylo' object.phylo_to_patristic_matrix
Pick a grove in the case of multiple groves in a set of trees.pick_grove
Some plants chronogramplant_bold_otol_tree
Problematic chronograms from Open Tree of Life.problems
Get an mrcaott tag from an OpenTree induced synthetic tree and get its name and ott idrecover_mrcaott
Return the relevant curators for a set of studies.relevant_curators_tabulate
Take results_list and process it.results_list_process
Core function to generate resultsrun
Runs MrBayes from Rrun_mrbayes
Sample trees from a file containing multiple trees. Usually from a bayesian analysis output trees file.sample_trees
datelifeResult object of some antssome_ants_datelife_result
A list with datelifeQuery and datelifeResult objects from a search of taxon names from subset2_taxasubset2_search
Long list of >2.7k virus, bacteria, plant and animal taxon namessubset2_taxa
Get summary statistics of ages in a 'congruifiedCalibrations' object.summarize_congruifiedCalibrations
Summarize a 'datelifeResult' object.summarize_datelife_result
Summarize taxon age from PBDB to just a single min and max agesummarize_fossil_range
Gets all ages per taxon pair from a distance matrix Internal function used in summary_matrix_to_phylo_all().summarize_summary_matrix
Go from a summary matrix to an ultrametric 'phylo' object.summary_matrix_to_phylo
Get minimum, median, mean, midpoint, and maximum summary chronograms from a summary matrix of a 'datelifeResult' object.summary_matrix_to_phylo_all
Summarize patristic matrix array (by default, median). Used inside: summarize_datelife_result.summary_patristic_matrix_array
Summarize a 'datelifeResult' object.summary.datelifeResult
Summarize a 'matchedCalibrations' object 'summary.matchedCalibrations' gets the node age distribution from a 'matchedCalibrations' object.summary.matchedCalibrations
'datelifeResult' object of three birds "Rhea americana", "Pterocnemia pennata", and "Struthio camelus"threebirds_dr
Taxon name resolution service (tnrs) applied to a vector of names by batchestnrs_match tnrs_match.default tnrs_match.phylo
Add missing taxa to a dated tree and fabricate node ages for these missing taxa.tree_add_dates
Adds labels to nodes with no assigned labeltree_add_nodelabels
Function to add an outgroup to any phylogeny, in phylo or newick formattree_add_outgroup
Checks if a tree is a phylo class object otherwise it uses input_process. Additionally it can check if tree is a chronogram with phylo_checktree_check
Take a tree with branch lengths and fix negative or zero length branches.tree_fix_brlen
Gets a taxonomic tree from a vector of taxatree_from_taxonomy
Get node numbers, node names, descendant tip numbers and labels of nodes from any tree, and node ages from dated trees.tree_get_node_data
Identify the presence of a single lineage outgroup in a phylogenytree_get_singleton_outgroup
To get tip numbers descending from any given node of a treetree_node_tips
Information on contributors, authors, study ids and clades from studies with chronograms in Open tree of Lifetreebase_cache
Update all data files as data objects for the packageupdate_all_cached
Create an updated OpenTree chronograms database objectupdate_datelife_cache
Date a given tree topology using a given set of congruified calibrations or agesuse_all_calibrations
Date a given tree topology using a combined set of given calibrationsuse_calibrations
Use calibrations to date a topology with the BLADJ algorithm.use_calibrations_bladj
Use calibrations to date a topology with the BLADJ algorithm.use_calibrations_bladj.matchedCalibrations
Date a given tree topology by using a given list of calibrations independently, to generate multiple hypothesis of time of divergenceuse_calibrations_each
Date a tree with secondary calibrations using PATHd8use_calibrations_pathd8
Date a tree with initial branch lengths with treePL.use_calibrations_treePL