Experimental animals
We used Drosophila melanogaster raised on standard cornmeal-agar medium supplemented with bakerâs yeast and incubated at 25â°C with 60% humidity and a 12âh lightâdark cycle throughout development and adulthood unless otherwise stated. The optogenetic manipulation experimental flies were collected on retinal food and again transferred to fresh retinal food 1â2âdays before testing. Retinal food contains standard fly food with freshly added 400âμM all-trans retinal (Sigma-Aldrich, catalogue no. R2500). These flies were kept in the dark for their entire life-cycle until test. Age and sex of animals tested is indicated in the sections below. All full experimental genotypes, exact sample size per genotype and source of the genetic reagents are described in Supplementary Tables 1 and 2.
Identification and generation of halt neuron specific drivers
The neural-activation screen was composed of an extended version of our previously published work19 with added lines from the SEZ-split-Gal4 collection20. Whereas in our previous work19 we focused on lines that increased walking on optogenetic stimulation, here we focused on lines that decreased walking. We could narrow the set of interesting lines to 11 drivers based on their locomotor phenotype and expression levels. Among the SEZ lines, we focused on three lines (SS40909, SS31326, SS31328) in which we could unambiguously identify the neurons as FG and BB both in the light microscopy24 as well as electron microscopy8,28,29,61 datasets. Additionally, we found three Gal4 drivers that drove the strongest halting phenotypes (R37F06, R36G02, VT12408). By comparing available or generated stochastic labelling images (we performed this for VT012408 as described in ref. 19, MCFO images were available for R36G02 and R37F06, ref. 24), we identified that these three lines labelled BRK neurons. To validate this further, we devised a split-Gal4 screen with R36G02-Gal4DBD and candidate BRK targeting p65-ADs identified by using the NeuronBridge toolkit24. This (Extended Data Fig. 1d) helped generate split-Gal4 drivers for labelling BRK neurons (Fig. 1).
Identification of neurons in connectome
We used image database search tools24,25 and co-ordinate transform tools23,26 to identify neurons across light microscopy and electron microscopy datasets. Maximum intensity colour-depth images from light microscopy and electron microscopy for each neuron used in this study are shown in Extended Data Fig. 5a. Electron microscopy identifiers of all neurons from this work are detailed in Supplementary Table 3. Further details of comprehensive DN and AN proofreading and identification in the FlyWire and FANC datasets are now reported in ref. 62.
Optogenetic activation in untethered animals
All optogenetic activation experiments in untethered animals were performed using 6â9-day-old female flies. The flies were loaded in behavioural arenas as described in ref. 19 (44âmm bowl-shaped arena made of 1.5% agarose gel). The videos were recorded as in ref. 19 using a FLIR BlackFly-S camera (FL3-U3-13Y3M-C) at a resolution of 1,280âÃâ1,024, at 30âHz. The camera was fitted with an adjustable focus lens (LMVZ990-IR) and near infrared bandpass filter (Midopt BP850) to allow infrared imaging without artefacts from visible light. A custom designed light-emitting diode (LED) panel19 provided backlit illumination with infrared (850ânm), green (530ânm) or red (630ânm) light. Both intensity and pulsing of each wavelength could be independently controlled and synchronized to the recording camera through transistorâtransistor logic pulses generated using a custom Arduino circuit. The bowl-shaped arena was backlit with infrared light (850ânm) for video recording. We also provided continuous dim green light (0.0031âmWâmmâ2) during all optogenetic activation experiments to avoid a jumping response in flies due to sudden bright red light exposure. The green light level was adjusted as to not drive optogenetic stimulation even in a very sensitive reagent (MDN>CsChrimson). All experiments were performed at 25â°C unless stated otherwise. Videos were tracked using FlyTracker software63 and data were analysed in MATLAB.
Activation in free-walking flies
Experimental flies were loaded in the setup described above, and allowed to walk freely to be assayed for optogenetics induced halting (Figs. 1aâc and 2 and Extended Data Figs. 1, 2dâg, 4b,c and 9e). The light stimulation protocol consisted of red light pulsed at 50âHz (5âms pulse width, average intensity at arena surface of 0.038âmWâmmâ2) in a sequence of 50âs OFF/10âs ON, repeated five times. A trial was defined as 10âs OFF followed by 10âs ON for analysis.
Activation in powdered flies
Flies were covered with powder (Reactive Yellow 86, Santa Cruz Biotechnology, catalogue no. sc-296260) to induce grooming19,48. Powdered flies were loaded in bowl-shaped arenas described above, and assayed for walking initiation with red light intensity of 0.04âmWâmmâ2 pulsed at 100âHz (Fig. 3j). The light stimulation protocol consisted of 50âs OFF/10âs ON sequence, repeated five times. For analysis, 10âs OFF followed by 10âs ON was considered as one trial.
Data analysis
FlyTracker63 output was used to quantify translational and angular velocities as in ref. 19. Angular velocity values correspond to âabsolute angular velocityâ. Rotation is defined as integral of angular velocity as in ref. 19. Pivots were defined as time periods with high angular velocity (more than two rotations per second) and low translational velocity (less than 5âmmâsâ1) after smoothing with 0.5âs window. These pivot thresholds are set based on empirical observation, as well as previous literature64,65,66 indicating values for slow walking and high turning. For coactivation experiments (Fig. 2), distance and rotation were calculated for the entire stimulation duration or just first 2âs of stimulation as indicated. In all experiments in Fig. 2 in which we compared coactivation of walkâ+âhalt neuron phenotypes, we restricted statistical analysis to a period of 2âs after stimulation onset. All walk activation phenotypes start declining after this 2âs mark. Moreover, in case of MDN activation, the flies start switching between backward and forward bouts after this 2âs mark. This 2âs period was thus selected to restrict the analysis to the clean and strong part of the walk phenotype. The results were identical if the time window was changed 2â±â1âs.
Optogenetic silencing in untethered animals
All optogenetic silencing experiments were performed using 6â9-day-old female flies (unless stated otherwise) in the same setup and tracking and analysis pipeline as the activation experiments. The 530ânm green LED used for silencing was adjusted to 0.0255âmWâmmâ2 average intensity at the arena walking surface to silence neurons expressing GtACR1.
Silencing in free-walking flies
Flies were loaded in bowl-shaped chambers kept at 30â°C (to elevate baseline walking) and assayed for decrease in walking velocity on silencing (Fig. 3k). The light stimulation protocol consisted of a 60âs OFF/30âs ON sequence, repeated three times, for a video duration of 5âmin.
Silencing in powdered intact flies
Flies were powdered as described above and assayed for interruption of grooming (Fig. 6i). The green light stimulation protocol consisted of 60âs OFF followed by continuous ON for a duration of 6âmin.
Silencing in powdered decapitated flies (assay for tripping quantification)
The flies were decapitated using forceps and the neck was sealed using ultraviolet-cured glue (Bondic). Flies that recovered well from this procedure (based on good self-righting and grooming behaviours) were chosen for experiments. The experimental flies were powdered (as mentioned above) and loaded in flat-floor arenas (50âmm diameter and 3âmm height described in ref. 19). The light stimulation protocol consisted of 30âs OFF/10âs ON sequence of green light, repeated three times, for a video duration of 3âmin. The flies that lost balance and ended in an upside-down position (with all legs off the ground) in at least one out of three light ON periods were recorded as tripped (Fig. 6l and Supplementary Video 10).
Data analysis
Velocities, distance and rotation were quantified as stated above. Stopping events were defined as instances in which smoothed translational velocity (1.5âmmâsâ1) was below a threshold defined previously31. Tripping events were quantified manually.
Feeding related neuronal silencing assays
Here, 1â3-day-old female flies were transferred to retinal food and allowed to feed for 4âdays. Flies were then wet-starved with 0.4âmM retinal in water before testing to induce starvation.
Sugar preference assay
This assay was performed using previously described setup and conditions42. Here, 36-hour starved female flies were loaded in flat-floor circular behavioural arenas (50âmm diameter) described above. The circular arena floor was covered with two halves of semi-circular filter paper, which had been soaked with either water or 2âM sucrose and left to dry overnight. Flies were introduced into the chamber and allowed to explore and choose a preferred side for a duration of 4âmin (Fig. 5e). Green light was provided throughout assay duration for GtACR1-based neuronal silencing. By the time video recording started, most flies had encountered both sides of the chamber, implying that at tâ=â0 flies are considered as having been exposed to sucrose. Video recording, tracking and analysis was performed as described above.
Sucrose-blob interaction assay
A 5âµl drop (3âmm diameter) of 1% agarose solution containing 200âmM sucrose was placed in the centre of the flat circular arena (50âmm diameter). One fly per arena was loaded and allowed to explore and find the sucrose drop. Green light was provided throughout the assay duration for GtACR1-based neuronal silencing as described above. Flies that encountered the sucrose before the video recording started were discarded from the analysis to ensure accurate capture of the first feeding bout. Video recording and tracking was performed as described above. A fly within 3âmm from the centre of the sucrose blob was considered as interacting with it (as both the sucrose blob and the fly are similar size; that is, roughly 3âmm). The food-zone was then defined as 6-mm-diameter circle centred around the sucrose blob (Fig. 5f). The exact frame corresponding to when the fly first found the sucrose was manually annotated, and the data were aligned to this time point (Extended Data Fig. 8fâi). Quantification of food-zone stopping and velocities was performed within 5âs of finding the sucrose. Stops were defined as smoothed-velocity less than 2âmmâsâ1 for ten frames (when flies stayed in one spot for long as happens when they feed, the tracker often induced a jitter that led to artificial velocity values, this definition helped extract true stopping events). For depicting velocity heatmap and averaged velocity plots depicting pre- and postencounter profile, we filtered the dataset to select cases that showed at least 20âs pre-encounter period and 50âs postencounter period. Most flies were still contained in this dataset.
PER assay
The PER assay in Extended Data Fig. 8j was performed as described in ref. 41. Data were analysed using Fisherâs exact test between test and control genotypes.
High-resolution 3D leg kinematics analysis
Setup
The setup consisted of eight cameras (FLIR BFS-U3-16S2M-CS, fitted with InfiniStix 194100 lenses and near infrared bandpass filters (Midopt BP850)) surrounding a ball holder (Extended Data Fig. 3a), such that all legs were visible from at least one pair of cameras, at all times. Individual flies were tethered to a 34-gauge needle by their thorax using ultraviolet-cured glue, and were then placed on an air-supported spherical treadmill (6âmm diameter). Tethered flies were illuminated with a custom infrared ring emitting focused light to the plane of the ball. The ball was tracked at 50âHz through two orthogonally placed custom motion sensors. The cameras, infrared light source and the ball tracker were all triggered by an Arduino at 200âHz, with camera exposure time set to 200âµs. Videos were recorded with a resolution of 1,440âÃâ1,072âpixels.
Camera calibration, two-dimensional pose tracking and 3D pose reconstruction
We used DeepLabCut (v.2.2.3, DLC67) to track 33 points of interest on the fly body: the notum, two wing hinges and five joints per leg (thorax-coxa, coxa-trocanter, FeâTi, tibia-tarsus and the tarsal tip). Separate ResNet-101 neural networks were trained for all cameras (500,000 iterations) except for the three front-facing cameras, which were all handled by the same network (five networks in total). We used roughly 830 manually annotated frames per camera for initial training of all networks (46 frames each from 18 flies) with a testâtrain split of 95â5%. An additional round of training was needed using roughly 600âframes each (40âframes from 16 flies) before the tracking was satisfactory (error in pixels less than 4âpixels for all networks). The cameras were calibrated using the calibration module in Anipose68 (v.1.0.1). We used a precision manufactured ChArUco board68 as a calibration target. The board was imaged from all cameras simultaneously at 15âHz and maximum resolution (1,440âÃâ1,072). When the board-based calibration alone failed to give satisfactory results (as measured by the mean reprojection error in pixels of the final 3D model output of Anipose being greater than 20âpixels for any point), their animal-based calibration module was used to bring the mean reprojection errors below this threshold. Anipose was used to triangulate all points, as well as to calculate the flexion angle for all four joints from each leg.
Ball fitting and swing-stance prediction
Step cycles were estimated based on the proximity of the tracked tarsal tip coordinates to the ball surface. As the ball itself was not tracked, we fit a sphere to the 3D reconstructed tarsal tip coordinates. The position of the sphere in space and its radius was optimized iteratively using the squared distance of the tarsal tips to the surface of the sphere. Tarsal tip positions within 0.05% of the radius were considered as stance, others as swing. Of note, swing and stance phases shorter than 10âms were filtered out.
Activation of halt neurons in tethered flies walking on the ball
To precisely quantify the difference between the halting phenotypes on activation of BRK, FG and BB (Figs. 1g and 4aâd and Extended Data Fig. 3), male flies aged between 7 and 10âdays expressing CsChrimson in the respective halt neurons were subjected to optogenetic activation on the ball. The flies were starved for 6â9âh before the experiment to increase the likelihood of high-speed spontaneous walking. The compressed air supplied to the ball was passed through an in-line heating element (Southeastern Heaters and Controls, Inc., Heater FLC-2 120âV 250âW coupled with a TPC10063 controller) to bring the local temperature on the ball up to 32â°C. Each fly was left on the ball for a maximum of 20âmin, during which a maximum of ten trials (7âs each) could be triggered in closed-loop with the forward velocity of the fly. Each trial consisted of 2âs of light OFF, followed by 3âs of red light stimulation (66âHz, roughly 0.04âmWâmmâ2) delivered through an LED-coupled optic fibre (625ânm, Thorlabs M625F2).
Kinematic analysis
To quantify the differences between halting phenotypes, we considered only the trials during which flies were walking with an average velocity greater than 1âmmâsâ1 before optogenetic stimulation. The whole dataset was segmented into cases in which the light stimulation onset coincided with a continuing swing phase or stance phase. A stopping bout was defined as when the average ball velocity was below 0.8âmmâsâ1 over a minimum period of 250âms. Swing duration before optogenetic stimulation was calculated as the median swing duration from all swing events in the prestimulation period. Swing duration after optogenetic stimulation was the duration of the continuing swing at light onset.
Activation experiments in tethered, decapitated flies walking on the ball
Flies were ice-anaesthetized, decapitated and their neck was sealed using ultraviolet-cured glue. Only flies that recovered well from decapitation (roughly 95% of all decapitated flies) (that is, showing proper self-righting and spontaneous grooming) were tethered to the 34-gauge needle with ultraviolet-cured glue and placed on the ball. In MDN and MDNâ+âBRK activation experiments (Fig. 4eâj), decapitated flies were subjected to ten trials (7âs each) with 3âs red light stimulation (66âHz, 0.04âmWâmmâ2). In the case of BDN2 activation in decapitated flies, we observed robust walking when we restricted to testing older flies (10â12âdays old, for Fig. 4eâj) flies compared to the 7â10-day-old age range that was used for initial experiments (Extended Data Fig. 6e), probably due to lower and more variable expression levels in younger flies. Further, for BDN2 and BDN2â+âBRK experiments (Fig. 4eâj), given expression levels of CsChrimson in BDN2 differed between individuals, for each fly we sampled five different intensities (0.01, 0.015, 0.025, 0.041, 0.058âmWâmmâ2) of stimulation and chose the particular intensity at which that individual fly showed some degree of intention for forward walking (if BDN2 expression is weak, BRK dominates the phenotype and legs do not show any movement). All videos acquired were passed through our 3D pose estimation pipeline as elaborated above. The SIZ was defined as the range below the 25th percentile (for forward walking) or above the 75th percentile (for backward walking) of the FeâTi flexion angle at which MDN or BDN2 activated flies initiate swings, respectively. The SIZ count is number of times the FeâTi joint angle enters the SIZ in a single trial. The dwell time in SIZ is the time spent by the leg in the SIZ each time it enters it. The percentage of swings in SIZ refers to the number of SIZ events in which the leg performs a swing, divided by total number of SIZ events, per trial.
Segment-specific grooming in decapitated flies on the ball
Tethered, decapitated flies expressing GtACR1 in different subsets of the BRK neurons were placed on the ball and acclimated to 45âs green light (530ânm, Thorlabs M530F2, continuous, roughly 0.018âmWâmmâ2) before recording. Subsequently, flies were again exposed to 45âs green light for silencing BRK, while front leg or hind-leg-specific grooming was induced. Hind-leg grooming was induced by gently touching the wing with a brush (Fig. 6pâr), whereas foreleg grooming (Fig. 6.mâo) was induced by touching the front leg with a brush covered with yellow dust (Reactive Yellow 86, catalogue no. sc-296260). These videos were manually scored for grooming bouts. We considered the start of a grooming bout when leg lifted off the ball surface, and the end when the leg touched down the ball surface (in case of stable grooming bouts) or when grooming movements ended (in case of destabilized grooming in which the fly tries to regain normal posture). The 3D pose (front and hind legs) of these flies were reconstructed using the pipeline mentioned above, and the FeâTi flexion angle standard deviation during each grooming bout was quantified. Mid-legs could not be tracked due to occlusions with the brush. Ball movement was defined as the sum of the x, y and z rotational velocities of the ball.
Functional connectivity
For all functional connectivity experiments, tissues were imaged under a Bergamo II two-photon (2P) microscope using a Ã20 numerical aperture (NA) 1.0 objective lens (XLUMPLFLN, Olympus). For imaging, GCaMP signal was recorded with a 920ânm Ti:Sapphire laser (MaiTai DeepSee, Newport Spectra-Physics). For optogenetic activation, a fibre-coupled 655ânm LED (FC1-LED, Prizmatix) was positioned with a micromanipulator (Misumi XYZFG2) to deliver pulse trains of red light onto the tissues, with an inter-stimulation interval greater than 10âs. The LED was controlled and synchronized with the resonance imaging scanner (8.3âkHz) using ScanImage software (MBF Bioscience), such that red light stimulation was permitted only during the non-imaging fly-back time of the scanner. This ensured that no light artefact appeared in the region of interest. LED power was measured with a power meter (PM100A, Thorlabs) paired with a photodiode sensor (S121C, Thorlabs), at roughly 1âcm distance between LED and sensor. Background subtracted imaging data were analysed using ImageJ and MATLAB as in ref. 19. Change in calcium signal was computed using âF/Fâ=â(FâââF0)/F0, where F0 is the mean fluorescence 2âs period before stimulation onset. Statistical comparisons between groups were performed by quantifying the area under the curve (0â2âs poststimulation).
To test whether BRK is excitatory (as predicted by the connectome), we optogenetically activated BRK while recording calcium activity from its main postsynaptic partner that we called BON1 (Brake Output Neuron 1). In this experiment (Extended Data Fig. 5e,f), whole central nervous systems (brainâ+âVNC) of female flies (6â9âdays old) of the genotypes BRK-Gal4>UAS-CsChrimson; BON1-LexA>LexAop-GCaMP6s or +>CsChrimson; BON1>GCaMP6s were dissected and imaged in extracellular saline solution bubbled with carbogen19. Tissues were transferred on a poly-l-lysine-coated coverslip fixed in an imaging chamber (ALAMS-518SWPW). During the entire imaging session, bubbled extracellular saline with carbogen was delivered over the brains by means of a perfusion system (78018-40, Masterflex). For BRK activation, 2âs pulse trains of red light (50âHz, roughly 0.08âmWâmmâ2) were delivered onto the tissues. Simultaneously, single-plane imaging of the BON1 soma was performed at a rate of 6âHz.
To test whether FG and/or BB receive information from gustatory sensory neurons, we activated Gr5a neurons while recording calcium activity from either FG or BB. In these experiments (Fig. 5b and Extended Data Fig. 8aâd), female flies (6â9âdays old) of the genotypes (1) Gr5a-LexA>LexAop-ChrimsonR; FG-Gal4>UAS-GCaMP7b, (2) Gr5a-LexA>LexAop-ChrimsonR; BB-Gal4>UAS-GCaMP7b, (3) +>LexAop-ChrimsonR; FG-Gal4>UAS-GCaMP7b and (4) +>LexAop-ChrimsonR; BB-Gal4>UAS-GCaMP7b were tethered, dissected and imaged as in refs. 41,69. In brief, flies were ice-anaesthetized and vertically mounted on chamber. The cuticle was removed from the head to expose the SEZ brain region from where FG and BB neurites could be imaged (single plane, 3âHz). The front legs were ultraviolet-glued to avoid movements during imaging, and Gr5a neurons were photostimulated by delivering pulsed red light onto the proboscis (100âHz, roughly 0.08âmWâmmâ2). A side camera (FLIR, SpinView software) ensured reproducible positioning of the LED in front of the proboscis (distance of roughly 1âcm). Flies were either fed or starved 24âh before the experiment (placed in vials with tissue soaked with water and all-trans retinal). Experiments for fed versus starved state comparison of FG activity on Gr5a stimulation and corresponding controls, (Extended Data Fig. 8a), were performed on a setup described in ref. 41, which used a 0.66âHz imaging frame rate and wide-field opto-stimulation (650ânm) through the imaging objective, instead of the fibre-coupled LED used in all other experiments.
Muscle imaging
To test the influence of BRK, FG or BB activation on leg muscle activity, we performed one-photon (1P) and 2P calcium imaging of front-leg femoral muscles (Fig. 4 and Extended Data Fig. 7). Female flies (5â8âdays) of the genotypes (1) BRK-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f (ref. 38), (2) FG-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f, (3) BB-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f and (4) +>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f were cold anaesthetized and placed on a circular coverslip fixed in an imaging chamber (CSC-25L, Bioscience Tools). The wings and five legs, except the left front leg, were ablated. We applied ultraviolet-cured glue around the fly body and on the proboscis to avoid movements during imaging. The remaining front leg was glued either in its flexed (FeâTi angle roughly 10â27°) or extended (FeâTi angle roughly 123â147°) position. The fly holder was then flipped, such that the fly was underneath the coverslip on the opposite side to the objective. We could then add water on the coverslip and image with a water immersion objective (Ã20 NA 1.0 objective lens, Olympus XLUMPLFLN), while the fly remained dry on the other side of the coverslip. Muscle GCaMP6f signal in the front leg was recorded using 1P, wide-field fluorescence imaging (488ânm mounted LED; Thorlabs) and then the same sample was imaged under 2P imaging (920ânm Ti:Sapphire laser; MaiTai DeepSee, Newport Spectra-Physics). Under 2P conditions, because the fly was in complete darkness, control flies often showed light responses to the opto-stim LED (note that even though we use 655ânm LED, it is likely that there was a dim tail of the LED spectrum that is present in the visual spectrum of the fly). On the other hand, under the 1P condition, because of bright blue imaging light, control flies did not show any responses to the 655ânm opto-stim LED. Hence we used 1P data for analysis, but still continued performing 2P imaging given it was very useful to draw the muscle boundaries and also depict the imaging videos. For activating CsChrimson expressed in BRK, FG or BB, the 655ânm LED described above was placed with a micromanipulator and used to deliver red light towards the fly thorax (roughly 1âcm distance). A given session typically consisted of four stimulations for both 1P and 2P experiments. Change in calcium signal was computed using âF/Fâ=â(FâââF0)/F0, where F0 is the tenth percentile fluorescence intensity level in the 2âs period before stimulation onset. For âF/F calculation, all four stimulation trials were considered and averaged across the different sessions.
In 1P experiments (Fig. 4k and Extended Data Fig. 7d), red light stimulation (continuous, roughly 0.01âmWâmmâ2) was delivered for 1.6âs with 10âs inter-stimulation intervals; muscle GCaMP6f signal was acquired at a frame rate of 50âHz. Red light stimulation was controlled by means of transistorâtransistor logic inputs synchronized to the imaging session using ThorCam software (Thorlabs) plus an external Arduino based trigger box (Thorlabs TSI-IOBOB2). In 2P experiments (Fig. 4l), 2âs of red light stimulation (100âHz, roughly 0.08âmWâmmâ2) was as described in functional connectivity experiments; muscle GCaMP6f signal was acquired at 6âHz.
To probe the effect of halting neurons on spontaneous muscle activity, we performed a separate set of experiments (Extended Data Fig. 7a,b,e,f) in which red light stimulation was delivered for roughly 2âs only during high muscle baseline activity.
For tibia-movement experiments (Extended Data Fig. 7c), we used a protocol described in ref. 70. Briefly, a fly was mounted on a coverslip as described above. A magnetic pin (Entomoravia, Austerlitz Insect Pins; 1âmm length; 0.1âmm diameter) was then glued on the front left leg tibia. A magnet mounted on a programmable servo motor (Silver max Hybrid Servo Motor, Precise Motion and Control Inc.) was used to forcibly flex and extend the FeâTi joint (1âs per flexion or extension, repeated four times). Femoral muscle activity was imaged under epifluorescence (1P) while delivering optogenetic stimulation using the 655ânm LED described above, during the entire session (continuous, roughly 0.08âmWâmmâ2). Muscle GCaMP signal was acquired at a frame rate of 50âHz. A simultaneous video of the tibia movements (720âÃâ540 resolution; 50âHz) was acquired in SpinView software (FLIR) and synchronized to the imaging session using ThorCam software (Thorlabs) plus an external Arduino based trigger box (Thorlabs TSI-IOBOB2). Change in calcium signal was computed using âF/Fâ=â(FâââF0)/F0, where F0 is the median fluorescence 300âms period before movement initiation onset.
In vivo imaging
For imaging BRK activity in vivo (Fig. 6), female flies (4â7âdays) of the genotypes BRK-Gal4>Act88F:Rpr; UAS-GCaMP6f; UAS-tdTomato or BDN2-Gal4>Act88F:Rpr; UAS-GCaMP6f; UAS-tdTomato were anaesthetized on ice and tethered on a custom fly holder19. Thoracic dissection for VNC imaging was then performed as described in ref. 15. Artificial Haemolymph (AHL71) solution was used during dissection and imaging of the exposed VNC. After dissection, the holder was placed under a Bergamo II 2P microscope (Thorlabs) under a water immersion objective (Ã40 NA 0.8 objective lens Nikon CFI APO near infrared). An air-supported ball was positioned under the fly in a similar setup as described above for leg kinematics analysis. Temperature under objective (roughly 25â30â°C) was controlled and maintained by using a heater (Southeastern Heaters & Controls, Inc., FLC-2 120âV 250âW paired with a TPC10063 controller) paired to the airâball system. Flies with uncoordinated leg movements (roughly 25%) were discarded before the experiment. After an acclimation period to the ball (roughly 15â20âmin), a volume containing axonal projections from BRK or BDN2 was imaged using at a volumetric rate of 2âHz (BRK) or 6âHz (BDN2), using a 920ânm Ti:Sapphire laser and a fast z-piezo device. Video of the behaving fly (720âÃâ540 resolution; 200âHz) was acquired in SpinView software (FLIR) and synchronized to the imaging session using ScanImage software (MBF Bioscience). The synchronized calcium imaging and ball velocity data were analysed offline. For BRK imaging experiments, additional behaviours were manually annotated (Fig. 6eâh) using FlyTracker software63. Data analysis was performed using custom scripts in Python and MATLAB.
Immunohistochemistry
All central nervous system dissections and immunohistochemistry were performed as described in ref. 72 with detailed protocols available at https://www.janelia.org/project-team/flylight/protocols. Primary antibodies used were chicken anti-GFP (1:1,000, Thermo Fisher Scientific, AB_2534023), rabbit anti-dsRed (1:500, CloneTech, AB_10013483) and anti-Bruchpilot (1:500, nc82, mouse monoclonal, Developmental Studies Hybridoma Bank, AB_2314866). Alexa fluor secondary antibodies (Thermo Fisher Scientific) were used at 1:500 dilution (Goat antichicken, Alexa488, AB_2576217; Goat antirabbit, Alex568, AB_10563566; Goat antimouse, Alex568, AB_2534072 and Goat antimouse, Alex647, AB_141725).
FISH
This was performed as a part of a large-scale fluorescence in situ hybridization (FISH) imaging session by A. Petruncio and the FlyLight team at the Janelia Research Campus, as described in ref. 73.
Connectome-constrained modelling
The neuronal activity was simulated as a spiking neural network in the brian2 software v.2.5.1 (ref. 74). Model details, including the original code, are described elsewhere7. The original code was modified to allow for stimulating and silencing neurons at arbitrary time points throughout the simulation. Briefly, a leaky integrate-and-fire model was constructed based on the fully annotated connectome8. The connection strength between two neurons was set as proportional to the number of synapses linking them. Neurotransmitter predictions based on the EM dataset35,75 determine whether the interaction between two neurons is inhibitory (GABA, Glu) or excitatory (all other). Neuronal stimulation was mimicked in the model by adding a Poisson spike train of defined frequency as an input to a neuron. Neuronal silencing was mimicked by simply severing all outgoing synaptic connections of the desired neuron. It is important to realize that the intrinsic firing rate of neurons in this model is zero and that the Poisson inputs constitute the only external input. The firing rates reported here are averaged over 30 trials, for 1,000âms each with 0.05âms integration time steps.
The walk neurons P9 and BPN were stimulated bilaterally at 150 and 50âHz, respectively. The firing rates for the top 100 neurons are shown in Fig. 3a,e. Figure 3bâd,fâh shows the same neurons as Fig. 3a,e, but here the stop neurons BB, FG and BRK, respectively, are stimulated at 150âHz between 0.25 and 0.75âs. All rates in the top Fig. 3aâh were smoothed with a Gaussian kernel (sigma 25âms). In the wiring diagram shown in the bottom of Fig. 3aâh, only the most active DNs with firing rates greater than 10.3 and 20âHz for P9 and BPN stimulations are shown. The node colour shows the average firing rates of the most active DNs during walk neuron stimulation (Fig. 3a,e) and during walkâhalt costimulation (Fig. 3bâd,fâh) normalized to the maximum firing rate in Fig. 3a,e, respectively. As BPNs project contralaterally, the left hemisphere DNs receiving input from contralateral BPNs (right) were chosen for representation (this applies to Extended Data Fig. 10a,b, in which walk neurons BPNs and P9 were stimulated at 150 and 50âHz, respectively, and oviDN and MAN1 were stimulated at 150âHz).
Extended Data Fig. 6b shows all neurons that were differentially affected in walk neuron stimulation and walk neuronâstop neuron costimulation. Walk neurons BPN and P9 were stimulated at 150 and 50âHz, respectively. Stop neurons FG and BB were stimulated at 150âHz.
The left hemisphere GRNs were activated (150âHz) in Fig. 5a and the downstream feeding pathway with increased firing rates, along with FG and BB, are shown as a wiring diagram. The node colours correspond to the firing rate, except for oDN1 and BDN1 (for simplicity, the graphs are limited to one hemisphere). The heatmaps in Fig. 5c,d show the average firing rate of oDN1 and BDN2 normalized to the maximum value in the left panel, respectively. The left shows costimulation of left hemisphere sugar GRNs and bilateral P9 or BPN walk neurons. The middle shows the same as left, but while silencing stop neuron FG bilaterally. The right shows the difference in firing rate between left and middle panels (this applies to Extended Data Fig. 8e in which only the difference in firing rate for oDN1 and BDN1 in case of BB is shown). The heatmap in Extended Data Fig. 9c demonstrates activation of sugar GRNs (left hemisphere) and eye bristles at 150âHz and the resultant change in firing of FG, BB and DNg12 neurons (grooming command neurons). Colours and values on the heatmap indicate their firing rates.
Cytoscape75 (v.3.10.0) was used to create all the wiring diagrams shown in this study. The edges in Figs. 3aâh and 5a and Extended Data Figs. 2b, 9b,f and 10aâc illustrate the connectivity in the model (red denotes excitatory, blue denotes inhibitory). The arrow size represents the connection strength (connections below five synapses are excluded). For simplicity, only one hemisphere is shown, except in Extended Data Figs. 2b and 9b. The node colours represent firing rates wherever mentioned.
Experimental procedures and statistics
We used standard sample sizes, from the field and similar to previous work. All behavioural experiments were reproduced independently at least twice. Control and experimental flies were scored in random order during behavioural experiments. Behavioural experiments were performed with the experimenter blinded to genotype. All statistical tests were performed in MATLAB or Graphpad Prism. All two-group comparisons (unless indicated otherwise) were performed using a non-parametric MannâWhitney test. All multiple-group comparisons (unless indicated otherwise), were performed using a non-parametric KruskalâWallis test followed by Dunnâs multiple comparisons with appropriate controls. Exact sample size values for each plot are reported in Supplementary Table 1.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.