{'fraction_non_alphanumeric': 0.022468354430379745, 'fraction_numerical': 0.010081374321880651, 'mean_word_length': 4.627321292292038, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automated Analysis of a Nematode Population-based Chemosensory Preference Assay

The nematode, Caenorhabditis elegans' compact nervous system of only 302 neurons underlies a diverse repertoire of behaviors. To facilitate the dissection of the neural circuits underlying these behaviors, the development of robust and reproducible behavioral assays is necessary. Previous C. elegans behavioral studies have used variations of a "drop test", a "chemotaxis assay", and a "retention assay" to investigate the response of C. elegans to soluble compounds. The method described in this article seeks to combine the complementary strengths of the three aforementioned assays. Briefly, a small circle in the middle of each assay plate is divided into four quadrants with the control and experimental solutions alternately placed. After the addition of the worms, the assay plates are loaded into a behavior chamber where microscope cameras record the worms' encounters with the treated regions. Automated video analysis is then performed and a preference index (PI) value for each video is generated. The video acquisition and automated analysis features of this method minimizes the experimenter's involvement and any associated errors. Furthermore, minute amounts of the experimental compound are used per assay and the behavior chamber's multi-camera setup increases experimental throughput. This method is particularly useful for conducting behavioral screens of genetic mutants and novel chemical compounds. However, this method is not appropriate for studying stimulus gradient navigation due to the close proximity of the control and experimental solution regions. It should also not be used when only a small population of worms is available. While suitable for assaying responses only to soluble compounds in its current form, this method can be easily modified to accommodate multimodal sensory interaction and optogenetic studies. This method can also be adapted to assay the chemosensory responses of other nematode species.


Introduction
Foraging animals must integrate inputs from multiple sensory modalities and select appropriate behavioral strategies in order to successfully navigate their environment. Understanding how external sensory inputs are received and transduced into neural information to guide action selection is a central goal in the field of neurobiology. The genetically tractable nematode, C. elegans, is an attractive model organism in which to study the neural mechanisms underlying sensory biology and multimodal integration. Although C. elegans has only 302 neurons, it can detect and discriminate between a wide variety of environmental stimuli including soluble compounds, volatile odorants, and ambient temperature 1,2,3,4,5,6,7 . The nematode C. elegans relies heavily on its chemosensory apparatus to localize food sources and to alert itself to potential threats. Thus, behavioral assays designed to screen the responses of wild-type and mutant C. elegans to chemical stimuli play a crucial role in dissecting the genetic, cellular, and neural mechanisms underlying C. elegans' remarkable sensory capabilities.
To assay the response to soluble compounds, three types of assays have been described -the drop test, the chemotaxis assay, and the retention assay. In the drop test, a small drop of the compound is placed at the tail of a moving worm and the worm's decision to reverse or move forward once the liquid reaches the anterior sensory apparatus is scored 4 . The drop test requires little experimental preparation and is useful when the sample size of worms is small, as in the case of laser-operated worms. However, as only one worm can be assayed at a time and the experimenter must be present throughout the duration of the assay, the drop test can be time consuming. The drop test is also vulnerable to variations in drop delivery between each worm within a sample, which may influence the overall results of the assay. Another limitation of the drop test is that it can only be used to assay the worm's response to aversive compounds as it is not possible to discriminate between an attractive or neutral effect of the compound from the worm's forward movement.
The chemotaxis assay for soluble compounds generally involves dividing an agar plate into four quadrants, with the experimental solution mixed into the agar of two opposing quadrants and the control solution mixed into the other two quadrants 8,9 . At the start of the assay, a drop of buffer containing worms is placed at the center of the plate and the number of worms in each quadrant is scored at different time points. The chemotaxis assay provides greater statistical power compared to the drop test as large numbers of worms are tested in each assay. However, one limitation of this method is that preparation of the chemotaxis assay plates requires large quantities of the experimental compound. This . In addition, the manual counting of worms throughout the assay is susceptible to errors and the perturbation of the plates during the counting process might affect the results.
Unlike the two aforementioned methods, the retention assay utilizes machine vision, which minimizes error during the scoring process and reduces experimenter's interference during the assay 11 . Computerized analysis of video recordings of worm behavior can also potentially reveal subtler behavioral dynamics that will be missed when scoring is only performed at a few discrete time points. In the retention assay, two solutions spots are added on opposite sides of a small circular bacterial food patch followed by the placement of a small number of worms in the middle of the food patch. The worms' behavior is then video recorded, analyzed, and a preference index value is calculated based on the total number of worm pixels in each solution region. Although the presence of an attractive food patch enables smaller populations of worms to be used in each assay, food has previously been shown to sensitize avoidance behaviors to soluble repellants 12 . Furthermore, worms exhibit a photophobic response to short-wavelength light and the use of microscope light sources that emit white light in the behavior recording setup might affect behavior 13 .
The purpose of the method discussed in this article is to record and analyze C. elegans' preference for soluble compounds using a populationbased assay. To this end, the current method integrates and improves upon aspects from all three of the previously discussed methods. It enables large populations of worms to be tested and requires only small amounts of the experimental solution to be used in each assay. In addition, the assay is conducted within a custom-built enclosed behavior chamber with infrared LED backlighting to minimize the effects of short-wavelength light on behavior. Each chamber can also be outfitted with multiple microscope cameras, which increases experimental throughput without compromising bench space. Finally, video analysis software outputs the preference index value for each video as well as an accompanying worm occupancy plot to visualize population behavior dynamics over time. The chamber setup and assay protocol can be further modified to study multimodal behavior responses such as the effect of odorants or temperature on chemosensory behaviors. This article describes the construction of the behavior chamber and the assay protocol. It also demonstrates the utility of this method in assaying the response of wild-type worms and chemosensory defective mutants to the known soluble repellant, copper ions 4 . Finally, the video analysis process using the provided software is detailed.

Behavior Chamber Assembly
NOTE: The behavior chamber consists of an approximately cube-shaped frame made of extruded aluminum bars, covered with opaque fabric covers, with a clear acrylic bottom and camera supports. Joints between the extruded aluminum bars forming the behavior chamber are all perpendicular and are secured using "L"-shaped corner brackets (1-inch wide with 1-inch legs) that fasten one corner bracket leg to each bar with screws and slide-in T-nuts. Each joint is secured with either one or two corner brackets as described below. The fabric covers over the chamber are attached to the aluminum frame bars with the same screws and slide-in T-nuts but through grommets in the corners of the fabric. Screws are properly inserted into the countersunk side of the slide-in T-nuts, not into the side with the protruding lip. When attaching a screw/Tnut fastener assembly to an aluminum bar, slide the T-nut into the channel on the appropriate face of the bar with the head of the screw sticking out of the slot.

Prepare fabric covers.
1. Use scissors to cut five pieces of the opaque polyester fabric to cover the top and four sides of the chamber. 1. Cut one square 14 x 14 inch 2 sheet of fabric for the top of the chamber. Cut four rectangular 11 x 14 inch 2 sheets of fabric for the sides of chamber.
2. Install grommets at the corners of the fabric sheets. 1. Mark a reference line 0.5 inch from each edge of all five polyester fabric sheets using a pencil and straightedge. 2. For the four rectangular sheets, use grommet pliers to insert grommets centered where the pencil lines intersect at each corner (that is, 4 grommets per sheet). 3. For the square sheet, insert two grommets along each edge with each grommet centered on the pencil line and positioned 1.5inches from the end of each of the four pencil lines (that is, 8 grommets total, two near each corner).
3. Insert a screw into each grommet hole and loosely attach a T-nut to each.

Fabricate camera mount bars.
1. Use a band saw or equivalent to cut one 2 inch long piece of aluminum extrusion bar for each camera, ensuring the cut end of the bar is perpendicular to the bar length to ease later assembly. 2. Use a drill press with a 0.25 inch diameter drill bit to drill a hole through the center webs of each camera mount bar, 0.75 inches from one end such that the hole is perpendicular to the top and bottom faces and passes through the centerline of the bar. Optionally, drill the hole using a handheld electric drill with a 0.25 inch drill bit, but ensure that the hole is perpendicular to the top and bottom faces of the bar.
1. Insert a screw through the hole in each corner bracket leg, inserting the screw from the inside angle side. Loosely thread a T-nut onto each screw.
4. Prepare the camera mount assembly ( Figure 1B, layer 2). NOTE: The camera mount assembly is an "H"-shaped assembly that supports the three camera holsters. 1. Attach the camera mount bars to the center bar of the camera mount assembly.
1. Lay out the three camera mount bars fabricated in step 1.2 with the drilled holes oriented vertically. Slip two corner brackets onto the sides of each mount bar at the end furthest from the drilled hole. 2. Position the corner brackets with the brackets' legs flush with the end of the bar and tighten the screws to secure in place. This forms a "T" shape with the drilled hole at the bottom of the "T". 3. Lay a 1 foot aluminum extrusion on the work surface. Slip the T-nuts of one camera mount bar assembly (from the previous step) onto one side of the 1-foot bar. Center the mount bar along the 1 foot bar's length and tighten the screws to secure in place. Slip the other two mount bars onto the opposite side of the 1 foot bar. 4. Position the two bars equidistant from the middle of the 1-foot bar, with their inner corner brackets approximately 2.5 inches apart. Slip corner brackets onto the sides of the 1-foot bar, two at each end of the bar. Position the corner brackets with the brackets' legs flush with the ends of the bar and tighten the screws to secure in place.
2. Attach the end bars to the center bar. 1. Slip two 1-foot aluminum extrusions onto the T-nuts at each end of the assembly from the previous step forming an "H" shape. Center each end bar on the center bar and secure by tightening the four screws. 2. Slip four corner brackets onto the top of the two end bars added in the previous step, one at each end of each bar. Position the corner brackets with the brackets' legs flush with the ends of the bars and tighten the screws to secure in place.
3. Attach camera stands and holsters to the camera mount assembly. 1. For each of the three microscope camera stands, remove the camera holster by loosening the thumbscrew and sliding off the stand rod. 2. For each camera mount bar (now secured to the center bar of the "H"), place one washer onto a round-head screw, slip the screw up through the drilled hole in the camera mount bar and place another washer down over the screw. Thread the tapped hole of the camera stand rod down onto the screw, tightening securely against the camera mount bar. 3. Repeat steps 14.3.2 for the other two camera mount bars. 4. Slip a camera holster onto each camera stand rod with the wider opening oriented toward the camera mount bar and screw.
Temporarily secure the holster to the camera stand rod with the holster's thumbscrew. NOTE: The final operating position will be set in section 2.
5. Assemble the behavior chamber frame ( Figure 1A). NOTE: For ease of construction, assemble the frame upside down, beginning with the "top" of the chamber's frame on the work surface ( Figure 1B, layer 1) and working upward toward the "feet" of the frame (Figure 1B, layer 3). 6. Slide the T-nuts of the four rectangular polyester sheets down into the channels on the upright extrusion bars to cover the sides of the chamber and tighten the fasteners to secure in place. 7. Select one side to be a door for accessing the interior of the chamber and remove the two screws and T-nuts at the bottom layer of the chamber. NOTE: When the frame is turned upright, the bottom of this cover will hang loose at the bottom and can be lifted to access the chamber's interior. 8. Place a plastic cap on the top end of each corner member to serve as feet for the completed frame. Turn the frame right-side-up. Insert two panel holders per side inside the frame's base layer and twist to secure them in place ( Figure 1B, layer 3). Place a 12 x 12 inch 2 piece of clear acrylic on top of the panel holders to provide a stage for assay plates (Figure 1B, layer 3).
2. Place a strip of double-sided tape on either side of a plate-alignment template. Ensure that the tape overlaps with the plate perimeter circle but does not occlude the recording region of interest at the center of the template. 3. Align the perimeter of the assay plate with the circle on the plate-alignment template and press down until the template adheres to the bottom of the plate. Align the assay plate template number markers with the solution-placement template markers on the dissecting microscope. 4. Use a P2 pipette and plastic tip to place 1 µL of the M13 buffer each in quadrants 1 and 4 (Figure 2A). Use a new tip to place 1 µL of 10 mM CuCl 2 solution each in quadrants 2 and 3 (Figure 2A). 5. Repeat steps 4.8. 2-4.8.4 for the other two assay plates. 9. Once the solution drops have been completely absorbed into the agar, use a glass Pasteur pipette to transfer washed worms from each microcentrifuge tube to the corresponding assay plate. 10. Place a drop of worms each on the area above and below the circular treated region. Fold a tissue four times and use the blunt edge to absorb excess wash buffer on all assay plates. 11. Immediately arrange the three assay plates under the microscope cameras in the behavior chamber by aligning the numbers at the template corners. Wait for 2-3 min to allow the worms to acclimate to the assay plates. NOTE: Ensure that the behavior chamber door flap is closed prior to initiating video recording in the next step. 12. Click on the 'Time-Lapsed Video' recording icon on the left side of the camera feed and enter '10' min for duration and '1' s for interval to record a 10 min video at 1 frame per second. Click on 'Start' to start video recording. After the videos have been recorded and saved, remove the assay plates from the chamber. 13. Repeat steps 4.7-4.12 for the next round of assay plates. Acquire at least six replicates or two rounds of recording for each treatment or genotype.

Reagent Preparation
Copyright © 2017 Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License July 2017 | 125 | e55963 | Page 6 of 9 NOTE: For each video frame, the preference_index function counts the number of worm pixels in each ROI and calculates the percentage of worm pixels out of the total number of ROI pixels. The function then generates a preference index value for each video frame using the formula: NOTE: Once the program has analyzed all the frames in the video, an average preference index value is generated for the video. A worm occupancy plot with the video's preference index printed at the top as well as a csv datasheet containing worm pixel, percentage worm occupancy values, and the preference index for each video frame will be saved to the designated folder once the program has finished running. Figure 3A shows the preference index values obtained for different genotype and treatment pairings. A preference index value of 1 indicates strong attraction to the solution placed in the experimental ROI while a preference index value of -1 indicates strong repulsion. A preference index of 0.02 was obtained when the M13 buffer solution was placed in both the control and experimental ROIs, demonstrating that there is no spatial bias towards either ROI. N2 worms strongly avoided the copper ions resulting in a preference index of -0.67, which corroborates previous findings that copper ions are a strong repellant (Supplementary Movie 1) 4 . osm-3 mutants, which lacks proper formation of the distal segments of sensory cilia, showed a significantly decreased avoidance of copper ions (PI = -0.19) 15 . ocr-2 mutants, which are defective in many ASHmediated nociceptive responses including copper avoidance, also exhibit significantly decreased avoidance and even some mild attraction to copper ions (PI = 0.19) (Supplementary Movie 2) 16 . Figure 3B shows representative worm occupancy plots, which indicate the density of worms in the control versus the experimental ROIs over time in each video. The darker the color of the plotting area, the greater the number of worm pixels in the ROI. The occupancy plot for N2 worms treated with the M13 buffer control shows that the number of worms in both ROIs remains similar throughout the assay. However, the occupancy plot for N2 worms treated with copper ions indicates that the worms strongly and consistently avoid the experimental ROI throughout the assay.

Discussion
A critical step in the protocol is ensuring that the assay plates have a consistent level of dryness across different experimental days. Different dryness levels will result in different diffusion rates of the solution into the agar and consequently, variations in behavioral outcome. Thus, assay plates should always be made fresh on the afternoon before experiments. The number of worms tested per assay should also be regulated for ease of comparison between treatments. For reference, a wild-type worm lays 4-10 eggs/h on average yielding >360 worms per assay if the worm synchronization protocol above is followed 17 . If certain mutant strains are egg-laying defective, pick more gravid adult worms for egg-laying to reach the target number of progeny. Another important step in the protocol is to handle worms gently during the washing process and worm placement. Worms are sensitive to mechanical stimuli, which elicit stress responses such as reversals and egg-laying inhibition 18 . Furthermore, care should be taken to define the ROI accurately and to determine the optimal thresholding constant value for specific lighting conditions before proceeding with the video analysis. It is also recommended that the calibration and thresholding processes be repeated if a lengthy period of time has elapsed since the last experiment was run.
A limitation of this method is that it is not suitable for assaying small worm populations. However, if the appropriate controls to determine the influence of the presence of food on the sensory behavior are performed, then utilizing food to restrict the worms' spatial exploratory location as in the retention assay is also possible with this setup. In addition, this method is not intended for studying stimulus gradient navigation due to the close proximity and small amounts of the control and experimental solution drops used.
In the future, programming software that enables multi-worm tracking and single-worm feature extraction can be integrated into this system 19,20 .
Recording subtle behavior parameters of single worm behavior such as reversal speeds and amplitude of body bends will provide a more detailed picture of an individual worm's chemosensory behavior in the context of a population-based assay. The assay can also be modified to study habituation by boring holes through the ROI using syringe needles with the appropriate gauge size and filling the holes with agar infused with the experimental compound or control buffer. This will ensure a more consistent surface concentration of the compound over a longer period of recording time as is necessary during habituation studies. Another potential application of this method is to conduct comparative behavior studies across different nematode species. In addition, the behavior chamber can be modified in multiple ways to study behavioral responses to multimodal stimuli. For optogenetic applications, high-intensity LED arrays can be attached next to the camera mount to selectively activate neurons of interest during the assay. Heating elements, cooling systems, and temperature sensors can also be added to the setup to study the effects of temperature on sensory behaviors. Furthermore, odor delivery systems can be installed inside the chamber to investigate interactions between odorsensory and chemosensory modalities.

Disclosures
The authors have nothing to disclose.