This article describes a simple, low-cost method of recording the lawn avoidance behavior of Caenorhabditis elegans, using readily available items such as a smartphone and a light emitting diode (LED) light box. We also provide a Python script to process the video file into a format more amenable for counting.
When exposed to toxic or pathogenic bacteria, the nematode Caenorhabditis elegans displays a learned lawn avoidance behavior, in which the worms gradually leave their food source and prefer to remain outside the bacterial lawn. The assay is an easy way to test the worms’ ability to sense external or internal cues to properly respond to harmful conditions. Though a simple assay, counting is time consuming, particularly with multiple samples, and assay durations that span overnight are inconvenient for researchers. An imaging system that can image many plates over a long period is useful but costly. Here, we describe a smartphone-based imaging method to record lawn avoidance in C. elegans. The method requires only a smartphone and a light emitting diode (LED) light box, to serve as a transmitted light source. Using free time-lapse camera applications, each phone can image up to six plates, with sufficient sharpness and contrast to manually count worms outside the lawn. The resulting movies are processed into 10 s audio video interleave (AVI) files for every hourly time point, then cropped to show each single plate to make them more amenable for counting. This method is a cost-effective way for those looking to examine avoidance defects and can potentially be extended to other C. elegans assays.
Among the many advantages of studying C. elegans, its simple nervous system offers the opportunity to study how changes at the genetic and cellular level impact network function and behavioral output. Despite having a limited number of neurons, C. elegans display a wide range of complex behaviors. One of these is lawn avoidance, in which the bacterivorous nematode responds to a harmful food source by leaving the bacterial lawn. C. elegans avoid lawns of pathogenic bacteria1,2,3, lawns of bacteria that produce toxins or are spiked with toxins1,4, and even RNAi-expressing bacteria whose target gene knockdown is detrimental to the health of the worms4,5. Studies have shown that worms respond to external cues such as metabolites produced by the pathogenic bacteria1,6, or internal cues that indicate that the food is making them sick4,7. These cues are processed through conserved signaling pathways, such as the mitogen-activated protein kinase (MAPK) pathway and the transforming growth factor beta (TGFβ) pathway, and require communication between the gut and the nervous system4,6,7,8.
Although the assay is simple, the learned behavior develops over many hours, often overnight. While there are mutants that are incapable of leaving, in which case scoring avoidance at just one time point is sufficient to demonstrate the defect, many mutants do leave eventually but are slower to come out. For these, the movement of the worms needs to be tracked every few hours, which can be difficult to do overnight. Counting itself also takes time, creating a lag time between the plates, and thus limits the number of plates that can be tested at the same time. Using an imaging setup to record many plates simultaneously for the whole duration of the assay would be very useful, but the cost of setup can be prohibitive, depending on the funding situation of the research lab.
To address this, we devised a very simple method that uses smartphones to record avoidance assays. Each phone can record time-lapse videos of up to six assay plates. To provide transmitted light, we use a light emitting diode (LED) light box that can be easily purchased online. Assay plates are placed on an elevated platform, supported by hollow rectangular tunnels, that focus the incoming light, creating contrast. We also provide a Python script that converts the videos into audio video interleave (AVI) files showing 10 s clips of each hourly time point. The videos are then cropped to individual plates and saved in separate files to use for manual counting.
The method provides a low-cost procedure that is also extremely easy to use, using items that are readily available to most people. Here, we describe the method using the well-established lawn avoidance assay against the human pathogen Pseudomonas aeruginosa (PA14), whose protocol has been previously described2,9. Finally, we also review the considerations and limitations of the imaging method for those that want to apply it to other C. elegans behavior experiments.
1. Setting up the imaging apparatus (Figure 1A-E)
2. Preparation of buffers and media
3. Preparation of high-peptone NGM plates (for PA14)
NOTE: These plates should be made at least 5 days before the assay.
4. Synchronizing worms by bleaching
NOTE: Start this step 3 days before the assay.
5. Preparation of bacteria ( Pseudomonas aeruginosa, PA14)
NOTE: Start this step 4 days before the assay.
6. Preparing to record
NOTE: Do this right before the assay.
7. Lawn avoidance assay
8. Processing of video using Python script
9. Manual counting using ImageJ
The first video produced by the script is 1 h from the start of the assay. The video for 0 h is not saved, as worms start the assay inside the lawn, so the occupancy rate is always 100%.
Wild-type N2 worms are compared against npr-1 mutants, whose lawn avoidance defect is well-established in the literature6,10 (Figure 3A–E). As can be seen in the wild type, worms progressively leave the bacterial lawn and stay outside (Figure 3A,B). Results are plotted in a graph to show the change in occupancy rate over time (Figure 3B). Worms outside are clearly seen in the video, but worms inside the thick bacterial lawn are harder to distinguish (Figure 3D,E). However, because there are exactly 30 worms in each plate, the number of worms still inside the lawn can be calculated by subtracting the counted worms from the total of 30.
Although this assumption could potentially introduce counting errors, especially if some worms end up near the walls of the plate where it may be difficult to see, this was not a significant concern. When counts made directly from the plates were compared against counts from imaged worms, counts from imaged worms turned out to be highly accurate. When three trials for each strain were averaged together, the N2 and npr-1 strains yielded 99.5% and 96.2% accuracy, respectively (Figure 3B,C). Of note, there was a slightly higher tendency to miss a few npr-1 worms due to its high motility11, whereas wild-type worms tended to stay near the lawn.
Figure 1: Imaging apparatus. (A) A schematic view of the imaging setup. (B) Imaging apparatus set up inside an incubator set to 25 °C for PA14 lawn avoidance assays. (C) Comparison of worms imaged with or without the tunnel. (D) A close-up view of how the plates are mounted on top of the tunnels. (E) The height of the phone is adjusted so that up to six 35 mm plates can fit into the screen. Please click here to view a larger version of this figure.
Figure 2: Determining plate coordinates using ImageJ. (A) In Analyze > Set Measurements, the Display label box must be checked (red dotted box). (B) A single frame extracted from the video is used to plot coordinates that are used for cropping. Points made using the Multi-point tool are in yellow. These serve as the upper left corners of the final cropped videos (marked as a dotted white box). Please click here to view a larger version of this figure.
Figure 3: Representative image and assay results. (A) After several hours of PA14 exposure, most worms leave the lawn and stay outside. (B) Representative results of the lawn avoidance assay. The movement of worms is followed every hour to determine the occupancy rate. The open squares at the 20 h time point indicate the average value determined from directly counting from plates from C. (C) To assess the accuracy of the counts made through the video, the worms were also counted directly at the end of the assay and compared against the values obtained through video imaging. Values indicate the worm numbers inside/outside the lawn. (D,E) L4 worms are clearly seen outside the bacterial lawn (black arrowhead), whereas worms inside are harder to see (white arrowhead). Worms that are overlapped in one frame can usually be distinguished apart in another frame from the same movie (black outline arrowhead). The number on the bottom right indicates the frame number out of the total frames of the 10 s video clip (30 frame/s). Please click here to view a larger version of this figure.
Imaging animal behavior, rather than relying on direct observation, is not only convenient but also has the advantage of leaving visual documentation. This allows for blind analysis by an objective third person, or could even be used for automated analysis using image recognition techniques. Despite the advantages, the standard equipment usually offered is high in cost, so one is committed to the setup once purchased.
Using smartphones to collect video recordings of simple C. elegans behavior offers several advantages. It requires minimal familiarity with tech knowledge and is extremely easy to set up, using items that can be procured easily and cheaply. Another advantage is the portability of a smartphone-it can fit in small spaces, and since it has its own storage, it does not need to be connected back to a computer. This allows the setup to be placed anywhere, even when space is extremely limited. Moving the recorded video files to the computer is convenient-the files are not that big since they are encoded in a compressed MPEG-4 format. Moving files is especially convenient when wireless options of file transfer are available.
Because the worms are imaged without any magnification, the worms captured in the videos consist of only a few pixels. L4 worms are just big enough to be captured without magnification, but the small pixel size limits its use for high-quality image recognition and movement tracking. Using the zoom lens offered by more recent models or attaching a zoom lens adaptor may help obtain more detailed images, although we have not tried this ourselves. However, this would also reduce the field of view and the number of plates that can be imaged simultaneously.
To make counting easier, the videos are cropped to show individual plates, and trimmed to 10 s videos corresponding to every hour of the assay. This is also important as converting the videos into AVI format significantly increases the file size, and cropping and trimming the videos ensure that the file sizes are more manageable. The cropped AVI files could also potentially be used to count the worms automatically with an image recognition algorithm. For the wild-type strain, we found that a crude form of automated counting is possible in ImageJ, using simple thresholding. However, when mutants with a smaller body size are used, automated counts produce more errors.
There have been many efforts to image worms and automate analyses. Traditionally, worms were recorded through a camera attached to a dissecting microscope, which usually only allows the imaging of a few worms at once due to its limited field of view. The need to image more worms simultaneously for higher throughput analyses pushed researchers to develop creative imaging approaches. One way was to use modified flatbed scanners to image lifespan assays, such as WormScan or the Lifespan Machine12,13. A high-resolution scanner can image worms so that moving live worms can be distinguished from unmoving dead worms.
For tracking worm movements at a higher fps rate, a camera is attached to a lens, and worms are imaged without a microscope14,15. Churgin et al., who developed WorMotel14, a method for long term imaging of individual worms grown in a polydimethylsiloxane (PDMS) multi-well plate, provide detailed explanations on factors to consider when choosing the right camera and lens16. This method also has the added advantage of being relatively modest in cost.
Capturing worms without a microscope inevitably results in images that lack the resolution for detailed analysis on the locomotion or gait of worms. To remedy this, Barlow et al. employed a strategy of using six cameras arranged in a three by two array to capture a single 96-well plate17. Each camera is set up to image only four x four wells of the 96-well plate, resulting in a much higher size and resolution of the imaged worms.
Because C. elegans has a clear body, lighting also has to be adjusted to provide contrast from the background. Our method used illumination from a flat LED light box, passed through a narrow tunnel to focus the light. The dimensions were determined by the size of the plate imaged; the 5.5 cm width fit the 35 mm plate used for the avoidance assay. To image a larger area, the tunnel will have to be wider, but we found that the height also needs to be increased as well to obtain the same focusing effect. The downside is that, with higher tunnels, more of the walls can be seen through the plate, obstructing the view at the edge of the plate. Another strategy that could be employed is to use LED string lights arranged in a circular ring (LED ring). The light, coming from many directions, scatters on the surface of the worm's body, creating light worms against a dark background14,16,18. This could work not only for bigger plates, but for imaging in smaller spaces that cannot fit a LED light box.
With many available imaging strategies developed by the worm community, researchers may want to try out a few options to find the right one that fits their need. The imaging method described here is cheap and approachable enough that it can easily be used in undergraduate classrooms, or as a temporary solution before investing in a long-term setup.
The authors have nothing to disclose.
We thank Deok Joong Lee for critical reading of the manuscript and testing the Python code. This research was sponsored by the National Research Foundation of Korea 2017R1A5A2015369 (K.-h.Y.) and 2019R1C1C1008708 (K.-h.Y.).
35 mm Petri dish | SPL | #10035 | |
Bacto agar | BD | #214010 | |
Bacto Peptone | BD | #211677 | |
CaCl2 | DAEJUNG | 2507-1400 | |
Cholesterol | BioBasic | CD0122 | |
Dipotassium hydrogen phosphate (K2HPO4) | JUNSEI | 84120-0350 | |
Glycerol | BioBasic | GB0232 | |
King B Broth | MB cell | MB-K0827 | |
LED light box multi-pad | Artmate | N/A | This is a USB powered, LED light pad for tracing and drawing purposes. Artmate is a Korean brand, but searching for "LED light box for tracing" in any search engine should yield numerous options from other brands. Overall dimension is around 9" x 12" (A4 size). For example, from amazon US: https://www.amazon.com/LITENERGY-Ultra-Thin-Adjustable-Streaming-Stenciling/dp/B07H7FLJX1/ref=sr_1_5?crid=YMYU0VYY226R&keywords= LED%2Blight%2Bbox&qid=1674183224&sprefix =led%2Blight%2Bbo%2Caps%2C270&sr=8-5&th=1 |
MgSO4 | DAEJUNG | 5514-4400 | |
Plastic paper sleeve (clear) | Smead | #85753 | Any clear plastic sheet with a bit of stiffness can be used as stage. For example, from Amazon US: https://www.amazon.com/Smead-Organized-Translucent-Project-85753/dp/B07HJTRCT7/ref=psdc_1069554_t3_B09J48GXQ 8 |
Potassium dihydrogen phosphate (KH2PO4) | JUNSEI | 84185-0350 | |
Power strip | To accommodate 3 phones and one LED box, you need at least 4 outlets. | ||
Smartphone | N/A | N/A | Minimum requirement: 12MP wide camera, 1080p HD video recording at 30fps |
Sodium chloride(NaCl) | DAEJUNG | #7548-4100 | |
Sodium phosphate dibasic anhydrous (Na2HPO4) | YAKURI | #31727 |