BioTraj: Information-Geometric Mapping of Spatial and Temporal Heterogeneity in Biological Trajectories
Danilo RoccatanoQuantitative trajectory analysis commonly summarizes biological motion using global geometric or dynamical descriptors, but these do not directly quantify how movement statistics vary across space or time. Here, we present BioTraj, an open-source Python framework integrating video-based trajectory extraction, conventional movement descriptors, and information-geometric analysis. Local and time-resolved turning angle distributions are represented on the probability simplex and compared using the Fisher–Rao geodesic distance. Spatial and temporal Fisher–Rao measures thereby quantify distributional heterogeneity without predefined behavioral states. The method is validated using simulated trajectories with a deliberately imposed stationary, spatial, temporal, and spatiotemporal structure, while sampling controls characterize finite-sample sensitivity. The workflow is then applied to ant recordings using independently defined scene annotations. In the Yellow ant recording, Fisher–Rao heterogeneity differed broadly inside and outside the historical footprint of a removed rock after controlling for tracking domain edges, whereas small candidate nest openings were unresolved at the selected grid scale. In the Wall recording, annotated surfaces exhibited different local heterogeneity, while distance from surface transitions showed no universal monotonic response. BioTraj therefore provides a descriptive, reproducible framework for identifying where movement statistics change and relating these changes to an independently annotated environmental context, rather than automatically assigning behavioral states.