DOI: 10.5281/zenodo.8171427
title: Code and data: Exploring congruent diversification histories with flexibility and parsimony

description: This repository contains the code and data for the article "Exploring congruent diversification histories with flexibility and parsimony" (abstract bellow). Data : <strong>4705sp_mammal-time.tree</strong>: Species-level calibrated mammalian phylogeny from <em>Alvarez-Carretero et al. </em>(https://doi.org/10.6084/m9.figshare.14885691) <strong>mammals_samplingfraction.csv</strong> : Clade-specific sampling fractions from <em>Quintero et al.</em>(https://www.biorxiv.org/content/10.1101/2022.08.09.503355v1.full). Code : <strong>CRABS-v1.1.0.9004.zip</strong>: Archived version of the CRABS package with our extension. <strong>Mammalian_rates_EBD.rev</strong>: <em>Rev</em> script for the mammalian diversification analysis in RevBayes. <strong>Mammals_proccess_RevBayes_outputs.Rmd</strong>: R notebook for processing the outputs from the RevBayes mammalian diversification analysis, plotting the rates through time, and saving the median trajectories used for further analyses. <strong>Exploring_congruent_diversification_histories_with_flexibility_and_parsimony.Rmd</strong>: R notebook for comparing the initial CRABS features and our new extensions. It enables replicating the figures in the article. Outputs : <strong>output_inferredIntervals_CSrho.zip</strong>: The raw traces from the RevBayes analysis, and the resulting median rate trajectories that are used to construct the congruence class illustrated in the article. <br> Abstract Using phylogenies of present-day species to estimate diversification rate trajectories -- speciation and extinction rates over time -- is a challenging task due to non-identifiability issues. Given a phylogeny, there exists an infinite set of trajectories that result in the same likelihood; this set has been coined a congruence class. Previous work has developed approaches for sampling trajectories within a given congruence class, and suggested that rapid changes in speciation or extinction rates are conserved across the class. We introduce a new method for exploring congruence classes, that we implement in the R package CRABS. Whereas existing methods constrain either the speciation rate or the extinction rate trajectory, ours provides more flexibility by sampling speciation and extinction rate trajectories simultaneously. We also implement a filtering step that allows selecting the most parsimonious trajectories within a class. We demonstrate the utility of our new sampling strategy using a simulated scenario. Next, we apply our approach to the study of mammalian diversification history. We show that rapid changes in speciation and extinction rates need not be conserved across a congruence class, but that selecting the most parsimonious trajectories shrinks the class to concordant scenarios. Our approach opens new avenues both to truly explore the myriad of potential diversification histories consistent with a given phylogeny, embracing the uncertainty inherent to phylogenetic diversification models, and to select among these different histories. This should help refining our inference of diversification trajectories from extant data.