# Deriving Shape-Based Features for *C. elegans* Locomotion Using Dimensionality Reduction Methods

^{1}MRC Clinical Sciences Centre, London, UK^{2}Institute of Clinical Sciences, Faculty of Medicine, Imperial College London, London, UK^{3}Department of Mathematics, Imperial College London, London, UK

High-throughput analysis of animal behavior is increasingly common following the advances of recording technology, leading to large high-dimensional data sets. This dimensionality can sometimes be reduced while still retaining relevant information. In the case of the nematode worm *Caenorhabditis elegans*, more than 90% of the shape variance can be captured using just four principal components. However, it remains unclear if other methods can achieve a more compact representation or contribute further biological insight to worm locomotion. Here we take a data-driven approach to worm shape analysis using independent component analysis (ICA), non-negative matrix factorization (NMF), a cosine series, and jPCA (a dynamic variant of principal component analysis [PCA]) and confirm that the dimensionality of worm shape space is close to four. Projecting worm shapes onto the bases derived using each method gives interpretable features ranging from head movements to tail oscillation. We use these as a comparison method to find differences between the wild type N2 worms and various mutants. For example, we find that the neuropeptide mutant *nlp-1(ok1469)* has an exaggerated head movement suggesting a mode of action for the previously described increased turning rate. The different bases provide complementary views of worm behavior and we expect that closer examination of the time series of projected amplitudes will lead to new results in the future.

## Introduction

Analyzing animal behavior is a high-dimensional problem since each joint in vertebrates and each independent muscle in invertebrates introduces new degrees of freedom. This makes it challenging to provide comprehensive and quantitative descriptions of behavior, even in small animals like the nematode worm *Caenorhabditis elegans* (Gomez-Marin et al., 2014). Traditional ethology methods have focused on observer-defined categories to reduce behavioral dimensionality, but automated imaging and data analysis tools have made it possible to extract more complete records of an animal’s behavior (Ohyama et al., 2013; Anderson and Perona, 2014; Chen and Engert, 2014; Gouvêa et al., 2014; Machado et al., 2015; Ramdya et al., 2015). From these data, lower-dimensional representations can then be identified using unsupervised learning algorithms. Dimensionality reduction can be achieved using a variety of different methods. Each emphasizes different aspects of the underlying behavior and it is not clear which of these will be the most informative in advance or in fact what behavioral feature each corresponds to in contrast to observer-defined categories. However, the assumptions and limitations of each automated approach are made explicit in the algorithm and they can be compared quantitatively on a common data set.

The nematode worm *C. elegans* is a useful model to test different dimensionality reduction methods. *C. elegans* moves by propagating bending waves along its body and when confined to the surface of an agar plate, this motion occurs in two dimensions, making it possible to capture its behavior using a single camera. Previous work on *C. elegans* body shape using principal component analysis (PCA) has shown that the effective dimensionality of worm locomotion is low, as there are correlations between bends along different parts of the body (Stephens et al., 2008). Trajectories through the lower dimensional space defined by the principal components can be used to classify different genotypes and explain certain behaviors both in *C. elegans* and in the larvae of *Drosophila melanogaster* (Stephens et al., 2011; Brown et al., 2013; Szigeti et al., 2015).

Here we revisit the question of how to represent worm shape space by using four different dimensionality reduction methods (Table 1). As each of these methods has different objectives, the resulting dimensions highlight different aspects of *C. elegans* shape space. We analyze these differences using features derived from the methods and compare the behavior of mutant worms.

## Materials and Methods

### Data

The dataset used in the analysis was collected and described previously (Yemini et al., 2013). It contains 9964 videos of single worms moving freely on an agar plate for 15 min (after a 30-min-long acclimatization period). Three hundred and thirty-five different genotypes were analyzed including the N2 lab strain. We used the angle representation of the worm (Figure 1) with a mean of zero except for non-negative matrix factorization (NMF) where all values were made positive by adding a constant (a requirement of the method). Ten N2 trajectories were picked randomly from a collection of 100 as the training set for jPCA (a dynamic variant of PCA). To obtain the variance of the basis shapes, we resampled the same collection 100 times obtaining 10 trajectories each time.

**Figure 1. (A)** A typical frame of a worm under the tracking microscope. **(B,C)** The outline and the curve through the center of the worm. The angle in radians between neighboring points along the centerline is plotted from the tip of the head (*s* = 1) to the end of the tail (*s* = 48). **(D)** As the worm moves, the value of each angle changes, but each subsequent angle provides little additional information because they are highly correlated with each other. **(E)** Dimensionality reduction methods can reveal more biologically meaningful time-series variables.

### Dimensionality Reduction

A training set of 3000 N2 shapes was picked randomly from a collection of 12,600 for independent component analysis (ICA) and NMF. To obtain the variance of the basis shapes, we resampled the same collection 100 times obtaining 3000 N2 shapes each time. For analysis, a testing set of 3000 N2 shapes was projected onto each basis shape to retrieve the corresponding amplitudes. To ensure that all of the mutants were represented in the test between PCA and the sinusoidal basis shapes, we sampled one shape from each of the 9964 recordings in the dataset. Each worm shape was reconstructed using either four principal components or the sinusoidal basis and the squared difference between the reconstructed and original shapes were determined in each case. PCA and NMF were conducted using built-in functions of MATLAB, while freely available methods were used for ICA (Hyvärinen, 1999^{1}) and jPCA (Churchland et al., 2012). We used the deflation approach and the power law nonlinearity as the parameters for ICA, but we find that our results are robust to different parameters, as well. The sinusoidal basis shapes were defined to be cosine waves,

where *s* is the arclength, *s*_{total} is the total arclength, and *n* is an integer from one to the number of basis shapes used.

### Mutant Comparisons

We projected the entire dataset onto the NMF and jPCA basis shapes (derived from the N2 wild type training set) to obtain the projected amplitudes for each worm at each time-point. The projected amplitudes have arbitrary units because the basis shapes are normalized. We then took the mean absolute value of each projected amplitude as a simple feature characterizing each worm’s average shape. For jPCA, we measured the mean amplitude of the anterior oscillation in each individual, i.e.,

where A_{1} and A_{2} are the projections onto the first two eigenshapes, and *t* is the frame number. These were compared between each genotype and the wild type (N2) using a Mann-Whitney U-test. Bonferroni correction was used to control for multiple comparisons.

### Worm Maintenance and Recordings

As previously described (Yemini et al., 2011), worms were maintained under standard conditions on Nematode Growth Medium (NGM) plates with OP50 as a food source at 22°C. The mutant strains highlighted in the results section are BZ28 *(snf-6)eg28*, VC1295 *egg-5(ok1781)* and RB1340 *nlp-1(ok1469)*. Induced reversal experiments were carried out as described in Alkema et al. (2005). The wild type strain was *C. elegans* variant Bristol, strain N2 and the mutant strain was MT13113 *tdc-1(n3419)*.

## Results

### Independent Component Analysis Refines Features Derived from PCA

ICA minimizes the statistical dependence of the components in multivariate signals as compared with PCA that minimizes the projection error. This means that ICA can remove noise and separate artifacts from the data (Hyvärinen and Oja, 2000), while PCA focuses on reducing the unexplained variance with successive components.

We find that ICA returns four basis shapes that are reminiscent of the ones obtained using PCA (Figures 2A,B), but the projected amplitudes of full worm trajectories show clear differences. This is consistent across resamplings and different parameters. The two PCA eigenshapes shown in Figure 2C have previously been described as forming an approximate quadrature pair (Stephens et al., 2008). Therefore, the traveling wave that worms form during crawling locomotion is encoded as phase-shifted oscillations in these modes. Histograms of projections onto the first two basis shapes averaged over multiple worms are shown in Figure 2. A ring structure suggesting oscillatory behavior is clearly present during forward locomotion (Figure 2C, top row) with both methods, although the probability distribution is less constant along the ring using PCA compared to ICA. When all the data are plotted including turns and dwelling, the probability distribution becomes more uniform, especially for PCA. This suggests that ICA returns modes that isolate the crawling wave more completely from other aspects of the shape dynamics compared to PCA.

**Figure 2. (A)** Independent component analysis (ICA) returns four basis shapes that explain 97.6% of the variance in the dataset. The graph shows an *x*-*y* coordinate representation of the modes with the resampled basis shapes in gray. **(B)** The fraction of the variance explained along the worm by including an increasing number of basis shapes suggests that the modes can each explain a different part of the worm well. **(C)** Bivariate histograms for the amplitudes of basis shapes (wild type worm, 15 min, frame rate: 30 Hz). Top row: forward locomotion only, bottom row: all data. Basis shapes 1 and 2 from ICA form a ring in both cases (especially clear when only the forward locomotion is counted), suggesting an oscillatory behavior between them. Similarly, two basis shapes from principal component analysis (PCA) are known to explain an oscillatory behavior, but they also include other information, as evidenced by a lack of clear, continuous ring in their histograms.

### Worm Body Segments are Individually Defined by Non-Negative Matrix Factorization

NMF is a commonly used method in computer vision and data clustering (Lee and Seung, 1999). In contrast to other methods that are more focused on returning a combination of the original variables as the reduced dimensions, NMF finds a parts-based representation. In the shape dataset, this means that each of the basis shapes is going to be good at explaining a particular segment of the worm and the corresponding amplitude will directly correlate with the size of displacement in that segment. Running the algorithm returns a set of basis shapes that indeed divides the worm into five approximately equally spaced segments (Figure 3) corresponding to the head, neck, midbody, hip and tail regions.

**Figure 3. (A)** Non-negative matrix factorization (NMF) returns five basis shapes that explain 97.6% of the variance in the angle data. The graph shows an *x-y* coordinate representation of the modes with the resampled basis shapes in gray. **(B)** Angle representation of the basis shapes in **(A**; legend in **C****)**. **(C)** The fraction of the variance explained along the worm by including an increasing number of basis shapes suggests that the modes can each explain a different part of the worm well, in this case localized to the five major segments of the worm. **(D)** Bivariate histograms for the amplitudes of basis shapes (wild type worm, 15 min, frame rate: 30 Hz). Basis shapes 3, 4, 1 and 5 form incomplete rings, suggesting a more diffuse representation of the oscillatory sinusoidal crawling behavior using NMF.

We compared the NMF segment features (mean absolute projected amplitudes) across all 335 genotypes in the database using the basis shapes derived from the training set of wild type N2 shapes. This set of basis shapes captures 97.6% of the variance in N2 and 97.1% in mutants. At least one feature was significantly different compared to the wild type N2 strain in 172 genotypes (significance level: 0.01, Bonferroni corrected Mann-Whitney U-test; Figure 4). The results confirm earlier research: for instance the mutant *snf-6* is known to have exaggerated head movements (Kim et al., 2004). Most behavioral studies have not focused on describing the locomotion phenotype in detail, as this is often difficult to do by eye. However, NMF can provide testable hypotheses on the location of effect in a novel way, for instance with regards to the mode of action of the gene *nlp-1*. The lack of this neuropeptide is known to increase the turning rate of the worm via modulating the AIA neurons, but it is not obvious how these two are linked, as these neurons are highly interconnected with other neurons (Chalasani et al., 2010). We find that *nlp-1* mutants show an increase in the amplitude projected onto the mode that corresponds to the head, while there is no significant difference along other parts of the body (Figure 4). Such a localized response could help constrain hypotheses for AIA function by focusing on neural circuits that modulate head muscles. NMF can also help in discerning phenotypes that may be masked by more obvious effects. An example of this is the *egg-5* mutant that has severe developmental problems during the oocyte phase while still in the parent worm (Parry et al., 2009). The increased movement in the hip and the tail of the worm (Figure 4) could be due to a decrease of eggshell on the eggs inside the gonads, making them more flexible and less restrictive for the worm.

**Figure 4. The mean of the absolute projected amplitudes corresponding to each basis shape from NMF is taken for individual worms of four different genotypes.** (wild type N2: *n* = 1303, *snf-6*: *n* = 43, *nlp-1*: *n* = 22, *egg-5*: *n* = 23) *snf-6* and *nlp-1* worms have significantly increased head motion, but normal movement in the rest of their body in terms of magnitude (*p*_{adj}(*snf-6*) = 3.13 × 10^{−14}, *p*_{adj}(*nlp-1*) = 6.83 × 10^{−4}), while the opposite can be observed in *egg-5* mutants (*p*_{adj}(hip) = 8.19 × 10^{−5}, *p*_{adj}(tail) = 2.48 × 10^{−6}). ***Indicates *p* < 0.001.

### Fourier Cosine Series Captures 97% of Variance Across Mutants

Data-driven dimensionality reduction methods are inherently dependent on the dataset used to train them, meaning that the basis shapes produced will be different if a different training set is used. If the training set is large enough, variation will be small, but if only a small number of trajectories are available for a given condition then the derived shapes could vary significantly from sample to sample. Using a set of pre-determined basis shapes would avoid this issue, but to be useful they must explain most of the shape space variance across different individuals. Given the sinuous set of basis shapes derived using both PCA and ICA, we defined a Fourier cosine series as a set of basis shapes and tested if it could capture worm shapes compactly (Figures 5A,B). The first four basis shapes of the cosine series captured 96.9% of the variance across the mutant shape test set (Figure 5C). While the cosine series performs significantly worse than PCA (*p* = 2.49 * 10^{−11}, *t*-test), the difference is small (the top four PCA components capture 97.1% of the variance) and may be negligible for some applications. Using a set of analytically defined modes may prove useful in theoretical applications.

**Figure 5. (A)** A cosine series was used to generate four basis shapes with increasing frequency. The corresponding *x*-*y* representations are shown. **(B)** The fraction of the variance explained along the worm by including an increasing number of basis shapes. **(C)** The shapes in the testing set were reconstructed using the four sinusoidal basis shapes and the top four modes of PCA. The histogram of the correlation coefficients (between the reconstructed and the original shapes) suggests a significant, but small difference between the sinusoidal analysis (96.9%) and the data-driven approach (97.1%; *t*-test, *p* = 2.49 × 10^{−11}).

### Body Oscillations are Described by jPCA

The methods considered above are time independent: they only take into account the distribution of shapes. In contrast, jPCA uses time series trajectories of worm motion, maps the shape space with PCA and then reorients these components to identify components that show strong oscillations (Churchland et al., 2012). Using this method on wild type (N2) trajectories leads to three pairs of components, each pair corresponding to a segment along the body of the worm (Figures 6A,B). The components are ordered according to the strength of the oscillation detected, indicating that the oscillation produced during locomotion decreases in strength from head to tail on average.

**Figure 6. (A)** jPCA is run with 12 components (top six shown here). The graph shows an *x*-*y* coordinate representation of the modes with the resampled basis shapes in gray. **(B)** Bivariate histograms for the amplitudes of basis shapes (wild type worm, 15 min, frame rate: 30 Hz). Basis shapes 1, 2, 3, 4, 5 and 6 all form rings, suggesting an oscillatory behavior between them and independent sinusoidal waves in the corresponding parts of the body.

Worms have different movement patterns during reversals as opposed to forward motion. We analyzed different mutants to see if there is any difference compared to wild type N2 by looking at the anterior body oscillation, a behavior that was the most rotationally robust in the dataset. Similarly to NMF, there is a large number of mutants (168, significance level: 0.01) significantly different compared to wild type N2 in the size of the anterior oscillation. Two examples are shown in Figure 7. We found that the wild type worm reduces the size of its anterior body oscillation during spontaneous reversals, prompting us to consider whether this feature was sensitive to the head tip oscillation of the worm, as this is known to be suppressed during reversal (Alkema et al., 2005). However, the anterior oscillation detected by jPCA is not suppressed during touch-evoked reversals (Figure 7). We also looked at *tdc-1(n3419)* mutants, which have been reported to maintain their head tip oscillation during touch-evoked reversals (Alkema et al., 2005). As with N2, we do not detect a change in jPCA anterior oscillation in *tdc-1(n3419)* touch-evoked reversals, but we do find that the magnitude of the oscillation is lower in *tdc-1* during spontaneous forward locomotion. This suggests that the jPCA anterior oscillation is not the same as the small oscillation that worms exhibit at the very tip of their heads. Despite this, the jPCA anterior oscillation does show a difference between spontaneous and touch-evoked reversals: both wild type and *tdc-1* worms show a stronger anterior body oscillation during touch-evoked reversals (Figure 7). Finally, we also found that *egg-5* mutants fail to suppress their anterior body oscillation during a reversal, even though they behave normally during forward locomotion.

**Figure 7. The amplitude of the jPCA anterior oscillation is measured for individual worms of three different genotypes during forward locomotion and reversals.** (wild type N2: *n* = 1303, *tdc-1*: *n* = 19, *egg-5*: *n* = 23) *tdc-1* has significantly reduced head oscillation during forward locomotion, but suppresses it during reversals to the same magnitude as wild types (*p*_{adj}(*tdc-1*) = 4.80 × 10^{−5}), while the opposite can be observed in *egg-5* mutants (*p*_{adj}(*egg-5*) = 3.71 × 10^{−4}). During touch-evoked reversals, head oscillation is reduced in both wild type N2 and *tdc-1* worms. Both have a significantly smaller ratio (forward/spontaneous reversal) than wild type (*p*_{adj}(*tdc-1*) = 3.73 × 10^{−6}, *p*_{adj}(*egg-5*) = 6.69 × 10^{−6}). ***Indicates *p* < 0.001.

## Discussion

We used four different dimensionality reduction methods to obtain a number of new features that can be used to describe different groups of worms. The new features are straightforward to use and show interpretable differences between mutants.

We found that none of the methods returned a more compact representation of the *C. elegans* shape space compared to PCA, confirming the previous lower-bound dimensionality of four for the worm shape space (Stephens et al., 2008). However, different projections provide different kinds of information, for instance the intuitive joint-like representation of postural dynamics through NMF or the full-body oscillations from ICA. In addition, ICA clearly defines two sets of basis shapes (1 and 2; 3 and 4) corresponding to two waves with different frequencies, suggesting a possible representation of worm behavior as a superposition of two fundamental oscillations. The set of sinusoidal basis shapes provides an analytically defined set of shapes that could be used across experiments and labs to make results more directly comparable since they generalize well across mutant strains. jPCA contributes an interesting insight into the dynamic oscillation patterns of the worm body. This pattern could be consistent with a central pattern generator in the head, producing an oscillation that becomes less coherent as it propagates down the worm (Gjorgjieva et al., 2014).

Behavior is a dynamic process often involving shifts between different states, single events and cyclic episodes. The amplitudes of the shapes projected onto the different bases also change over time, but this was not taken into account when we interrogated the database. Instead, we used the magnitude averaged over the entire recording that reflects the general shape of the worm, which was sufficient to detect many significant differences. However, thorough time series analysis would likely reveal more details about the locomotion trajectories. Oscillations are ubiquitous in all four bases, but each feature also has a rich dynamical profile with different properties and comparison between these has the potential to provide different and complementary information. One example could be the characterization of the spontaneous switch between the feeding states of the worm. *C. elegans* has been reported to have three different behavioral states (roaming, dwelling and quiescence) that are influenced by food availability and nutritional status (You et al., 2008). The states are traditionally defined by instantaneous midbody speed when using automatic tracking, but this is known to have its limits when trying to find well-defined states (Fujiwara et al., 2002; Ben Arous et al., 2009; Gallagher et al., 2013). The shape has been useful for detecting lethargus, a different quiescent state that has a specific posture associated with it (Iwanir et al., 2013; Nelson and Raizen, 2013). The new shape features could provide further insight into shape differences that characterize different behavioral states. At the same time, some bases may be better suited than others for defining predictors of single events such as omega turns, and description of periodic behaviors like reversals.

Worm behavior has often been described using states defined by the experimenter. Using recording equipment and automated feature extraction was initially conceived to help with the process of group assignment and definition (de Bono and Bargmann, 1998; Baek et al., 2002), and this has been extended with unsupervised methods to detect patterns in worm locomotion (Brown et al., 2013; Schwarz et al., 2015). As we have shown here, the basis used for representing shape can reveal different aspects of behavior and provide new avenues for the future development of behavior classification and analysis methods.

## Author Contributions

BG performed data analysis, BG and AEXB conceived the research and wrote the manuscript.

## Funding

Funding for this work was provided by the Medical Research Council through grant MC-A658-5TY30 to AEXB.

## Conflict of Interest Statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

## Footnotes

## References

Alkema, M. J., Hunter-Ensor, M., Ringstad, N., and Horvitz, H. R. (2005). Tyramine functions independently of octopamine in the *Caenorhabditis elegans* nervous system. *Neuron* 46, 247–260. doi: 10.1016/j.neuron.2005.02.024

Anderson, D. J., and Perona, P. (2014). Toward a science of computational ethology. *Neuron* 84, 18–31. doi: 10.1016/j.neuron.2014.09.005

Baek, J.-H., Cosman, P., Feng, Z., Silver, J., and Schafer, W. R. (2002). Using machine vision to analyze and classify *Caenorhabditis elegans* behavioral phenotypes quantitatively. *J. Neurosci. Methods* 118, 9–21. doi: 10.1016/s0165-0270(02)00117-6

Ben Arous, J., Laffont, S., and Chatenay, D. (2009). Molecular and sensory basis of a food related two-state behavior in *C. elegans*. *PLoS One* 4:e7584. doi: 10.1371/journal.pone.0007584

Brown, A. E. X., Yemini, E. I., Grundy, L. J., Jucikas, T., and Schafer, W. R. (2013). A dictionary of behavioral motifs reveals clusters of genes affecting *Caenorhabditis elegans* locomotion. *Proc. Natl. Acad. Sci. U S A* 110, 791–796. doi: 10.1073/pnas.1211447110

Chalasani, S. H., Kato, S., Albrecht, D. R., Nakagawa, T., Abbott, L. F., and Bargmann, C. I. (2010). Neuropeptide feedback modifies odor-evoked dynamics in *Caenorhabditis elegans* olfactory neurons. *Nat. Neurosci.* 13, 615–621. doi: 10.1038/nn.2526

Chen, X., and Engert, F. (2014). Navigational strategies underlying phototaxis in larval zebrafish. *Front. Syst. Neurosci.* 8:39. doi: 10.3389/fnsys.2014.00039

Churchland, M. M., Cunningham, J. P., Kaufman, M. T., Foster, J. D., Nuyujukian, P., Ryu, S. I., et al. (2012). Neural population dynamics during reaching. *Nature* 487, 51–56. doi: 10.1038/nature11129

de Bono, M., and Bargmann, C. I. (1998). Natural variation in a neuropeptide y receptor homolog modifies social behavior and food response in *C. elegans*. *Cell* 94, 679–689. doi: 10.1016/s0092-8674(00)81609-8

Fujiwara, M., Sengupta, P., and McIntire, S. L. (2002). Regulation of body size and behavioral state of *C. elegans* by sensory perception and the EGL-4 cGMP-dependent protein kinase. *Neuron* 36, 1091–1102. doi: 10.1016/s0896-6273(02)01093-0

Gallagher, T., Bjorness, T., Greene, R., You, Y.-J., and Avery, L. (2013). The geometry of locomotive behavioral states in *C. elegans*. *PLoS One* 8:e59865. doi: 10.1371/journal.pone.0059865

Gjorgjieva, J., Biron, D., and Haspel, G. (2014). Neurobiology of *Caenorhabditis elegans* locomotion: where do we stand? *Bioscience* 64, 476–486. doi: 10.1093/biosci/biu058

Gomez-Marin, A., Paton, J. J., Kampff, A. R., Costa, R. M., and Mainen, Z. F. (2014). Big behavioral data: psychology, ethology and the foundations of neuroscience. *Nat. Neurosci.* 17, 1455–1462. doi: 10.1038/nn.3812

Gouvêa, T. S., Monteiro, T., Soares, S., Atallah, B. V., and Paton, J. J. (2014). Ongoing behavior predicts perceptual report of interval duration. *Front. Neurorobot.* 8:10. doi: 10.3389/fnbot.2014.00010

Hyvärinen, A. (1999). Fast and robust fixed-point algorithms for independent component analysis. *IEEE Trans. Neural Netw.* 10, 626–634. doi: 10.1109/72.761722

Hyvärinen, A., and Oja, E. (2000). Independent component analysis: algorithms and applications. *Neural Netw.* 13, 411–430. doi: 10.1016/s0893-6080(00)00026-5

Iwanir, S., Tramm, N., Nagy, S., Wright, C., Ish, D., and Biron, D. (2013). The microarchitecture of *C. elegans* behavior during lethargus: homeostatic bout dynamics, a typical body posture and regulation by a central neuron. *Sleep* 36, 385–395. doi: 10.5665/sleep.2456

Kim, H., Rogers, M. J., Richmond, J. E., and McIntire, S. L. (2004). SNF-6 is an acetylcholine transporter interacting with the dystrophin complex in *Caenorhabditis elegans*. *Nature* 430, 891–896. doi: 10.1038/nature02798

Lee, D. D., and Seung, H. S. (1999). Learning the parts of objects by non-negative matrix factorization. *Nature* 401, 788–791. doi: 10.1038/44565

Machado, A. S., Darmohray, D. M., Fayad, J., Marques, H. G., and Carey, M. R. (2015). A quantitative framework for whole-body coordination reveals specific deficits in freely walking ataxic mice. *Elife* 4:e07892. doi: 10.7554/eLife.07892

Nelson, M. D., and Raizen, D. M. (2013). A sleep state during *C. elegans* development. *Curr. Opin. Neurobiol.* 23, 824–830. doi: 10.1016/j.conb.2013.02.015

Ohyama, T., Jovanic, T., Denisov, G., Dang, T. C., Hoffmann, D., Kerr, R. A., et al. (2013). High-throughput analysis of stimulus-evoked behaviors in Drosophila larva reveals multiple modality-specific escape strategies. *PLoS One* 8:e71706. doi: 10.1371/journal.pone.0071706

Parry, J. M., Velarde, N. V., Lefkovith, A. J., Zegarek, M. H., Hang, J. S., Ohm, J., et al. (2009). EGG-4 and EGG-5 link events of the Oocyte-to-Embryo transition with meiotic progression in *C. elegans*. *Curr. Biol.* 19, 1752–1757. doi: 10.1016/j.cub.2009.09.015

Ramdya, P., Lichocki, P., Cruchet, S., Frisch, L., Tse, W., Floreano, D., et al. (2015). Mechanosensory interactions drive collective behaviour in *Drosophila*. *Nature* 519, 233–236. doi: 10.1038/nature14024

Schwarz, R. F., Branicky, R., Grundy, L. J., Schafer, W. R., and Brown, A. E. X. (2015). Changes in postural syntax characterize sensory modulation and natural variation of *C. elegans* locomotion. *PLoS Comput. Biol.* 11:e1004322. doi: 10.1371/journal.pcbi.1004322

Stephens, G. J., Bueno de Mesquita, M., Ryu, W. S., and Bialek, W. (2011). Emergence of long timescales and stereotyped behaviors in *Caenorhabditis elegans*. *Proc. Natl. Acad. Sci. U S A* 108, 7286–7289. doi: 10.1073/pnas.1007868108

Stephens, G. J., Johnson-Kerner, B., Bialek, W., and Ryu, W. S. (2008). Dimensionality and dynamics in the behavior of *C. elegans*. *PLoS Comput. Biol.* 4:e1000028. doi: 10.1371/journal.pcbi.1000028

Szigeti, B., Deogade, A., and Webb, B. (2015). Searching for motifs in the behaviour of larval Drosophila melanogaster and *Caenorhabditis elegans* reveals continuity between behavioural states. *J. R. Soc. Interface* 12:20150899. doi: 10.1098/rsif.2015.0899

Yemini, E., Jucikas, T., Grundy, L. J., Brown, A. E. X., and Schafer, W. R. (2013). A database of *Caenorhabditis elegans* behavioral phenotypes. *Nat. Methods* 10, 877–879. doi: 10.1038/nmeth.2560

Yemini, E., Kerr, R. A., and Schafer, W. R. (2011). Preparation of samples for single-worm tracking. *Cold Spring Harb. Protoc.* 2011, 1475–1479. doi: 10.1101/pdb.prot066993

Keywords: dimensionality reduction, *C. elegans*, computational ethology, worm tracking, locomotion

Citation: Gyenes B and Brown AEX (2016) Deriving Shape-Based Features for C. elegans Locomotion Using Dimensionality Reduction Methods. Front. Behav. Neurosci. 10:159. doi: 10.3389/fnbeh.2016.00159

Received: 19 May 2016; Accepted: 03 August 2016;

Published: 17 August 2016.

Edited by:

Nuno Sousa, University of Minho, PortugalReviewed by:

Etsuro Ito, Waseda University, JapanAndreia Teixeira-Castro, University of Minho, Portugal

Copyright © 2016 Gyenes and Brown. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution and reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: André E. X. Brown, andre.brown@imperial.ac.uk