Extended Data Fig. 2: Further analysis of neural circuit dynamics in turning circuit.
From: Neural sequences underlying directed turning in Caenorhabditis elegans

a, Reorientations are composed of a period of backwards velocity (a reversal), shown in red; then a high-angle turn as the animal moves forward, shown in purple; then the forward run, shown in blue. b, Dorsal counterparts of the neurons shown in Fig. 2b, showing neuron activity across reorientations. Red shading shows reversal; black dashed line is at reversal end. Z-scored activity is aligned to head curvature, data are separated into reversals with dorsal vs ventral postreversal turns. Further alignment description found in Fig. 2b and Methods. n = 115–140 dorsal turn and 415–524 ventral turn reversals. Two-sided Wilcoxon rank-sum test with Bonferroni correction, comparing activity 5 s (one head swing) before or after the reversal end (from left to right, p = 0.001, p < 0.0001, p < 0.0001). Data are mean ± 95% CI. c, Average SAAV activity aligned to reversal ends during long and short reorientations with ventral postreversal turns. Red shading shows reversal; black dashed line is at reversal end. Z-scored activity is aligned to head curvature. Data are split by reversal length. SAAV activity is higher in longer reversals (>9 s), reflecting that it ramped to a higher activity level during these longer reversals. n = 462 reversals. Two-sided Wilcoxon rank-sum test (both p < 0.0001), comparing 5 s (one head swing) before or after the reversal end. Data are mean ± 95% CI. d, Approach used for decoding of upcoming turn direction. Aligned head curvature and SAAV activity (as in Fig. 2b) were taken from all reversals 12 frames or longer (~1.5 head swings). Time segments of activity and behavior of length 4 (that is, 4 frames, which is 2.4 s) were then extracted from these reversals. These segments were then used to validate, train, and test recurrent neural networks (RNNs) with fivefold cross-validation (more information can be found in Methods) to predict the upcoming postreversal turn direction. We then compared the decoding accuracy of an RNN trained on behavior and SAAV activity to that of an RNN trained on behavior alone. See Methods for additional details. e, Order in which each neuron reaches its peak activity across all recordings with these five neuron classes captured (SAAV, RMDV, SMDV, RIV, and SMBV). To determine the activity order, the time at which each neuron’s activity is highest during the transition between reversal to turn forward was quantified (here we examined all neuron activity from 1.8 s before the reversal end to 7.2 s after the reversal end). Based on these times, the order in which the neurons were most active in that reorientation was assigned (first, second, etc.). n = 190 reorientations. f, Neuron activity as animals reverse away from octanol barrier is shown in orange, specifically showing reversals followed by a ventral turn that start on octanol and end on NGM agar (and therefore navigate the animals away from the odor). The gray line shows neuron activity during spontaneous reverse movement followed by a ventral turn. Black dashed line shows reversal end; reversals are shaded in red, as in Fig. 2b. Data are mean ± 95% CI. RMDV n = 36 octanol reversals, 488 spontaneous. SMDV n = 49 octanol reversals, 555 spontaneous. RIV n = 45 octanol reversals, 550 spontaneous. g, Neuron activity during head swings where the animal was moving forward onto the octanol gradient, as in Fig. 2e,f, showing the dorsal counterpart neuron activity. Neural activity during these head swings was compared to activity during similar spontaneous head swings on baseline agar. Dorsal and ventral octanol encounters are defined by the direction of the first head swing that the animal makes when they encounter the octanol boundary (see diagram at e). Neuron activity is aligned to the head swings, as described in Fig. 2a. Data are mean ± 95% CI. None of the comparisons is significant using the Wilcoxon rank-sum test with Bonferroni correction. h, Fraction of animals that start a reversal in a 10 s interval. ‘Diacetyl’ examines whether animals start a reversal in the 10 s following a diacetyl encounter. ‘Spontaneous’ examines if animals reverse in a randomly chosen 10 s interval of spontaneous movement on baseline agar (not diacetyl). This fraction is calculated by looking at the fraction of animals that reverse in a fixed number of random intervals, which is chosen based on the number of intervals where the animal was on diacetyl. Each dot shows one random sample of data. This process was then repeated 500 times to generate the distribution in black. Statistics compare this distribution to the actual fraction of animals reversing on octanol in a one-tailed test (**p < 0.01). i, AWA activity upon diacetyl encounter (left) and as the animal leaves diacetyl (right). To control for motion-responsive effects, the ‘spontaneous’ data are from epochs of similar forward versus reverse movement off odor. For each individual odor encounter or exit event, the two most similar epochs of movement where the animal was consistently off odor were chosen across all recorded videos. These two were then added to the ‘spontaneous’ distribution. AWA activity is high before diacetyl encounter because animals frequently have recently been on diacetyl before they return to it. Data are mean ± 95% CI. j, Neuron activity during head swings where the animal was moving forward, entering diacetyl. Neural activity during these head swings was compared to activity during similar spontaneous head swings on baseline agar. As in Fig. 2e–g, these panels are split by the direction of approach at the moment of odor leaving. Neuron activity is aligned to the head swings, as described in Fig. 2a. Statistics compare average neuron activity during ventral/dorsal diacetyl exit versus spontaneous movement. Two-sided Wilcoxon rank-sum test with Bonferroni correction (p = 0.0006), data are mean ± 95% CI. k, SAAV activity during the first reversal after the animal encounters diacetyl, split by the direction the animal encounters diacetyl (direction of approach as in Fig. 2e,f, activity presented as in Fig. 2b). Data are mean ± 95% CI. n = 33–36 reversals. Activity is not significantly different in the first head swing before or after reversal end using two-sided Wilcoxon rank-sum test with Bonferroni correction. l, SAAV activity during the first reversal after the animal encounters octanol, split by the direction the animal encounters, as in k. Data are mean ± 95% CI. n = 25 ventral encounter reversals, 50 dorsal encounter reversals. Activity is not significantly different in the first head swing before or after reversal end using two-sided Wilcoxon rank-sum test with Bonferroni correction. m, Example dataset with joint activity recordings of single SAAV, RMDV, SMDV, RIV, and SMBV neurons over two reorientations. Red shading shows reversals, gray lines show when head curvature crosses from dorsal to ventral (positive to negative). Head curvature for the same animal is quantified at the bottom. For all panels, significance is noted as: NS (not significant), *P < 0.05, **P < 0.01, ***P < 0.001 and **P < 0.0001. For panels with multiple comparisons, symbols denote Bonferroni-adjusted P values.