README file for Zenodo repository, created on January 8, 2021

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

Planktivores as trophic drivers of global coral reef fish diversity patterns - PNAS
Authors: Siqueira, Alexandre C; Morais, Renato A; Bellwood, David R; Cowman, Peter F

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


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

This folder contains all datasets used in the main analyses of the paper.
 
 - 'Richness_PerCell_PresenceAbsence.csv' contains the number of species per coral reef fish trophic group in geographic cells, along with the latitudinal and longitudinal midpoints of each cell, and the distance to the central point in the Indo-Australian Archipelago.

 - 'Proportion_PerCell_PresenceAbsence.csv' contains the same information as the previous dataset, however, instead of species richness, it contains proportion of species per trophic group.

 - 'Richness_PerSite_RLS.csv' contains the species richness per trophic group ('SpeDens') per site surveyed in the Reef Life Survey dataset.

 - 'BodySize_PerCell_PresenceAbsence.csv' and 'MeanSize_PerSite_RLS.csv' consist of body size data per trophic group in the Presence-absence and the Reef Life Survey datasets, respectively. These datasets are used internally in the R scripts to run the analyses.

 - 'Data_final_Siqueira_etal_2020.csv', 'NetDiv_PerCell_pk.csv' and 'Data_biogeo.csv' are datasets used in the analyses of evolutionary mechanisms. The first is the dataset derived from Siqueira et al. (2020) Nat. Comms. The second contains net diversification rates calculated per geographic cell for planktivores. The third consists of biogeographical distributions for all species considered in the study.

 - 'Reef_fish_all.tacted.tre' is the phylogenetic tree derived from Siqueira et al. 2020 Nat. Comms. and is used in the analyses of evolutionary mechanisms.


-------------------------------------------------
(2) Scripts folder

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

 - 'Siqueira_etal_MainScript.R' runs the main analyses and reproduces the figures number 1, 2 and 3 from the paper.

 - 'Siqueira_etal_Evolutinonary_mechanisms.R' runs the phylogenetic comparative analyses and reproduces figure 4 from the paper.

 - 'Siqueira_etal_RFunctions.R' and 'make.simmap.musse.R' are functions that are sourced internally in the previous scripts.

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


** Notes: 
* All R scripts require setting the working directory in which all these folders are saved
* All R package versions are provided within the respective scripts
* The scripts were written in R version 4.0.3 using a Mac OS 10.14.6 

Please contact corresponding author for any queries
