From Modes to Movement in the Behavior of Caenorhabditis elegans

Organisms move through the world by changing their shape, and here we explore the mapping from shape space to movements in the nematode Caenorhabditis elegans as it crawls on an agar plate. We characterize the statistics of the trajectories through the correlation functions of the orientation angular velocity, orientation angle and the mean-squared displacement, and we find that the loss of orientational memory has significant contributions from both abrupt, large amplitude turning events and the continuous dynamics between these events. Further, we discover long-time persistence of orientational memory in the intervals between abrupt turns. Building on recent work demonstrating that C. elegans movements are restricted to a low-dimensional shape space, we construct a map from the dynamics in this shape space to the trajectory of the worm along the agar. We use this connection to illustrate that changes in the continuous dynamics reveal subtle differences in movement strategy that occur among mutants defective in two classes of dopamine receptors.


Introduction
From the swimming motions of E. coli [1] to the mobility of human populations [2], the way in which organisms move through the world profoundly influences their experience. Ultimately, these strategies of movement change the chances for survival and reproduction, and thus are subject to natural selection. Typically, ecological or evolutionary studies of movement focus on trajectories measured through course-grained variables such as the center of mass [3]. However, to an organism, movement is not translation or rotation of its body relative to an external coordinate system, but rather transformations of shape as measured in its own intrinsic coordinates. Analyzing together both the internal states and external motions offers deeper insight into the study of movement strategies.
In general, the connection between transformations in shape space and movement through the world is complicated. There is a long tradition of work which tries to make this connection through analytic approximations of the equations describing the mechanics of the organism's interaction with the outside world. This approach is perhaps best developed for swimming and flying organisms [4,5], and there are particularly elegant results in the limit of swimming at low Reynolds number [6][7][8]. All of these methods depend on some small parameter in the physical interaction between the organism and its environment. A very different possibility for simplifying the relation between shapes and movement arises if the space of shapes itself is limited. In several systems, the potentially high dimensional space of shapes or movements is not sampled uniformly under natural conditions, so that one can recognize a lower dimensional manifold that fully describes the system [9][10][11][12]. In these cases it is possible to ask empirically how motions on this low dimensional manifold map into movements relative to the outside world.
The motion of the nematode Caenorhabditis elegans provides an example of this dimensionality reduction. In previous work, we found that the shapes taken on by the worm's body are wellapproximated by a four dimensional space spanned by elementary shapes or 'eigenworms' [13]. Here we connect the dynamics in this low dimensional space of shapes to the trajectories of worms as they crawl on an agar plate, the conventional experimental setup for studying worm behavior [14][15][16][17]. In the process, we offer a new analysis of the trajectories themselves, and show how the intrinsic shape dynamics gives us a more comprehensive tool for the analysis of mutant locomotory behavior.

Center-of-mass trajectories
To understand how changes in the worm's shape determines its motion, we first characterize the motion itself. In Fig 1a, we show an example of the worm's trajectory, defined by the centroid of the black and white body images. The worm's trajectory consists of gently curving segments, interrupted by sharp turns or reversals. These discrete reorientation events are characterized by curved body shapes, such as turns caused by body bends or turns after reversal events, known as V-turns, because the worm's resemblance to the Greek letter V. It is tempting to think of these trajectories as being approximately like those of E. coli, consisting of long, relatively straight runs punctuated by tumbles, which randomly reorient the cell [18]. Indeed, variations of this model in which trajectories are segmented into discrete 'runs' have long been used to study the movements of a wide variety of organisms [19,20] including C. elegans [14,21]. However we will see the limitations of this ''run and tumble'' model by closer statistical analysis of the entire trajectory.
Trajectories are characterized by the speed of motion, v cm~D _ x x x xD, the local tangent angle, a(t), and the local orientation velocity v cm~d a=dt at each moment in time (Fig 1b). The standard deviation of the curvature is dv rms~0 :223+0:001 rad=sec, but the distribution of angles r(v) has long tails, as shown by comparing the cumulative distribution P(DvD) to a Gaussian distribution with the same variance (inset to Fig 1b). Excursions to the large amplitude tails correspond to abrupt reorientation events and are colored red in Fig 1a. If worms lose orientational memory then their movements will look diffusive at long times. One signature of such behavior is contained in the mean-square distance between two points on the trajectory, which for diffusion should grow linearly with the time t. In Fig 2a, we see that this is what happens for times longer than t*10s. At shorter times, the mean-square displacement grows as the square of the time difference, which corresponds to ballistic motion at a fixed velocity. This suggests that the time scale for worms to lose directional memory is *10s, and this can be seen directly from the correlation function for the local tangent angle, as shown in Fig 2b. A sequence of uncorrelated runs and tumbles translates into a mathematical model in which the orientation angle a is, from time to time, completely randomized by discrete events. For E. coli these events are the tumbles, and it is natural to think that for C. elegans these events are the reorientation events. If turns occur randomly at rate r turn , and generate completely new, uncorrelated directions of movement, then the correlation function for direction will decay as But since r turn typically is less than two per minute [14,21], reorientation events alone can't explain the shorter time of decay of the directional correlations, as seen quantitatively in Fig 1d. Thus, changes in the orientation angle a occurring in between reorientation events must play a key role. We can disentangle the contributions of continuous and discrete reorientation by looking at the orientation correlation of the trajectory between reorientation events. As in previous work [21] we identify reorientation events as moments when v cm w0:87 rad=s. The correlation of the angles at the beginning and the end of the reorientation event, vcos(a start )cos(a end )w~{0:06+0.01, demonstrating that these turns effectively randomize the direction. We compute the orientation correlation function C a (t) within the intervals, and the result, C interval a (t), is shown as the green curve of Fig. 3. Removing the intervening abrupt reorientation events reveals a non-exponential, non-monotonic angular correlation, which is a marked departure from ordinary orientational diffusion.
If the continuous dynamics within intervals are independent of reorientation events then the angular correlation function is the product of two terms where P(t) is probability that two points separated by time t come from the same interval. To quantify the contribution of continuous dynamics to the overall loss of orientation memory, we use Eq 4 to compute C total a and we compare this with the measured angular correlation. Figure 3 shows that this is an excellent approximation, with no adjustable parameters. Importantly, the continuous dynamics remain significant even when the threshold is lowered to v cm w0:60 rad=s, the lowest value where Eq 4 is an adequate description of orientation correlations (data not shown). These results demonstrate that the loss of total orientational memory is due to two independent processes, both of which may be controlled as part of an overall foraging strategy, and that a ''run and tumble'' model focusing on discrete reorientation events is an inadequate description of C. elegans movement.

Modes and movements
Worms move in the world by changing their posture and here we show that the centroid trajectories are quantitatively captured The path includes both abrupt orientation changes (red) in which the worm shape is deeply bent (inset), and continuously curving segments. (b) Definition of the local orientation angle a(t) and the local orientation velocity v cm (t)~da(t)=dt. The inset shows the cumulative distribution of orientation velocities (red) contrasted with a Gaussian distribution that has the same variance (blue). The center-of-mass time series fx cm (t),y cm (t)g was filtered with a third-order polynomial in a running window 11 frames in length and a cm and v cm were built using this filter. doi:10.1371/journal.pone.0013914.g001 by the dynamics of body shape. Following general practice, we generated trajectories by tracking the center of mass of the worm's silhouette,x x cm (t), but an equally valid alternative would be to follow the midpoint of the worm as indicated in Fig 4a, generating a trajectoryx x mid (t). When the worm moves smoothly and doesn't change shape dramatically, both definitions of trajectory produce nearly identical results, but during those moments when the worm bends deeply, these trajectories diverge. We can quantify this divergence by measuring the difference between the center of mass and the midpoint trajectories, dx x~x x cm {x x mid and defining the difference speed v d~D d _ x x x xD. For large curvature we see this difference speed v d approaches the center-of-mass speed v cm (Fig 4b), illustrating that neither measure is a good indicator of the trajectory. Guided by these observations, we partition the worm's trajectory into three regimes: (i) segments where the centroid heading is a faithful representation of trajectory orientation, DvDv0:4 rad=s, 86% of the data; (ii) segments involving large reorientations which we collapse to point events, DvDw0:87 rad=s, 5% of the data; and (iii) ambiguous segments 0:4ƒDvDƒ 0:87 rad=s, 9% of the data. To construct the connection between shape and movement we confine our analysis to the first regime and note that our results are insensitive to small changes in the boundaries between segments.
In previous work [13] we found that the space of shapes of C. elegans during free locomotion is low-dimensional with four principal dimensions (eigenworms) capturing approximately 95% of the variance of the space of shapes. In this framework, the trajectories of worm shape are quantitatively described as a linear combination of the four eigenworms with corresponding time-varying weights, the modes fa i~1:4 (t)g. A summary of these results is shown in Fig 5 and we use these modes to construct an explicit map from the dynamics of shape into v cm (t).
In general we expect the worm's reorientation dynamics to be connected to changes in its shape, and we can construct this connection between modes and movement using the four intrinsic shape modes. The simplest model is a linear one, and by fitting the coefficients, b i~½ {0:021,0:017,0:023,0:015 rad/s, we can capture 60% of the variance in v cm . More generally we expect a nonlinear relationship, including time derivatives of the shape. Thus, we introduce twelve variables, x i~5:8~d a 1: x i~9:12~d 2 a 1:4 (t)    Figure 5. Low dimensional description of worm shape, following Ref [13]. (a) Each raw image of the worm is processed by passing a curve through the center of the body; the red circle marks the head. Arc length s along this curve is normalized, 0ƒsv1, and we define the tangent t t(s)~dh=ds to the centerline curve. (b) We rotate all images so that ShT is zero and thus h(s) provides a description of the worm shape that is intrinsic to the worm itself. (c) We decompose each shape h(s) into contributions from the leading four eigenmodes, which capture 95% of the variance in shape space, and the amplitudes of fluctuation along each mode are normalized to unit variance, Sa This mode-based model of v cm provides an excellent fit, Fig 6a, and captures more than 80% of the variance in the curvature. More importantly, we also predict the dynamics of the curvature, as shown through the correlation function in Fig 6b, and it is these dynamics that underlie the continuous reorientations shown in the green curve of Fig 3. The curvature is dominated by contributions from the amplitude of the third mode, which is connected to bending of the worm's body [13]. We have shown previously that the instantaneous speed of the worm v cm (t)! _ w w(t), where the phase w as the angle in the plane fa 1 ,a 2 g (cf Fig 5d). Taken together we can map from the modes to the speed and local curvature of the center-of-mass trajectory, so we can completely reconstruct the worm's movements from its shape as a function of time ( Figure  S1).

Mutants and adaptation
As with all organisms, C. elegans behavior is modulated by experience. As an example, the rate of V-turns decreases systematically with time away from food [14], as well as changing in response to thermal [22] and chemical [21] stimuli. It is also known that dopamine plays a significant role in these behaviors [23,24]. Here we use the analytic tools developed above to characterize both adaptation and the behavior of dopamine mutants dop-2 (vs105) and dop-3 (vs106).
The distribution of times between reorientation events changes as the worms spend more time away from food. As before we identify reorientation events as moments when v cm w0:87 rad=s. With this threshold, we can measure the cumulative distribution of inter-turn intervals, or equivalently the probability that a turn has not yet occurred after a time t, and this is shown in Fig 7a. During the course of our experiments the worms spend 40 min away from food; allowing for an initial adjustment to being placed on the the plate we divide the last 28.3 min into three equal epochs to search for adaptation to the environment. We see that the interval distributions vary systematically with time. In more detail, we see that the distribution has two components, and only the slower component r long contributes to the lengthening of the times between turns. A similar results has been shown for swimming worms [25]. Repeating the analysis for the dopamine mutants, we find the interval distributions statistically identical ( Table 1). The short time behavior of the distribution, summarized by r short is unchanging, while the long time behavior varies across time but is different than the wild-type at late times. The dopamine mutants do not have the same suppression of reorientation events as the wild-type as shown previously [24]. Our analysis above shows that continuous re-orientation in between turns is a significant component of the worm's motion, and that this behavior is driven by the dynamics in shape space. Indeed, the correlation time of the bending mode a 3 also shows adaptation between early and late times (Fig 7b), showing that worms produce straighter inter-turn trajectories at later times. Although the statistics of turning are the same for the two different mutants, Fig 8 shows that the dynamics along the different modes are in fact quite different. Along modes 1 and 2 (which form a quadrature pair), dop-2 is similar to the wild type, but dop-3 exhibits a faster oscillation. Recalling that this corresponds to the undulatory wave along the body [13], we predict that the dop-3 mutant should move more quickly, and this is observed when we track the center-of-mass motions: mean speeds of the three variants are v cm~½ 0:076,0:082,0:121+0:001 mm/s for N2, dop-2 and dop-3 respectively. The mode dynamics also combine though Eq 9 to produce different turning dynamics and, in particular, dop-3 animals make longer-lasting turns which result in curvier trajectories. While these pheonotypic differences are subtle and have not been reported before, they are immediately apparent in the dynamics in shape space. Taken together we find continuous motion, including gradual re-orientation, and discrete turning behaviors are under genetic control.

Discussion
It is tempting to think of behavior as a sequence of discrete actions, each taken in consequence of a specific decision. In the simplest cases, such as the running and tumbling of E. coli, we can see these discrete events reflected directly in the trajectory of the organism's center-of-mass motion [1]. In contrast, we find that, for C. elegans, discrete behaviors are roughly only half of the story: the exploratory trajectories of the worm get approximately equal contributions from discrete turning events and from continuous re-orientational motions in between the turns. Further, we can trace these continuous motions back to the underlying dynamics in the space of body shapes. Finally, we see that these different components of the motion are under independent genetic and adaptive control.
Quantitatively, we found that the exploratory motions of C. elegans are composed of two principle reorientation elements: abrupt events, including classical V-turns, which occur infrequently, and the continuous dynamics of orientation between these events. These two processes both make significant contributions to the worm's total loss of orientational memory on the *10s time scale. By focusing on the continuous intervals between discrete turns, however, we find that the worm's orientation can exhibit a longer term memory, lasting two minutes or more, and nonmonotonic correlations, corresponding to an abundance of arcs as seen, for example, in the trajectory of Fig. 1a. The presence of these arcs as well as the differential behavior of the mutants suggests that C. elegans controls more aspects of its motion than the stochastic rate of abrupt events. Evidence for this sort of continuous control has also recently been observed during C. elegans chemotaxis [26].
Extending previous work showing that the body shapes of C. elegans are captured by four modes [13], we built a phenomenological model that connects the intrinsic dynamics of these modes to the speed and curvature of the worm's trajectory through the external world. This model allows us to connect the body configurations, which are what the neuromuscular system can control, to the behaviors that have adaptive value. As an example of what can be learned from this analysis, we studied the motion of two mutants, dop-2 and dop-3, which contain defective receptors for the neurotransmitter dopamine, an important component in the modulation of foraging strategy. Although these mutants have nearly identical statistics when we look at their discrete turning behaviors, their continuous motions, as seen in the dynamics of fluctuations along four different shape dimensions, show substantial differences. This suggests that the goal of mapping genes to behavior [27,28] will require us to look much more closely, and quantitatively, at the behavior of individual organisms.

Methods
The image centroid and worm shape data were collected as in Ref [13], using tracking video microscopy with sampling frequency f~4hz, similar to other machine vision-based phenotyping [29,30]. The resulting centroid time series fx cm (t),y cm (t)g was filtered with a third-order polynomial in a running window spanning +5 frames and the derivatives used to construct a cm and v cm were built from the filtered data. We used a total of N~32 wild-type worms, N~50 dop-2 (vs105) worms and N~50 dop-3 (vs106) worms, each tracked for 35 minutes. The worms were transferred to the agar plate using a platinum worm pick and we excluded the first 400 seconds of each tracking run to avoid any influences due to mechanical stimulation. Following [13] we derive the shape from each worm image by passing a curve through the center of the body. x mid is defined as the center position along this curve. We normalize the arc length s along this curve 0ƒsv1, and we define the tangentt t(s)~dh=ds. We then rotate all images so that ShT is zero and thus h(s) provides a description of the shape that is intrinsic to the worm itself. Finally, we decompose each shape h(s) into contributions (modes, a i~P h(s) : e i (s)) from the leading four eigenworms e i~1:4 , which capture 95% of the variance in shape space. For the linear models connecting modes to movement, Eqn's (5,9), fitting was confined to inter-turn intervals, and the weights were obtained by minimizing the rms error e~ffi ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi S(v cm {v modes ) 2 T q . Figure S1 Reconstructed trajectories. To explicitly demonstrate that the shape modes provide sufficient information to reconstruct the worm trajectories in real space, we show 16  Data as in Fig 7 were collected also for N~50 dopamine mutants, each also observed for 35 minutes, and all the data were fit to Eq 11. Results are shown for the two rates, r short and r long , that define the time scales for turning. We note that r short~0 :66+0:04 Hz across all epochs and genetic variants, and that differences in V-turns between the dopamine mutants are statistically insignificant. doi:10.1371/journal.pone.0013914.t001

Supporting Information
trajectory reconstructions from (randomly chosen) continuous intervals in the data that are longer than 60 seconds. In these reconstructions, red trajectories are generated from the mode model (Eq 9) while blue trajectories are measured from centroid motion. Arrows denote the direction of motion and the black scale bar is 1 mm in each plot. For these reconstructions, we model the worms trajectory orientation dynamics entirely through v mode and we use the centroid speed to fit the overall scale. Thus we have x recon (t)~x 0 z Ð dt v cm cos ( Ð dt v mode (t)za 0 ) and y recon (t)ỹ 0 z Ð dt v cm sin ( Ð dt v mode (t)za 0 ). We note that our model is based on v mode and thus the reconstructions involve two integrations and we match the initial position and initial orientation angle to the worm data. Importantly, during the integration process, errors in the model, however small, accumulate leading to deviations from the actual trajectories at late times.
Nonetheless, it is clear from the reconstructions that the shape model predicts qualitatively similar movements even during trajectory epochs where the orientation changes dramatically Found at: doi:10.1371/journal.pone.0013914.s001 (0.81 MB EPS)