Dawn of the dinosaurs demonstrates early diversification bursts and potential role for neutral dynamics during major evolutionary radiations
Data files
Jun 16, 2026 version files 63.94 MB
-
Archosauromorph-diversification.zip
63.93 MB
-
README.md
10.73 KB
Abstract
Major radiations have given rise to huge swathes of life on Earth, and understanding their dynamics reveals the process of biodiversity generation itself. The rise of dinosaurs and other archosaurs during the Triassic was a spectacular example of such a radiation; it set the stage for Mesozoic faunas and gave rise to the largest land animals on Earth. Previous attempts to understand its dynamics have relied on phylogeny, necessitating the exclusion of much data. We employ the Bayesian occurrence-based approach PyRate, allowing speciation and extinction dynamics to be estimated without recourse to phylogeny. We analyse stratigraphic range-based data for all archosauromorphs from the late Permian to the Early Jurassic, and test for association of body size with diversification using a body size proxy. We find an “early burst” pattern of diversification, with initial high speciation giving way to increased extinction. Falling speciation is consistent with niche-filling following extinction, but increasing extinction may indicate a role for neutral dynamics during radiation. Cryptic diversification may be evidenced by a peak earlier than inferred using phylogenetic estimates. Body size is not statistically associated with diversification, but the positive direction of association potentially reflects the concurrent passive “trend” of increasing size.
Archosauromorph diversification rate analyses
This dataset contains the data and scripts used for the Bayesian diversification rate analyses of archosauromorph taxa.
Contents of the zip archive Archosauromorph-diversification.zip
Master data file data/Archosauromorpha_source.txt
Original data table (tab-delimited) with all the species in the study.
Columns:
- Name: Name of the species. Underscores used instead of spaces.
- Taxonomic_group: Least inclusive taxonomic group used for deriving the subsets of the dataset.
- Status: Whether the species is extant or extinct. Required for PyRate input. In this dataset, all the values are "Extinct".
- MinAge: Most recent age boundary of the stratigraphic range of the species. In millions of years.
- MaxAge: Most ancient age boundary of the stratigraphic range of the species. In millions of years.
- trait: Observed or estimated maximum femoral length, in cm. Missing data coded as "NA".
Subset names
Each taxon was assigned to its least inclusive taxonomic group among the following: Archosauromorpha, Avemetatarsalia, Ornithischia, Pseudosuchia, Sauropodomorpha, and Theropoda.
Nine subsets were derived from the original dataset, based on the taxonomic groups, as defined below.
| Subset name | Taxonomic groups included |
|---|---|
| "Archosauromorpha" | Archosauromorpha, Avemetatarsalia, Ornithischia, Pseudosuchia, Sauropodomorpha, and Theropoda |
| "Stem" (stem-Archosauria) | Archosauromorpha |
| "Archosauria" | Avemetatarsalia, Ornithischia, Pseudosuchia, Sauropodomorpha, and Theropoda |
| "Pseudosuchia" | Pseudosuchia |
| "Avemetatarsalia" | Avemetatarsalia, Ornithischia, Sauropodomorpha, and Theropoda |
| "Dinosauria" | Ornithischia, Sauropodomorpha, and Theropoda |
| "Sauropodomorpha" | Sauropodomorpha |
| "Theropoda" | Theropoda |
| "Ornithischia" | Ornithischia |
For instance, Sarcosaurus andrewsi is assigned to the Theropoda taxonomic group, and therefore it is present in the datasets "Archosauromorpha", "Avimetatarsalia", "Dinosauria", and "Theropoda".
The name of the subset is the first part of the file name of the corresponding input data files and output result files.
Data files
In the data directory, there are three files for each subset. These files were generated by scripts derived from the data in the master file data/Archosauromorpha_source.txt (see Workflow instructions).
data/<SUBSET>.txt: Tab-delimited table with the data of the species in the subset. Each species has two identical rows, which are treated as pseudo-occurrences by the age resampling script. It contains the following columns, with the same definitions as in the master data file:- Name
- Status
- MinAge
- MaxAge
- trait
data/<SUBSET>_resampled.py: PyRate input file containing Python code that defines multiple datasets of resampled minimum and maximum ages.data/<SUBSET>_TaxonList.txt: Simplified table of species data (tab-delimited). Generated by default by the age resampling script, but not used in the downstream analyses.
Columns:- Species: Name of the species
- Status: Same as in the master data table
- trait: Same as in the master data table
In addition, there are two chronostratigraphic data files:
data/geoseries.txt: List of age boundaries (in millions of years before the present) between selected geological units (Capitanian-Changhsingian (late Permian), Lower Triassic, Middle Triassic, Upper Triassic, and Lower Jurassic), used to define the time bins in the TPP analyses. One value per line.data/stratigraphic_chart.txt: Table of ISC stratigraphic chart boundaries and colours, used for plotting.
Columns:- Name: Name of the chronostratigraphic unit.
- Rank: Rank of the chronostratigraphic unit ("system", "series", or "stage").
- Lower_boundary: Start of the stratigraphic unit (in millions of years before the present).
- Upper_boundary: End of the stratigraphic unit (in millions of years before the present).
- Duration: Difference between the lower and upper boundaries.
- Colour: Hex code of the ISC stratigraphic char colour for this unit.
- Text_colour: Hex code of the colour to use for the text label.
Output files
We provide the MCMC files of the combined results of the 20 age-resampled HPP analyses in the paper. These are the files used for producing Fig. 1 in the paper.
-
output/<SUBSET>_mcmc.log: Combined Markov chain Monte Carlo samples from traces of multiple age-resampled analyses, in tab-delimited format. Due to a bug in the log combination process, four of the columns are mislabelled.Columns:
- it: Iteration (sample number), starting from 0.
- posterior: Posterior probability
- PP_lik: Prior probability (should be prior)
- BD_lik: Likelihood of the Preservation process (should be PP_lik)
- q_rate: Likelihood of the Birth-Death process (should be BD_lik)
- mean_q: Preservation rate (should be q_rate)
- alpha: Shape parameter of the gamma distribution of preservation rate heterogeneity (not used in the HPP model)
- cov_sp: Covariance of the trait with the speciation rate
- cov_ex: Covariance of the trait with the extinction rate
- cov_q: Covariance of the trait with the preservation rate (zero in the HPP model)
- k_birth: Number of speciation rate shifts
- k_death: Number of extinction rate shifts
- RJ_hp: Random jump hyper-prior
- root_age: Time of origin of the oldest lineage
- death_age: Time of extinction of the youngest lineage
- tot_length: Total branch length
_TS: Time of speciation of the species _TE: Time of extinction of the species
-
output/<SUBSET>_sp_rates.log: Tab-delimited speciation rates and their shift times, matching line by line the samples in theoutput/<SUBSET>_mcmc.logfile.
In a sample with $k$ shifts, the first $k + 1$ values in the line are the rates, and the last $k$ values are the dates at which the shifts occurred. -
output/<SUBSET>_ex_rates.log: Extinction rates and their shift times, given in the same way as the speciation rates. -
output/plotsis an empty directory for the scripts to save the plots.
Scripts
scripts/analysis_group_definitions.jl: Utility script that creates dictionaries defining taxon groups and analysis groupsscripts/create_replicates.r: R script that runs a bundled PyRate utility function for generating the resampled replicatesscripts/create_replicates.jl: Generates data subsets by taxon groups and runsscripts/create_replicates.ron each subsetscripts/plot_covar.jl: Plots the distribution of covariance between femoral length and speciation and extinction ratescripts/rtt_figure.jl: Plots multiple RTT curves on the same scale
Other files
Project.toml: Julia project file.readme.md: Readme file in the archive.
Workflow instructions
1. Dependencies
Make sure all the project dependencies are installed.
-
PyRate should be available in the project directory following the instructions from: https://github.com/dsilvestro/PyRate
-
Julia 1.11. Install the project dependencies with the command:
julia --project=@. -e 'using Pkg; Pkg.instantiate()'Compilation can take a while.
-
R v4.4
-
GNU Parallel
2. Subset and resample
The following command divides the data into subsets by taxon group and generates replicate PyRate input files resampling ages of taxon occurrence.
The files created by this command are saved to the data directory. They are named by the analysis group (Archosauromorpha, Stem, Dinosauria, etc.). The resampled input files have the postfix "_resampled".
julia --project=@. scripts/create_replicates.jl
3. Run PyRate analyses
We use GNU Parallel to run several PyRate analyses at once. The HPP analyses are run with this command:
cd PyRate && parallel -j 6 --joblog ../parallel_hpp_commands.log \
python3 PyRate.py {1}.py -se_gibbs -mCov 3 -logT 10 -n 1000000 -s 1000 -p 5000 -out _hpp -mHPP -j {2} ::: Archosauromorpha Archosauria Stem Pseudosuchia Avemetatarsalia Dinosauria Theropoda Sauropodomorpha Ornithischia ::: {1..20} && cd ..
The number of parallel jobs is set to 6 with the GNU Parallel option -j 6.
The TPP analyses are run with this command:
cd PyRate && parallel -j 6 --joblog ../parallel_commands_tpp.log \
python3 PyRate.py {1}.py -se_gibbs -mCov 3 -logT 10 -n 2750000 -s 1000 -p 5000 -out _tpp -qShift ../data/geoseries.txt -j {2} ::: Archosauromorpha ::: {1..20} && cd ..
4. Process PyRate MCMC log files
The following command combines log files from multiple replicates and creates a script for generating the R scripts that produce the RTT plots. The combined log files and generated scripts are saved to the output directory.
julia --project=@. scripts/process_mcmc.jl _hpp # HPP analyses
julia --project=@. scripts/process_mcmc.jl _tpp # TPP analyses
Then run the generated "makeplots" scripts to create the default PyRate. The plotting scripts generated by this command are used in the next step to produce the plots on paper.
bash output/makeplots_hpp.sh
bash output/makeplots_tpp.sh
5. Generate figures
The figures used in the paper can be recreated with the following commands. PDF files are saved to output/plots.
Rates through time:
julia --project=@. scripts/rtt_figure.jl
Covariance between femoral length and speciation and extinction rates:
julia --project=@. scripts/plot_covar.jl
This script also generates a summary table, saved to output/covar_table.tsv.
