DOI: 10.5281/zenodo.17905309
title: Data from: Deep evolutionary roots of diet in seagrass bed fishes

description: Provided here are the datasets and R code for the study entitled "Deep evolutionary roots of diet in seagrass bed fishes". 

Summary of the study: Diet is a fundamental trait of fish that defines their roles in food webs and in regulating the functions of aquatic ecosystems. The role of evolutionary history, including conservatism and divergence, in diet shaping is poorly understood, especially for fish living in marine ecosystems such as seagrass beds. Using a series of phylogenetic comparative analyses, we investigate conservatism and divergence in the diet of fishes associated with seagrass beds globally over deep evolutionary time. We find that the trophic levels of seagrass bed fishes exhibit a strong phylogenetic pattern, with closely related fishes being more trophically similar. This phylogenetic pattern is also supported by macroevolutionary model inferences, with major diet divergences occurring deep in history. Consistently, phylogenetic relationships explain ~ 60% of the variation in the diet composition of seagrass bed fishes, whereas contemporary morphological, ecological, and geographical factors explain ~ 5% in total. These results reveal that the diet of seagrass bed fishes has been shaped by general conservatism, with rare divergences leading to abrupt diet shifts. Our study fills a key gap in understanding the shaping of fish diet in seagrass beds and suggests that diet specialists represent products of long-term evolution and have irreplaceable functions, warranting priority conservation.

#####Files order by names######

# ALL (folder):  the dataset and code used to perform the main analysis.

## ALL.R: the R code to conduct the analysis in our research except for data collection.

## all_covariates.xlsx:  this file contains the data used for CPO and VPA in our analysis,  including the variables representing ecological, geographical, and morphological factors.

## diets.xlsx: this file contains the diet compositions of the fishes extracted from Fishbase.

## ref.tre: the time-calibrated phylogeny used in our analysis (extracted from Rabosky et al. 2018).

## tree_mr.xlsx: this file contains the matrix representing the phylogenetic relationship produced by compute.mr() in phytools.

## trophic_level.xlsx: the trophic level of species estimated by dietr, using the data of diet composition.

 

#Family10 (folder): the dataset and code used to perform the sub-analysis, which contains the data of all the fishes from families where the proportion of seagrass bed fishes exceeds 10%.

## diets.xlsx: this file contains the diet compositions of the fishes extracted from Fishbase.

## Family10.R: the R code to conduct the sub-analysis except for data collection.

## ref.tre: the time-calibrated phylogeny used in the sub-analysis (extracted from Rabosky et al. 2018).

## tree_mr.xlsx: this file contains the matrix representing the phylogenetic relationship produced by compute.mr() in phytools.

## trophic_level.xlsx: the trophic level of species estimated by dietr, using the data of diet composition.

 

#JUV (folder): the dataset and code used to perform the sub-analysis, which contains the data of juveniles and recruits for the fishes included in our main analysis.

## diets.xlsx: this file contains the diet compositions of the fishes, extracted from Fishbase.

## JUV.R: the R code to conduct the sub-analysis except for data collection.

## ref.tre: the time-calibrated phylogeny used in the sub-analysis (extracted from Rabosky et al. 2018).

## tree_mr.xlsx: this file contains the matrix representing the phylogenetic relationship produced by compute.mr() in phytools.

## trophic_level.xlsx: the trophic level of species estimated by dietr, using the data of diet composition.

 

#OSGB (folder): the dataset and code used to perform the sub-analysis, which contains data of adult fishes that were identified by the IUCN, for which seagrass beds serve as habitats of major importance.

## diets.xlsx: this file contains the diet compositions of the fishes extracted from Fishbase.

## OSGB.R: the R code to conduct the sub-analysis except for data collection.

## ref.tre: the time-calibrated phylogeny used in the sub-analysis (extracted from Rabosky et al. 2018).

## tree_mr.xlsx: this file contains the matrix representing the phylogenetic relationship produced by compute.mr() in phytools.

## trophic_level.xlsx: the trophic level of species estimated by dietr, using the data of diet composition.

 

#species_list_of_each_dataset.xlsx: this file contains the species lists for the main analysis and each sub-analysis.

The metadata for interpreting the data in the Excel files are included in the Metadata sheet.