Fast, automated measurement of nematode swimming (thrashing) without morphometry
© Buckingham and Sattelle; licensee BioMed Central Ltd. 2009
Received: 05 June 2009
Accepted: 20 July 2009
Published: 20 July 2009
The "thrashing assay", in which nematodes are placed in liquid and the frequency of lateral swimming ("thrashing") movements estimated, is a well-established method for measuring motility in the genetic model organism Caenorhabditis elegans as well as in parasitic nematodes. It is used as an index of the effects of drugs, chemicals or mutations on motility and has proved useful in identifying mutants affecting behaviour. However, the method is laborious, subject to experimenter error, and therefore does not permit high-throughput applications. Existing automation methods usually involve analysis of worm shape, but this is computationally demanding and error-prone. Here we present a novel, robust and rapid method of automatically counting the thrashing frequency of worms that avoids morphometry but nonetheless gives a direct measure of thrashing frequency. Our method uses principal components analysis to remove the background, followed by computation of a covariance matrix of the remaining image frames from which the interval between statistically-similar frames is estimated.
We tested the performance of our covariance method in measuring thrashing rates of worms using mutations that affect motility and found that it accurately substituted for laborious, manual measurements over a wide range of thrashing rates. The algorithm used also enabled us to determine a dose-dependent inhibition of thrashing frequency by the anthelmintic drug, levamisole, illustrating the suitability of the system for assaying the effects of drugs and chemicals on motility. Furthermore, the algorithm successfully measured the actions of levamisole on a parasitic nematode, Haemonchus contortus, which undergoes complex contorted shapes whilst swimming, without alterations in the code or of any parameters, indicating that it is applicable to different nematode species, including parasitic nematodes. Our method is capable of analyzing a 30 s movie in less than 30 s and can therefore be deployed in rapid screens.
We demonstrate that a covariance-based method yields a fast, reliable, automated measurement of C. elegans motility which can replace the far more time-consuming, manual method. The absence of a morphometry step means that the method can be applied to any nematode that swims in liquid and, together with its speed, this simplicity lends itself to deployment in large-scale chemical and genetic screens.
The nematode, Caenorhabditis elegans, has been used extensively for tackling fundamental questions in biology, including the modeling of aspects of human disease, drug screening and development [1–5]. It was the first complex animal genome to be sequenced . Its high fecundity, short life cycle and the availability of many mutants facilitate the exploration of gene function, while its complete cell lineage and transparency are useful in studies of development. The discovery of the RNA interference method for selective gene knockdown by Fire and Mello  and the ease of delivery, via Escherichia coli on which the worms feed, of specifically-targeted double-stranded RNA has paved the way for genome-wide RNAi screens . However, despite the facility with which large-scale genetic and chemical screens can be applied to C. elegans, the lack of automation of phentoyping has limited its use in highly automated screening applications.
To fully harness the potential of the growing number of C. elegans disease models for discovering new drugs, it is therefore necessary to develop automated methods of assaying locomotor phenotypes. For example, screening for new anthelmintics using C. elegans or parasitic worms could be accelerated if automated phenotyping could be deployed in screening chemical libraries. Parasitic nematodes present a major challenge to both human and animal health [9, 10] so automation could also assist in accelerating screening for the discovery of new antiparasitic drugs. In addition, automation would enhance the utility of C. elegans models mimicking aspects of human nervous system and neuromuscular diseases.
Assays of C. elegans motility frequently deploy the "thrashing assay". This is performed by placing worms in liquid medium and counting the number of lateral swimming movements (thrashes min-1), thereby quantifying an important aspect of locomotion. The effects on locomotion of genetic manipulations and/or drugs can thus be studied with little training, yielding a numerical output that is easy to relate to behaviour. The manual assay, however, suffers two major disadvantages. First, it is very time consuming. Each measurement takes at least 30 s to perform, making it unsuitable for high-throughput assays. In addition, since it requires a human operator, it can be prone to errors in counting, especially at high thrashing rates (over 4 s-1 in a healthy, wild-type worm) with the added hazard of investigator repetitive strain. These difficulties, when set against the tremendous potential for drug/chemical discovery if C. elegans could be used for automated chemical and genetic screens, point to the urgent need for a simple, automated system of counting thrashes.
Current approaches to automating the thrashing assay follow two general strategies . The first is to emulate the human measurement using computer vision. Typically, the worm is distinguished from the background and its shape estimated. The body angles through which the worms pass are then determined, from which the frequency of thrashing can be measured. This approach provides a readout that can be compared directly with manually-derived values. Only two such analyses, designed specifically for the thrashing assay, have been described. In both cases, several parameters in addition to thrashing rate have been measured [12, 13] but the software for these analyses has not been published. Several tools for the analysis of nematode locomotion on agar, rather than in fluid, have been made available which could be applied to analyzing thrashing worms [14–20]. Although providing extra information additional to thrashing rate, this strategy is subject to several difficulties. For example, its accuracy depends on precise morphometry, which in turn depends upon accurately distinguishing the worm from its background (referred to as "segmentation" in the context of computer vision). These processes are usually highly sensitive to recording conditions and can fail under uneven illumination. Even after accurate morphometric data have been obtained, estimating thrashing frequency from the data presents further problems. The most obvious method, that of counting the peaks in a graph of angle against time, can be confounded by the presence of random fluctuations in the measured angle, and setting the threshold to distinguish real peaks from noise in different experimental trials can be difficult. The alternative method of using Fourier analysis to derive the strongest component in the frequency domain can fail at low frequencies, where the signal components are hard to distinguish from the DC signal.
A second approach replaces the manual assay with an alternative, less direct method of estimating thrashing frequency. For instance, Simonetta and Golombek  measured thrashing of several worms simultaneously by recording the interruption of an infrared beam. Although such indirect measures do have potential for automation and high-throughput screening, the output of such an assay is not easily related to manual methods, making the results difficult to validate and to interpret biologically.
Here we present a method of automatically measuring thrashes per minute, but without using morphometry or even segmentation of the worm from the background. In our approach, the covariance matrix of film frames of thrashing worms is used to measure the time interval between frames that are statistically similar.
After reduction of the background, the next step is to calculate the covariance matrix. The covariance matrix of the films after removal of the first Principal Component shows a diagonal band of high values, representing the variance of each frame, with similar, parallel bands of lower peak heights (Figure 1). These parallel bands represent frames with high covariance separated by frames with low covariance. The number of frames separating the peaks correspond to the interval between similar images and hence to the interval between similar worm conformations.
The third step in our algorithm consists of deriving the thrashing frequency from the covariance matrix. We compared two methods of automating the measurement of the interval between these peaks. First, we tried converting the covariance matrix into the frequency domain using the Discrete Fourier Transform. This gave accurate measurements of the peak interval at high thrashing rates, but at low rates the peaks corresponding to thrashes became hard to distinguish without human intervention. We therefore adopted the peakdet.m routine generously released into the public domain by Mr. Eli Billauer http://www.billauer.co.il/index.html in which frames separating peaks greater than 50% of the total range of data are counted for each point along the diagonal of the covariance matrix. The thrashing frequency is taken as the product of the median of these values and twice the film acquisition frequency. The median is preferred over the mean, as the former is less sensitive to the effect of outliers. This median is multiplied by twice the acquisition frequency because the strongest covariance is between worm conformations at the same phase of swimming, which represents the movement between two thrashes, as one thrash is counted as a single side-to-side movement. This method has proved robust at all thrashing rates up to about 300 s-1, this upper limit being presumably determined by the film acquisition frequency.
C. elegans were raised at 21°C under standard laboratory conditions on agar plates seeded with a lawn of E. coli (OP50) on which they feed. The following C. elegans strains were used: N2 wild-type (Bristol variety), as well as nicotinic acetylcholine receptor mutants unc-63(x26), unc-63(x37), lev-8, acr-16, lev-1, unc-29 and unc-38. All strains were handled according to standard procedures http://www.wormbook.org/chapters/www_strainmaintain/strainmaintain.html. Haemonchus contortus L3 larvae were kindly supplied by Dr. Adrian Wolstenholme of University of Bath.
Worms were synchronously grown to early adult stage and placed in individual wells of a 96-well microtiter plate containing 50 μl M9 with or without drug. After a 10 min exposure period to M9, thrashes were counted at 21°C for 30 s. A single thrash was defined as a complete change in the direction of bending at the mid body. Worms were either counted and filmed at the same time, or filmed and subsequently counted from the movies. Manual counting was performed independently by two trained experimenters. For automated analysis, each experiment was processed as a batch. In accordance with accepted practice, during manual thrash counts the data for a particular worm was dropped if the worm remained still for > 10 s, or if the worm was visibly damaged. In automated assays, all worms were included. Worms were filmed using an XLI 2 Mpixel camera attached to a Nikon SMZ 1000 dissecting microscope and the 640 × 320 pixel images acquired at 10 frames s-1 using XLI imaging software. Before filming, the image was magnified and positioned so that the circular well of the microtitre plate occupied the field of view. Movies were stored in the Microsoft "wmv" format and subsequently analysed using the Matlab software package running on a desktop PC running under Windows XP. To speed computation, images were reduced to 20% of their resolution.
To test the usefulness of our method in analyzing the effects of drugs on motility, we performed a thrashing analysis of the dose-dependence of the actions of the anthelmintic drug, levamisole, on wild-type (N2) worms, comparing counts obtained by a human observer with those obtained using our automated covariance method. Both approaches revealed a similar dose-dependent inhibition of thrashing frequency (Figure 2D).
Because the method makes no assumptions about the shape of the worms, it is adaptable for use with other nematode species. We repeated our measurement of levamisole effects using 3rd instar larvae of the parasitic nematode, Haemonchus contortus. The parasite's swimming behaviour at low rates often involves the animal completely coiling up on itself, which would represent an insurmountable difficulty for most, if not all, machine-vision approaches. The algorithm revealed a dose-dependent action of levamisole closely resembling that measured manually (figure 2D).
Our method of automating thrashing assays has a number of advantages over traditional machine-vision approaches. Avoiding the use of morphometry speeds computation. As implemented in our Matlab script, the method is capable of analyzing a previously recorded 30 s movie off-line in less than 30 s, and can therefore be applied to directly-acquired images without the need to store movies. This is an important consideration in developing high-throughput screens, as moving images place high demands on computer storage space. In addition, errors introduced by failures in accurately distinguishing the worm from its background or in abstracting morphometric parameters are avoided. Finally, because it makes no assumptions about the shape of the worms, it is robustly adaptable for use with other species, as shown here by our study on the parasitic worm, H. contortus.
We have implemented this novel method using films of single worms in individual wells of a 96-well plate so that its output with manual assays can be directly compared. Deployed in this way, it can only be applied to one worm at a time, as the presence of more than one worm in the field of view (unless it is significantly smaller) will make it difficult to derive an accurate measurement of thrashing frequency from the covariance matrix. However, adaptations of the same principle could be used to increase the number of worms that can be measured simultaneously. For example, an array of cameras could be used to acquire data from several wells simultaneously. Alternatively, if the worms can somehow be spatially restricted, for example, in plate wells, a large number of worms could be monitored simultaneously with a single camera if the images are split to cover each worm separately.
Here we present a method for automating an established swimming ("thrashing") assay widely used for measuring locomotor phenotypes of the model genetic organism, Caenorhabditis elegans. Measurements of the frequency of thrashing and their reliability compare well with manual counting over the entire range of thrashing rates likely to be encountered in studying C. elegans. Thus, our method of automating worm thrashing assays using covariance is robust, reliable and fast. Deployed in a fully automated system incorporating liquid-handling systems to deliver worms in suspension to microplates and computer-controlled positioning of the plate, this method should facilitate large-scale chemical and genetic screens for effects on motility.
Availability and requirements
Project name: Automated thrashing assay using covariance
Operating system: Platform independent
Programming language: Matlab script
Other requirements: Matlab, peakdet.m
Licence: GNU GPL
Any restrictions to use by non-acedemics: licence needed
The authors wish to acknowledge Dr Andrew Jones, Dr Adrian Wolstenholme and Dr Sandrine Fraboulet for their helpful contributions to experimental design and the preparation of the manuscript. We also acknowledge Dr Paul Fleming and Dr Randy Blakely of Vanderbilt University for helpful scientific exchanges.
- Brenner S: Nobel lecture. Nature's gift to science. Biosci Rep. 2003, 23 (5–6): 225-237. 10.1023/B:BIRE.0000019186.48208.f3.View ArticlePubMedGoogle Scholar
- Chalasani SH, Chronis N, Tsunozaki M, Gray JM, Ramot D, Goodman MB, Bargmann CI: Dissecting a circuit for olfactory behaviour in Caenorhabditis elegans. Nature. 2007, 450 (7166): 63-70. 10.1038/nature06292.View ArticlePubMedGoogle Scholar
- Jones AK, Buckingham SD, Sattelle DB: Chemistry-to-gene screens in Caenorhabditis elegans. Nat Rev Drug Discov. 2005, 4 (4): 321-330. 10.1038/nrd1692.View ArticlePubMedGoogle Scholar
- Jorgensen EM, Mango SE: The art and design of genetic screens: Caenorhabditis elegans. Nat Rev Genet. 2002, 3 (5): 356-369. 10.1038/nrg794.View ArticlePubMedGoogle Scholar
- Ruvinsky I, Ohler U, Burge CB, Ruvkun G: Detection of broadly expressed neuronal genes in C. elegans. Dev Biol. 2007, 302 (2): 617-626. 10.1016/j.ydbio.2006.09.014.View ArticlePubMedGoogle Scholar
- Genome sequence of the nematode C. elegans: a platform for investigating biology. Science. 1998, 282 (5396): 2012-2018. 10.1126/science.282.5396.2012.Google Scholar
- Fire A, Xu S, Montgomery MK, Kostas SA, Driver SE, Mello CC: Potent and specific genetic interference by double-stranded RNA in Caenorhabditis elegans. Nature. 1998, 391 (6669): 806-811. 10.1038/35888.View ArticlePubMedGoogle Scholar
- Kamath RS, Martinez-Campos M, Zipperlen P, Fraser AG, Ahringer J: Effectiveness of specific RNA-mediated interference through ingested double-stranded RNA in Caenorhabditis elegans. Genome Biol. 2001, 2 (1): RESEARCH0002.PubMed CentralPubMedGoogle Scholar
- Colley DG, LoVerde PT, Savioli L: Infectious disease. Medical helminthology in the 21st century. Science. 2001, 293 (5534): 1437-1438. 10.1126/science.1060733.View ArticlePubMedGoogle Scholar
- Eziefula AC, Brown M: Intestinal nematodes: disease burden, deworming and the potential importance of co-infection. Curr Opin Infect Dis. 2008, 21 (5): 516-522. 10.1097/QCO.0b013e32830f97fd.View ArticlePubMedGoogle Scholar
- Buckingham SD, Sattelle DB: Strategies for automated analysis of C. elegans locomotion. Invert Neurosci. 2008, 8 (3): 121-131. 10.1007/s10158-008-0077-3.View ArticlePubMedGoogle Scholar
- Restif C, Metaxas D: Tracking the swimming motions of C. elegans worms with applications in aging studies. Med Image Comput Comput Assist Interv Int Conf Med Image Comput Comput Assist Interv. 2008, 11 (Pt 1): 35-42.Google Scholar
- Tsechpenakis G, Bianchi L, Metaxas D, Driscoll M: A novel computational approach for simultaneous tracking and feature extraction of C. elegans populations in fluid environments. IEEE Trans Biomed Eng. 2008, 55 (5): 1539-1549. 10.1109/TBME.2008.918582.View ArticlePubMedGoogle Scholar
- Tsibidis GD, Tavernarakis N: Nemo: a computational tool for analyzing nematode locomotion. BMC Neurosci. 2007, 8: 86-10.1186/1471-2202-8-86.PubMed CentralView ArticlePubMedGoogle Scholar
- Ramot D, Johnson BE, Berry TL, Carnell L, Goodman MB: The Parallel Worm Tracker: a platform for measuring average speed and drug-induced paralysis in nematodes. PLoS ONE. 2008, 3 (5): e2208-10.1371/journal.pone.0002208.PubMed CentralView ArticlePubMedGoogle Scholar
- Cronin CJ, Mendel JE, Mukhtar S, Kim YM, Stirbl RC, Bruck J, Sternberg PW: An automated system for measuring parameters of nematode sinusoidal movement. BMC Genet. 2005, 6 (1): 5-10.1186/1471-2156-6-5.PubMed CentralView ArticlePubMedGoogle Scholar
- Geng W, Cosman P, Baek JH, Berry CC, Schafer WR: Quantitative classification and natural clustering of Caenorhabditis elegans behavioral phenotypes. Genetics. 2003, 165 (3): 1117-1126.PubMed CentralPubMedGoogle Scholar
- Geng W, Cosman P, Berry CC, Feng Z, Schafer WR: Automatic tracking, feature extraction and classification of C elegans phenotypes. IEEE Trans Biomed Eng. 2004, 51 (10): 1811-1820. 10.1109/TBME.2004.831532.View ArticlePubMedGoogle Scholar
- Cronin CJ, Feng Z, Schafer WR: Automated imaging of C. elegans behavior. Methods Mol Biol. 2006, 351: 241-251.PubMedGoogle Scholar
- Feng Z, Cronin CJ, Wittig JH, Sternberg PW, Schafer WR: An imaging system for standardized quantitative analysis of C. elegans behavior. BMC Bioinformatics. 2004, 5: 115-10.1186/1471-2105-5-115.PubMed CentralView ArticlePubMedGoogle Scholar
- Simonetta SH, Golombek DA: An automated tracking system for Caenorhabditis elegans locomotor behavior and circadian studies application. J Neurosci Methods. 2007, 161 (2): 273-280. 10.1016/j.jneumeth.2006.11.015.View ArticlePubMedGoogle Scholar
- Jolliffe IT: Principal Component Analysis. 2002, Springer, 2Google Scholar
- Krzanowski WJ: Principles of multivariate analysis: a user's perspective. 1988, Oxford University Press, Inc.Google Scholar
- Culetto E, Baylis HA, Richmond JE, Jones AK, Fleming JT, Squire MD, Lewis JA, Sattelle DB: The Caenorhabditis elegans unc-63 gene encodes a levamisole-sensitive nicotinic acetylcholine receptor a subunit. J Biol Chem. 2004, 279 (41): 42476-42483. 10.1074/jbc.M404370200.View ArticlePubMedGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.