Skip to contents

Prepare data for deepSTRAPP

Prepare trait and diversification data to use as inputs for a deepSTRAPP test.

prepare_trait_data()
Map trait evolution on a time-calibrated phylogeny
prepare_diversification_data()
Run a full BAMM (Bayesian Analysis of Macroevolutionary Mixtures) workflow

Run deepSTRAPP worflow

run_deepSTRAPP_for_focal_time()
Run deepSTRAPP to test for a relationship between diversification rates and trait data at a given focal time
run_deepSTRAPP_over_time()
Run deepSTRAPP to test for a relationship between diversification rates and trait data over multiple time steps
compute_STRAPP_test_for_focal_time()
Compute STRAPP to test for a relationship between diversification rates and trait data

Extract data from mapped phylogenies

extract_most_likely_trait_values_for_focal_time()
Extract trait data mapped on a phylogeny at a given time in the past
extract_most_likely_trait_values_from_contMap_for_focal_time()
Extract continuous trait data mapped on a phylogeny at a given time in the past
extract_most_likely_states_from_densityMaps_for_focal_time()
Extract categorical trait data mapped on a phylogeny at a given time in the past
extract_most_likely_ranges_from_densityMaps_for_focal_time()
Extract biogeographic range data mapped on a phylogeny at a given time in the past

Extract data from BAMM objects

extract_diversification_data_melted_df_for_focal_time()
Extract diversification data from a BAMM_object
update_rates_and_regimes_for_focal_time()
Update diversification rates/regimes mapped on a phylogeny up to a given time in the past

Cut phylogenies

Cut different types of mapped phylogenies to a given focal-time.

cut_phylo_for_focal_time()
Cut the phylogeny for a given time in the past
cut_contMap_for_focal_time()
Cut the phylogeny and continuous trait mapping for a given focal time in the past
cut_densityMap_for_focal_time()
Cut the phylogeny and posterior probability mapping of a categorical trait for a given focal time in the past
cut_densityMaps_for_focal_time()
Cut phylogenies and posterior probability mapping of each state for a given focal time in the past

Plot mapped phylogenies

plot_contMap()
Plot continuous trait evolution on the tree
plot_densityMaps_overlay()
Plot posterior probabilities of states/ranges on phylogeny from densityMaps
plot_BAMM_rates()
Plot diversification rates and regime shifts from BAMM on phylogeny
plot_traits_vs_rates_on_phylogeny_for_focal_time()
Plot trait/range evolution vs. diversification rates and regime shifts on phylogeny
plot_traits_vs_rates_on_phylogeny_over_time()
Plot multiple mapped phylogenies of trait/range evolution vs. diversification rates and regime shifts over time-steps

Plot deepSTRAPP outputs

plot_STRAPP_pvalues_over_time()
Plot evolution of p-values of STRAPP tests over time
plot_histogram_STRAPP_test_for_focal_time()
Plot histogram of STRAPP test statistics to assess results
plot_histograms_STRAPP_tests_over_time()
Plot multiple histograms of STRAPP test statistics over time-steps
plot_rates_through_time()
Plot evolution of diversification rates in relation to trait values over time
plot_rates_vs_trait_data_for_focal_time()
Plot rates vs. trait data for a given focal time
plot_rates_vs_trait_data_over_time()
Plot rates vs. trait data over time-steps

Miscellaneous functions

Additional utility functions used mostly internally.

BSM_to_phytools_simmap() BSMs_to_phytools_simmaps()
Convert Biogeographic Stochastic Map (BSM) to phytools SIMMAP stochastic map (SM) format
select_best_trait_model_from_geiger()
Compare trait evolutionary model fits with AICc and Akaike's weights
select_best_model_from_BioGeoBEARS()
Compare model fits with AICc and Akaike's weights

Datasets

Datasets used to run examples and display expected results.

Phylogenies

Ponerinae_tree
Dataset providing the extensive time-calibrated phylogeny of extant ponerine ants
Ponerinae_tree_old_calib
Dataset providing the extensive time-calibrated phylogeny of extant ponerine ants using an old calibration for illustrative purposes

Trait datasets

mammals
Phylogeny and body mass data for extant and extinct mammals families/genera from Slater, 2013
Ponerinae_trait_tip_data
Dataset providing fake trait data for extant ponerine ants for illustrative purposes
Ponerinae_binary_range_table
Dataset providing biogeographic range data for extant ponerine ants

Trait evolution data

Ponerinae_trait_cont_tip_data_10My
Data summarizing the evolution of a fake continuous trait in Ponerinae ants extracted for 10 Mya
eel_cat_3lvl_data
Data summarizing the evolution of feeding habits in eels using a 3-level factor as categorical trait
Ponerinae_cat_2lvl_data_old_calib
Data summarizing the evolution of fake size data in Ponerinae ants using a 2-level factor as categorical trait
Ponerinae_cat_3lvl_data_old_calib
Data summarizing the evolution of fake habitat data in Ponerinae ants using a 3-level factor as categorical trait
eel_biogeo_data
Data summarizing the evolution of geographic ranges in eels
Ponerinae_biogeo_data_old_calib
Data summarizing the evolution of geographic ranges in Ponerinae ants using an old ill-calibrated phylogeny for illustrative purposes

BAMM data

BAMM_template_diversification
Template file for BAMM diversification analyses
whale_BAMM_object
Dataset summarizing 1000 posterior samples of BAMM for extant whales
Ponerinae_BAMM_object
Dataset summarizing 1000 posterior samples of BAMM for extant ponerine ants
Ponerinae_BAMM_object_old_calib
Dataset summarizing 1000 posterior samples of BAMM for extant ponerine ants based on an old time-calibration for illustrative purposes
Ponerinae_BAMM_object_10My
Dataset summarizing 1000 posterior samples of BAMM for extant ponerine ants updated to 10 My

deepSTRAPP data

Ponerinae_deepSTRAPP_cont_old_calib_0_40
deepSTRAPP output for fake continuous trait data for old time-calibrated ponerine ant phylogeny over 0 to 40 Mya
Ponerinae_deepSTRAPP_cat_2lvl_old_calib_0_40
deepSTRAPP output for fake categorical size data with 2-levels mapped on old time-calibrated ponerine ant phylogeny over 0 to 40 Mya
Ponerinae_deepSTRAPP_cat_3lvl_old_calib_0_40
deepSTRAPP output for fake categorical habitat data with 3-levels mapped on old time-calibrated ponerine ant phylogeny over 0 to 40 Mya
Ponerinae_deepSTRAPP_biogeo_old_calib_0_40
deepSTRAPP output for biogeographic ranges mapped on old time-calibrated ponerine ant phylogeny over 0 to 40 Mya