This code accompanies the paper 'The evolution trajectory of drosophilid walking' (York et al. 2022, Current Biology).
Raw kinematic parameter+position data and a pre-computed behavior space layout can be downloaded from Dryad (https://doi.org/10.5061/dryad.z8w9ghxfc).
Paper abstract:
Neural circuits must both execute the behavioral repertoire of individuals and account for behavioral variation across species. Understanding how this variation emerges over evolutionary time requires large-scale phylogenetic comparisons of behavioral repertoires. Here, we describe the evolution of walking in fruit flies by capturing high-resolution, unconstrained movement from 13 species and 15 strains of drosophilids. We find that walking can be captured in a universal behavior space, the structure of which is evolutionarily conserved. However, the occurrence of, and transitions between, specific movements have evolved rapidly, resulting in repeated convergent evolution in the temporal structure of locomotion. Moreover, a meta-analysis demonstrates that many behaviors evolve more rapidly than other traits. Thus, the architecture and physiology of locomotor circuits can both execute precise individual movements in one species and simultaneously support rapid evolutionary changes in the temporal ordering of these modular elements across clades.