We performed several analyses to evaluate tracker accuracy. First, we generated a ‘gold standard’ set of approximately 500 worms that were manually identified and marked. Using this training set (which reflects the presumably optimal human-eye tracker), we could estimate the precision of our segmentation and worm identification process. Specifically, we calculated three well-known parameters in the field of object identification, namely Precision, Recall and Fscore, all as a function of different training sizes. These parameters, provided in Fig. 2b, are defined as follows:
In addition, we assessed the tracker performance when disabling the machine learning and the Kalman-type predictor. We find that enabling these features significantly improves animal segmentation and tracking (Fig. 2c and Additional file 6: Figure S1 and Additional file 7: Figure S2). In particular, these features are important even when analyzing movies that initially seem to be ‘easy-to-analyze’ with high contrast between animals and background (see analyses in Additional file 7: Figure S2 and Additional file 8: Movie S5, Additional file 9: Movie S6, Additional file 10: Movie S7).
To estimate the precision by which our system correctly resolves worms after collision, we have taken a similar approach as described above to evaluate tracker accuracy. We first defined collisions as events in which worms have come to a close proximity (less than 15 pixels which correspond to approximately 0.4 mm in our setup), and manually matched worm identity before and after the collision event. This is to be used as our ‘gold standard’ measure. We then ran our tracker in two modes, with and without the predictor. The results of the accuracy of predicting the correct tracks following collisions are summarized in Additional file 6: Figure S1b. As evident, applying the predictor significantly improved detection of worms after collision as only approximately 2% of the cases were not resolved (Resolved 0), whereas without implementing our predictor, 46% of the collisions were not resolved. Furthermore, in 44% of the collision cases, one worm was correctly resolved (as opposed to 16% without the predictor) and in 55% of the cases both worms were correctly resolved (as opposed to 38% without the predictor).
To get a large synchronized population of young adult animals (N2, WT strain), we bleached gravid worms and plated approximately 1000 eggs on a 90-mm standard NGM plate pre-seeded with 500 μL E. coli OP 50 culture. These worms were assayed 3 days later when they reached young adulthood (YA). Before the experiment, the YA worms were rinsed off the growth plates and washed three times in chemotaxis buffer (1 mM CaCl2, 1 mM MgSO4, 5 mM K3O4P, pH 6.0). Chemotaxis assays were performed on Chemotaxis plates, which include the same ingredients as the chemotaxis buffer with the addition of 2% agar. Importantly, worms were grown at 20 °C and behavioral assays were also performed in a temperature-controlled room at 20 °C.
We marked an equilateral triangle on the plate’s lid (90-mm round plates) with an edge length of 3 cm. We used agar chunks soaked (15 μL) with the chemoattractants of choice and placed them on two of the triangle vertices (Fig. 3a). On the third vertex, we placed a 5-μL Chemotaxis Buffer drop of washed worms (we first estimated worms’ concentration in the pellet following the last wash to plate a desired number of worms). Chemotaxis assays were then imaged using a Photometrics Micropublisher 5 MB camera, using Olympus SZ61 binocular equipped with a 0.5× lens. To acquire movies we used our own in-house imaging software that is freely available with this MAT and which uses MATLAB’s image acquisition toolbox. Movies were acquired at a rate of one frame per second.
We quantified worm’s directness towards the chemoattractant at time t by obtaining the projection of the worm’s velocity (v(t)) on the vector that connects the worm and the chemoattractant (d(t), normalized). That is, for each step of each worm, we calculated the following dot product:
In the integration experiments we used only projections of the worms that were on their way towards the chemoattractant for the first time (and ignored revisiting worms).
To study the role of pirouettes during chemotaxis, we used the same notations as described previously by Shimomura et al. [12]; we defined bearing (B) as the angle between the worm’s velocity vector and the spatial vector between the worm’s position and the peak of the chemoattractant. We used BBefore and BAfter as the bearing immediately before and immediately after a pirouette event, respectively, and ΔB as BBefore – BAfter.
We defined sharp turns as succeeding movement vectors with an angle of > 100° between them, and used the definition suggested by Shimomura et al. [12] for a pirouette, which is a bout of sharp turns. Following the observation that run distribution can be described by the sum of two exponents [12], we chose the minimal size of a pirouette to be Tcrit = 5 sec. Any run shorter than this will be considered to be a component of a pirouette. We defined Bbefore as the average bearing for three consecutive steps prior to the pirouette, and similarly we defined Bafter to be the average bearing of three consecutive steps after the pirouette.
We first looked for two chemoattractants that attract the worm in the same manner. To do so, we performed an array of chemotaxis experiments with varying chemicals and concentrations and examined motility parameters such as chemotaxis index dynamics, probability for a pirouette, and lengths of runs, etc. We chose two chemoattractants that showed the same effect on the worm’s chemotaxis: 0.75 × 10−5 DA, and 0.5 × 10−4 IAA. We then created a mixture of the two chemicals such that each chemical was diluted twice in the final solution, and performed the chemotaxis assay with it. We compared chemotaxis dynamics, directness, and bearing between the single chemoattractant experiments and the mixture.
To study the significance of directional changes following a pirouette in light of our findings, we simulated worm courses towards an attractant using three different reorientation strategies, namely (1) choosing the directional change (ΔB) uniformly between –180° and +180°; (2) uniformly sampling from the directional changes observed in our experiments regardless of the specific angle in which the worm entered the pirouette; and (3) we first divided the directional changes observed in our experiments into two groups – one group contained directional changes made by worms which were initially directed towards the target (–90° < BBefore < +90°), and the other contained directional changes made by off-course worms (+90° < BBefore < 270°). We next chose the directional change based on the angle of the ‘simulated worm’ just prior to the pirouette (e.g., if the worm was initially directed towards the target then the directional change was sampled from the directional change group of the directed worms). Interestingly, worms simulated using the third strategy reached their target significantly faster than if simulated using the first two strategies (Fig. 5c).
For these simulations, we used a simple model considering a minimal number of parameters, namely worm start point, chemoattractant position (target point), and probabilities for a pirouette of directed and undirected worms. The first two parameters, the start and target coordinates, were extracted directly from the chemotaxis experiments. The probability for a pirouette of directed worms was set to 0.03 per second, reflecting two pirouettes per minute, and the probability for a pirouette of undirected worms was set to be five times more probable (0.15). All the angular differences before and after a pirouette were directly drawn from our experimental data based on directed and undirected worm behavior. For this, we extracted from the experimental data all pirouette instances and calculated angular differences before and after a pirouette and constructed a distribution curve. For simulations, we drew angular angle differences based on these distributions. Importantly, the simulation results were not sensitive to small changes in the parameters set.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
 Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.