README file for Zenodo repository, created on April 17, 2023

-------------------------------------------------
Citation
-------------------------------------------------

On the evolution of fish-coral interactions - Ecology Letters
Authors: Siqueira, Alexandre C; Muruga, Pooventhran; Bellwood, David R

Corresponding author: Siqueira AC (alexandre.siqueira@my.jcu.edu.au)


-------------------------------------------------
Description of files
-------------------------------------------------
(1) Data folder

This folder contains the datasets used in the paper.
 
 [1.1] 'Siqueira_etal_coral_association_consensus.csv' is the main dataset of coral association in reef fishes (n = 3700) collected as described in the main methods.

 [1.2] 'Siqueira_etal_coral_association_sub_clean.csv' is the main dataset but filtered to only include fish species that are present in the phylogenetic tree (n = 1723), and including the model notation for association categories.

 [1.3] 'Huang_etal_2017_CoralSpecies.csv' is the taxonomic dataset from Huang et al (2017), used for filtering species for the analyses.

 [1.4] 'Huang_etal_2017_Scleractinia.csv' is the set of 1000 posterior phylogenetic trees of Scleractinia, derived from Huang et al (2017).

 [1.5] 'scleractinia_fossil_ltt.txt' is the dataset containing the number of scleractinian coral fossils through time, derived from Siqueira et al. (2022).

 [1.6] 'acroporidae_fossils_ltt.txt' is the dataset containing the number of acroporid coral fossils through time, derived from Siqueira et al. (2022).

 [1.7] 'simulation.csv' is the output from the simulation analyses run to generate Figure 3 in the paper.

-------------------------------------------------
(2) RevBayes folder

This folder contains the files necessary to reproduce the main RevBayes analyses performed in the paper.

 [2.1] 'data' contains all the inputs necessary to run the evolutionary models (i.e. interaction dataset coded accordingly and reef fish phylogeny [pruned from Rabosky et al 2018]).

 [2.2] 'CID' contains the model outputs from the CID model.

 [2.3] 'MuSSE' contains the model outputs from the MuSSE model.

 [2.4] 'MuHiSSE' contains the model outputs from the MuHiSSE model.

 [2.5] 'Scripts' contains the RevBayes scripts to reproduce each analysis.

-------------------------------------------------
(3) R_scripts folder

This folder contains all scripts necessary to reproduce the main analyses and figures of the paper.

 [3.1] 'Siqueira_etal_reconstructions_and_simulations.R' runs the analyses necessary to generate Figures 1, 2 and 3 from the paper.

 [3.2] 'Siqueira_etal_evolutionary_rates.R' reproduces Figure 4 from the paper.

 [3.3] 'Siqueira_etal_Marginal_Lik_script.R' performs model selection of the models run in RevBayes (Supplementary Table 1).

 [3.4] 'Siqueira_etal_functions.R' provides auxiliary functions sourced within the other scripts.

-------------------------------------------------


** Notes:
* All scripts require setting the working directory in which the folders are saved.
* All R package versions are provided within the respective scripts.
* The R scripts were written in R version 4.1.2 using a MacOS 13.3.1.
* The RevBayes analyses were performed using version 1.1.1 of the software.
* The RevBayes analyses were run on the High Performance Computing (HPC) environment at James Cook University.

Please contact corresponding author for any queries
