Data and analysis for the paper Insect pollination for most of angiosperm evolutionary history
Authors: Ruby E. Stephens (1,2), Rachael V. Gallagher (1,3), Lily Dun (2,4), Will Cornwell (4), Hervé Sauquet (2,4)
- Corresponding author: Ruby E. Stephens
Author addresses:
- School of Natural Sciences, Macquarie University, Sydney, Australia
- National Herbarium of New South Wales (NSW), Royal Botanic Gardens and Domain Trust, Sydney, Australia
- Hawkesbury Institute for the Environment, Western Sydney University, Sydney, Australia
- Evolution and Ecology Research Centre, University of New South Wales, Sydney, Australia
Using RStudio open main.R and run scripts in order given in this main script.
Necessary packages can be installed by running install_dependencies.R. Check package versions mentioned in this script are consistent with your installed versions. Originally run in R version 4.1.3
Two data files are >100 mb and made available using git large file storage.
These are:
1.SA_thin_trees_corrected.tre
(155 mb, multiple angiosperm phylogenies from the posterior of Ramírez-Barahona et al. (2020)); and
2.filtered_obs_ruby.csv
(170 mb, GBIF records for 1201 taxa downloaded and initially filtered by Will Cornwell)
The code caches several steps of the data cleaning and results so most analyses can run without needing to download the above files if difficult.
Running a completely fresh analysis will require downloading the entire repository, deleting all cached results and output in results and data_output, and then running main.R from the start.
To complete the posterior stochastic mapping in multiPhylo_simmap.R you will need access to a computer with a lot of CPUs and memory (I ran on a machine with 36 CPUs and 300GB memory).
Feel free to re-use scripts and functions for your own analyses, e.g.
arclabel.R adds custom labels to circular phylogenies by providing the tips to draw the label between;
transition_times.R extracts the timing of transitions from a dated stochastic map
Citation: Stephens, R. E., Gallagher, R. V., Dun, L., Cornwell, W., & Sauquet, H. (2023). Insect pollination for most of angiosperm evolutionary history. New Phytologist, 240(2), 880–891. https://doi.org/10.1111/nph.18993