Data and code from: Bat community assembly in the ecotone of two neotropical biodiversity hotspots is determined by environmental filtering rather than historical factors
Data files
Jul 31, 2026 version files 73.20 KB
-
Data_scripts.zip
61.68 KB
-
README.md
11.52 KB
Abstract
This dataset accompanies a study examining the ecological and evolutionary processes structuring bat communities across the Cerrado–Atlantic Forest ecotone in Brazil, a region characterized by strong environmental gradients and the transition between two of the world's major biodiversity hotspots. Using a coevolutionary modeling framework, we evaluated the relative support for three classic community assembly mechanisms environmental filtering, competitive exclusion, and neutral dynamics and assessed how environmental and historical factors shape patterns of phylogenetic beta diversity across the landscape. We further investigated whether community composition changes abruptly along the gradient extending from the ecotone toward the core regions of each biome. Our analyses reveal that environmental filtering provides the strongest explanation for bat community assembly in the ecotone, outperforming both competitive and neutral models. Variation in phylogenetic beta diversity was primarily associated with precipitation seasonality, annual precipitation, annual temperature range, and canopy height. We also found an abrupt shift in phylogenetic beta diversity between the ecotone and the central Cerrado, but no comparable discontinuity toward the Atlantic Forest, indicating contrasting assembly processes along these two major Neotropical biomes. Together, these results highlight the importance of coevolutionary dynamics in explaining community structure and offer new insights into how environmental and historical drivers shape biodiversity across ecotonal regions.
Overview
This repository contains the full dataset and reproducible analysis scripts used in the study examining how ecological and evolutionary processes structure bat communities across the Cerrado–Atlantic Forest ecotone in Brazil.
All files needed to reproduce the analyses are contained within the archived folder Data_scripts.zip, including datasets, phylogenetic information, trait matrices, and R Markdown scripts.
These materials allow complete replication of phylogenetic beta diversity analyses, trait evolution modeling,
community assembly simulations, Random Forest and ABC model selection, and environmental gradient analyses.
File Structure (inside Data_scripts.zip)
1. R Markdown Scripts (.Rmd)
These scripts provide full reproducibility of all analyses.
CAMI.Rmd
Implements the complete CAMI-based workflow, including:
- Preparation of phylogeny, traits, and community matrices
- Fitting BM and OU trait evolution models
- Calculation of summary and dispersion statistics
- Community assembly simulations under neutral, filtering, and competition models
- Random Forest and ABC model selection
- Estimation of environmental filtering strength (tau)
Community_assembly.Rmd
Contains complementary and supporting analyses:
- Phylogenetic beta diversity (turnover, nestedness, total β)
- Segmented regression along environmental gradients
- VSURF variable selection
- Additional exploratory analyses
2. Data Files
(All located inside Data_scripts.zip)
com_all.csv
This file contains the presence–absence matrix of bat communities sampled across the Cerrado, Atlantic Forest, and the Cerrado–Atlantic Forest ecotone.
Each row corresponds to one sampled community.
| Variable | Description | Unit |
|---|---|---|
| id | Community identifier | — |
| Bioma | Biome classification (Cerrado, Atlantic Forest, Ecotone) | — |
| Report | Regional grouping used in analyses | — |
| Axis_0 | Longitude coordinate | decimal degrees |
| Axis_1 | Latitude coordinate | decimal degrees |
| Species columns | Species occurrence (0 = absence; 1 = presence) | binary |
Species names follow binomial nomenclature and are written with underscores instead of spaces.
Predictor.csv
This file contains the environmental, historical, geographic, and phylogenetic predictor variables used in regression models,
segmented analyses, and Variable Selection Using Random Forests (VSURF) to evaluate drivers of phylogenetic beta diversity across bat communities.
Each row corresponds to one sampled community.
| Variable | Description | Unit |
|---|---|---|
| id | Unique community identifier | — |
| Bioma | Biome classification (Cerrado, Atlantic Forest, Ecotone) | — |
| ELEMENT | Regional grouping category used in the analyses | — |
| Long | Longitude of the sampling site | decimal degrees |
| Lat | Latitude of the sampling site | decimal degrees |
| ses.phylosor | Standardized effect size of phylogenetic Sørensen dissimilarity, measuring deviation from null expectations | unitless |
| beta | Total phylogenetic beta diversity between communities | unitless |
| Turnover | Turnover component of phylogenetic beta diversity, representing lineage replacement among communities | unitless |
| Nest | Nestedness component of phylogenetic beta diversity, representing lineage loss or gain among communities | unitless |
| Distance | Geographic distance from the ecotone centroid | kilometers (km) |
| Vegetation | Proportion of remaining natural vegetation cover surrounding each sampling site | proportion (0–1) |
| Veget.porc | Percentage of remaining natural vegetation cover | percent (%) |
| Paleoclimate | Paleoclimatic variation index representing historical climatic changes over time | unitless |
| Stability | Climatic stability index, representing long-term environmental stability | unitless |
| Vertical | Mean canopy height at the sampling site | meters (m) |
| alt | Elevation above sea level | meters (m) |
Bioclimatic variables (WorldClim v2)
The following variables correspond to the standard WorldClim bioclimatic layers:
| Variable | Description | Unit |
|---|---|---|
| bio_1 | Annual mean temperature | °C |
| bio_2 | Mean diurnal temperature range | °C |
| bio_3 | Isothermality (bio2 / bio7 × 100) | % |
| bio_4 | Temperature seasonality | standard deviation ×100 |
| bio_5 | Maximum temperature of the warmest month | °C |
| bio_6 | Minimum temperature of the coldest month | °C |
| bio_7 | Annual temperature range (bio5 – bio6) | °C |
| bio_8 | Mean temperature of the wettest quarter | °C |
| bio_9 | Mean temperature of the driest quarter | °C |
| bio_10 | Mean temperature of the warmest quarter | °C |
| bio_11 | Mean temperature of the coldest quarter | °C |
| bio_12 | Annual precipitation | millimeters (mm) |
| bio_13 | Precipitation of the wettest month | millimeters (mm) |
| bio_14 | Precipitation of the driest month | millimeters (mm) |
| bio_15 | Precipitation seasonality (coefficient of variation) | % |
| bio_16 | Precipitation of the wettest quarter | millimeters (mm) |
| bio_17 | Precipitation of the driest quarter | millimeters (mm) |
| bio_18 | Precipitation of the warmest quarter | millimeters (mm) |
| bio_19 | Precipitation of the coldest quarter | millimeters (mm) |
These predictors were used to test how environmental and historical variables influence patterns of
phylogenetic beta diversity across the Cerrado–Atlantic Forest ecotone.
RF_OUMods_Table24batComs.csv
This file contains the Random Forest classification probabilities for the three alternative
community assembly models tested in the 24 ecotonal communities.
| Variable | Description |
|---|---|
| Com | Community identifier |
| Value | Probability assigned to the model |
| Process | Community assembly process (Neutral, Filtering, Competition) |
Trait.csv
This file contains the functional trait data used in principal component analyses (PCA),
phylogenetic generalized least squares (PGLS) trait imputation, and trait evolution modeling.
Each row corresponds to one bat species.
| Variable | Description | Unit |
|---|---|---|
| Species | Scientific name of the bat species | — |
| Forearm | Forearm length | millimeters (mm) |
| Mass | Body mass | grams (g) |
| WL | Wing loading | N/m² |
| AR | Aspect ratio | unitless |
| Reference | Original literature source for trait information | — |
Missing values (NA) indicate trait measurements unavailable in the original literature sources.
These values were later estimated using phylogenetic generalized least squares (PGLS) models based on forearm length and phylogenetic relationships.
tree.tre
Time-calibrated phylogenetic tree of 118 bat species in Newick format, derived from the species-level mammal phylogeny of Upham et al. (2019).
Used for phylogenetic beta diversity analyses, CAMI simulations, and PGLS trait estimation.
Methods Summary
This dataset supports analyses integrating:
- Phylogenetic beta diversity partitioning
- Segmented regression across ecological gradients
- Trait evolution modeling under BM and OU processes
- Coevolutionary community assembly inference using CAMI
- Random Forest assembly model classification
- ABC posterior probability estimation
- Tau estimation under OU-filtering simulations
All analyses are fully reproducible using the .Rmd scripts provided.
Software Requirements
- R (>= 4.0)
- Required packages:
CAMI,ape,picante,geiger,betapart,tidyverse,
abc,randomForest,segmented,VSURF,ggplot2,ggsci.
How to Reproduce the Analyses
- Download and extract Data_scripts.zip
- Open CAMI.Rmd or Community_assembly.Rmd in RStudio
- Install all required R packages
- Ensure all
.csvand.trefiles remain in the same directory as the scripts - Knit the
.Rmdfiles to HTML to reproduce all results
Funding
This work was supported by:
- Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq)
- Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brasil (CAPES), Finance Code 001
- Fundação de Amparo à Pesquisa do Estado de Mato Grosso (FAPEMAT)
Contact
For questions regarding the dataset or reproducibility, please contact the corresponding author.
