{'fraction_non_alphanumeric': 0.02867161716171617, 'fraction_numerical': 0.043763751375137515, 'mean_word_length': 4.856452587074693, '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}}
Distributed rhythm generators underlie Caenorhabditis elegans forward locomotion

Coordinated rhythmic movements are ubiquitous in animal behavior. In many organisms, chains of neural oscillators underlie the generation of these rhythms. In C. elegans, locomotor wave generation has been poorly understood; in particular, it is unclear where in the circuit rhythms are generated, and whether there exists more than one such generator. We used optogenetic and ablation experiments to probe the nature of rhythm generation in the locomotor circuit. We found that multiple sections of forward locomotor circuitry are capable of independently generating rhythms. By perturbing different components of the motor circuit, we localize the source of secondary rhythms to cholinergic motor neurons in the midbody. Using rhythmic optogenetic perturbation, we demonstrate bidirectional entrainment of oscillations between different body regions. These results show that, as in many other vertebrates and invertebrates, the C. elegans motor circuit contains multiple oscillators that coordinate activity to generate behavior.


INTRODUCTION 25
Oscillatory neural activity underlies rhythmic animal behaviors such as feeding and locomotion. El Manira, 2015). At the same time, sensory feedback and reflex loops have also been found to 30 be important for motor rhythm coordination and modulation (Wendler, 1974;Andersson et al., 31 1981;Yu and Friesen, 2004;Kristan et al., 2005). 32 How do cellular pacemakers, network oscillators, and sensory feedback interact to perform 33 rhythmic motor generation and coordination? The identification and study of locomotor Central 34 Pattern Generators (CPGs) in the mammalian spinal cord has been complicated by the 35 system's complexity and the large numbers of neurons that are potentially involved. As a result, 36 many components of the mammalian locomotor rhythm generator remain unidentified (Kiehn,37 2006; Mullins et al., 2011;Kiehn, 2016). However, work on vertebrate and invertebrate models, 38 such as swimming leeches and lampreys, has allowed the basic principles and components of 39 neural oscillators to be identified (Goulding, 2009;Mullins et al., 2011). 40 8 residual small amplitude wave allows propagation of the bending wave through the partially 167 paralyzed region. We therefore sought means of paralyzing the head more effectively. 168 We hypothesized that regional paralysis could be induced by lesioning the anterior BWMs 169 instead of hyperpolarizing them. To selectively lesion muscles, we used region-targeted 170 illumination at 470 nm of Pmyo-3::PH::miniSOG worms in which the photosensitizing protein 171 miniSOG is expressed in body wall muscles (Xu and Chisholm, 2016). The anterior portion of 172 most treated animals was nearly immobile ( Figure 2C, Video 1, especially the last 8 seconds). 173 Nevertheless, undulation posterior to the region of illumination was routinely observed in these 174

animals. 175
We also conducted thermal lesioning experiments in which touched the anterior half of the worm 176 with a hot platinum wire attached to a soldering iron. After this treatment, the animal's head and 177 neck were again nearly motionless, yet rhythmic undulation routinely persisted in the tail ( Figure  178 optogenetically inhibiting neck muscles prevented waves generated in the head from 191 propagating through the neck. During the interruption of these waves the tail exhibited bending 192 undulations at a higher frequency than that of the head, resulting in the animal simultaneously 193 undulating at two distinct frequencies ( Figure 3A, Video 2). We henceforth refer to this 194 behavior, whether or not induced by any manipulation, as two-frequency undulation (2FU). 195 We observed 2FU upon inhibiting all neck cholinergic neurons ( Figure 3B, Video 2) and also 196 upon inhibiting neck B-type motor neurons (Pacr-5::Arch; Figure 3C, Video 2). These 197 manipulations did lead to a large decrease in wave amplitude in the neck and a smaller 198 decrease in wave amplitude in the tail ( Figure 3F). Nevertheless, multiple animals in each 199 experiment showed 2FU, with the highest ratios of tail frequency to head frequency seen in 200 worms in which the neck muscles were inhibited ( Figure 3E). 201 In some experiments, the optogenetic manipulation of motor neurons or muscles did not 202 completely block wave transmission through the paralyzed region. In these trials, some tail 203 waves appeared synchronized with head waves, whereas others did not ( Figure 3C). To test 204 whether 2FU can occur after stronger disruption of motor coupling, we lesioned mid-body 205 muscles in Pmyo-3::PH::miniSOG worms. This manipulation indeed led to stronger decoupling 206 between head and tail oscillations, but did still not prevent 2FU ( Figure 3D, Video 2). 207 If the posterior motor circuit of B and AS type neurons contains additional oscillating units, we 208 reasoned that localized undulations might occur after selectively activating small portions of the 209 motor circuit while inhibiting the rest. We therefore examined worms in which both the inhibitory  Taken together, these results strongly suggest that the C. elegans forward motor circuit contains 232 at least two units capable of independent rhythm generation, and that a partial breakdown in 233 anterior proprioceptive coupling (for example by inhibiting neck BWMs) is sufficient to reveal the 234 presence of the posterior oscillating unit(s). 235 expression in AVB and UNC-9 expression in the B-type motor neurons (Starich et al., 2009;261 Kawano et al., 2011;Liu et al., 2017). UNC-9 also participates in electrical coupling between 262 BWM cells (Liu et al., 2006). We asked whether animals lacking UNC-7 or UNC-9 could exhibit 263 2FU. We crossed unc-7 and unc-9 mutations into our Pmyo-3::NpHR strain and performed 264 optogenetic experiments as before. The unc-7 and unc-9 worms are uncoordinated and exhibit 265 significantly reduced spontaneous forward locomotion (Starich et al., 2009;Kawano et al., 266 2011). To initiate a short bout of forward locomotion, we used a cell phone motor to apply a 267 mechanical stimulus in the form of a 3-5 s, ≈200 Hz vibration of the slide just before illumination. 268 We found that both strains were capable of 2FU, although it appeared to occur less often than in 269 PVC-ablated animals, and sometimes occurred prior to neck muscle inhibition ( The premotor interneurons comprise the primary circuit connection between the VNC motor 286 neurons and the worm's other sensory and interneuronal circuits (White et al., 1986). The 287 finding that premotor interneurons are not necessary for forward locomotion and 2FU suggests 288 that high frequency tail undulations during 2FU may originate from the motor neurons 289 themselves. We asked, in the presence of all premotor interneurons, whether any classes of 290 motor neurons are required for 2FU. 291 We first examined the A-type motor neurons. While the A class motor neurons are preferentially 292 active during reverse locomotion (Haspel et al., 2010;Kawano et al., 2011), and are required for 293 reverse locomotion (Chalfie et al., 1985), it is conceivable that they play a role in 2FU. We found 294 that ablating the A-and VC-type motor neurons with a genetically targeted ROS generator 295 (Punc-4::miniSOG) did not prevent 2FU induced by neck paralysis during forward locomotion 296  Next, we examined whether the GABAergic D-type motor neurons are required for 2FU. The D-299 type motor neurons release GABA onto the UNC-49 receptor to trigger contralateral muscle 300 inhibition during a bend. Therefore, the putative null allele unc-49(e407) (Bamber et al., 1999;301 Liewald et al., 2008), should effectively block the functional output of D-type motor neurons. 302 Indeed, unc-49 mutants exhibited simultaneous dorsal and ventral contractions when stimulated 303 for forward and reversal movement, as did animals in which D motor neurons were ablated 304 (McIntire et al., 1993a). We found that animals harboring an unc-49(e407) mutation, while very 305 slow swimmers, were nonetheless capable of 2FU during neck muscle paralysis (Figure 4D, E). 306 In one case we observed 2FU before inhibition of neck muscles (Figure 4   . We sought to determine whether any individual or small group of 311 these neurons is essential for 2FU. We ablated groups of 2-6 B-type motor neurons at a time 312 using our pulsed infrared laser system. 2FU occurred at least rarely in each condition (Figure 313 for 2FU. In nearly all cases, ablation of a DB motor neuron resulted in the disappearance of its 315 commissural process, but we could not determine whether ablated VB neuronal processes were 316 similarly removed. Therefore, we cannot completely exclude the possibility that a specific 317 neuronal process can generate rhythms for 2FU in the absence of its associated cell body. 318 Taken together, these results suggest that in the presence of premotor interneurons, the B 319 and/or AS class motor neurons contribute to neck-paralysis induced 2FU, but no single member 320 is essential for generating high frequency tail rhythms during 2FU. The A, VC and D motor 321 neurons are not required for 2FU. Our results are consistent with a model in which posterior 322 rhythm generation can arise from multiple subsets of B or AS motor neurons. 323 324 B-type motor neurons, as a class, are essential for 2FU 325 We next asked whether the B motor neurons as a class are required for 2FU. We first 326 considered vab-7 mutants, in which the DB motor neurons have aberrantly reversed processes. 327 These worms have disrupted wave propagation in the tail, which coils towards the ventral side 328 (Wen et al., 2012). We found that vab-7 mutants had mildly or strongly paralyzed tails and were 329 incapable of 2FU when neck muscles were inhibited, suggesting that vab-7 is essential for 2FU notion that broad disruption of the B motor neurons prevents 2FU. However, the behavioral 333 deficit could also result from other effects of the mutation. 334 To ascertain whether the B motor neurons are required for 2FU, we performed broad ablations 335 of the B motor neurons. We studied worms expressing Punc-17::PH::miniSOG (Xu and 336 Chisholm, 2016). In our integrated lines, we found that illumination of Punc-17::PH::miniSOG 337 worms preferentially eliminated the DA and DB over the VA and VB motor neurons (see 338 Methods). Worms in which most DB motor neurons were eliminated were dramatically less likely 339 to show 2FU than mock controls, but were not incapable of doing so ( Figure 5, Video 4; N=9 340 out of 104 trials from 25 worms by blinded, randomized scoring). We performed the converse 341 experiment -elimination of most VB motor neurons using our infrared laser system-and found 342 the incidence of 2FU was again sharply reduced but not eliminated (  The observation that 2FU could persist despite disruptions to many components of the mid-body 353 motor circuitry could also be explained by the hypothesis that additional rhythm generators 354 located in the head are responsible for the observed high frequency tail undulations. Although the premotor INs account for the majority of synaptic inputs to the VNC motor neurons, there 356 are additional connections between head neurons and the anterior VNC motor neurons that 357 bypass the premotor INs (White et al., 1986). 358 To ascertain whether the mid-body motor circuit is capable of independent rhythm generation, 359 we developed a method for eliminating synaptic connections between the mid-body motor 360 neurons and the head circuits. We used our infrared laser system to sever both the VNC and 361 the dorsal nerve cord (DNC) just posterior to the pharynx. In many cases, this procedure also 362 severed other fasciculated process bundles that run parallel to the VNC and DNC ( Figure 6A). 363 Several hours after disruption of the nerve cords, most animals were inactive (data not shown), 364 but active forward locomotion was induced by application of a mechanical stimulus. Most of 365 these worms could generate robust oscillations posterior to the cut location ( Figure 6A, E, 366 Video 5). Moreover, the tail often undulated at a higher frequency than the mid-body ( Figure  367 6E). In these worms, oscillations in the head were highly disrupted. In some cases, low 368 amplitude waves propagating in the posterior-to-anterior direction occurred simultaneously with 369 robust mid-body and tail waves propagating in the anterior-to-posterior direction ( Figure 6A, 370 Video 5), suggesting a deficit in coordination between circuits on either side of the lesion. These 371 results suggest that synaptic connections from the head circuits to the motor neurons may not 372 be essential for wave generation posterior to the head. 373 We considered the possibility that under these conditions, mid-body undulations were being 374 caused by small movements in the head rather than generated by a second oscillator. To 375 minimize the small movements of the head, we introduced an additional manipulation to reduce 376 head movement. Using our infrared laser, we applied thermal damage to the worm's nerve ring 377 (located in the head) in addition to cutting both nerve cords. Animals treated with these three 378 lesions are henceforth referred to as "VNC-lesioned" worms. These worms exhibited very little movement in the head. However, they continued to generate robust oscillations in the mid-body 380 and even higher frequency oscillations in the tail (Figure 6B, E, Video 5). The pattern of 381 locomotion in VNC lesioned animals strongly resembled the 2FU induced by optogenetic 382 perturbation, with the important difference that in our lesioned preparation, both frequencies 383 were likely generated outside the head. 384 The emergence of multiple frequencies of undulation outside the head suggests that the VNC 385 motor circuit itself may contain multiple units capable of independent oscillation. These units 386 may exist in addition to any oscillating unit(s) in the head. To test this possibility directly, we cut 387 the VNC and DNC in two locations: in the neck (anterior to VB3) and in the tail (posterior to 388 VB8). We again thermally lesioned the head neurons to suppress head movement. Under these 389 conditions, the VNC motor neurons between VB3 and VB8 are isolated from circuitry in both the 390 head and tail, and the VNC motor neurons posterior to VB8 are isolated from both the head 391 circuits and the anterior VNC motor neurons. As before, these animals could generate robust The B motor neurons were required for neck-paralysis-induced 2FU in intact animals ( Figure 5). 413 We hypothesized that they are also required for forward undulatory rhythms in VNC-lesioned 414 worms. To test this idea, we used VNC-lesioned worms in which the DA and DB motor neurons 415 were ablated by miniSOG and the VB motor neurons were ablated by an infrared laser as 416 before. Three to five hours after nerve cord surgery, worms in either B-ablation condition, like 417 mock controls, were highly inactive. Application of a mechanical stimulus caused tight coiling,  locations slightly more posterior to the head to reduce the likelihood of damage to the head 431 motor neurons, but which were not subject to thermal damage to the head. As in our earlier 432 experiment ( Figure 6A), head movement was severely disrupted (not shown). However, we 433 occasionally observed very slow head undulation in these animals, indicating that head 434 undulation is still possible under these conditions ( Figure 6D, Video 5). 435 One explanation for the low frequency of head undulations is that damage to the SMB or SMD 436 neurons in the parallel tracts ( Figure 6A) hampered head movement. Another possibility is that 437 input from the posterior motor circuit is essential for the normal frequency of head undulation. 438 The first hypothesis may be supported by our earlier observation that strong decoupling of head proprioceptive coupling, via optogenetic inhibition of neck muscles, could decouple body that paralyzing the neck muscles appeared to decrease the head frequency. We found that 476 during 2FU, head frequency decreases relative to the unperturbed swimming frequency ( Figure  477 8A). Slowing was often even more dramatic when decoupling was stronger (Figures 3D, 6D). 478 These observations suggest that anteriorward coupling, in addition to posteriorward coupling, 479 may be present in the forward locomotor circuitry. 480 To test for anteriorward coupling between motor circuit elements, we asked whether an 481 oscillating optogenetic perturbation in the mid-body can entrain the head to a new frequency. 482 We used our optogenetic targeting system to rhythmically inhibit the mid-body BWMs ( Figure  483 8B). Worms subject to this procedure exhibit a head bending frequency approximately one half 484 that of the imposed frequency. The factor of one half is likely due to the presence of two phases 485 during the rhythmic locomotory cycle of any single part of the body during which the curvature is 486 close to zero (i.e. muscles are relaxed). In some cases, small head bends corresponding to 487 individual mid-body pulses were evident as well (Figure 8C(i), Video 7). 488 We found the head frequency could be entrained to a range of imposed mid-body frequencies. 489 Subjecting body coordinates 33-66 to pulsed illumination at frequencies from approximately 1 to 490 2 Hz caused an increase in the power spectrum of the worm's oscillations at frequencies 491 corresponding to half of the imposed frequency, and a decrease at other frequencies. Pulsing at 492 frequencies below 1 Hz generally led to head oscillations near the imposed frequency ( Figure  493 8C(ii)). These results show that a mid-body rhythmic signal can entrain head bending, and 494 point to the presence of an anteriorward coupling mechanism within the motor circuit. 495 their head bending frequency to match one-half of the imposed frequency ( Figure 8D(i), Video 500 7). Moreover, rhythmic illumination of the tail cholinergic neurons at 2 Hz similarly increased the 501 magnitude of head bending at 1 Hz (Figure 8D(ii)). Selective rhythmic hyperpolarization of the 502 mid-body B motor neurons also sufficed to increase the magnitude of head bending at one-half 503 of the stimulus frequency (Figure 8 -Figure Supplement 1A), as did rhythmic 504 hyperpolarization of the BWMs when muscle-to-muscle gap junctions were disrupted in only in 505 the BWM by a mutation in the innexin unc-9 that was rescued in neurons but not muscles (Wen 506 et al., 2012) (Figure 8 -Figure Supplement 1B). These observations suggest that the posterior 507 to anterior coupling is mediated neuronally, possibly by the VNC motor neurons. 508 In zebrafish and lampreys, rhythmogenic capability for swimming undulations is distributed 512 along the rostro-caudal axis of the spinal cord (Kiehn, 2006;Mullins et al., 2011). When isolated 513 from the rest of the cord, groups of lamprey spinal segments do not exhibit identical preferred 514 frequencies (Cohen, 1987). In the swimming intact animal, oscillations in all segments are 515 phase and frequency-locked by intersegmental coupling that spans broad swaths of the spine 516 (Mullins et al., 2011). 517 The motor system of the leech, an invertebrate, also shows a distributed rhythm generating 518 architecture. Individual ganglia of the leech VNC can generate crude bursting patterns that 519 resemble their firing patterns during swimming. The most robustly oscillating ganglia are 520 towards the middle of the leech's body, and isolated midbody ganglia also have a higher 521 frequency than isolated ganglia near either the head or tail. In the intact animal, extensive, 522 bidirectional intersegmental coupling drives the system to adopt a single locomotor frequency 523 (Pearce and Friesen, 1985;Kristan et al., 2005). 524 Our results reveal a picture of forward locomotor control in C. elegans similar to that found in 525 lamprey and leech. We found that rhythmogenic capability in the worm is distributed along the 526 VNC motor circuit. As in other swimming models, the rhythm-generating capability of posterior 527 circuits is only detectable when coupling is disrupted. The rhythm-generating capability of 528 posterior circuits was demonstrated in several ways: optogenetic inhibition of anterior neurons, 529 optogenetic inhibition of anterior muscles, an inhomogeneous mechanical environment, or a 530 lesion to the nerve cords. The incomplete nature of our optogenetic decoupling method yielded 531 evidence that an anterior rhythm can entrain the higher-frequency posterior rhythms. For 532 example, we found that during 2FU, some but not all waves in the tail were continuous with waves in the head (Figure 3B, C). Even in these cases, the difference in locomotory frequency 534 between the two body regions is inconsistent with single oscillator models. 535 We found that neither the head nor tail frequency during 2FU matched the natural (unperturbed) 536 frequency of locomotion. Instead, the normal locomotory frequency in the environment of the  (Figures 4, 5, and 6). Second, stimulation of select B and AS neurons 568 after paralyzing most of the body led to local, high frequency oscillations in the tail that 569 mimicked 2FU (Figure 3  is a growing recognition that motor neurons are not limited to conveying oscillatory signals from 598 interneurons, but may themselves participate in rhythm generation. 599 One difference between our results and previous findings in leeches is in the effect of severing 600 the VNC. When we severed the VNC and DNC of C. elegans, we found that independent, 601 generally higher frequency undulations occurred posterior to the severed region (Figures 6 and  602   7). Disruption of the leech VNC, by contrast, was not sufficient to prevent wave propagation 603 from head to tail (Yu et al., 1999), suggesting that proprioceptive information suffices to 604 propagate the wave. However, severing the VNC intersegmental coordinating neurons in in vitro 605 preparations induced uncoordinated fictive swim oscillations at different frequencies occurring between our thermal ablation method in C. elegans and physical severing of the leech VNC, or 608 the relative span of proprioceptive signals in each system. 609 Our laser lesioning of the VNC likely did not remove processes of premotor interneurons, nor 610 did it prevent nonsynaptic neurotransmission, for example through neuropeptides, from 611 potentially regulating rhythm generation across the lesion. These possibilities may account for 612 the apparent difference in posterior rhythmogenic capability between worms in which AVB had 613 been ablated versus severed. When the ventral nerve cord was isolated from the head ganglia, 614 including the soma of AVB, rhythmic tail undulation was reliably evoked by a mechanical 615 stimulus (Figures 6 and 7). However, independent tail undulations were observed only rarely 616 after ablating AVB, even when the mechanical stimulus was applied (Figure 4   oscillations; when we severed the VNC and DNC at arbitrary locations we found that oscillations 634 resume closely posterior to each cut over a wide range of circuit sizes (Figure 7). Moreover, we 635 cannot rule out the possibility that even smaller circuit units, perhaps even individual motor 636 neurons, can generate rhythmic outputs.   nerve ring of each worm was also damaged to restrict head movements as in Figure 5B. frequency. This decrease is not predicted by either model discussed in Figure 1. at a frequency of 2 Hz onto a Pmyo-3::NpHR worm. Note that the head frequency slows to half 807 of the imposed frequency, although some instances of a 1:1 correlation between laser pulse and 808 a head bend are also evident (e.g. around t = 13 s). 809 (ii) Mean head frequency power spectra of Pmyo-3::NpHR worms before manipulation (left bar, 810 worms from all conditions are pooled) and while subject rhythmic mid-body paralysis. 811 Frequencies tested were 0 (with laser on), 0.5, 0.85, 1.1, 1.25, 1.4, 1.55, 1.7, 1.9, and 2.0 Hz. 812 Frequency data is interpolated between these points. N≥11 trials per condition, with each worm 813 supplying at most two trials. For high frequency inhibition (f>1.1 Hz) the head is entrained to 814 half of the inhibition frequency (bright peaks lie along y=x/2). For lower frequencies of inhibition 815 (f~0.85 Hz) the head is entrained to the inhibition frequency (bright peaks lie along y=x).

Strains 968
We maintained C. elegans on 6 cm NGM plates seeded with E. coli OP50 at 20˚C using 969 standard methods (Sulston and Hodgkin, 1988). For all optogenetic experiments, we added 970 100 mM all-trans retinal (ATR) in ethanol at 0.8% by volume to the bacteria suspension before 971 seeding the plates, and kept plates in darkness. All strains were synchronized by hypochlorite 972 bleaching and allowed to hatch on an NGM plate without food. L1 arrested larvae were 973 transferred to OP50 or OP50+ATR plates and allowed to grow to the appropriate stage. Unless 974 otherwise specified, all experiments were performed using day 1 adult hermaphrodites. 975 All strains used in this study are listed in Tables 1 and 2. All transgenic strains were outcrossed 976 a minimum of 3 times against N2. 977 978  To determine the accuracy of our illumination system, we studied worms expressing the YX137 (Muscle::NpHR, unc-7(e5)), or YX140 (Muscle::NpHR, unc-9(fc16)) larvae were 1011 transferred to ATR plates and allow to grow to first day of adulthood. Up to 20 adult worms were 1012 mounted at a time on our optogenetic targeting system. Worms were sampled with replacement times in the indicated region, with at least 10 s between successive illuminations of the same and VC-type motor neurons. Worms were bulk illuminated with blue light (wavelength 470±17 nm) at 3.5 mW/mm 2 for 20 minutes of total illumination time using 0.5 s on / 1.5 s off pulse train dextran chamber for behavioral imaging.
IR laser pulses with 2 ms duration. Worms were transferred to fresh unseeded plates and 1112 allowed to recover for at least four hours before behavioral and fluorescence imaging. For 1113 behavioral imaging, worms were mounted individually in 20% dextran chambers and recorded 1114 swimming for at least 1 minute under dark field illumination. Most worms were inactive 4 hours 1115 after surgery, especially when the VNC and DNC were lesioned in two locations (not shown). 1116 In many other systems, mechanical, electrical, or chemical stimuli can be applied to induce 1117 swimming or fictive swimming in an otherwise quiescent preparation (Kristan et al., 2005). To 1118 agitate C. elegans, we mechanically vibrated each worm using a 200 Hz cell phone motor for 1119 periods of 10-20 s to induce locomotion at least twice during each recording. After behavioral 1120 imaging, each worm was transferred to a pad and imaged for red or green fluorescence 1121 imaging. 1122  ablation conditions, we only analyzed data from worms in which both AVB cell bodies and their 1138 associated processes were removed. Because cell killing occurs over a ~3 μm radius volume in 1139 our system, it is highly likely that other head neurons were also damaged or killed by this 1140 procedure. For nerve cord lesioning experiments, we only analyzed data from animals in which 1141 all indicated VNC/DNC targets were clearly severed. 1142

Head lesions using a heated wire 1145
To broadly lesion the head and inhibit anterior bending, four freely crawling adult N2 worms 1146 were gently touched on or near the head with a platinum wire attached to a soldering iron. The 1147 worms appeared to crawl backwards after the initial touch, so we applied a second touch to the 1148 agar near the tail to induce forward locomotion. We recorded behavior immediately after 1149 lesioning. For experiments with our optogenetic targeting system, the real-time segmentation for body 1163 targeting was recorded to disk along with each video frame. We wrote custom MATLAB codes 1164 to compute the curvature of the worm in each frame using the recorded centerline coordinates. For all other experiments, worm segmentations were generated from dark field videos using 1173 WormLab software (MBF Bioscience, Williston, VT). The centerline coordinates were exported 1174 and curvature maps constructed as before. To identify bouts of forward locomotion in 1-2 min 1175 worm recordings, we computed the activity level and wave direction in the kymogram as a 1176 function of time and body coordinate. Bouts of forward locomotion in body segments were 1177 identified when the activity level was higher than a fixed threshold and the local direction of (typically 2-3 s). 1180 To measure frequencies of undulation at any body coordinate, we computed the Fourier 1181 transform of time derivative of the curvature, and identified the frequency corresponding to the