skip to main content
US FlagAn official website of the United States government
dot gov icon
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
https lock icon
Secure .gov websites use HTTPS
A lock ( lock ) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.


Title: swaRmverse: An R package for the comparative analysis of collective motion
Abstract Collective motion, that is the coordinated spatial and temporal organisation of individuals, is a core element in the study of collective animal behaviour. The self‐organised properties of how a group moves influence its various behavioural and ecological processes, such as predator–prey dynamics, social foraging and migration. However, little is known about the inter‐ and intra‐specific variation in collective motion. Despite the significant advancement in high‐resolution tracking of multiple individuals within groups, providing collective motion data for animals in the laboratory and the field, a framework to perform quantitative comparisons across species and contexts is lacking.Here, we present theswaRmversepackage. Building on two existing R packages,trackdfandswaRm,swaRmverseenables the identification and analysis of collective motion ‘events’, as presented in Papadopoulou et al. (2023), creating a unit of comparison across datasets. We describe the package's structure and showcase its functionality using existing datasets from several species and simulated trajectories from an agent‐based model.From positional time‐series data for multiple individuals (x‐y‐t‐id),swaRmverseidentifies events of collective motion based on the distribution of polarisation and group speed. For each event, a suite of validated biologically meaningful metrics are calculated, and events are placed into a ‘swarm space’ through dimensional reduction techniques.Our package provides the first automated pipeline enabling the analysis of data on collective behaviour. The package allows the calculation and use of complex metrics for users without a strong quantitative background and will promote communication and data‐sharing across disciplines, standardising the quantification of collective motion across species and promoting comparative investigations.  more » « less
Award ID(s):
2222418
PAR ID:
10627882
Author(s) / Creator(s):
; ;
Publisher / Repository:
Wiley
Date Published:
Journal Name:
Methods in Ecology and Evolution
Volume:
16
Issue:
1
ISSN:
2041-210X
Page Range / eLocation ID:
29 to 39
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. Abstract Numerous modelling techniques exist to estimate abundance of plant and animal populations. The most accurate methods account for multiple complexities found in ecological data, such as observational biases, spatial autocorrelation, and species correlations. There is, however, a lack of user‐friendly and computationally efficient software to implement the various models, particularly for large data sets.We developed thespAbundance Rpackage for fitting spatially explicit Bayesian single‐species and multi‐species hierarchical distance sampling models, N‐mixture models, and generalized linear mixed models. The models within the package can account for spatial autocorrelation using Nearest Neighbour Gaussian Processes and accommodate species correlations in multi‐species models using a latent factor approach, which enables model fitting for data sets with large numbers of sites and/or species.We provide three vignettes and three case studies that highlightspAbundancefunctionality. We used spatially explicit multi‐species distance sampling models to estimate density of 16 bird species in Florida, USA, an N‐mixture model to estimate black‐throated blue warbler (Setophaga caerulescens) abundance in New Hampshire, USA, and a spatial linear mixed model to estimate forest above‐ground biomass across the continental USA.spAbundanceprovides a user‐friendly, formula‐based interface to fit a variety of univariate and multivariate spatially explicit abundance models. The package serves as a useful tool for ecologists and conservation practitioners to generate improved inference and predictions on the spatial drivers of abundance in populations and communities. 
    more » « less
  2. Abstract Microbial networks offer critical insights into community structure, ecological interactions and host–microbe dynamics. However, constructing reliable microbiome networks remains challenging due to variability among existing inference methods, limited overlap between inferred networks and the absence of a gold standard (a universally accepted reference for benchmarking) for validation.We developedCMiNet, an R package and interactive Shiny App(https://cminet.wid.wisc.edu) that enables consensus microbiome network construction by integrating up to 10 widely used inference algorithms.CMiNetsupports both correlation‐based and conditional dependence‐based methods and provides users with flexible options to construct individual or consensus networks across different approaches.CMiNetintegrates results from multiple inference methods through a voting strategy that retains edges supported by a user‐defined number of methods. To assess robustness, we complement this with a bootstrap analysis that quantifies edge stability under resampling. By jointly reporting method support and bootstrap confidence,CMiNetprovides a reproducible framework that explicitly communicates both agreement across methods and stability under perturbation.We appliedCMiNetto gut and soil microbiome datasets, constructing consensus networks that retained edges supported by multiple methods and confirmed by bootstrap reproducibility values. To identify disease‐associated taxa, we developed an integrative strategy that compared results across machine learning, differential abundance and network‐based approaches, ensuring that selected taxa were consistently recovered across methods. In the soil dataset, this analysis highlighted key taxa such asKtedonobacteria, Acidobacteriae, Vicinamibacteria, MB‐A2‐108, IgnavibacteriaandAnaerolineae, all of which were confirmed by multiple independent strategies. 
    more » « less
  3. Abstract Gene flow is increasingly recognized as an important macroevolutionary process. The many mechanisms that contribute to gene flow (e.g. introgression, hybridization, lateral gene transfer) uniquely affect the diversification of dynamics of species, making it important to be able to account for these idiosyncrasies when constructing phylogenetic models. Existing phylogenetic‐network simulators for macroevolution are limited in the ways they model gene flow.We presentSiPhyNetwork, an R package for simulating phylogenetic networks under a birth–death‐hybridization process.Our package unifies the existing birth–death‐hybridization models while also extending the toolkit for modelling gene flow. This tool can create patterns of reticulation such as hybridization, lateral gene transfer, and introgression.Specifically, we model different reticulate events by allowing events to either add, remove or keep constant the number of lineages. Additionally, we allow reticulation events to be trait dependent, creating the ability to model the expanse of isolating mechanisms that prevent gene flow. This tool makes it possible for researchers to model many of the complex biological factors associated with gene flow in a phylogenetic context. 
    more » « less
  4. Abstract Accurate quantification of soil carbon fluxes is essential to reduce uncertainty in estimates of the terrestrial carbon sink. However, these fluxes vary over time and across ecosystem types and so, it can be difficult to estimate them accurately across large scales. The flux‐gradient method estimates soil carbon fluxes using co‐located measurements of soil CO2concentration, soil temperature, soil moisture and other soil properties. The National Ecological Observatory Network (NEON) provides such data across 20 ecoclimatic domains spanning the continental U.S., Puerto Rico, Alaska and Hawai‘i.We present an R software package (neonSoilFlux) that acquires soil environmental data to compute half‐hourly soil carbon fluxes for each soil replicate plot at a given terrestrial NEON site. To assess the computed fluxes, we visited six focal NEON sites and measured soil carbon fluxes using a closed‐dynamic chamber approach.Outputs from theneonSoilFluxshowed agreement with measured fluxes (R2between measured andneonSoilFluxoutputs ranging from 0.12 to 0.77 depending on calculation method used); measured outputs generally fell within the range of calculated uncertainties from the gradient method. Calculated fluxes fromneonSoilFluxaggregated to the daily scale exhibited expected site‐specific seasonal patterns.While the flux‐gradient method is broadly effective, its accuracy is highly sensitive to site‐specific inputs, including the extent to which gap‐filing techniques are used to interpolate missing sensor data and to estimates of soil diffusivity and moisture content. Future refinement and validation ofneonSoilFluxoutputs can contribute to existing databases of soil carbon flux measurements, providing near real‐time estimates of a critical component of the terrestrial carbon cycle. 
    more » « less
  5. Abstract Projects focused on movement behaviour and home range are commonplace, but beyond a focus on choosing appropriate research questions, there are no clear guidelines for such studies. Without these guidelines, designing an animal tracking study to produce reliable estimates of space‐use and movement properties (necessary to answer basic movement ecology questions), is often done in an ad hoc manner.We developed ‘movedesign’, a user‐friendly Shiny application, which can be utilized to investigate the precision of three estimates regularly reported in movement and spatial ecology studies: home range area, speed and distance travelled. Conceptually similar to statistical power analysis, this application enables users to assess the degree of estimate precision that may be achieved with a given sampling design; that is, the choices regarding data resolution (sampling interval) and battery life (sampling duration).Leveraging the ‘ctmm’Rpackage, we utilize two methods proven to handle many common biases in animal movement datasets: autocorrelated kernel density estimators (AKDEs) and continuous‐time speed and distance (CTSD) estimators. Longer sampling durations are required to reliably estimate home range areas via the detection of a sufficient number of home range crossings. In contrast, speed and distance estimation requires a sampling interval short enough to ensure that a statistically significant signature of the animal's velocity remains in the data.This application addresses key challenges faced by researchers when designing tracking studies, including the trade‐off between long battery life and high resolution of GPS locations collected by the devices, which may result in a compromise between reliably estimating home range or speed and distance. ‘movedesign’ has broad applications for researchers and decision‐makers, supporting them to focus efforts and resources in achieving the optimal sampling design strategy for their research questions, prioritizing the correct deployment decisions for insightful and reliable outputs, while understanding the trade‐off associated with these choices. 
    more » « less