Understanding the niches of intermediate hosts and vectors for
environmentally transmitted pathogens is crucial for identifying endemic
areas, assessing habitat suitability, and targeting interventions. This
study focuses on intermediate hosts of intestinal schistosomes, with over
700m people at risk of lifelong infection. We compared habitat suitability
and species interactions across 674 sites in 52 villages in rural Uganda
between 2022–2024, capturing a severe flooding event. Spatiotemporal
models incorporating a polygon-based method to account for space with time
as a fixed effect were developed to analyse snail abundance for
Biomphalaria sudanica and B. stanleyi. B. sudanica was associated with
marshy sites near lake shorelines and presence of hyacinths, while B.
stanleyi was more likely found in deeper waters with Vallisneria plants.
However, cohabitation was common for both species. Habitat suitability for
each species fluctuated temporally, and more starkly with extreme
flooding, resulting in switching of species dominance. Our study suggests
that events consistent with climate change may influence habitat
suitability without necessitating an expansion of environmental areas. Our
models enable tracking of dynamic ecological niches that, if replicated
elsewhere and for other intermediate hosts or vectors, can be used to
better target environmental and community interventions as environmental
conditions change. # Temporal variability and flooding influence the ecological niche of
*Biomphalaria* intermediate hosts for *Schistosoma mansoni* in rural
Uganda This repository contains the code for running the modelling
pipeline in the paper "Temporal variability and flooding influence
the ecological niche of *Biomphalaria* intermediate hosts for *Schistosoma
mansoni* in rural Uganda". Journal: *Proceedings of The Royal Society
B* Article DOI: 10.1098/rspb.2025.2083. ### Study summary This study,
conducted within the SchistoTrack cohort in rural Uganda, specifically the
districts of Buliisa, Pakwach, and Mayuge, analysed the ecological niche
and species interactions of *Biomphalaria sudanica* and *B. stanleyi*,
intermediate hosts of *Schistosoma mansoni*, across 674 water sites from
2022–2024. Data were collected during four malacology surveys spanning dry
and rainy seasons, including a major flooding event in 2022.
Spatiotemporal models using polygon-based methods were developed to assess
snail abundance and ecological niche variability across sites and time.
### Packages and package versions R version 4.2.1 (2022-06-23)
tidyverse_1.3.1 glmmTMB_1.1.10 lmtest_0.9-40 DHARMa_0.4.5 pROC_1.18.0
broom.mixed_0.2.9.4 performance_0.13.0 zeallot_0.1.0 MuMIn_1.48.4
caret_6.0-92 deldir_1.0-6 sp_1.5-0 maptools_1.1-4 sf_1.0-7
geosphere_1.5-20 factoextra_1.0.7 cluster_2.1.3 spdep_1.3-10 ### Files
Data to run the snail models are included in a .csv and .RData file. It is
recommended to use the .RData file so that the structure of the dataframe
remains intact (e.g. for variables that are factors, etc.). * `dict.xlsx`:
Data dictionary including variable definitions and relevant units. *
`snail_models.R`: Code to run variable selection and GLMM models to
identify the ecological niche of each species. Code for model validation
using stratified k-fold and leave-one-out cross-validation methods. Needs
to import `sites_snails_models.RData.` * `polygons.R`: Code for the
construction of village- and cluster-based polygons. Data not included as
they include household GPS locations and identify study participants that
need to remain anonymous. * `spatial_autocorrelation.R`: Code to compute
Moran's *I* to identify potential spatial autocorrelation. Data
includes GPS locations and are thus not included (as above). *
`sites_snails_models.RData`: Dataframe used for the snail models
(anonymised villages and does not include any GPS locations). Recommended
to load this when running `snails_models.R`. * `data.csv`: Same as
`sites_snails_models.RData` but in `.csv` form for easier viewing.