Data from: No consistent effect of migration on speciation rates in two avian superfamilies: A check on the robustness of trait-dependent diversification methods
Data files
Jul 09, 2026 version files 1.83 GB
-
dryad_data_and_code.zip
1.83 GB
-
README.md
41.40 KB
Abstract
Seasonal migration is performed by taxonomically diverse groups across the planet’s oceans and continents. Migration has been hypothesized to promote speciation through a variety of mechanisms that may initiate reproductive isolation and population divergence, such as temporal or spatial migratory divides, migration ‘falloffs’, or the colonization of new, geographically isolated breeding areas. Migration has also been implicated in recent population divergence within a handful of bird species; however, it is unknown whether migration is generally associated with higher speciation rates. We sought to test this question in two large clades of New World birds with diverse migratory phenotypes, the suboscines and the Emberizoidea, employing three state-of-the-art comparative methods of trait-based diversification: estimates of tip speciation rates using 1) BAMM and 2) ClaDS; and 3) hidden-state speciation-extinction models. Our results differed across methods and across taxonomic scales, suggesting an acute need to corroborate inferences across different frameworks and datasets prior to concluding that a given trait has, in fact, promoted diversification. Overall, and based upon the majority of results across different methods, we conclude that there is no methodologically consistent evidence of faster speciation in migratory lineages in these groups. We discuss the biological implications of this finding, as well as the challenges of inference posed by current trait-based diversification methods.
https://doi.org/10.5061/dryad.9ghx3ffsj
Description of the data and file structure
This repository contains data and code for the following submitted manuscript:
Calabrese GM, Delmore KE, Wolf JBW, Safran RJS, Rabosky DL. No Consistent Effect of Migration on Speciation Rates in Two Avian Superfamilies: A Check on the Robustness of Trait-Dependent Diversification Methods. Submitted to Systematic Biology in March 2025.
There are 2 chains of mostly-parallel main-text analyses, one on the suboscines and one on the Emberizoidea (two bird superfamilies). These are segregated into the "suboscine" and "emberizoidea" folders, respectively. Within the folder of each clade (suboscine folder and emberizoidea folder), there are seven analysis folders that are numbered in progression. Early folders contain data generation and cleaning/organizing steps, and subsequent folders use output from earlier folders. As such, each analysis folder contains its own readme.txt describing input and output files. These input and output files are either included in this repository, or where relevant, instructions are given on how to access them from other publicly-available repositories. The suboscine folder contains an eighth analysis folder that is only applied to the Tyrannidae family (within the suboscines).
The third main folder, "supplemental_avonet comparison" includes the scripts and data files for an analysis contained in the supplementary text of the journal article. Specifically, it repeats a subset of main-text analyses using a different data source for the migration data (the AVONET database), and compares these results to main-text analyses (which use Dufour et al. 2020 as migration data source).
Files and variables
File: dryad_data_and_code.zip
Description:
FOLDER: emberizoidea analysis: folder containing ordered data processing and analysis sub-folders for the emberizoidea analysis
SUBFOLDERS:
"1. source files and getting bamm tip rates" This subfolder contains the following info in its readme.txt
For the Emberizoidea analysis we used the the Barker et al. 2015 phylogeny.
Their data repository is on dryad at: https://datadryad.org/stash/dataset/doi:10.5061/dryad.pb787 (hereafter "the Barker repository")
To get the bamm tip rate data, ran the BAMM program on the maximum clade credibility tree from the Barker repository.
The "sptree_MCC.tre" file was downloaded from the Barker repository.
This tree file is in nexus format, I converted it to newick format using the first few lines in the "bamm formatting and results.R" script (more on this script later) to produce "sptree_MCCnewick.tre".
Download and install the BAMM program executable file (bamm.exe) from: http://bamm-project.org/download.html into the current folder.
The following files were used as input for the bamm run:
"control.txt" #a .txt file containing the various priors and settings for BAMM to estimate tip rates.
"sptree_MCCnewick.tre" # the Barker emberizoidea phylogeny in newick tree format; "control.txt" directs bamm.exe to use this file.
The following files are produced as OUTPUT from the bamm run:
"run_info_emb.txt" #a copy of the run info (e.g., the command line entries and the settings in "control.txt" used by bamm
"mcmc_out_emb.txt" #a record of the log prior probs. and log likelihoods at steps in the MCMC (sampled every 20K steps) during the bamm run
"event_data_emb.txt" #the bamm event data: this file is what's actually used to generate the tip rate data
The "bamm formatting and results.R" script reads the BAMM event data and matches the BAMM tip rates to each tip's complete species names in the Barker et al. data.
It takes the following files as INPUT:
"taxon_translations.txt" #Downloaded from the Barker repository; it provides the clements scientific name for each of the tip labels in the emberizoidea phylogeny.
"event_data_emb.txt" #the bamm run output describved above.
This script produces the following files as OUTPUT:
emb_eventsample.rda #the bamm event data as an .rda file, for faster loading into R.
emb.sp.df.csv #a dataframe including the bamm tip speciation rate for each of the species names/tip labels
The script also does various checks and visualizations on the BAMM results. More information can be found at:
http://bamm-project.org/documentation.html
"emb.sp.df.csv" is then used in the subsequent analysis folder: "2. clean and organize migration data".
"2. clean and organize migration data." This subfolder contains the following info in its readme.txt:
The R script "Clean and organize migration data_emb.R" co-organizes the bamm tip rates, the migration data, and the breeding and non-breeding latitudes.
It takes as INPUT the following files:
migration data_dufour et al. 2019.csv # the migration data from dufour et al. 2019. Data is provided by the authors as a supplementary file to the article with DOI: 10.1111/jbi.13700 . Download the file from the Journal of Biogeography webpage for this article (file is named: "jbi13700-sup-0002-DataS1.xlsx"). Open the file, save it as a .csv with the filename "migration data_dufour et al. 2019.csv" for loading into R via the script.
emb.spec.df.csv # the the bamm tip rates; see folder "1. source files and processing BAMM results" for more details.
MigStatusAll.Rdata # the migration data: this is a .Rdata file of biogeographic data provided by Carlos Botero. This file can be obtained on a zenodo repository at DOI : 10.5281/zenodo.20932745 The relevant columns in the dataframe are SCentLat ("summer" or breeding-season centroid latitude) and WCentLat ("winter" or non-breeding season centroid latitude). These are latitudes of the centroid of the breeding and nonbreeding ranges of each species.
The main objective of the .R script is to match the migration data from dufour to each species in the emberizoidea bamm tip rates file ("emb.spec.df.csv"), thereby dealing with differences in species naming conventions and/or changes to species status/nomenclature between the two data sources. The next objective is to then match the biogeography data (breeding and non-breeding latitudes) for each species.
The OUTPUT of this script is:
mig.tip.rate.emb.csv #a csv containing the migration data, latitudinal data, and bamm tip rates for each of the emberizoid species in the analysis. This csv serves as an input file in subsequent analysis folders. It can be generated from the code in this folder, and can also be obtained from a zenodo repository at DOI: 10.5281/zenodo.20932745
"3. getting and analyzing clads tip rates" This subfolder contains the following info in its readme.txt:
This folder contains the files used to get ClaDS tip rates for the emberizoidea.
The ClaDS program was run in Julia v1.9.1 and used the following file as INPUT:
emb.pruned.tre # this is the emberizoidea phylogeny, pruned of the tips that have been re-designated as subspecies or for other issues (see manuscript and supplementary methods, also see folder "2. clean and organize migration data").
The file "julia script.txt" documents the commands entered to the Julia program to calculate clads tip speciation rates using "emb.pruned.tre". This results in the following files as OUTPUT:
julia_clads_emb # the output from running ClaDS in Julia on the Emberizoidea tree
julia_clads_Robj.Rdata # the output from running ClaDS in Julia on the Emberizoidea tree, saved in a .Rdata format for analysis in R
Next, an R script "CladS_emb.R" is used to analyze the ClaDS output in conjunction with migration data. It reads in the following as INPUT:
julia_clads_Robj.Rdata # the output from running ClaDS in Julia
emb.pruned.tre # the emberizoidea phylogeny
mig.tip.rate.emb.csv # mig.tip.rate.emb.csv was produced in the previous analysis folder: "2. clean and organize migration data". It is also available at the zenodo repository at DOI : 10.5281/zenodo.20932745
The script analyses the relationship between ClaDS tip rates ~ migration phenotype and breeding latitude.
"4. analysis of bamm tip rates and plotting" This subfolder contains the following info in its readme.txt:
This folder does the following analyses for the Emberizoidea:
1) does the ancestral character reconstruction of migration 2) analyzes the BAMM tip speciation rates with respect to migration, using STRAPP and PGLS and 3) does the plotting for the plots that include both bamm and clads tip rates (Fig. 4)
All of this is accomplished with the R script "analysis of migration and tip rates_emb.R". This script reads in the following files as INPUT:
emb.tre # a ladderized version of the Emberizoidea MCC tree (see readme in folder 1. for details)
mig.tip.rate.emb.csv # the data file including migration, latitudes, and bamm tip rate data for each species (generated by code in folder 2)
emb_eventsample.rda # the bamm event data (see folder 1. for details)
julia_clads_Robj.Rdata # the clads tip rates (see folder 3. for details)
phylobalance.R # an R script that contains a pruning algorithm developed by Rabosky lab, to make a reduced-representation phylogeny plot that maintains the overall tree structure (density, lengths of branches etc.) while pruning the tree to allow more visual interpretation. This script is used in plotting Fig. 2.
figure 4.R # an R script that plots figure 4, when called within the R environment set up by the "analysis of migration and tip rates_emb.R" script
The following files are produced as OUTPUT by the "Analysis of migration and tip rates.R" script:
"figure 4.png" # manuscript figure 4
The following files are optional INUPT data for "Analysis of migration and tip rates.R" script:
acr.hid.RData # the ancestral character reconstruction (ACR) with hidden states and step-wise transition only between migration states
acr.nohid.RData # the ACR without hidden states and with step-wise transition only between the migration states
acr.allrates.hid.RData # the ACR with hidden states and with all transitions between migration states
acr.allrates.nohid.RData # the ACR without hidden states and with all transitions between migration states.
These four .RData files contain the output from fitting the various corHMM ACR models. The code to fit these models is within the "Analysis of migration and tip rates.R script", so they are not strictly necessary as 'input'. However, each of these models can take >24 hours (depending on computing resources) to fit, so I saved the output as an .RData object for user ease. Thus, these files can also serve as INPUT for the "Analysis of migration and tip rates.R" script if the user wants to skip the model fitting process. The models are identical if loading the .RData files vs. fitting the models yourself with the script.
"5. MuHisse analysis" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to fit the multistate-hidden state speciation extinction (MuHiSSE) models, for the Emberizoidea. The script "HiSSE analysis.R" does the MuHiSSE analysis.
It takes the following files as INPUT:
emb.tre # a ladderized version of the MCC tree for Emberizoidea; see readme in folder 1. for details)
mig.tip.rate.csv # the migration data for each species (generated by code in folder 2, see folder 2 README for additional details.)
The MuHiSSE models can each take days to fit, so the models fit by the script are saved as OUTPUT for the user's convenience in:
Emberizoidea_MuHiSSE.RData # This can be loaded to view the MuHiSSE results without having to run the first half of the script that fits the models.
"6. Time-slice Contrast Count" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to get the Time Slice Contrast Count (TSCC) data for the Emberizoidea. Because these data are plotted on multipanel plots that have primarily suboscine and Tyrannid TSCC data, the output is then passed to the suboscine analysis pipeline (specifically the "6. Time Slice Contrast Count" folder in that pipeline).
The "TSCC data prep_emb" script conducts the Time Slice Contrast Count on the Emberizoidea data. It takes the following files as INPUT:
traitDependent_functions.R" # this file has custom functions commonly used by the Rabosky lab, some of which are dependencies for the TSCC functions contained in "slice-fxns.R". This also has a function for getting the DR statistic from the tree.
slice-fxns.R # this script has the functions that perform and summarize the TSCC.
emberizoidea.tre # this is the pruned emberizoidea tree
mig.tip.rate.emb.csv # the migration and latitude data for each species, generated by code in folder 2, see folder 2 README for details.
julia_clads_Robj.Rdata # the clads tip speciation rates, generated in analysis folder 3.
The script performs the TSCC for migration and breeding latitude, for each of the ClaDS and BAMM tip rates and the DR statistic.
It saves all of these TSCC objects as the following OUTPUT file:
emb_TSCC_data.RData # this is the Emberizoidea TSCC output. It is passed to the folder suboscine_analysis/6.Time-slice Contrast Count, where the data are used in plotting the TSCC results for all clades in the paper (emberizoidea, suboscines, Tyrannidae).
"7. MiSSE tip rates" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to get the MiSSE tip speciation rates and analyze their relationship with migration, for the Emberizoidea. The script "MiSSE analysis.R" script gets the tip rates and does the analysis for Emberizoidea. It takes the following files as INPUT:
emb.tre # this is the emberizoidea tree
mig.tip.rate.emb.csv # the migration and latitude data, and BAMM tip rates, for each Emberizoidea species. See Folder 2 for code to generate this file.
Fitting the multiple MiSSE models on this tree, and getting their reconstructions, is computationally intensive (it can take many days).
These models can be fit by the script, but it also saves the models as OUTPUT:
Emb_MiSSE.RData # this file can be loaded by the user for the analysis portion of the script, in lieu of fitting the MiSSE models themselves.
FOLDER: suboscine analysis. folder containing ordered data processing and analysis sub-folders for the suboscine analysis.
SUBFOLDERS:
"1. source files and getting bamm tip rates" This subfolder contains the following info in its readme.txt:
For this analysis we used suboscine BAMM tip speciation rates and phylogeny from Harvey et al. 2021 Science paper. Their data repository is on Zenodo at: https://zenodo.org/records/3976115 (hereafter "the Harvey repository"). The tip rates are included in the Harvey et al. paper, but tip rate data itself was not part of the repository.
# FOLDER: bamm_100_prior_AOSHM
To get the tip rate data, I re-ran the BAMM program on the Harvey et al. phylogeny. This was done within the bamm_100prior_AOSHM folder.
Download and install the BAMM program executable file (bamm.exe) from: http://bamm-project.org/download.html into this folder (bamm_100_prior_AOSHM)
Download the following INPUT files from the Harvey repository at https://zenodo.org/records/3976115 and place in the bamm_100prior_AOSHM folder:
"T400F_AOS_HowardMoore.tre" #a .tre file containing the suboscine phylogeny
"run_info.txt" #a .txt file containing the various priors and settings for BAMM to estimate tip rates.
The program bamm.exe was run from the command line, using run_info.txt to direct it to use the "T400F_AOS_HowardMoore.tre" file and the other necessary priors/settings listed in run_info.txt.
The following files are generated as OUTPUT of this bamm run:
"100_prior_AOSHM_run_info.txt" #a copy of the run info used by bamm
"100_prior_AOSHM_mcmc_out.txt" #a record of the log prior probs. and log likelihoods at steps in the MCMC (sampled every 20K steps) during the bamm run
"100_prior_AOSHM_event_data.txt" #the bamm event data: this file is what's actually used to generate the tip rate data
#Rest of folder:
The "process_BAMM_results.R" script was used to view the BAMM results and extract the tip rate data for subsequent analyses.
This script uses the following files as INPUT:
"T400F_AOS_HowardMoore.tre" #the same phylogeny described above; Download this from the Harvey repository at https://zenodo.org/records/3976115
"bamm_100prior_AOSHM/100prior_AOSHM_event_data.txt" #the output data from the bamm run
"Species_name_map_uids.csv" #a .csv file available for download from the Harvey repository at https://zenodo.org/records/3976115, which maps the tip labels used by the .tre file to other naming conventions of these tips (full species names in AOS/HowardMoore, IUCN, etc. naming conventions, as well as the family to which the species belongs).
The "process_BAMM_results.R" script loads the event data and produces as OUTPUT an .rda file of the event data (for faster loading into R):
"100prior_AOSHM_eventsample.rda" #the bamm event data as an .rda file
The "process_BAMM_results.R" script then does various checks and visualizations on the BAMM results. More information can be found at:
http://bamm-project.org/documentation.html
Finally, the script extracts the bamm tip rates from the event data, and uses the tipnamecode common to the .tre phylogeny and the "Species_name_map_uids.csv" to match the tip rate to the full set of species name data. This dataframe is OUTPUT as "suboscine.tip.speciation.rates" here, and is copied in the subsequent analysis folder ("2. clean and organize migration data")
"2. clean and organize migration data" This subfolder contains the following info in its readme.txt:
The R script "Clean and organize migration data.R" folder co-organizes the bamm tip rates, the migration data, and the breeding and non-breeding latitudes. It takes as INPUT the following files:
migration data_dufour et al. 2019.csv # the migration data from dufour et al. 2019. Data is provided by the authors as a supplementary file to the article with DOI: 10.1111/jbi.13700 . Download the file from the Journal of Biogeography webpage for this article (file is named: "jbi13700-sup-0002-DataS1.xlsx") Open the file, save it as a .csv with the filename "migration data_dufour et al. 2019.csv" for loading into R via the script.
T400F_AOS_HowardMoore.tre # the suboscine phylogeny. Download from the Harvey et al. 2021 Zenodo repository at : https://zenodo.org/records/3976115
suboscine.tip.speciation.rates.csv # the the bamm tip rates; see folder "1. source files and processing BAMM results" for how this file was produced from Harvey et al. 2021 tree and bamm settings)
MigStatusAll.Rdata # the migration data: this is a .Rdata file of biogeographic data provided by Carlos Botero. This file can be obtained on a zenodo repository at DOI : 10.5281/zenodo.20932745. The relevant columns in the dataframe are SCentLat ("summer" or breeding-season centroid latitude) and WCentLat ("winter" or non-breeding season centroid latitude). These are latitudes of the centroid of the breeding and nonbreeding ranges of each species.
The main objective of the .R script is to match the migration data from dufour to each species in the suboscine bamm tip rates file, thereby dealing with differences in species naming conventions and/or changes to species status/nomenclature between the two data sources. The next objective is to then match the biogeography data (breeding and non-breeding latitudes) for each species. The OUTPUT of this script is:
"mig.tip.rate.csv" #a csv containing the migration data, latitudinal data, and bamm tip rates for each of the suboscine species in the analysis. This csv serves as an input file in subsequent analysis folders. It can be generated from the code in this folder, and can also be obtained from a zenodo repository at DOI: 10.5281/zenodo.20932745
"3. getting and analyzing clads tip rates" This subfolder contains the following info in its readme.txt:
This folder contains the files used to get ClaDS tip rates for the suboscines. The ClaDS program was run in Julia v 1.9.1 and used the following file as INPUT:
The file "julia script.txt" documents the commands entered to the Julia program to calculate clads tip speciation rates using suboscine.tre . This results in the following files as OUTPUT:
"julia_clads_Robj.Rdata" # the clads tiprates as a .Rdata object, for easy loading into R
julia_clads_suboscine # the clads tiprates as the default file type when Julia saves it. I didn't really use this as I did further processing in R.
Next, an R script "CladS_subo.R" is used to analyze the ClaDS output in conjunction with migration data. It reads in the following as INPUT:
julia_clads_Robj.Rdata # the output from running ClaDS in Julia
T400F_AOS_HowardMoore.tre # the suboscine phylogeny. User may download from the Harvey et al. 2021 Zenodo repository at : https://zenodo.org/records/3976115
mig.tip.rate.csv # mig.tip.rate.csv was produced in the previous analysis folder: "2. clean and organize migration data".
The "CladS_subo.R" script analyses the relationship between ClaDS tip rates ~ migration phenotype and breeding latitude.
"4. analysis of bamm tip rates and plotting" This subfolder contains the following info in its readme.txt:
This folder: 1) does the ancestral character reconstruction of migration on the suboscine tree 2) analyzes the BAMM tip speciation rates with respect to migration, using STRAPP and PGLS, for suboscines and the Tyrannidae within the suboscines and 3) does the plotting for the plot that includes both bamm and clads tip rates for suboscines (Fig. 3). 4) It also does the plotting for the summary of migratory phenotypes (Fig. S1) and for the sister clade visualization in tyrannidae (Fig. 4).
All of this is accomplished with the R script "Analysis of migration and tip rates.R". This script reads in the following files as INPUT:
"T400F_AOS_HowardMoore.tre" #the suboscine tree from the Harvey et al. 2021 data repository (User may download from: https://zenodo.org/records/3976115)
"mig.tip.rate.csv" #the data file including migration, latitudes, and bamm tip rate data for each species (see folder 2. for details)
"100prior_AOSHM_eventsample.rda" #the bamm event data (see folder 1. for details)
"julia_clads_Robj.Rdata" #the clads tip rates (see folder 3. for details)
"figure S2.R" # an R script that plots figure S2, when called within the R environment set up by the "Analysis of migration and tip rates.R"
"phylobalance.R" # an R script that contains a pruning algorithm developed by Rabosky lab, to make a reduced-representation phylogeny plot that maintains the overall tree structure (density, lengths of branches etc.) while pruning the tree to allow more visual interpretation. This script is used in plotting Fig. 2.
"figure 2.R" # an R script that plots figure 2, when called within the R environment set up by the "Analysis of migration and tip rates.R" script
The following files are produced as OUTPUT by the "Analysis of migration and tip rates.R" script:
"figure S1.png" # manuscript figure S2
"figure 3.png" # manuscript figure 3
"figure 5.png" # manuscript figure 5
The following files are optional INUPT data for "Analysis of migration and tip rates.R" script:
"acr.hid.RData" #the ancestral character reconstruction (ACR) with hidden states and step-wise transition only between migration states
"acr.nohid.RData" #the ACR without hidden states and with step-wise transition only between the migration states
"acr.allrates.hid.RData" #the ACR with hidden states and with all transitions between migration states
"acr.allrates.nohid.RData" #the ACR without hidden states and with all transitions between migration states.
These four .RData files contain the output from fitting the various corHMM ACR models. The code to fit these models is within the "Analysis of migration and tip rates.R script", so they are not strictly necessary as 'input'. However, each of these models can take >24 hours (depending on computing resources) to fit, so I saved the output as an .RData object for user convenience. Thus, these files can also serve as INPUT for the "Analysis of migration and tip rates.R" script if the user wants to skip the model fitting process. The models are identical if loading the .RData files vs. fitting the models yourself with the script.
"5. MuHiSSE analysis" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to fit the multistate-hidden state speciation extinction (MuHiSSE) models, for suboscines and Tyrannidae (within the suboscines). The script "HiSSE analysis.R" does the MuHiSSE analysis for the suboscines as a whole. It takes the following files as INPUT:
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, User may download at: https://zenodo.org/records/3976115
mig.tip.rate.csv #the migration data for each species, generated in folder 2 (see folder 2 readme for details).
The MuHiSSE models can each take days to fit, so the models fit by the script are saved as OUTPUT for the user's convenience in:
"Suboscine_MuHiSSE.RData". This can be loaded to view the MuHiSSE results without having to run the first half of the script that fits the models.
The script "HiSSE analysis_Tyrannidae only.R" does the MuHiSSE analysis for the tyrannids specifically.
It takes the same INPUT files ("T400F_AOS_HowardMoore.tre" and "mig.tip.rate.csv"), and saves the fitted models into the OUTPUT file "Tyrannidae_MuHiSSE.RData".
"6. Time-slice Contrast Count" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to get the Time Slice Contrast Count (TSCC) data for the suboscines and tyrannids, and to plot these data for all the clades (including emberizoidea).
The "1. TSCC data prep and concept figure.R" script conducts the Time Slice Contrast Count on the suboscines and tyrannids. It and also produces Figure 2 (a conceptual figure illustrating the steps in the TSCC.) It takes the following files as input:
traitDependent_functions.R # this file has custom functions commonly used by the Rabosky lab, some of which are dependencies for the TSCC functions contained in "slice-fxns.R". This also has a function for getting the DR statistic from the tree.
slice-fxns.R # this script has the functions that perform and summarize the TSCC.
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, User may download at: https://zenodo.org/records/3976115
mig.tip.rate.csv # the migration and latitude data, and BAMM tip rates, for each suboscine species (generated in folder 2, see folder 2 readme for details).
julia_clads_Robj.Rdata #the clads tip speciation rates, generated in analysis folder 3.
The script performs the TSCC for migration and breeding latitude, for each of the ClaDS and BAMM tip rates and the DR statistic. It does this for the suboscines as a whole, and then again for the Tyrannidae subtree within the suboscines. It saves all of these TSCC objects as the following OUTPUT file:
subo_TSCC_data.RData #this is the suboscine/tyrannid TSCC data. It is passed to the next script ("2. TSCC plotting.R") for plotting.
Finally, the script plots a conceptual figure illustrating the steps of the TSCC analysis (Fig. 2 of the Manuscript), which produces the OUTPUT file:
tscc.concept.multipanel.png # this is Figure 2 in the manuscipt.
The subsequent script, "2. TSCC plotting.R", uses the TSCC data to create plots of TSCC through time. It takes the following INPUT files:
subo_TSCC_data.RData # the suboscine and tyrannid TSCC data, generated in the first numbered script in this folder
emb_TSCC-data.RData # the emberizoidea TSCC data, generated in the emberizoidea folder pipeline (folder "emberizoidea/6. Time-slice Contrast Count")
plot_tscc_bars_updated.R # a script with a function to plot the TSCC summary data as bar plots
The script then produces the following OUTPUT files:
Fig6.png # TSCC plot of the DR statistic for all clades; Figure 6 in the manuscript
figS3_tscc_bamm.png # TSCC plot of bamm tip rates for all clades; Figure S3 in the manuscript
FigS4_tscc.clads.png # TSCC plot of clads tip rates for all clades; Figure S4 in the manuscript
"7. MiSSE tip rates" This subfolder contains the following info in its readme.txt:
This folder contains scripts and input files to get the MiSSE tip speciation rates and analyze their relationship with migration, for both the suboscines and the tyrannidae (within the suboscines). The script "MiSSE analysis.R" gets the tip rates and does the analysis for suboscines. It takes the following files as INPUT:
T400F_AOS_HowardMoore.tre # The suboscine phylogeny, user may download at: https://zenodo.org/records/3976115
mig.tip.rate.csv # the migration and latitude data, and BAMM tip rates, for each suboscine species. File is generated with code in folder 2, see folder 2 README for details.
Fitting the multiple MiSSE models on this tree, and getting their reconstructions, is computationally intensive (it can take many days). These models can be fit by the script, but it also saves the models as OUTPUT:
Suboscine_MiSSE.RData #this file can be loaded by the user for the analysis portion of the script, in lieu of fitting the MiSSE models themselves.
The script "MiSSE analysis_Tyrannidae.R" script gets the tip rates and does the analysis for Tyrannidae.
It takes the following files as INPUT:
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, User may download at: https://zenodo.org/records/3976115
mig.tip.rate.csv # the migration and latitude data, and BAMM tip rates, for each suboscine species. File is generated with code in folder 2, see folder 2 README for details.
It saves the fitted MiSSE models and their reconstructions to OUTPUT file:
Tyrannidae_MiSSE.RData #this file can be loaded by the user for the analysis portion of the script, in lieu of fitting the MiSSE models themselves.
"8. supplemental_monomorphic sister clade analysis" This subfolder contains the following info in its readme.txt:
This folder contains the script and input files needed to perform an analysis in the manuscript supplement, specifically a standard sister clade analysis (comparing sister clades that are each monomorphic in opposing migration traits) of the Tyrannidae. The analysis is performed by the script "supplemental_sisters package analysis.R". It takes the following files as INPUT:
mig.tip.rate.csv #the data file including migration data for each species, generated by code in folder 2 (see folder 2 readme for details).
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, download at: https://zenodo.org/records/3976115
It produces the following file as OUTPUT:
supp_sisters.png #Figure S4 of the manuscript
FOLDER: supplemental_avonet comparison. folder containing ordered data processing and analysis sub-folders for comparing results of some analyses between two different migration data sources, as detailed in the supplemental materials and methods of the manuscript.
SUBFOLDERS:
"1. suboscines" This subfolder contains the following info in its readme.txt:
This repository contains scripts and data files for analyzing ClaDS and BAMM tip rates in relation to migration data from the AVONET database, for the suboscines and the Tyrannidae.
The first script, "1. avonet_dufour_species_matching.R", matches species names and migration data for each lineage between the two data sources (Dufour et al. 2020 and AVONET). It takes the following files as INPUT:
mig.tip.rate.csv # migration data and BAMM tip rates for the suboscines. See the main-text analysis "suboscines" folders for details
AVONET birdlife.csv # migration data from AVONET. To Obtain:
1) Download "AVONET Supplementary dataset 1.xlsx" from: https://figshare.com/s/b990722d72a26b5bfead (article DOI: https://doi.org/10.111/ele.13898)
2) Open "AVONET Supplementary dataset 1.xlsx". Save the second sheet (titled "AVONET1_BirdLife") as a .csv file, naming the file "AVONET birdlife.csv".
The script generates a dataframe with a row for each species, and columns for the tree tip label (species name) and the migration phenotype of each species from Dufour et al. 2020 and from avonet. It saves this dataframe as OUTPUT:
mig_avo_compare.csv
This file is then passed to the subsequent script for analysis.
The script "2. BAMM tip rates_avonet.R" analyzes the BAMM tip rates in relation to migration data from avonet.
It takes the following files as INPUT:
mig.tip.rate.csv # migration data as categorized in the Dufour et al. 2019 paper and BAMM tip rates for the suboscines. See the main-text analysis "suboscines", sub-folder 2 for details on generating this file.
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, User may download at: https://zenodo.org/records/3976115
mig_avo_compare.csv # migration data output from R script "1. avonet_dufour_species_matching.R"
100prior_AOSHM_eventsample.rda # the BAMM event data for the suboscines
All analyses are done within the script, and there are no figures or other output files.
The script "3.ClaDS tip rates_avonet.R" analyzes the ClaDS tip rates in relation to migration data. It takes the following files as INPUT:
mig.tip.rate.csv # migration data as categorized in the Dufour et al. 2019 paper and BAMM tip rates for the suboscines. See the main-text analysis "suboscines", sub-folder 2 for details on generating this file.
T400F_AOS_HowardMoore.tre #the suboscine phylogeny, User may download at: https://zenodo.org/records/3976115
mig_avo_compare.csv # migration data output from R script "1. avonet_dufour_species_matching.R"
julia_clads_Robj.Rdata # the ClaDS tip rates for the suboscines.
All analyses are done within the script, and there are no figures or other output files.
"2. emberizoidea" This subfolder contains the following info in its readme.txt:
This repository contains scripts and data files for analyzing ClaDS and BAMM tip rates in relation to migration data from the AVONET database, for the Emberizoidea. The first script, "1. avonet_dufour_species_matching.R", matches species names and migration data for each lineage between the two data sources. It takes the following files as INPUT:
mig.tip.rate.emb.csv # migration as characterized by Dufour et al. 2020 and BAMM tip rates for the Emberizoidea. See the main-text analysis "emberizoidea", subfolder 2 for details on generating this file.
AVONET birdlife.csv # migration data from AVONET. To Obtain:
1) Download "AVONET Supplementary dataset 1.xlsx" from: https://figshare.com/s/b990722d72a26b5bfead (article DOI: https://doi.org/10.111/ele.13898)
2) Open "AVONET Supplementary dataset 1.xlsx". Save the second sheet (titled "AVONET1_BirdLife") as a .csv file, naming the file "AVONET birdlife.csv".
The script generates a dataframe with a row for each species, and columns for the tree tip label (species name) and the migration phenotype of each species from Dufour et al. 2020 and from avonet. It saves this dataframe as OUTPUT:
mig_avo_compare.csv
This file is then passed to the subsequent script for analysis.
The script "2. BAMM tip rates_avonet.R" analyzes the BAMM tip rates in relation to migration data from avonet. It takes the following files as INPUT:
mig.tip.rate.emb.csv # migration as characterized by Dufour et al. 2020 and BAMM tip rates for the Emberizoidea. See the main-text analysis "emberizoidea", subfolder 2 for details on generating this file.
emb.tre # the Emberizoidea phylogeny
mig_avo_compare.csv # migration data output from R script "1. avonet_dufour_species_matching.R"
emb_eventsample.rda # the BAMM event data for the Emberizoidea
All analyses are done within the script, and there are no figures or other output files.
The script "3.ClaDS tip rates_avonet.R" analyzes the ClaDS tip rates in relation to migration data from avonet. It takes the following files as INPUT:
mig.tip.rate.emb.csv # migration as characterized by Dufour et al. 2020 and BAMM tip rates for the Emberizoidea. See the main-text analysis "emberizoidea", subfolder 2 for details on generating this file.
emb.tre # the Emberizoidea phylogeny
mig_avo_compare.csv # migration data output from R script "1. avonet_dufour_species_matching.R"
julia_clads_Robj.Rdata # the ClaDS tip rates for the Emberizoidea.
All analyses are done within the script, and there are no figures or other output files.
"3. database comparison" This subfolder contains the following info in its readme.txt:
This folder compares how the two data sources agree and disagree on assigning migration phenotypes to each species, using the script "compare.R". It takes the following INPUT files:
mig_avo_compare_subo.csv # contains migration data as categorized by dufour and avonet for each species in the suboscines. This file was generated in folder "1. suboscines", there named simply "mig_avo_compare.csv"
mig_avo_compare_emb.csv # contains migration data as categorized by avonet for each species in the emberizoidea. This file was generated in folder "2. emberizoidea", there named simply "mig_avo_compare.csv"
mig.tip.rate.emb.csv # migration as characterized by Dufour et al. 2020 and BAMM tip rates for the Emberizoidea. See the main-text analysis "emberizoidea", subfolder 2 for details on generating this file.
The script organizes the data and generates a table comparing assignments of migration status for each species between the data sources. There is no output file.
Code/software
Scripts/code are available in the .zip file but is organized within the ordered project folders in an organized workflow. Individual description here would make much less sense to a user than opening each folder in order, reading that folder's readme.txt, and following the described workflow.
Software needed is:
- R version R version 4.3.1 (https://cran.r-project.org/bin/windows/base/old/),
- BAMM version 2.5.0 (www.bamm-project.org),
- Julia version 1.9.1. (https://julialang.org/downloads/).
All are free and open source. Relationship between programs and files is all explained in the readme.txt of each ordered project folder within the .zip file.
Access information
Code in this repository may take the below-listed data as input files. These files are not included in the repository (except where licensed under CC0) but instructions for access are included where appropriate throughout the README.
- migration data are sourced from the Dufour et al. 2020 article, as a supplementary file on the publisher's site with DOI: 10.1111/jbi.13700
- emberizoidea phylogeny: the Barker et al. 2015 phylogeny is on dryad at: https://datadryad.org/stash/dataset/doi:10.5061/dryad.pb787
- suboscine phylogeny: the Harvey et al. 2021 phylogenty is on Zenodo at: https://zenodo.org/records/3976115
- migration data from AVONET for the supplemental comparison can be downloaded from: https://figshare.com/s/b990722d72a26b5bfead ; article DOI: https://doi.org/10.111/ele.13898
- Breeding latitude and longitude for species included in the analysis can be accessed at a Zenodo repository at DOI: 10.5281/zenodo.20932745 (direct link: https://zenodo.org/records/20932745).
The dataset is comprised of existing published phylogenies of suboscines (Harvey et al. 2020) and Emberizoidea (Barker et al. 2015) and two existing published databases of bird migratory phenotypes (Dufour et al. 2020; and AVONET--Tobias et al. 2022; see manuscript for details).
Data were processed and analyzed primarily in R, but BAMM and Julia software were both also used in processing and analyzing data. The workflow of processing and analysis is detailed in ordered project folders, each with its own readme.txt file, in the repository.
