Skip to main content
Dryad logo

The evolutionary trajectory of drosophilid walking


York, Ryan et al. (2022), The evolutionary trajectory of drosophilid walking, Dryad, Dataset,


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.


This dataset represents the movement patterns of individual flies measured using The Coliseum, an enclosed 1m x 1m arena for measuring the unconstrained walking of fruit flies. The arena is sealed from external light via Velcro-attached curtains on the sides and solid walls on the top and bottom. Flies are released into the arena through a hole in the floor by means of an automated dispenser consisting of a vial filled with flies and a servo-gated exit. Flies enter the arena by crawling up the exit channel. An optical sensor detects that a fly has entered the channel and immediately closes the gate behind the fly to both avoid releasing multiple flies simultaneously and to prevent flies from returning to the vial from the arena. Once a fly is in the arena, it is edge-lit by IR LEDs around the perimeter of the floor and recorded from above by a high-definition camera outfitted with a zoom lens that is sufficiently powerful to capture anatomical details at high resolution. To keep the fly in its field of view the camera is mounted on a 2-axis CNC mill (grbl with gShield + Arduino UNO; stepper motors are SM42HT47-1684B) that updates the camera position as the fly moves. 


The position of the CNC mill is controlled by the software flyvr ( by tracking the position of the fly and the camera simultaneously. The fly’s position in the camera is first computed by thresholding and extracting the pixels representing the fly, identifying the head-tail axis and orientation, and then calculating the in-frame coordinates of the fly’s center. This relative position is then summed with the position of the camera to calculate an absolute position in the Coliseum which is used to update the stepper-motor coordinates of the CNC and thus keep the camera in sync with the fly’s movement. The absolute position and heading angle of the fly are recorded for each frame (at 100Hz) and outputted by flyvr at the end of each trial.


Immediately after eclosion, virgin female flies were sorted into vials of 10-20 flies and reared in light-dark chambers (12:12h) at 25°C. 2-4 day old flies were used for tracking in the Coliseum. On the day of the experiment, individual vials would be loaded directly into the automated dispenser and flies would enter the Coliseum one at a time. Flies were allowed to explore the arena freely for up to 20 minutes, after which the animal would be manually removed from the chamber. The floor of the Coliseum was cleaned with 70% ethanol between trials to remove odorants or other stimuli that may affect patterns of locomotor behavior. All experiments were conducted during the same time window to align with the light-dark cycle, from roughly CT0-CT3.


National Institutes of Health, Award: U19NS104655

National Institutes of Health, Award: R01GM121750

Simons Foundation

School of Medicine, Stanford University

New York Stem Cell Foundation

Searle Scholars Program

Esther A. and Joseph Klingenstein Fund

Pew Charitable Trusts

Alfred P. Sloan Foundation

National Science Foundation