This is data and code supporting the results of Sarah-Sophie Weil, Laure Gallien, Sébastien Lavergne, Luca Börger, Gabriel Hassler, Michaël P. J. Nicolaï, William L. Allen (2022): Chameleon biogeographic dispersal associated with extreme life history strategies. The following R scripts are provided (in Scripts): - 3_2_Trait_preparation: Produces binary trait files using the factor scores of a phylogenetic factor analysis. These binary trait files can then be used to run trait-dependent BioGeoBEARS models. - 5_1_Biogeobears_basic_cluster (in Scripts/Cluster_Scripts): Prepares workspace to run biogeographic models with BioGeoBEARS. At the beginning of the scripts, a handful of things need to be specified, e.g. which model (DEC, BAYAREA or DIVA) and which extension (+x, +m2, +m2x) will be run. See beginning of script for details. At the end of the script, one of the scripts 5_2_Function_run_Biogeobears is sourced which actually runs the specified model. Note: we've provided the outputs of all runs referenced in the article in Data/BioGeoBEARS/Chamaeleonidae since the models can take a long time to run (>12h). - 5_2_Function_run_Biogeobears (in Scripts/Cluster_Scripts): Runs the actual BioGeoBEARS model. There are 12 scripts in total; one script per combination of (DEC, BAYAREA, DIVA)x(0,x,m2,m2x). These scripts are sourced in script 5_1, so it is not necessary to run them separately. - Note for scripts 5_1 and 5_2: These were put together and adapted from Gallien et al. (2019, Proc R Soc B), Klaus & Matzke (2020, Syst Biol) and http://phylo.wikidot.com/. - 5_3_Analysis_BioGeoBEARS_cluster_output_MDMMS: AICc model comparison between different trait-independent biogeographic models to decide which manual dispersal multiplier (MDMM) and base model (DEC, BAYAREA or DIVA) are best suited to the data. An output table and a plot are written to Outputs/Chamaeleonidae/Tables. Since DEC was the best model for our case, trait-dependent models were only run on DEC. - 5_4_Analysis_BioGeoBEARS_cluster_output_just_DEC: AICc model comparison between trait-independent and trait-dependent biogeographic models (per trait. Since the trait data changes from one trait set to another, it is not possible to compare different trait sets). Output tables can be found in Outputs/Chamaeleonidae/Tables, and estimated ancestral regions per model are plotted to pdf files in Outputs/Chamaeleonidae. The data necessary to run the above scripts and some additional files are in Data: - Traits/Chamaeleonidae: - Chamaeleonidae_data.csv: The log10 trait data. SVL = snout-vent-length (mm), CS = clutch size, CY = clutches per year, SM = sexual maturity (months), GT = gestation time (days), RL = reproductive lifespan (months). See article for sources. - 20201221_Chamaeleonidae_181_constrained_MSE_factors.txt: The factor scores of species on 2 axes of life-history variation which are the result of a phylogenetic factor analysis (see article for details). These scores are used to produce binary trait files that can be used for the trait-dependent BioGeoBEARS analysis. - Chamaeleonidae_traits_xx.data: binary trait files for BioGeoBEARS runs. See script 3_2 for details. - Geographies/Chamaeleonidae: - Chamaeleonidae_bioregions_upgma_const_93271_Simpson_final.cpg,.dbf,.shp,.shx: Biogeographic regions that were used to assign presence/absence of species - Chamaeleonidae_geographic_distances_new.txt: Distances between those regions at 5 points in time defined by Chamaeleonidae_timeperiods.txt (in Million years). Is taken into account in BioGeoBEARS +x models - Chamaeleonidae_geographic_distances_final.txt: Same thing as above but 0 replaced by 10^-4 - Chamaeleonidae_geography.data: Occurrences of species in the 9 biogeographic regions - Chamaeleonidae_geography1area.data: 1-area geography file which is necessary to estimate likelihood of only trait-transition model in the scripts 5_2_Function_run_Biogeobears_x_m2.R. This likelihood is combined with the likelihood of trait-independent BioGeoBEARS models and then compared with AICc to trait-dependent BioGeoBEARS models. - Chamaeleonidae_man_disp_mult_areas_allowed.ods: Overview file of relationships between regions at different points in time (manual dispersal multiplier matrices). OA: overwater dispersal against currents, OW: overwater dispersal with currents, C: continental dispersal. Areas allowed: Defines which areas existed at which point in time. - Chamaeleonidae_manual_dispersal_multipliers_x.txt: Different manual dispersal multiplier matrices, all based on the file above, but using different modifications of dispersal probabilities depending on whether dispersal between regions was oceanic (against or with currents) or continental. See article and supplementary material for details. - Chamaeleonidae_areas_allowed.txt: Areas allowed file for input in BioGeoBEARS models - Chamaeleonidae_timeperiods.txt: For time-stratification in BioGeoBEARS models - BioGeoBEARS/Chamaeleonidae: - Chamaeleonidae_tree_final.nwk: Phylogeny of chameleons (taken from Tonini et al., see article). - Chamaeleonidae_tree_final.nwk: Same as above but polytomies resolved (necessary for BioGeoBEARS models) - all other folders contain the outputs of BioGeoBEARS runs, using different manual dispersal multiplier models (folder names), base models (DEC, BAYAREALIKE, DIVALIKE) and extensions (+x,+m2,+m2x).