^{1}

^{*}

^{2}

^{1}

Conceived and designed the experiments: PM IG. Performed the experiments: IG. Analyzed the data: DV. Contributed reagents/materials/analysis tools: DV. Wrote the paper: DV.

The authors have declared that no competing interests exist.

Obtaining a complete phenotypic characterization of a freely moving organism is a difficult task, yet such a description is desired in many neuroethological studies. Many metrics currently used in the literature to describe locomotor and exploratory behavior are typically based on average quantities or subjectively chosen spatial and temporal thresholds. All of these measures are relatively coarse-grained in the time domain. It is advantageous, however, to employ metrics based on the entire trajectory that an organism takes while exploring its environment.

To characterize the locomotor behavior of

The measures discussed in this paper provide a detailed profile of the behavior of a single fly and highlight the interaction of the fly with the environment. Such measures may serve as useful tools in any behavioral study in which the movement of a fly is an important variable and can be incorporated easily into many setups, facilitating high-throughput phenotypic characterization.

Characterizing the locomotor behavior of animals is essential to any study of the genotype-phenotype interaction. This is especially true for

The importance of locomotor activity, however, is often overlooked in and of itself as an important characteristic of the phenotype. Establishing a quantitative description of such behavior can help overcome any anthropomorphic bias of the investigator in inferring levels of fear, stress, anxiety, or attention. For this, however, it is advantageous to define measures that take into consideration the entire time series of movement of the fly—the trajectory that the fly takes during a given behavioral test. Because locomotor activity is a dynamic process, not only can analysis of such a trajectory provide measures of activity, but it can also shed light into the neurological and biochemical processes involved as the behavior unfolds over time. Such a study of the trajectory is best done in the Open Field, an environment which serves to approximate how animals would move in a natural setting.

Open-field behavior has been studied in mammals for some time

The measures we introduce attempt to completely characterize the trajectory of a fly in the experimental environment, and can thus serve as the basis for a complete behavioral model of a walking fly. Performing such an analysis on multiple flies can refine such a model, and elucidate the individuality of phenotype under the control of constant genotype. The methods presented here utilize the entire time series obtained from tracking the fly over a long period of time, and can allow the experimenter to infer the influence of the environment on the resulting behavior—a point rarely considered in many behavioral assays.

The experimental setup for observing a fly in the Open Field is relatively straightforward, and is shown in

Following acquisition of the video, the position of the fly was tracked in each frame. For this study, the tracking was performed in the computing environment Matlab (

The tracking algorithm proceeds as follows _{B}

To determine the location of the fly, the pixel of maximum intensity is found in each frame, and a subset image _{Δsub} around this pixel is extracted. The center of intensity of the subset image is calculated and used to calculate the object's _{x}_{y}

Although it is recommended to manually calibrate the orientation of the camera during the setup of the experiment, it is difficult to measure and completely eliminate any tilt that the camera plane may have. Unfortunately, such a tilt causes slight errors in measurement of positions and velocities from the video, since the video is capturing events projected onto a titled (as opposed to a parallel) plane. In the case of a circular arena, a tilt causes the arena to appear slightly elliptical. The deviation from circularity is measured by the eccentricity of the ellipse

(a) The trajectory obtained from tracking a fly for two hours using the setup shown in

Tilt and rotation of the camera can be corrected during post-processing. It can be shown that the eccentricity ε of the projected ellipse and the angle of tilt

Due to noise and errors in tracking that occur for numerous reasons

From smooth position trajectories, the velocity can then be calculated. There are two methods by which to do this. First, polynomial regression not only provides a smooth estimate of the position, but also allows a direct estimate of the velocity. The coefficient of the linear term of the local polynomial fit provides the velocity at that time step. An alternative, yet somewhat simpler, calculation of the velocity can be done by taking a numerical derivative of the position trajectory; however, one must ensure the trajectory has been properly smoothed if this method is chosen—the derivative of noise is undefined and can provide the researcher with meaningless velocity estimates. For this paper, the latter method was used. In any case, one should take care that both the position and velocity obtained after smoothing is physically plausible and corresponds to the actual movement seen in the video.

The trajectory of the fly, regarded as a spatial stochastic process _{1}),_{2}),…,_{n})) were specified for all choices of time points (t_{1},t_{2},…,t_{n}). Such probability functionals are widely used in statistical physics. The most general such process cannot be easily characterized, and one often resorts to simplified models such as Gaussian stochastic processes or Levy laws. Neither is particularly appropriate here: the position distributions are strongly non-Gaussian due to the influence of the arena, and the speed distributions are not consistent with Gaussian distributions. Furthermore, the departure from Gaussian behavior cannot be simply characterized by long tailed processes such as a Levy flight.

One approach would be to describe the trajectory using a Langevin style equation, commonly used to describe random walkers in statistical physics, and incorporate effects of the environment through boundary conditions. This is not a particularly useful approach, however, since the trajectories are smooth and proceed in smoothly curved segments, punctuated by stops.

Instead, we adopt another tool from statistical physics for characterizing processes by providing the joint distribution of the position and velocity at a given time, P(

We estimated the joint position-velocity distributions using a variety of histogram estimates. When examining histogram estimates of these probability distributions, one needs to exercise care about phase space factors in order to obtain accurate estimates. For example, because the fly is moving in two dimensions, the probability density for the speed _{x},v_{y}^{2}, since ^{2}/2)d(v^{2}/2)

Similar to many other animals

In the rodent literature, by contrast, much work has been done on this segmentation procedure to ensure reproducibility of tests across labs and across animals

For this paper, speed distributions are used to segment the motion where applicable; however, in contrast to

It is evident that the fly explored nearly the entire arena over the course of the two hours (

(a) The joint probability distribution ^{2}^{2} (50 total bins). This estimate suggests defining a boundary between a Rim Zone and Central Zone at approximately

The segmentation of the arena into spatial zones based on the trajectory data is clearly possible, but we have yet to determine if the fly moves differently in these two zones. To answer this question, we next examined the speed distribution

(a) Speed distribution in the Central Zone, obtained using a bin size of 0.1 cm^{2} in ^{2}. Two visible behavioral components are seen in the plot, near-zero speed segments, marked by the tail descending from the zero speed bin, and finite speed segments, marked by the peak in the distribution at a non-zero, finite velocity (∼1.48 cm/s). A transition between these two segments can be estimated at about 0.75 cm/s. The first bin, which contains stops, is not shown in the figure. (b) Speed distribution in the Rim Zone, obtained using a bin size of 0.033 cm in

Comparison of these distributions is not an entirely trivial exercise, since comparing motions of different dimensionality can lead to misleading conclusions about the distributions' shapes. We established above that in the Rim Zone, the fly walks mainly along the wall of the arena. When this is the case, the motion is approximately one-dimensional—the velocity of the fly should always be tangent to the wall. Examination of the velocity distributions for velocities tangent to and normal to the wall shows a normal velocity distribution that is narrowly peaked around zero, whereas the tangent velocity distribution is much broader (^{2}

The fact that the normal (radial) velocity is concentrated near zero suggests that the Rim Zone motion should be treated as one-dimensional. The peak at zero for the normal velocity distribution reaches up to

Unfortunately, the differing bin sizes obfuscates the comparison of the distributions at low speeds. In _{th}_{th}_{th}

It is not trivial that these distributions show non-zero peaks. This suggests flies have a preferred walking speed, and this preferred speed depends on distance from the boundary in the environment. If the fly were a random-walker (Gaussian speed distribution), the only peak would occur at zero and nowhere else; a plot of log(^{2}

While the distributions are similar, the fly's speed behavior is quite different in the two zones.

NZS – near-zero speed segments; FSS – finite speed segments; RZ – Rim Zone; CZ – Central Zone.

The influence of the geometry on the behavior is best illustrated by the joint distribution

There is a slight increase in the finite speed peak location and narrowing of the distribution as the fly gets closer to the center of the arena (

The results of

Note the different scales on the plots. Bin sizes are: (a) 0.48 s, (b) 0.12 s, and (c) 0.55 s.

This can also been interpreted as the “length of stay.” A bin size of 4 seconds has been used to bin the data.

For both finite speed and near-zero speed segments, the duration distributions appear to exponentially decay (

As seen in the figures, the main difference between finite speed segments and near-zero speed segments is that the near-zero speed segments occur on a much shorter time scale than the finite speed segments. This result may be attributed more to the fact that a finite speed segment is always proceeded and followed by a near-zero speed segment than to any outright behavioral aspect. That is to say: these data do not suggest that the fly is “choosing” to walk slowly for shorter lengths of time, but show the physical nature of the locomotor behavior. In fact, the near-zero segments provide one with a profile of the acceleration/deceleration ability of the fly. This acceleration and deceleration occurs on very vast time scales (<1 s)—the fly does not slowly work its way up to full speed, nor to a stop.

One can also examine the distribution of the events marked by the entrance into and the exit from each zone, which can yield a measure of likelihood that the fly remains in that particular zone. These are shown in

The data presented above imply behavior in which the fly is more likely to linger, yet takes longer, faster excursions when it chooses to walk in the Central Zone. In contrast, the fly has a slower, more staccato-type walk in the Rim Zone, perhaps suggesting a behavior more exploratory in nature.

Two more quantities can be used to characterize the locomotor behavior of the fly in the open field: path curvature and reorientation angle. The curvature of a path is defined as^{−1}, the curvature of the arena. However, this is close to the bin size in our computation, and a more tightly curved arena might produce corresponding peaks in the curvature distribution in the rim zone.

Bin size: 0.1 cm^{−1}. Both distributions are peaked around κ = 0, which corresponds to movement in a straight line.

Bin size: 0.2 cm^{−1}.

Finally, one can examine the tendency of the fly to change direction after stops, a similar measure to those defined for chemotaxis and thermotaxis in

In both zones, the fly prefers to walk in the same direction after a stop as it was heading before the stop. Because the peak at zero is so large for both zones (>0.1), the plot has been truncated to better display the characteristics of the distribution. Bin size: 5 degrees.

In order to complement the metrics that are currently used to describe the locomotor behavior of

It is clear that locomotor activity is greatly influenced by the environment within which the behavior occurs. Such an interaction can in general be difficult to characterize, and one quickly realizes that by observing an animal in an environment, as much is learned about the structure of the environment as is learned about the behavior of the animal. Given

The authors would like to thank Eyal Gruntman for many useful comments on the manuscript.