Innate behaviors are frequently comprised of ordered sequences of component actions that progress to satisfy essential drives. Progression is governed by specialized sensory cues that induce transitions between components within the appropriate context. Here we have characterized the structure of the egg-laying behavioral sequence in Drosophila and found significant variability in the transitions between component actions that affords the organism an adaptive flexibility. We identified distinct classes of interoceptive and exteroceptive sensory neurons that control the timing and direction of transitions between the terminal components of the sequence. We also identified a pair of motor neurons that enact the final transition to egg expulsion. These results provide a logic for the organization of innate behavior in which sensory information processed at critical junctures allows for flexible adjustments in component actions to satisfy drives across varied internal and external environments.
Organisms have evolved a repertoire of innate behaviors, comprised of sequences of component actions, to satisfy essential drives1,2,3. Progression along an innate behavioral sequence is regulated by distinct stimuli, or ‘releasers’, to ensure that transitions between component actions occur in a suitable context at the appropriate time3. This mechanism imparts behavioral flexibility by introducing decision points that allow innate behaviors to adapt to variation in the organism’s internal and external environment. Control at the junctures of component actions is a fundamental property of many instinctive behaviors.
The drive to reproduce is a dominant motivator of behavior in all species. Diverse behavioral programs dedicated to courtship, copulation and the production and care of offspring have evolved to optimize reproductive success. For oviparous animals that do not brood, such as the fruit fly Drosophila melanogaster, egg deposition represents the culmination of this array of reproductive behaviors. Considerable pressure is imposed on the selection of the appropriate time and place to deposit eggs. Fruit flies express strong, species-specific preferences for the site of egg deposition based, in part, on odor, taste, texture and the spatial dimension of the environment4,5,6,7,8,9,10,11,12. During egg laying, females evaluate the local environment before expressing an ordered motor sequence (abdominal bending, ovipositor (hypogynium) burrowing and egg expulsion) that culminates in egg deposition subterraneously within a nutritive substrate10,13,14,15,16,17,18. After egg expulsion, the female comes to rest, this final phase of the behavioral sequence is coupled to ovulation and fertilization, and the cycle repeats.
Egg laying in the fly is initiated by a seminal fluid peptide, sex peptide, introduced into the uterus (genital chamber) during mating19. Sensory information from neurons responsive to sex peptide is relayed to the brain, inhibiting a subset of the pC1 cluster of neurons15,20,21,22,23. This disinhibits the oviposition descending neurons (oviDNs), a collection of descending interneurons that project to the ventral nerve cord and are necessary and causal for the expression of the ordered egg deposition motor sequence15. One model posits that ramping activity in these descending neurons determines the progression of this terminal motor sequence15,24. Progression along the sequence, however, is likely to be dictated by the ongoing acquisition of sensory information, allowing the motor pattern to adapt to variability in the internal and external environment.
In this study, we have characterized the detailed structure of egg-laying behavior and identify that the transitions between component actions are variable and can be flexibly adjusted to accommodate diverse environmental conditions. Moreover, we have identified three classes of neurons that control the timing and direction of specific transitions within the terminal egg deposition motor sequence. These results provide both a behavioral logic and a neural basis for the imposition of adaptive flexibility on an innate and stereotyped sequence of motor actions.
Variable transitions in the egg-laying behavioral sequence
Females lay eggs one at a time in a repeating cycle, continually transitioning between three distinct phases of a behavioral sequence. Each egg-laying cycle is comprised of an active exploratory phase, deposition and a more stationary phase (‘reset’) that includes ovulation, after which the cycle repeats (Supplementary Fig. 1)10,13,14,17,18. We have studied the composition of this sequence in detail by filming individual gravid females at high resolution in small egg-laying chambers on a 1% agarose substrate and manually scoring the component behaviors (Supplementary Fig. 2, Supplementary Video 1 and Supplementary Table 1). Before deposition, flies explored the substrate with their proboscis and legs. During this phase, flies extended their proboscis to make brief contact with the substrate and walked to a new location (Fig. 1a). They then transitioned to deposition and bent their abdomen to bring the ovipositor in contact with the surface, initiated substrate burrowing (a rhythmic behavior in which the ovipositor digs into the substrate and expels the egg) and ultimately deposited the egg subterraneously. After egg expulsion, the flies abruptly stopped burrowing, detached from the egg and then lifted and groomed their ovipositor (Fig. 1a). The females then remained stationary for an extended period of time, intermittently grooming and exhibiting abdominal contortions likely to result from ovulation (the reset phase)17. The behavioral sequence then repeated. This ordering of component actions was highly conserved across repeated egg-laying events (Fig. 1b). We independently rescored a subset of data using a second human annotator to demonstrate the consistency and reproducibility of our manual labels. Human–human labeling agreement, as determined using the F1 scoring metric25,26, was above 90% for most behaviors and above 95% for all behaviors combined (Extended Data Fig. 1). We further validated these behavioral observations by implementing an unsupervised behavioral classification analysis based on a pose estimation model to automatically identify stereotyped, recurring behavioral actions27,28. There was high correspondence between the unsupervised classifier and our manually defined behavioral categories and labels (Supplementary Fig. 3, Extended Data Fig. 2, Supplementary Videos 2 and 3 and Methods). Thus, egg-laying behavior appears to be organized as an ordered sequence of behavioral components.
Although the sequential organization of these behaviors is conserved, the timing, frequency and duration of the individual components within this behavioral sequence exhibit considerable variability (Fig. 1c,d). Moreover, the behavioral sequence was conserved, but transitions could occur in both directions (Fig. 1e and Supplementary Table 2). This variability in transitions was not only apparent for exploration but also observed for deposition behaviors. Although burrowing was always preceded by abdominal bending, bending was not always followed by burrowing. Instead, walking or proboscis contact were observed. Likewise, 35% of burrowing episodes did not persist to egg expulsion but were aborted in favor of additional bouts of burrowing or further exploration. Persistent burrowing invariably preceded egg expulsion, and behavioral transitions following expulsion exhibited little variability and proceeded along the ordered sequence to the reset phase. Thus, during both exploration and deposition, the egg-laying sequence is comprised of multiple junctures between component actions that may serve as decision points. These junctures may allow the fly to advance or reinitiate the sequence contingent on sensory information obtained during a component action.
Egg deposition sequence adjusts to changes in substrate firmness
We therefore asked whether abdominal bending and ovipositor burrowing, component actions obligatory for the subterraneous deposition of the egg, adapt to changes in the properties of the substrate. We initially scored both the count and the depth of penetration of eggs laid on agarose substrates of increasing firmness (agarose concentrations from 0.75% to 2.5%; Fig. 2a,b)7,11,16. As substrate firmness was increased, flies were less successful at achieving subterraneous egg deposition (Fig. 2a). Above 1.75% agarose, total egg output dropped significantly, with a mean of 11 eggs laid in 4 h on 2.0% agarose compared to 18–21 eggs on 0.75% to 1.75% agarose (Fig. 2b), and flies deposited a significantly larger fraction of eggs on the substrate surface (Fig. 2a). These data suggest that the ability to achieve subterraneous egg placement is sensitive to substrate firmness and may positively gate egg output.
We filmed egg-laying behavior on different substrates and observed that progression along the deposition sequence was dramatically reduced as the firmness of the agarose substrate was increased (Fig. 2c). The probability of transitioning from bending to burrowing was highest on 1% agarose and was reduced by 29% on 1.75% agarose (Fig. 2d). Moreover, burrowing-to-expulsion transitions reduced by 65% as the agarose concentration increased from 0.75% to 1.75% (Fig. 2e). These data suggest that abdominal bending is not simply a means of initiating burrowing. Rather, bending may allow substrate sampling by sensory organs on the abdominal terminalia that permits the recognition of tactile cues that regulate the transition to burrowing. Burrowing is also likely to be gated by tactile feedback as the fly makes contact with and engages the substrate in an effort to achieve subterraneous egg deposition. Burrowing may be unsuccessful on firmer substrates and can be aborted in search of a more favorable location. The variability in the sequence of these behaviors is likely to reflect the search for an optimal location to deposit eggs subterraneously.
Terminalia sensory bristles regulate sequence progression
Peripheral touch sensation in Drosophila is mediated by tactile hairs, or bristles, that cover the surface of the fly29. The bristles of the ovipositor valves and adjacent segments of the abdominal terminalia make contact with the substrate during egg deposition in Drosophila (Fig. 3a)30,31,32. In flies that express pan-neuronal green fluorescent protein (GFP), we observed that the vast majority of terminalia bristles are innervated by a single bipolar neuron, a canonical feature of purely mechanosensory bristles (elav-GAL4>mCD8–GFP; Extended Data Fig. 3a)29,31. Moreover, the base of all terminalia bristles stains with an antibody directed to NOMPC, a force-sensitive ion channel present in mechanosensory neurons (Extended Data Fig. 3b,c)33,34,35. These observations suggest that the terminalia bristles harbor mechanosensory neurons that play a role in tactile sensing during the egg deposition sequence.
We searched literature and image databases and used the split-GAL4 intersectional strategy to generate two restrictive driver lines (ATB-1 and ATB-2) that target the sensory neurons that innervate the abdominal terminalia bristles (ATB neurons; Fig. 3b–e, Extended Data Fig. 4 and Supplementary Table 3)36,37,38,39. ATB-1 also drives expression in a sparse population of neurons in the brain, whereas ATB-2 drives reliable expression in the forelegs but not in the brain. However, the only consistently labeled neurons common to these two lines are those that innervate the approximately 150 terminalia bristles (88% and 76% innervated overall, including 81% and 79% of ovipositor bristles, in ATB-1 and ATB-2, respectively; Supplementary Table 3). The axons of these neurons project to a ventral domain of the abdominal neuromere (Fig. 3e and Extended Data Fig. 4b) and are thus poised to inform local circuits about tactile properties of the substrate during egg deposition18,40.
We asked whether ATB neurons are functionally involved in egg laying by expressing the potassium channel Kir2.1 in these neurons to inhibit their activity (ATB-1>Kir2.1; Extended Data Fig. 4d)41. We initially filmed egg-laying behavior on 1% and 1.25% agarose substrates in control and ATB-silenced flies. Control flies exhibited reduced progression from bending to burrowing as we increased the firmness of the substrate (Fig. 3f). By contrast, ATB-silenced flies progressed from bending to burrowing with high probability on all substrates examined (Fig. 3f). These flies also showed aberrant burrowing behavior on agarose substrates; burrowing episodes were shorter in duration and more frequently aborted than in control flies (Fig. 3g,h and Extended Data Fig. 5a,b). Furthermore, ATB-silenced flies atypically deposited eggs on the rigid chamber walls; when burrowing on the wall, ATB-silenced flies expeled eggs during 15% of the burrowing episodes, whereas burrowing on the wall in control flies rarely persisted to egg expulsion (Fig. 3g–i).
Together, these results suggest that tactile feedback from ATB neurons modulates the egg deposition sequence, affording an adaptive response to the firmness of the substrate. While bending on a firm substrate, the tactile response of ATB neurons may suppress the transition to burrowing (Fig. 3f). During burrowing, tactile feedback from the ATB neurons may promote the persistence of burrowing on ideal substrates and elicit the abortion of burrowing on inappropriate substrates (Fig. 3g). Absent this feedback, bending transitions to burrowing with high frequency, and burrowing transitions to egg expulsion with low frequency, independent of the substrate firmness (Fig. 3f,g).
We next examined the consequences of ATB silencing on both the count and the depth of penetration of eggs across a wider range of substrate firmness. Flies with silenced ATB neurons exhibit a diminished ability to achieve subterraneous egg deposition on substrates firmer than 0.5% agarose, whereas control flies deposit subterraneously until 1.25% (Fig. 3j and Extended Data Fig. 5c,d; ATB-2>Kir2.1 silenced flies on 1% agarose). ATB-silenced flies continued to release a large number of eggs on firmer substrates despite the failure to achieve subterraneous egg placement (Fig. 3j,k and Extended Data Fig. 5c,d). By contrast, control flies began to show a reduction in egg output at 1.25% (Fig. 3j,k). In flies in which Kir2.1 expression was restricted to the subset of brain neurons labeled by ATB-1, subterraneous egg deposition was largely unaffected (ATB-1>Otd-nls:FLP; UAS(FRT.mCherry)Kir2.1-GFP; Extended Data Fig. 6)42. Thus, ATB neurons may coordinate penetration of the substrate by the ovipositor and positively gate egg expulsion after successful penetration.
ATB silencing yields a complex array of phenotypes that strongly implicate ATB neurons in providing tactile feedback during egg laying that modulates the progression from bending to burrowing to egg expulsion. The mechanisms by which ATB neurons exert this control may rely on the spatial and morphological heterogeneity of terminalia bristles32. Individual sets of bristles may exhibit unique tuning properties and may function independently to modulate different phases of the behavioral progression29,33,43,44.
Burrowing behavior adjusts to changes in substrate firmness
The pivotal role of subterraneous egg placement in the progression of component behaviors led us to closely examine the substructure of burrowing (Fig. 4a). A burrowing episode is comprised of discrete cycles that begins with rhythmic ovipositor digging. As the surface is scored, the ovipositor extends into the substrate, and the egg emerges out of the uterus and into the ovipositor. Rhythmic pushing expels the egg out of the ovipositor and into the substrate, just beneath the surface. Completed egg expulsion halts the rhythm, terminating the burrowing episode, and the fly then detaches the ovipositor from the egg.
In chambers containing 1% agarose, egg expulsion required a minimum of three cycles and could require as many as ten cycles within a burrowing episode (Fig. 4b). The number of cycles was significantly lower in aborted episodes in which flies did not persist to egg expulsion (mean of three cycles for aborted episodes and five cycles for expulsion; P < 0.001, Wilcoxon rank-sum test), and burrowing could be aborted after any cycle within an episode (minimum of one and maximum of eight; Fig. 4b). This suggests that the decision to persist in burrowing may be determined after each individual cycle. Burrowing can therefore be extended or aborted and then reinitiated to achieve successful egg deposition.
We observed that the substructure of burrowing behavior was dramatically altered as the firmness of the agarose substrate was increased. The total number of burrow cycles required for egg expulsion increased over twofold (Fig. 4c) as the agarose concentration increased from 0.75% to 1.75%. Thus, additional burrowing cycles are required to dig and push the egg into the firmer substrates. Burrow episodes that were aborted also displayed a twofold increase in cycle count on firmer substrates (Fig. 4c). If the egg cannot be successfully deposited after an extended attempt, burrowing is aborted in search of a more favorable location. These data suggest that the transition to egg expulsion (‘egg out’) and the reset phase is contingent on the decision to persist in burrowing until the egg is completely expelled. The decision to persist in burrowing for additional cycles is likely to be informed by ongoing sensory feedback regarding the position of the egg as it is pushed through the uterus and ovipositor into the substrate.
Internal sensory neurons activated by the progression of the egg
We next screened a library of transgenic lines45 to identify candidate sensory neurons that innervate the lower reproductive tract and detect the passage of the egg through the uterus during burrowing4,46,47,48. We identified a cluster of sensory neurons whose cell bodies flank the posterior uterus and whose processes arborize along the outer surface of the distal-most fibers of the muscle that encircles the uterus (posterior uterine (PU) sensory neurons; Fig. 5a–d)49. We used the split-GAL4 intersectional strategy to generate two lines that labeled a pair of PU neurons on each side of the uterus (PU-1, 1.9 ± 0.5 cells per side, n = 17 sides in 13 flies; PU-2, 2.1 ± 0.3 cells, n = 11 sides in 8 flies; mean ± s.d.; Fig. 5a–c and Extended Data Fig. 7a,b). These neurons send projections centrally that terminate in the ventral-most neuropil of the abdominal neuromere, a sensory domain associated with multidendritic sensory neuron inputs50,51 (Fig. 5e and Extended Data Fig. 7a,c). We confirmed the polarity of PU neurons by targeted expression of both synaptotagmin–GFP52, a presynaptic marker, and DenMark53, a somatodendritic marker. Synaptotagmin–GFP was restricted to the central projections in the abdominal neuromere, while DenMark localized to the peripheral processes encircling the posterior uterus (Extended Data Fig. 7d). This pattern of dendritic innervation suggests that PU neurons may sense the passage of an egg through the posterior uterus into the ovipositor.
We therefore monitored the activity of PU neurons as the egg is expelled from the uterus. GCaMP6f was expressed in PU neurons, and calcium activity was recorded in flies mounted ventral-side up (Fig. 5f and Methods)54,55. Snapshots from a typical video recording over a 90-s window encompassing egg expulsion are shown in Fig. 5g, along with the corresponding activity of the four PU axons and behavioral measurements of the movement of the egg and ovipositor (Supplementary Video 4). Initially, we observed an incomplete expulsion event (Fig. 5g), where the egg advanced from the uterus (first frame) into the extruded ovipositor (second frame), after which the egg retreated into the uterus and the ovipositor retracted (third frame). During this event, calcium activity in PU neurons increased from baseline after the egg entered the ovipositor and returned to baseline when the egg retreated into the uterus. A second, complete expulsion event then occurred (fourth frame), and the PU neurons again responded after the egg entered the ovipositor, and the activity returned to baseline after the egg was completely expelled (fifth frame). These response properties were observed in all 28 PU neurons recorded from eight flies (Fig. 5h,i and Supplementary Fig. 4). PU neurons were not activated when the egg was at rest in the uterus. Moreover, PU neuron response was specific to the advancement of the egg into the ovipositor and not simply to the extrusion of the ovipositor. PU neurons did not respond to ovipositor extrusion events in flies lacking an egg (Fig. 5j–l and Supplementary Video 5). These observations demonstrate that PU neurons respond shortly after the egg passes through the posterior uterus into the ovipositor and may therefore inform circuits in the abdominal neuromere about the position of the egg during burrowing18,40.
Silencing PU neurons disrupts the egg-laying sequence
We silenced PU sensory neurons to examine their role in egg-laying behavior by the targeted expression of Kir2.1 (PU-1>Kir2.1). In PU-silenced flies, we observed a dramatic reduction in egg output (mean of 9 eggs in 4 h compared to 23 and 34 in the two genetic controls; Fig. 6a and Supplementary Fig. 5a). Moreover, the majority of the eggs in PU-silenced flies were not deposited subterraneously on a 1.0% agarose substrate (29% deposited subterraneously versus 95% and 93% in both genetic controls; Fig. 6b and Supplementary Fig. 5b). This reduction in egg count was not a consequence of a mating defect. PU-silenced virgins showed no deficit in mating but exhibited a reduction in egg count after a single mating event (Supplementary Fig. 5c,d).
PU-silenced flies expelled 51% of the eggs in the typical fashion following burrowing but exhibited a 67% reduction in the progression from burrowing to egg expulsion (PU-1>Kir2.1, probability of 0.25 versus 0.75 for both genetic controls; Fig. 6c,e). Burrowing episodes were comprised of fewer cycles than burrowing episodes in control flies (Fig. 6f,g). Moreover, burrowing episodes culminating in egg expulsion resulted in the premature release of the egg on the substrate surface. These data suggest that PU neurons sense the passage of the egg into the ovipositor during a burrowing episode, promoting persistent burrowing to achieve subterraneous egg deposition.
The remaining 49% of eggs in PU-silenced flies were spontaneously dropped without burrowing or expression of any of the other behavioral components that typically precede egg expulsion (Fig. 6c). These eggs spontaneously emerged while the ovipositor was in midair and were removed by hindleg grooming. This phenotype was exhibited by 19 of 22 PU-silenced flies but was rarely observed in control flies (0% in 12 GAL4-only control flies and 2% in 3 of 30 UAS-only control flies; Fig. 6d). This distinct phenotype may implicate PU feedback in the regulation of musculature required for egg retention. Thus, the silencing of PU neurons resulted in deficits in burrowing and diminished and aberrant egg output.
PU neurons control timing and direction of burrow transitions
We next explored the function of PU neurons by targeted expression of the red-light-activated channelrhodopsin CsChrimson (PU-1>CsChrimson)56. We devised a physiological paradigm in which we photostimulated PU neurons in the context of egg laying. We have shown that PU neurons are activated after passage of the egg through the uterus into the ovipositor and that their activity returns to baseline after completed expulsion. We reasoned that prolonged PU neuron activation beyond egg expulsion may mimic the continued presence of the egg within the posterior uterus and ovipositor and delay progression along the behavioral sequence. In normal egg-laying behavior, burrowing ceases after egg expulsion, and the fly detaches from the egg, grooms its ovipositor and transitions to the reset phase. We photostimulated PU neurons during burrowing with a pulse of light that was triggered immediately before the completion of egg expulsion and remained on after egg expulsion for different durations (2.5, 5 or 20 s; light onset 0.9 ± 1.1 s before complete egg expulsion; n = 215 photostimulation events; mean ± s.d.; Fig. 7a). Prolonged PU neuron activation beyond egg expulsion resulted in the aberrant persistence of burrowing without transitioning to detachment despite the absence of an egg in the uterus (Fig. 7b). With 20-s photostimulation, flies stopped burrowing an average of 5.5 ± 1.3 s beyond egg expulsion (n = 15 flies; Fig. 7b). Flies that burrowed throughout the photostimulation period ceased burrowing after light offset (Fig. 7b and Extended Data Fig. 8a). As expected, given our observations with 20-s photostimulation, burrowing persisted until light offset frequently for 2.5-s stimulations, in approximately half of 5-s stimulations and almost never for 20-s stimulations (52 of 60 stimulations, 45 of 80 and 5 of 75, respectively). In the remaining events, burrowing persisted for variable durations but stopped before light offset. These data suggest that PU activation promotes burrowing persistence. However, persistent burrowing is not sustained, suggesting an intrinsic temporal control on the duration of burrowing.
Flies that persist in burrowing throughout photostimulation abruptly stopped burrowing after light offset and transitioned to the behavioral sequence normally triggered by egg expulsion (Fig. 7c). This behavior was observed for all three stimulus durations (Fig. 7b, Extended Data Fig. 8b,c and Supplementary Video 6). These data support the argument that PU neurons are activated by the passage of the egg into the ovipositor and drive the persistence of burrowing. These observations also suggest that a decrease in PU activity signals the completion of egg expulsion, resulting in the transition to detachment, grooming and the reset phase (Fig. 7d).
In the photostimulation events where burrowing stopped before light offset, flies exhibited exploration and deposition behaviors in new locations despite the fact that they had already expelled an egg (Fig. 7b,c, Extended Data Fig. 8b–d and Supplementary Video 7). This behavior appears to recapitulate the behavior observed after aborting a burrowing episode in normal egg-laying behavior. In wild-type flies, prolonged burrowing and PU activation without expulsion may signal the inability to deposit an egg, resulting in abortion of the episode (Fig. 7d). In the photostimulation experiment, the flies may be unaware of having laid an egg, and the prolonged activation of PU neurons may also signal the inability to deposit an egg, resulting in abortion (Fig. 7d). These flies persistently expressed exploration and deposition behaviors and exhibited numerous burrowing episodes for up to several minutes beyond light offset despite the absence of an egg in the uterus (Extended Data Fig. 8e,f). After the decision to abort and revert, a decrease in PU activity (photostimulation offset) no longer triggers the transition to reset.
These experiments demonstrate a role for PU activation and inactivation in the context of a burrowing episode. We therefore asked whether photostimulation of PU neurons could impact behavior outside the context of burrowing. We photostimulated PU neurons for 20 s at 90-s intervals, independent of the ongoing behavioral state of the fly. Neither the photostimulation period nor its offset induced an overt behavioral response (Extended Data Fig. 9). Thus, optogenetic activation only results in persistent burrowing during an ongoing burrowing episode. Moreover, a decrease in PU neuron activity only signals the completion of egg expulsion and the transition to postdeposition behaviors in the context of an ongoing burrowing episode.
A pair of uterine motor neurons expels the egg during burrowing
The transition from burrowing to egg expulsion represents the final decision point in the egg-laying sequence and results in the transition to reset. We screened an image database45 to identify transgenic lines that target motor neurons innervating the uterus and involved in expelling the egg. We identified a symmetric pair of large neurons in the abdominal neuromere that project into the abdominal nerve trunk and ramify along the ipsilateral length of the muscle that encircles the uterus49. We used the split-GAL4 intersectional strategy to generate four lines with restricted expression in these neurons (circular muscle of the uterus (CMU) neurons; Fig. 8a–c, Extended Data Fig. 10a and Supplementary Table 4). Their axon terminals exhibit abundant boutons that stain with an antibody to Drosophila VGLUT, a marker for glutamatergic motor neuron synapses (Fig. 8a)57,58.
We asked whether stimulation of CMU neurons could trigger egg expulsion by expressing the channelrhodopsin CsChrimson in these neurons. Optogenetic activation reliably induced egg expulsion in gravid females (Fig. 8d). Moreover, following activation of CMU neurons, histological analysis revealed that the uterus was dramatically constricted (Extended Data Fig. 10b). Egg expulsion did not occur after photostimulation of control flies harboring only UAS-CsChrimson or the split-GAL4.
We used two-photon imaging to demonstrate that CMU neurons are indeed active when a fly expels an egg. GCaMP6f was expressed in CMU neurons, and calcium activity was recorded, as in Fig. 5f. We observed an acute increase in calcium activity concurrent with egg expulsion (Fig. 8e,f). These observations suggest that the CMU neurons are active during natural egg laying, expelling the egg during burrowing.
We also expressed the anion channelrhodopsin GtACR1 (ref. 59) to silence CMU neurons and examine their functional role in egg-laying behavior. In CMU-silenced flies, we observed a dramatic reduction in egg output compared to control flies (Fig. 8g and Supplementary Fig. 6). Moreover, CMU-silenced flies spontaneously dropped 89% of their eggs without burrowing (Fig. 8h). Egg-laying behavior was intact in these flies, and they engaged in a comparable number of burrowing episodes as control flies (Fig. 8i,j). However, burrowing almost never culminated in egg expulsion in flies with silenced CMU neurons (Fig. 8k). Thus, CMU neuron activity is necessary to progress from burrowing to egg expulsion, the final decision point in the egg-laying sequence (Fig. 8l).
We have characterized the structure of egg-laying behavior in the fly and demonstrate that it consists of a sequence of component actions analogous to Nikolaas Tinbergen’s ‘reaction chain’3. Tinbergen portrayed innate behaviors as a reaction chain, in which each component action of the sequence enhances the probability of encountering releasers, or ‘sign stimuli’, that promote progression to a subsequent component. This organization of component actions provides decision points at the junctures of component behaviors that ensure the successful progression toward the consummate act that satisfies the drive.
Our data demonstrate that the individual components of egg-laying behavior are not simply motor acts but also acts of sensory evaluation of the external and internal world that govern behavioral progression. During exploration, substrate cues are encountered while walking and proboscis sampling that may identify a suitable location for egg deposition6,11,17. The flies then initiate more refined local exploration involving abdominal bending to permit sampling with the abdominal terminalia. We have identified a class of external sensory neurons (ATB neurons) that innervate tactile hairs on the abdominal terminalia29,31, which contact the substrate and regulate the transition from bending to burrowing. During burrowing, the ovipositor is used to score the surface, extend into the substrate and expel the egg subterraneously. We further describe a pair of uterine motor neurons (CMU neurons) that enact this critical transition of burrowing to egg expulsion. The expulsion of the egg triggers egg detachment and the transition to the final behavioral phase, grooming and ovulation, facilitating the reinitiation of the sequence. We also identified a cluster of interoceptive sensory neurons (PU neurons), likely to be proprioceptive4,46,47,48, that signal the passage of the egg through the uterus into the ovipositor during burrowing and coordinate the transition to the final reset phase. Behavioral analysis along with genetic manipulation suggest that information from the PU neurons can either drive the persistence of burrowing, resulting in egg expulsion, or prompt the cessation of burrowing if the egg cannot be expelled after an extended attempt. Finally, diminished activity in PU neurons during burrowing signals the completion of egg expulsion and initiates the transition to the reset phase. These results provide a logic for a reaction chain in which sensory information at critical junctures guides flexible adjustments in component behaviors to achieve subterraneous egg deposition across varied environmental conditions.
The organization of innate behaviors into a sequence of component actions may confer additional adaptive advantages. Individual components in an innate behavioral sequence may be differentially responsive to the distinct sensory stimuli that promote transitions along the sequence. A given stimulus may behaviorally impact only one of the components in the sequence. Each component therefore establishes a context that filters relevant sensory input. For example, during the hunting of bees, digger wasps first visually identify a target bee. The odor of bees has no impact during this visual search, but once a bee has been spotted, the bee odor triggers an acute strike3,60. Similarly, we observe context-dependent behavioral responses to the activation of PU neurons. Photostimulation of PU neurons during a burrowing episode results in persistent burrowing, whereas activation at other times in the sequence does not elicit a behavioral response. Moreover, only during burrowing does a decline in PU neuron activity result in the transition to the reset phase. Thus, the behavioral impact of sensory stimuli differs for each of the components in a sequence. Each component therefore displays selective attention to distinct stimuli that structures the transition between behaviors to accommodate a complex and variable sensory environment.
In addition, each component in the sequence affords an entry point for adaptive evolutionary change. Changes in specific components of egg-laying behavior that accommodate a new ecological niche can occur without perturbing the overall sequence. For example, changes in substrate preferences during exploration may occur as an evolutionary adaptation to a changing environment7,8,61. Alterations in subsequent components, such as burrowing, may then be necessary to accommodate changes in the properties of the novel substrate. D. melanogaster and D. suzukii have different preferences for the site of egg laying7. D. suzukii females prefer to deposit eggs within firmer ripe fruit, whereas D. melanogaster favors softer rotting fruit. Egg-laying behavior is comprised of the same sequence of component actions in the two species, but D. suzukii females exhibit dramatically prolonged burrowing episodes14. Episodes in D. suzukii can persist for over 100 s, whereas D. melanogaster burrowing on the same substrate does not extend for more than 9 s. Interestingly, D. suzukii has also evolved an enlarged and serrated ovipositor62. These changes do not alter the sequence of behaviors but illustrate evolutionary adaptations that allow D. suzukii to deposit eggs within firmer fruits. A similar logic holds for male Drosophila courtship behavior, where adjustments in different steps in a conserved sequence (for example, foreleg pheromone sampling and singing) can be independently altered, and these modifications play critical roles in the sexual isolation of related species63,64,65.
An innate behavioral repertoire is thought to be initiated by higher-order brain centers that represent a specific motivational state or drive3,66,67,68,69,70,71. These centers are activated by stimuli relevant to the drive and then select an appropriate motor program for action15,72,73,74. A signal is then transmitted to preconfigured circuits in the ventral nerve cord or spinal cord that are capable of producing a coordinated sequence of motor actions18,40,75,76,77,78. Pivotal intermediaries in this pathway are the descending interneurons that link the output of higher brain centers with the appropriate local circuits in the ventral nerve cord15,18,24,40,72,74,79,80,81,82,83. One intermediary eliciting components of egg laying in D. melanogaster has been recently identified, the descending oviDN cluster of neurons15. OviDNs are necessary and causal for the expression of the terminal components of the egg-laying sequence: abdominal bending, ovipositor burrowing and egg expulsion. Higher-order brain centers disinhibit the oviDN cluster following mating and modulate oviDN activity in response to mechanical and gustatory stimuli presented to the legs15,17. Thus, oviDNs are poised to induce the transition from exploration (walking and proboscis sampling) to later steps in the sequence, resulting in egg deposition. Although activation of the oviDNs is capable of eliciting the complete sequence from abdominal bending to egg expulsion, our observations demonstrate that transitions along this late sequence are exquisitely sensitive to ongoing sensory feedback. We observe that abdominal bending does not always lead to burrowing and identify that this transition is modulated by tactile feedback from ATB neurons. Furthermore, the duration of burrowing and the transition to the reset phase are informed by feedback from PU neurons that sense the presence of the egg in the ovipositor. Thus, once the activation of oviDNs initiates the egg deposition motor program, sensory information acquired during the ensuing behavioral sequence governs the progression of the component actions to satisfy the drive.
Fly stocks and genotypes
All experiments were performed using 3- to 20-d-old females. For detailed fly stock sources and genotypes, see Supplementary Tables 5 and 6.
Flies were reared at 25 °C and 55% relative humidity on a 12-h light/12-h dark cycle in vials containing cornmeal-agarose food. Females used in egg-laying experiments were genotyped under CO2 anesthesia within 1 d of eclosion and transferred to a vial containing an enriched medium (Nutri-Fly GF, Genesci Scientific) in a ratio of 4 females to 5 males, with a minimum of 12 and a maximum of 20 females per vial48. Egg-laying experiments were performed 5 to 7 d after eclosion. All experiments were initiated ±2 h of lights off. For optogenetic experiments, flies were reared and maintained in complete darkness, and all-trans-retinal (0.4 mM; Santa Cruz Biotechnology) was included in the enriched medium.
Wild-type and loss-of-function behavior
For quantifying behavior at high resolution, single females were filmed in parallel within a custom three-dimensional-printed assembly containing six chambers (Shapeways). Individual chambers were 4.1 mm deep and tapered from top to bottom (7.3 mm × 5.8 mm to 6.7 mm × 4.3 mm). One side of the chamber was open to a reservoir, within which the agarose-based substrate (Affymetrix Agarose-LE, 32802) plus 3% acetic acid (vol/vol; Sigma-Aldrich, 338826) was poured and allowed to set for 30 min. Flies were introduced by gentle aspiration, the assembly was placed at the center of a 5-cm off-axis ring light (530 nm; Metaphase Technologies), and video recording was performed using a GigE camera (Basler Ace acA2000-50gmNIR) attached to a ×0.5 telecentric lens (Edmund Optics, 54-798) at 20 Hz (682 × 540 pixels per chamber) via pylon Viewer software (Basler). Experiments lasted 2 h.
The study of egg depth of penetration was performed in a custom acrylic assembly with 16 individual chambers (18.5 mm × 18.5 mm × 6 mm). Flies were introduced by gentle aspiration and allowed to habituate to the chamber. Forty milliliters of substrate containing agarose and 3% acetic acid was poured into a 120-mm square petri dish (Greiner) and allowed to set for 30 min. The experiment was initiated by removal of the thin plastic barrier separating the flies from the substrate, and the whole assembly was then placed in the dark for 4 h.
Immunostaining and confocal microscopy
Flies were anesthetized with CO2 and fixed (2% paraformaldehyde in 75 mM lysine and 37 mM sodium phosphate buffer, pH 7.4) for 2 h at room temperature. The flies were then removed, and the brains, ventral nerve cord and lower reproductive tract were dissected in PBS containing 0.3% Triton X-100 (PBST), blocked with 10% normal goat serum diluted in PBST for 30 min and incubated in a primary antibody mix overnight at 4 °C. Subsequently, the tissue was washed for multiple rounds with PBST before being incubated in a secondary antibody mix overnight at 4 °C. A final round of PBST washing occurred before the tissue was mounted using VectaShield (Vector Laboratories) and imaged using an LSM 710 laser-scanning confocal microscope with a ×25/0.8 DIC or ×40/1.2 W objective (Zeiss). Primary antibodies used were mouse anti-bruchpilot (nc82; 1:10; Developmental Studies Hybridoma Bank), chicken anti-GFP (1:1,000; Aves Labs), rabbit anti-DsRed (1:500; Clontech), rabbit anti-NOMPC (1:5,000)35 and rabbit anti-DVGLUT (1:10,000)57. Secondary antibodies used were Alexa Fluor 633 goat anti-mouse, Alexa Fluor 488 goat anti-chicken, Alexa Fluor 488 goat anti-rabbit and Alexa Fluor 555 goat anti-rabbit (all at 1:200; Life Technologies). To visualize F-actin, Alexa Fluor 633 phalloidin was included in the secondary antibody mix (1:200; Life Technologies). Acquired images were processed using the Fiji distribution of ImageJ (NIH).
Thoracic dissection for calcium imaging
Three- to 20-d-old females were anesthetized on ice, and the wings were removed before being mounted (ventral-side up) on a square acrylic platform using UV-curable glue (AA 3104, Loctite) and UV illumination (LED-200, Electro-Lite). The head and abdomen were lightly pressed down to ensure complete mounting from the head to just anterior of the analia. All legs were cut at the trochanter before, using a 30-gauge needle, a thin well was created with petroleum jelly that encompassed the remaining leg coxa and ranged from the neck connective to the anterior abdomen. A custom imaging platform with a hole (1 mm × 750 μm) at the bottom of a pyramidal basin was positioned using putty such that the hole was centered on the hindleg coxa. The basin was filled with external saline (108 mM NaCl, 5 mM KCl, 2 mM CaCl2, 4 mM MgCl2, 4 mM NaHCO3, 1 mM NaH2PO4, 5 mM trehalose, 10 mM sucrose and 5 mM HEPES, adjusted to pH 7.3) before the remaining coxa of the middle and rear legs were removed, along with the surrounding preepisternum, the internal sternal apophysis and any visible trachea, revealing a rectangular window above the abdominal neuromere and proximal extent of the abdominal nerve trunk. Finally, the basin was drained, and fresh saline was gently flushed over the window.
Two-photon functional imaging
Pilot experiments revealed that gravid females mounted ventral-side up reliably expel an egg in midair within 30–60 min. Experiments were initiated immediately after completion of the dissection. The acrylic platform was secured adjacent to a camera and high-magnification lens setup (Point Grey USB3 camera, CM3-U3-13S2M-CS; InfiniProbe S-80 right angle video microscope lens) and infrared band-pass filter (Thorlabs, FGB25S) that, when illuminated by a nearby infrared (850-nm) LED lamp, allowed for high-resolution video recordings of the posterior abdomen concurrent with two-photon imaging.
Two-photon experiments were performed using an Ultra Microscope (Bruker) coupled to a Ti:Sapphire laser (Chameleon Vision, Coherent) via PrairiewView software (Bruker), with a GaAsp detector (Hamamatsu Photonics) for GCaMP6f and a photomultipier tube for tdTomato imaging. A ×40/0.80-NA water immersion objective (Nikon) was used, and the laser was tuned to 925 nm; the power measured after the objective ranged from 5 to 7 mW. The abdominal neuromere and abdominal nerve trunk were located using the microscope oculars and positioned near the center of the field of view by two-photon imaging. Using the tdTomato anatomical marker, a stretch of the abdominal nerve trunk where the axons were separated and ran in parallel was selected for the coronal section55. Coronal section imaging was performed at 10 Hz, covering 42.4 μm in x and 60 μm in z (512 × 85 pixels per image; 1.2-μs pixel dwell time). Small adjustments in the x and z dimensions were made as needed throughout the experiment to compensate for drift.
Axons corresponding to PU or CMU neurons were determined by two-photon imaging at the conclusion of the experiment. Axon projections were traced anteriorly, identifying PU or CMU axons by their expression pattern within the abdominal neuromere.
Optogenetic perturbations during behavior
For the optogenetic stimulation of PU neurons during egg-laying behavior, the high-resolution filming apparatus described above was slightly modified. Chambers were illuminated with an infrared 5-cm off-axis ring light (880 nm; Metaphase Technologies), a single 655-nm high-power LED (Luxeon Star) was installed adjacent to the video lens to deliver red-light stimulation, and an infrared band-pass filter was mounted in front of the lens. A custom MATLAB graphical user interface (GUI) was used to select the stimulus condition and control the timing of the light stimulus via an Arduino UNO (Arduino) and LED controller (BuckPuck 700 mA, Luxeon Star). Experiments were performed on a 0.8% agarose substrate plus 3% acetic acid. As the egg neared complete expulsion during burrowing, a trigger was pressed that turned the light stimulus on. The instant the egg was fully expelled, a second trigger was pressed, initiating a countdown timer for stimulus offset whose duration was determined by the selected stimulus condition. Individual flies contributed a minimum of 15 events (5 events each for control and two experimental conditions) and a maximum of 20 events (5 events each for control and all three experimental conditions) to the final data set. At the beginning and end of a behavioral session, 20-s light pulses were delivered at 90-s intervals to examine the impact of photostimulation outside the context of burrowing. The aberrant persistence of burrowing and/or reversion in the behavioral sequence following egg expulsion were reliably observed using the second PU split-GAL4 line in response to 5-s stimulation at 8 µW mm–2 (PU-2>CsChrimson, 60/60, n = 12). Genetic control flies did not exhibit these aberrant behaviors in response to 5 s of stimulation at 8 µW mm–2 (PU-1>smGFP, 0/50, n = 10 flies; empty-split-GAL4>CsChrimson, 0/50, n = 10).
For the optogenetic stimulation of CMU neurons in gravid females, up to 12 flies were transferred to a small, circular acrylic chamber (28 mm in diameter and 2 mm in height) and placed atop an infrared panel light (850 nm; Smart Vision Lights). Video recordings were performed using a USB3 camera (Basler Ace acA2040-90umNIR) attached to a ×0.377 telecentric lens (Edmund Optics, 34-015) at 40 Hz (2,048 × 2,048 pixels). Photostimulation was controlled by a custom MATLAB GUI and delivered by four 655-nm LEDs. A single volley of five light pulses of the selected duration was delivered with 1 s between pulse offset and onset, and the fraction of flies that expelled an egg at any point before 4 s following the last pulse offset was scored.
For the optogenetic silencing of CMU neurons during egg-laying behavior, all experiments were performed in the assembly used for high-resolution filming. Flies were filmed under constant green light (6 μW, 530 nm) delivered by the off-axis ring light.
Wild-type and loss-of-function behavior data analysis
For the high-resolution assay, the video was segmented in one of three ways. Wild-type flies on 1% agarose and PU-silenced flies were analyzed over ±60 s of egg expulsion. Wild-type flies on substrates of various firmness and ATB-silenced flies were analyzed over a contiguous video segment spanning three to eight egg-laying events beginning immediately after the first egg was deposited. CMU-silenced flies were analyzed over the entire 2-h recording session.
Segmented videos were manually annotated frame by frame in a custom MATLAB GUI. Manual scoring of behavior required 640.5 ± 275.1 s (mean ± s.d.) per 2-min video (n = 25 videos). Detailed annotation criteria are provided in Supplementary Table 1. The timing and count of burrow cycles were determined by observing individual episodes in real time. The cycle count per burrowing episode was highly positively correlated with the duration of the episode (r = 0.91). Manual annotations were validated by independently rescoring behavior on a subset of data using a second human annotator and were also compared to the output of a supervised learning algorithm (DeepEthogram26). Agreement was determined by calculating the F1 score25,26, a standard metric that ranges from 0 (poor agreement) to 1 (perfect agreement), calculated as
DeepLabCut (DLC; a feature detection algorithm)28 was used to track the x–y position of the posterior tip of the scutellum on the thorax, and the speed was estimated by comparing the distance between this position across ten frames (500 ms). A fly was considered to be walking if its speed, smoothed by a 1-s moving average, was greater than a threshold of 0.29 mm s–1.
For the determination of behavioral transition probabilities, the probability of start-to-start transitions was calculated as in ref. 24. Proboscis extension was only considered when expressed at distinct locations spaced greater than 500 μm apart. Proboscis extension events that occurred during other behaviors were omitted from this analysis. Bend onset was only scored once if burrowing was aborted and then reinitiated during a sustained abdominal bend. Transition probabilities were determined separately for behaviors happening before and after egg expulsion (egg out). The statistical significance of each transition was determined by comparison to a distribution of transition probabilities derived from 10,000 shuffled permutations of the original sequences. Transitions not shown were not significant and of low probability (<0.04; initial behavior distribution and complete transition matrices are shown in Supplementary Table 2).
For quantifying normalized egg depth of penetration, an egg was given a score of 1 if it was deposited entirely beneath the substrate surface, with only the egg’s spiracles exposed. If only part of the egg was beneath the surface, it was given a score of 0.5, whereas if it was entirely resting on the surface, it was scored as 0. The average normalized egg depth was calculated per fly for all flies that laid one or more eggs.
Supervised behavioral classification analysis
A DeepEthogram-slow model26 was trained using 518 manually annotated 2-min videos surrounding egg-laying events (±1 min of completed egg expulsion). Test data consisted of a subset of 30 randomly selected 2-min videos corresponding to 72,000 frames, which were held out from the training data set. Proboscis extension and egg out labels were expanded from one frame to three frames in both train and test datasets.
Unsupervised behavioral classification analysis
Our approach was based on ref. 27 and implemented using custom MATLAB code. Using key points from a DLC pose estimation model, 17 features were extracted from each video frame that represent postural and motion features relevant to egg laying. These features were velocity (movement of the scutellum over time, ‘vel’; Supplementary Video 2), movement of the proboscis relative to the ocellus (‘pe’), the z-score-normalized angle formed between a line connecting the ventral abdominal stripes and a line connecting the ocellus and scutellum (‘ba’), the angular velocity of this angle (‘velba’), movement of the leg joint from each leg (three features; ‘T1’–‘T3’), the DLC prediction confidence for egg emergence (‘Pegg’), the magnitude of two bands of the Morlet wavelet spectrogram of the pixel intensity of a circular region of interest (ROI) of radius 10 pixels surrounding the ovipositor (0.8 to 1.3 Hz and 1.3 to 2.3 Hz; ‘w1ovi’ and ‘w2ovi’) and the log of the magnitude of seven bands of the Morlet wavelet spectrogram of the movement of the dorsal arch of the stripe on abdominal segment A5 (ranging from 0.5 Hz to 10 Hz; ‘cwt1’–‘cwt7’). For a complete description of this analysis, see Supplementary Methods.
Functional imaging data analysis
Imaging data were first segmented into cell-specific ROIs. The location and shape of ROIs corresponding to all labeled axons across all frames was determined from the tdTomato channel using a semiautomated pipeline. DLC was used to track the center position of all identified axons, appearing as ellipsoids, in the tdTomato image stack. DLC predictions were then used to select foreground ROIs from a binary thresholded image stack. The raw fluorescence, F, was then calculated as the mean pixel value within the ROI bounds for each frame. The raw fluorescence was converted to ΔF/F0 using a baseline determined as the median fluorescence value from recording onset to 20 s before completed egg expulsion, excluding ±20 s surrounding ovipositor extrusion events. Example ΔF/F0 traces shown in figures and videos were smoothed by a three-point moving average.
The timing of egg expulsion events and ovipositor extrusion events was determined via an automated analysis of the distances between DLC-tracked key points (the dorsal–posterior edge of T6, the posterior tip of the egg and the midpoint of the ovipositor). T6:egg distance and T6:ovipositor distance were used to detect behavioral events before and after egg expulsion, respectively.
Raw distance traces were high-pass filtered (0.001 Hz) before total variation regularization, with events identified as threshold crossings of one-fifth the maximum regularized signal. Distances were within-fly normalized by the median distance between T6 and the posterior edge of the analia base, which was set to 1. Calcium response events (Supplementary Fig. 4) were determined similarly.
To compare response magnitude across events and flies, the fluorescence data were integrated and normalized as follows. The integration window for both egg expulsion and ovipositor extrusion events was defined as t = 0 to t = 3 s after event onset. For comparing incomplete to complete egg expulsion, the baseline 0 value was determined as the median 3-s integral over the first contiguous stretch of 60 s leading up to complete egg expulsion, excluding ±20 s surrounding any egg expulsion event. The postexpulsion value was determined as the median 3-s integral from t = 10 to t = 20 s after complete egg expulsion. The maximum ‘1’ value for normalization was the maximum 3-s integral observed throughout. For comparing incomplete egg expulsion to postexpulsion ovipositor extrusion events, the minimum ‘0’ value was determined as the median of the first 60 s (non-contiguous) starting 10 s after egg expulsion and excluding ±20 s surrounding ovipositor extrusion events. For flies that expressed multiple events, the mean was used in plots and all analyses. Calcium imaging was performed using both PU-1 and PU-2 split-GAL4 lines, and the data were combined.
Optogenetic activation data analysis
For every egg-laying event, the timing of completed egg expulsion and burrow termination was manually annotated in a custom MATLAB GUI. The time of completed egg expulsion was defined as the first frame where the egg reached maximum depth within the substrate. Burrow termination was defined as the frame associated with the onset of ovipositor detachment or lifting. The transition to the reset phase was determined if no additional burrowing episode occurred within 65 s of egg expulsion. If additional burrowing episodes did occur, the onset timing of the last burrowing episode before reset was similarly determined as the last burrowing episode to precede a 65-s window free of burrowing. For stimulation events presented in Fig. 7c and Extended Data Fig. 7b, t = 0 corresponds to the onset of the countdown timer, which approximately coincided with completed egg expulsion.
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Data from this study are available at https://github.com/axellaboratory/Cury_and_Axel_2023 and upon request. Trained pose estimation models and the supervised behavioral classifier can be accessed via Dropbox (https://www.dropbox.com/sh/jh4422f3ld95j1a/AAAHVb-pFsmcEk40BgSHm1TEa?dl=0).
Code used for processing the data is available at https://github.com/axellaboratory/Cury_and_Axel_2023.
Bastock, M. & Manning, A. The courtship of Drosophila melanogaster. Behaviour 8, 85–110 (1955).
Noirot, E. Serial order of maternal responses in mice. Anim. Behav. 17, 547–550 (1969).
Tinbergen, N. The Study of Instinct (Clarendon Press, 1951).
Cury, K. M., Prud’homme, B. & Gompel, N. A short guide to insect oviposition: when, where and how to lay an egg. J. Neurogenet. 33, 75–89 (2019).
Dweck, H. K. M. et al. Olfactory preference for egg laying on citrus substrates in Drosophila. Curr. Biol. 23, 2472–2480 (2013).
Joseph, R. M., Devineni, A. V., King, I. F. G. & Heberlein, U. Oviposition preference for and positional avoidance of acetic acid provide a model for competing behavioral drives in Drosophila. Proc. Natl Acad. Sci. USA 106, 11352–11357 (2009).
Karageorgi, M. et al. Evolution of multiple sensory systems drives novel egg-laying behavior in the fruit pest Drosophila suzukii. Curr. Biol. 27, 847–853 (2017).
Prieto-Godino, L. L. et al. Evolution of acid-sensing olfactory circuits in drosophilids. Neuron 93, 661–676 (2017).
Rockwell, R. F. & Grossfield, J. Drosophila: behavioral cues for oviposition. Am. Midl. Nat. 99, 361–368 (1978).
Yang, C.-h, Belawat, P., Hafen, E., Jan, L. Y. & Jan, Y.-N. Drosophila egg-laying site selection as a system to study simple decision-making processes. Science 319, 1679–1683 (2008).
Zhang, L. et al. Parallel mechanosensory pathways direct oviposition decision-making in Drosophila. Curr. Biol. 30, 3075–3088 (2020).
Schwartz, N. U., Zhong, L., Bellemer, A. & Tracey, W. D. Egg laying decisions in Drosophila are consistent with foraging costs of larval progeny. PLoS ONE 7, e37910 (2012).
Aranha, M. M. & Vasconcelos, M. L. Deciphering Drosophila female innate behaviors. Curr. Opin. Neurobiol. 52, 139–148 (2018).
Bräcker, L. B. et al. Quantitative and discrete evolutionary changes in the egg-laying behavior of single Drosophila females. Front. Behav. Neurosci. 13, 118 (2019).
Wang, F. et al. Neural circuitry linking mating and egg laying in Drosophila females. Nature 579, 101–105 (2020).
Takamura, T. Behavior genetics of choice of oviposition sites in Drosophila melanogaster. IV. Differentiation of oviposition force in the melanogaster species sub-group. Jpn. J. Genet. 59, 71–81 (1984).
Vijayan, V., et al. A rise-to-threshold signal for a relative value deliberation. Preprint at bioRxiv https://doi.org/10.1101/2021.09.23.461548 (2021).
Oliveira-Ferreira, C., Gaspar, M. & Vasconcelos, M. L. Neuronal control of suppression, initiation and completion of egg deposition in Drosophila melanogaster. Preprint at bioRxiv https://doi.org/10.1101/2021.08.23.457359 (2021).
Chen, P. S. et al. A male accessory gland peptide that regulates reproductive behavior of female D. melanogaster. Cell 54, 291–298 (1988).
Feng, K., Palfreyman, M. T., Häsemeyer, M., Talsma, A. & Dickson, B. J. Ascending SAG neurons control sexual receptivity of Drosophila females. Neuron 83, 135–148 (2014).
Häsemeyer, M., Yapici, N., Heberlein, U. & Dickson, B. J. Sensory neurons in the Drosophila genital tract regulate female reproductive behavior. Neuron 61, 511–518 (2009).
Yang, C. et al. Control of the postmating behavioral switch in Drosophila females by internal sensory neurons. Neuron 61, 519–526 (2009).
Yapici, N., Kim, Y.-J., Ribeiro, C. & Dickson, B. J. A receptor that mediates the post-mating switch in Drosophila reproductive behaviour. Nature 451, 33–37 (2008).
McKellar, C. E. et al. Threshold-based ordering of sequential actions during Drosophila courtship. Curr. Biol. 29, 426–434 (2019).
Segalin, C. et al. The mouse action recognition system (MARS) software pipeline for automated analysis of social behaviors in mice. eLife 10, e63720 (2021).
Bohnslav, J. P. et al. DeepEthogram, a machine learning pipeline for supervised behavior classification from raw pixels. eLife 10, e63377 (2021).
Berman, G. J., Choi, D. M., Bialek, W. & Shaevitz, J. W. Mapping the stereotyped behaviour of freely moving fruit flies. J. R. Soc. Interface 11, 20140672 (2014).
Mathis, A. et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 21, 1281–1289 (2018).
Tuthill, J. C. & Wilson, R. I. Mechanosensation and adaptive botor control in insects. Curr. Biol. 26, R1022–R1038 (2016).
Bryant, P. J. in The Genetics and Biology of Drosophila (eds Ashburner, M. & Wright, T. R. F.) 255–260 (Academic Press, 1978).
Crava, C. M. et al. Structural and transcriptional evidence of mechanotransduction in the Drosophila suzukii ovipositor. J. Insect Physiol. 125, 104088 (2020).
Tsacas, L. Fine structure and functioning of the ovipositor of Drosophila melanogaster Meigen (Diptera, Drosophilidae). Arch. de Zool. Exp. Génér. 116, 431–436 (1975).
Walker, R. G., Willingham, A. T. & Zuker, C. S. A Drosophila mechanosensory transduction channel. Science 287, 2229–2234 (2000).
Lee, J., Moon, S., Cha, Y. & Chung, Y. D. Drosophila TRPN(= NOMPC) channel localizes to the distal end of mechanosensory cilia. PLoS ONE 5, e11012 (2010).
Zhang, W. et al. Ankyrin repeats convey force to gate the NOMPC mechanotransduction channel. Cell 162, 1391–1403 (2015).
Luan, H., Peabody, N. C., Vinson, C. R. & White, B. H. Refined spatial manipulation of neuronal function by combinatorial restriction of transgene expression. Neuron 52, 425–436 (2006).
Pavlou, H. J. et al. Neural circuitry coordinating male copulation. eLife 5, e20713 (2016).
Pfeiffer, B. D. et al. Refinement of tools for targeted gene expression in Drosophila. Genetics 186, 735–755 (2010).
Tuthill, J. C. & Wilson, R. I. Parallel transformation of tactile signals in central circuits of Drosophila. Cell 164, 1046–1059 (2016).
Kimura, K., Sato, C., Koganezawa, M. & Yamamoto, D. Drosophila ovipositor extension in mating behavior and egg deposition involves distinct sets of brain interneurons. PLoS ONE 10, e0126445 (2015).
Baines, R. A., Uhler, J. P., Thompson, A., Sweeney, S. T. & Bate, M. Altered electrical properties in Drosophila neurons developing without synaptic transmission. J. Neurosci. 21, 1523–1531 (2001).
Asahina, K. et al. Tachykinin-expressing neurons control male-specific aggressive arousal in Drosophila. Cell 156, 221–235 (2014).
Zhou, Y., Cao, L.-H., Sui, X.-W., Guo, X.-Q. & Luo, D.-G. Mechanosensory circuits coordinate two opposing motor actions in Drosophila feeding. Sci. Adv. 5, eaaw5141 (2019).
Belanger, J. H. & Orchard, I. The role of sensory input in maintaining output from the locust oviposition digging central pattern generator. J. Comp. Physiol. A 171, 495–503 (1992).
Jenett, A. et al. A GAL4-driver line resource for Drosophila neurobiology. Cell Rep. 2, 991–1001 (2012).
Clark, J. & Lange, A. B. Evidence of a neural loop involved in controlling spermathecal contractions in Locusta migratoria. J. Insect Physiol. 47, 607–616 (2001).
Thomas, A. Nervous control of egg progression into the common oviduct and genital chamber of the stick-insect Carausius morosus. J. Insect Physiol. 25, 811–823 (1979).
Gou, B., Liu, Y., Guntur, A. R., Stern, U. & Yang, C.-H. Mechanosensitive neurons on the internal reproductive tract contribute to egg-laying-induced acetic acid attraction in Drosophila. Cell Rep. 9, 522–530 (2014).
Demerec, M. Biology of Drosophila (Wiley, 1950).
Court, R. et al. A systematic nomenclature for the Drosophila ventral nerve cord. Neuron 107, 1071–1079 (2020).
Tsubouchi, A. et al. Topological and modality-specific representation of somatosensory information in the fly brain. Science 358, 615–623 (2017).
Zhang, Y. Q., Rodesch, C. K. & Broadie, K. Living synaptic vesicle marker: synaptotagmin–GFP. Genesis 34, 142–145 (2002).
Nicolai, L. J. J. et al. Genetically encoded dendritic marker sheds light on neuronal connectivity in Drosophila. Proc. Natl Acad. Sci. USA 107, 20553–20558 (2010).
Chen, T.-W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).
Chen, C.-L. et al. Imaging neural activity in the ventral nerve cord of behaving adult Drosophila. Nat. Commun. 9, 4390 (2018).
Klapoetke, N. C. et al. Independent optical excitation of distinct neural populations. Nat. Methods 11, 338–346 (2014).
Daniels, R. W. et al. Increased expression of the Drosophila vesicular glutamate transporter leads to excess glutamate release and a compensatory decrease in quantal content. J. Neurosci. 24, 10466–10474 (2004).
Jan, L. Y. & Jan, Y. N. l-glutamate as an excitatory transmitter at the Drosophila larval neuromuscular junction. J. Physiol. 262, 215–236 (1976).
Mohammad, F. et al. Optogenetic inhibition of behavior with anion channelrhodopsins. Nat. Methods 14, 271–274 (2017).
Tinbergen, N. Über die orientierung des bienenwolfes II. Die bienenjagd. Z. Vgl. Phys. 21, 699–716 (1935).
Auer, T. O. et al. Olfactory receptor and circuit evolution promote host specialization. Nature 579, 402–408 (2020).
Atallah, J., Teixeira, L., Salazar, R., Zaragoza, G. & Kopp, A. The making of a pest: the evolution of a fruit-penetrating ovipositor in Drosophila suzukii and related species. Proc. Biol. Sci. 281, 20132840 (2014).
Seeholzer, L. F., Seppo, M., Stern, D. L. & Ruta, V. Evolution of a central neural circuit underlies Drosophila mate preferences. Nature 559, 564–569 (2018).
Ding, Y. et al. Neural evolution of context-dependent fly song. Curr. Biol. 29, 1089–1099 (2019).
Ding, Y., Berrocal, A., Morita, T., Longden, K. D. & Stern, D. L. Natural courtship song variation caused by an intronic retroelement in an ion channel gene. Nature 536, 329–332 (2016).
Anderson, D. J. Circuit modules linking internal states and social behaviour in flies and mice. Nat. Rev. Neurosci. 17, 692–704 (2016).
Saper, C. B. & Lowell, B. B. The hypothalamus. Curr. Biol. 24, R1111–R1116 (2014).
Sternson, S. M. Hypothalamic survival circuits: blueprints for purposive behaviors. Neuron 77, 810–824 (2013).
Swanson, L. W. Brain Architecture: Understanding the Basic Plan (Oxford Univ. Press, 2012).
Deutsch, D. et al. The neural basis for a persistent internal state in Drosophila females. eLife 9, e59502 (2020).
Schretter, C. E. et al. Cell types and neuronal circuitry underlying female aggression in Drosophila. eLife 9, e58942 (2020).
Kohatsu, S., Koganezawa, M. & Yamamoto, D. Female contact activates male-specific interneurons that trigger stereotypic courtship behavior in Drosophila. Neuron 69, 498–508 (2011).
Clowney, E. J., Iguchi, S., Bussell, J. J., Scheer, E. & Ruta, V. Multimodal chemosensory circuits controlling male courtship in Drosophila. Neuron 87, 1036–1049 (2015).
Wang, K. et al. Neural circuit mechanisms of sexual receptivity in Drosophila females. Nature 589, 577–581 (2021).
Grillner, S. Biological pattern generation: the cellular and computational logic of networks in motion. Neuron 52, 751–766 (2006).
Harris, R. M., Pfeiffer, B. D., Rubin, G. M. & Truman, J. W. Neuron hemilineages provide the functional ground plan for the Drosophila ventral nervous system. eLife 4, e04493 (2015).
Marder, E., Bucher, D., Schulz, D. J. & Taylor, A. L. Invertebrate central pattern generation moves along. Curr. Biol. 15, R685–R699 (2005).
Büschges, A., Scholz, H. & El Manira, A. New moves in motor control. Curr. Biol. 21, R513–R524 (2011).
Bidaye, S. S., Machacek, C., Wu, Y. & Dickson, B. J. Neuronal control of Drosophila walking direction. Science 344, 97–101 (2014).
Cande, J. et al. Optogenetic dissection of descending behavioral control in Drosophila. eLife 7, e34275 (2018).
Hsu, C. T. & Bhandawat, V. Organization of descending neurons in Drosophila melanogaster. Sci. Rep. 6, 20259 (2016).
Lemon, R. N. Descending pathways in motor control. Annu. Rev. Neurosci. 31, 195–218 (2008).
Namiki, S., Dickinson, M. H., Wong, A. M., Korff, W. & Card, G. M. The functional organization of descending sensory-motor pathways in Drosophila. eLife 7, e34272 (2018).
We thank L.F. Abbot, C.M. Root and W.B. Grueber for comments on the paper; D. Hattori, B. Noro, J.A. Browning–Kamins, J.T. Remark, A.D. Pourmorady, R.A. Mosneanu, C.E. Haoud and A. Zangiabadi for technical assistance; N. Gompel, E.A. Lumpkin, A. Vina–Albarracin, R. Behnia, K. Kay, L.Y. Tian, K. Wang, F. Wang, B.J. Dickson, A. Mathis, B. de Bivort, G.G. de Polavieja, R. Benton, V. Ruta and members of the Axel laboratory for discussions; G.M. Rubin, B. Noro, D. Hattori, T.R. Shirangi and B.J. Dickson for fly stocks and M. Gutierrez, C.H. Eccard and A. Nemes for general laboratory support. Stocks from the Bloomington Drosophila Stock Center (NIH P40OD018537) were used in this study. Financial support was provided by the Howard Hughes Medical Institute and the Simons Foundation.
The authors declare no competing interests.
Peer review information
Nature Neuroscience thanks the anonymous reviewers for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended Data Fig. 1 Human-Human agreement is high and exceeds supervised behavioral classifier output.
a, Comparison of annotation agreement between two humans and between a human and a supervised behavioral classifier (DeepEthogram; Methods). n = 30 videos for all groups; same videos re-annotated by second human and held out as test dataset for supervised classifier. Blue, human-human agreement; pink, human-DeepEthogram agreement. Box bounds, 25th and 75th percentile; red line, median; whiskers, 5th and 95th percentile; +, outliers. background, unlabeled frames; all, all behaviors combined. ***p < 0.001, two-sided Wilcoxon rank sum test (Supplementary Table 7). b, Representative ethograms from six of 30 videos, displaying the annotations of two humans (top two rows of each plot) and the output of DeepEthogram (bottom row). Values within parenthesis at left, F1 score of the corresponding annotation compared with Human1 (top row annotation) for all behaviors combined. t = 0 marks the time of completed egg expulsion (egg out).
Extended Data Fig. 2 Reliable mapping between manual annotations and unsupervised behavioral classifier.
a, Mean time course of the 17 extracted features used for unsupervised behavioral classification analysis, plotted surrounding egg-laying (input feature definitions in Methods), each normalized to a maximum of 1. Here and in c, t = 0, egg out. b, Left: probability density function (PDF) generated from t-SNE embedding. Boundary lines, watershed-transform segmented behavioral clusters, with cluster index indicated within. Right: feature magnitudes of embedded data points plotted for 9 of the 17 features. c, Time course of expression fraction of the 14 t-SNE clusters that were expressed significantly higher than chance (p < 0.001, one-sided Fisher’s exact test; see top plot in f) and displayed peak expression within ± 20 seconds of egg out. Clusters sorted according to their peak timing (green tick mark) here and in d. Examples of these 14 clusters shown in Supplementary Video 3. d, Left: mean feature magnitudes of embedded data points (columns) corresponding to each of the 14 t-SNE clusters shown in c (rows). Right: mapping of these 14 clusters onto human labels, displayed as a fraction (bar height indicates fraction from 0 to 1). Here and in e and f, bg, unlabeled, background frames. e, Mapping of t-SNE clusters (rows) onto human labels (columns), displayed as a fraction. Percentage of total frames within original embedded data points belonging to each cluster is indicated at left. Here and in f, mappings significantly higher than chance are indicated by a white-rimmed black circle (p < 0.001, one-sided permutation test; Supplementary Methods; Supplementary Table 8); red asterisks, clusters expressed significantly higher than chance surrounding egg laying (p < 0.001, one sided Fisher’s exact test; Supplementary Table 7); t-SNE cluster # 0 corresponds to stationary frames. f, Top: log ratio of t-SNE cluster expression fraction within ± 60 seconds surrounding egg-laying relative to expression fraction within original embedded data points. Here and below, clusters arranged according to their peak timing. Bottom: mapping of human labels (rows) onto t-SNE clusters (columns), displayed as a fraction. Percentage of total frames given a particular label indicated at left.
Extended Data Fig. 3 Mono-innervation and anti-NOMPC labeling of terminalia bristles.
a, Representative images of posterior abdomen from one of four pan-neuronal elav-GAL4>mCD8–GFP females. Left and middle: mCD8-GFP, pan-neuronal expression demonstrating the innervation of each bristle by the distal process of a single bipolar neuron (green). The innervation patterns associated with the long sensillum and short sensilla of the ovipositor (hypogynium) could not be deciphered. Left: autofluorescence, abdominal cuticle (magenta). Left and right: bright-field (grayscale). Here and in b-d, A, analia; OV, ovipositor valves; T8, 8th abdominal tergite; T7, 7th abdominal tergite; S7, 7th abdominal sternite; scale bar, 50 μm. b, Top five rows: representative images of posterior abdomen from one of nine wild-type female flies stained with anti-NOMPC (green at left, grayscale at middle). Left: autofluorescence, abdominal cuticle (magenta). Left and right: bright-field (grayscale). Arrowheads, foci of anti-NOMPC labeling observed at the base of all bristles34. Bottom: lower resolution image of the posterior abdomen, lateral aspect, containing the regions displayed above (orange boxes). c, Representative images of the ovipositor valves from two of nine wild-type flies stained with anti-NOMPC (green at left, grayscale at right). Left, autofluorescence, abdominal cuticle (magenta); bright-field (grayscale). Foci of anti-NOMPC labeling at the base of the three hypogynial short sensilla, the singular long sensillum, and the hypogynial teeth are indicated by triangles, the arrow, and the arrowheads, respectively. d, Diagram of female posterior abdomen, lateral aspect.
Extended Data Fig. 4 Expression pattern of ATB-split-GAL4 lines.
E a, Representative images of the posterior abdomen from two of seven ATB-2>mCD8-GFP females, lateral (left) and ventral aspects (right). mCD8-GFP expression, membrane of ATB neurons (green); autofluorescence, abdominal cuticle (magenta). Background, overlaid bright-field images reveal extended bristles. Here and in b-d, scale bar, 50 μm. b, Representative image of the ventral nerve cord (left) and abdominal neuromere (right) from two ATB-2>mCD8-GFP females, stained with anti-GFP (membrane of ATB neurons, green) and nc82 (synaptic neuropil, magenta). Black bars flanking left image, region shown in higher resolution at right. c, Representative images of the brain from one of two ATB-1>mCD8-GFP females (left) and from one of two ATB-2>mCD8-GFP females (right), stained with anti-GFP (membrane of ATB neurons, green) and nc82 (synaptic neuropil, magenta). d, Representative images of the brain (left, one of six flies) and ventral nerve cord (right, one of six flies) from ATB-1>Kir2.1-T2A-tdTomato females, stained with anti-DsRed (ATB neurons co-expressing tdTomato and Kir2.1, green) and nc82 (synaptic neuropil, magenta). Foreleg expression is sparse in these flies (0.67 + /− 0.65 efferents per side in the dorsal prothoracic nerve; n = 12 nerves from six flies; mean ± s.d.).
Extended Data Fig. 5 Aberrant egg-laying in ATB-1 silenced and ATB-2 silenced flies.
a, Average number of cycles per aborted burrowing episode on a 1% agarose substrate. Only flies that exhibited two or more aborted burrowing episodes were considered here and in b. Burrowing episodes are comprised of discrete, rhythmic cycles (see Fig. 4); the cycle count per burrowing episode was highly positively correlated with the duration of the episode (r = 0.91). Here and in b-d, box bounds, 25th and 75th percentile; red line, median; whiskers, 5th and 95th percentile; o, data from individual flies; +, outliers; **p < 0.01, ***p < 0.001, n.s., p > .05, two-sided Wilcoxon rank sum test followed by Bonferroni correction (Supplementary Table 7). b, Average number of cycles per egg-expulsion burrowing episode on a 1% agarose substrate. c, Average normalized depth of penetration of eggs released on a 1% agarose substrate. Silencing neurons using either ATB-1 or ATB-2 splitGAL4 yielded significant deficits in subterraneous egg deposition (see also Fig. 3j, right panel), implicating a defect in the common set of terminalia bristle-innervating neurons in producing this phenotype. d, Number of eggs released on a 1% agarose substrate in 4 h.
Extended Data Fig. 6 Silencing ATB-1 brain neurons does not result in deficit in subterraneous egg deposition.
a, Representative images of the brain (left column, one of 13 flies) and ventral nerve cord (right column, one of four flies) from ATB-1>Otd-nls:FLP; UAS(FRT.mCherry)Kir2.1-GFP females. Flippase under control of the head-restricted Otd promotor used in combination with UAS(FRT.mCherry)Kir2.1-GFP results in the restricted expression of Kir2.1-GFP in ATB-1 brain neurons, whereas mCherry is expressed in ATB-1 non-brain neurons42. Samples stained with anti-GFP (Kir2.1-GFP-expressing ATB-1 neurons,green), anti-DsRed (mCherry-expressing ATB-1 neurons, red), and nc82 (synaptic neuropil, magenta). Scale bar, 50 μm. b, Average normalized depth of penetration of eggs released on a 1% agarose substrate. Subterraneous egg deposition is largely unaffected compared to ATB-1>Kir2.1 flies (see Fig. 3j, right panel). Here and in c, box bounds, 25th and 75th percentile; red line, median; whiskers, 5th and 95th percentile; “o”, data from individual flies; “+”, outliers; ***p < 0.001, **p < 0.01, n.s., p > .05, two-sided Wilcoxon rank sum test followed by Bonferroni correction (Supplementary Table 7). c, Number of eggs released on a 1% agarose substrate in a 4-hour window.
Extended Data Fig. 7 Expression pattern of PU-splitGAL4 lines.
a, Representative images from PU-2 > mCD8-GFP females. Left: ventral nerve cord (one of 13 flies) stained with anti-GFP (membrane of PU neurons, green) and nc82 (synaptic neuropil, magenta). Right: lower reproductive tract (one of eight flies) stained with anti-GFP (green) and phalloidin (muscle f-actin, gray); autofluorescence abdominal cuticle (red). In addition to consistent labeling of the PU neurons (PU-1, 2.1 ± 0.4 ventral afferents per side, n = 17 sides in thirteen flies; PU-2, 2.0 ± 0.6; n = 11 sides in eight flies; mean ± s.d.), both lines exhibited inconsistent labeling in a small number of peripheral neurons that project to the dorsal abdominal neuromere (PU-1, 1.2 ± 0.6 dorsal afferents per side; PU-2, 0.5 ± 0.6; mean ± s.d.). Here and in b-d, scale bar, 50 μm. b, Representative images of the brain from PU-1>mCD8-GFP (left, one of three flies) and PU-2>mCD8-GFP (right, one of two flies) females, stained with anti-GFP (green) and nc82 (magenta). c, Representative images from hs-FLP; PU-2>(FRT.stop)CsChrimson-mVenus females (one of two flies) where stochastic labeling resulted in only a single PU neuron being labelled (Gordon and Scott, Neuron 61, 373–384 (2009)). Top two images and right image: ventral nerve cord stained with anti-GFP (mVenus-expressing PU neurons, green) and nc82 (magenta). Bottom two images: lower reproductive tract stained with anti-GFP (green) and phalloidin (muscle f-actin, gray); autofluorescence, abdominal cuticle (red); white triangle, PU cell body; u, uterus. Right: lateral projection of the ventral nerve cord after registration with a template; V, ventral; P, posterior. d, Representative images of the abdominal neuromere (top row, one of three flies) and lower reproductive tract (middle, bottom rows, one of three flies) from PU-2>DenMark, synaptotagmin-GFP females, stained with anti-DsRed (dendrites, red) and anti-GFP (synaptic vesicles, green)52,53.
Extended Data Fig. 8 Phenotypes induced by PU photo-stimulation beyond egg expulsion.
a, Timing that burrowing stopped after completed egg expulsion in no-light control events (control, n = 83 events) and after light offset in stimulation events where burrowing persisted throughout photo-stimulation (stim, n = 93). Here and in e and f, box bounds, 25th and 75th percentile; red line, median; whiskers, 5th and 95th percentile; o, data from individual events; +, outliers. n.s., p > 0.05, two-sided Wilcoxon rank sum test (Supplementary Table 7). b, Time course of annotated behaviors for no light control events. c, Time courses of annotated behaviors for three stimulus conditions. Left: burrowing persisted throughout photo-stimulation. Right: burrowing stopped during photo-stimulation. Red bar above each plot, period of photo-stimulation. d, Fraction of events where burrowing was re-initiated within 65 s of egg expulsion in control and three stimulus conditions. For stimulation groups, fraction plotted separately for events where burrowing persisted throughout photo-stimulation (persist), and events where burrowing stopped during photo-stimulation (stop). Events defined as reverting in the sequence if burrowing was re-initiated within 65 s of egg expulsion. ***p < 0.001, two-sided Fisher’s exact test (Supplementary Table 7). e, Number of aberrant burrowing episodes after egg expulsion for events where burrowing stopped during photo-stimulation for all three stimulus conditions. Episode defined as aberrant if occurring within 65 s of egg expulsion or a previous aberrant episode. f, Onset timing of last aberrant burrowing episode expressed after egg expulsion for events where burrowing stopped during photo-stimulation and the fly reverted in the sequence, plotted for all three stimulus conditions. Last aberrant episode after the fly reverted in the sequence defined as the first episode preceding a 65-s window devoid of burrowing behavior. Light offset during an aberrant burrow episode significantly increased the probability of progressing to reset: 14 of 33 aberrant burrow episodes that spanned light offset progressed to reset compared to 0 of 106 episodes that stopped before light offset and 93 of 457 episodes that started after light offset (p = 1.40×10−10, p = 0.0048 comparing group 1 to group 2 or group 3, respectively, one-sided Fisher’s exact test).
Extended Data Fig. 9 PU photo-stimulation outside the context of burrowing.
a, Representative ethograms of behavior surrounding a 20-s photo-stimulation pulse delivered at 90-s intervals, independent of the ongoing behavioral state of the fly (Methods). Ethogram depicts data from 16 flies (n = 6 events per fly). Horizontal black dotted lines demarcate data from different flies. The component actions are color coded as in Fig. 1c, and completed egg expulsion events (egg out) are indicated by a black ‘X’. Photo-stimulation did not induce an overt behavioral response with the exception of two out of the 96 events where egg expulsion was completed within the stimulation window and the animal reverted in the sequence (‘<’ symbols at the right indicates these two events). Here and in b, t = 0, photo-stimulation onset; red bar above plot and vertical dashed magenta lines, period of photo-stimulation. b, Time course of annotated behaviors depicted in a.
Extended Data Fig. 10 Expression pattern of CMU-splitGAL4 lines.
a, Representative images of the brain (top row), ventral nerve cord (second, third rows), and lower reproductive tract (bottom row) from CMU-splitGAL4>mCD8-GFP females, stained with anti-GFP (membrane of CMU neurons, green). Top three rows: tissue also stained with nc82 (synaptic neuropil, magenta). Bottom row: tissue also stained with phalloidin (muscle f-actin, gray); autofluorescence, abdominal cuticle (magenta). Representative brain images (top row) from 12, 2, 2, 6 flies. Representative ventral nerve cord images (second, third rows) from 8, 22, 6, 12 flies. Representative lower reproductive tract images (bottom row) from 8, 11, 2, 10 flies. Images in third row are higher resolution regions of images in second row. For quantitation of expression patterns in the ventral nerve cord and lower reproductive tract, see Supplementary Table 4. Here and in b, scale bar, 50 μm. b, Representative images of the lower reproductive tract from gravid CMU-4>CsChrimson females that were flash frozen in liquid nitrogen without (left, one of two flies) or with (right, one of four flies) concurrent photo-stimulation (655 nm light at 40 µW/mm2). Prior to experiment, gravid females were maintained in the dark in an environment that ensured egg retention in the uterus, as in Fig. 8d (Methods).
Supplementary Figs. 1–6, Tables 1–8 and Methods.
Supplementary Video 1
Annotated behaviors surrounding an egg-laying event. Top: video recording of a female within an egg-laying chamber. Bottom: concurrent behavioral annotations. Blue, proboscis extension; white, walk; green, bend; magenta, burrow; yellow, detach; gray, groom. The vertical dashed line indicates the current time displayed in video; t = 0, completed egg expulsion (egg out).
Supplementary Video 2
Manual and automated analysis of egg-laying behavior. i, Video recording of a female within an egg-laying chamber displaying relevant key points used to determine features for unsupervised behavioral classification analysis (Extended Data Fig. 2 and Methods). Cyan circle, proboscis tip; red circle, dorsal arch of the stripe on abdominal segment A5; pink circle, ROI used to determine ovipositor pixel intensity in vii; white circle, T3 (metathoracic) leg joint; green lines, used to determine abdominal bend angle in v, with the upper green line connecting the ocellus to the posterior tip of the thoracic scutellum and the lower green line connecting the ventral-most edge of the stripes on abdominal segments A2 and A6. ii, Manual annotations. iii, Velocity (black, ‘vel’; 1/20× pixels per s) and proboscis movement (blue, ‘PE’; pixels per s). iv, Movement of the leg joint from each leg (magenta, ‘T1’; brown, ‘T2’; gray, ‘T3’; pixels per s). v, Z-score-normalized abdominal bend angle (>0 is downward bending, ‘ba’). vi, Egg emergence (DLC prediction confidence, ‘Pegg’). vii, Pixel intensity in a circular region of interest surrounding the ovipositor (1/1,000× intensity; pink circle in i). viii, Magnitude of continuous Morlet wavelet transform of ovipositor intensity trace in vii. The ovipositor intensity trace displays oscillations that slow in frequency as the egg incrementally emerges and is completely expelled. ix, Log magnitude of continuous Morlet wavelet transform of the position of the stripe on abdominal segment A5 (red circle in i; same data depicted in Supplementary Fig. 3).
Supplementary Video 3
Unsupervised behavioral clusters encompassing egg-laying behavior. Five-second video clips of flies displaying representative actions associated with each of the 14 t-SNE clusters that occurred significantly above chance and displayed peak expression within ±20 s of egg out (Extended Data Fig. 2c,d,f and Methods). Four clips are presented for each cluster. Black text at top left, exemplar cluster identity; gray index at center, real-time cluster expression; white index at center, midpoint of exemplar behavioral epoch after which the 5-s clip is centered. Clusters are presented according to their peak timing (Extended Data Fig. 2c).
Supplementary Video 4
PU neurons respond to the progression of the egg into the ovipositor. a, Two-photon imaging depicting relative fluorescence changes of GCaMP6f in four PU neurons (two each from the right and left sides) from a representative experiment encompassing an incomplete egg expulsion event followed by complete egg expulsion over a 90-s window. Measurements were performed in PU axons within the abdominal nerve trunk as shown in c; vertical dashed line, current time displayed in c and d. b, Top: normalized distance between T6 and ovipositor (blue). Bottom: normalized distance between T6 and posterior tip of the egg (magenta; Methods). Raw distance measures superimposed on video recording in d. c, Corresponding two-photon coronal section through the abdominal nerve trunk depicting raw GCaMP6f (green) and tdTomato (red) fluorescence in PU neurons (PU-1>GCaMP6f; tdTomato). Segmented ROIs corresponding to individual PU axons are color coded to match the traces in a; V, ventral; D, dorsal. d, Corresponding video recording of the posterior abdomen, lateral aspect, under infrared light. The blue and magenta lines connect the dorsal–posterior edge of T6 with the ovipositor and posterior tip of the egg, respectively. Before expulsion, the posterior aspect of the egg within the uterus is visible through the abdominal cuticle (same data depicted in Fig. 5g).
Supplementary Video 5
PU neurons do not respond to ovipositor extrusion after egg expulsion. a, Two-photon imaging depicting relative fluorescence changes of GCaMP6f in four PU neurons (two each from the right and left sides) from a representative experiment over two 30-s windows, one before and one after egg expulsion. The first clip (‘before egg expulsion’) encompasses multiple incomplete egg expulsion events. The second clip (‘after egg expulsion’) encompasses multiple ovipositor extrusion events lacking an egg. Measurements were performed in PU axons within the abdominal nerve trunk, as shown in c; vertical dashed line, current time displayed in c and d. b, Top: normalized distance between T6 and ovipositor (blue). Bottom: normalized distance between T6 and posterior tip of the egg (magenta; Methods). Raw distance measures superimposed on the video recording in d. c, Corresponding two-photon coronal section through the abdominal nerve trunk depicting raw GCaMP6f (green) and tdTomato (red) fluorescence in PU neurons (PU-1>GCaMP6f; tdTomato). Segmented ROIs corresponding to individual PU axons are color coded to match the traces in a; V, ventral; D, dorsal. d, Corresponding video recording of the posterior abdomen, lateral aspect, under infrared light. The blue and magenta lines connect the dorsal–posterior edge of T6 with the ovipositor and posterior tip of the egg, respectively. Before expulsion, the posterior aspect of the egg within the uterus is visible through the abdominal cuticle (same data depicted in Fig. 5j).
Supplementary Video 6
PU photostimulation beyond egg expulsion drives burrowing persistence. Four representative 35-s videos of PU-1>CsChrimson flies filmed within egg-laying chambers under infrared light exposed to different durations of red-light stimulation beyond completed egg expulsion. The ‘no-light’ control is at the top, and three experimental conditions (2.5-s, 5-s and 20-s light) are below. For each experimental condition, flies persist in burrowing throughout photostimulation and, after light offset, abruptly stop burrowing and transition to the behavioral sequence normally triggered by egg expulsion (‘advance’ group in Fig. 5). The light stimulation period indicated by the presence of a red box in the top left corner that, following completed egg expulsion, diminishes in size to reflect the stimulation time that remains. The background flashes white to indicate the timing of egg expulsion (t = 0.0 s).
Supplementary Video 7
Distinct phenotypes induced by PU photostimulation beyond egg expulsion. Eight representative 35-s videos of PU-1>CsChrimson flies filmed within egg-laying chambers under infrared light exposed to 5 s of red-light stimulation beyond completed egg expulsion. The first cohort of four videos depicts ‘advance’ events where flies persist in burrowing throughout photostimulation and, after light offset, abruptly stop burrowing and transition to the behavioral sequence normally triggered by egg expulsion. The second cohort of four videos depicts ‘revert’ events where flies stop burrowing before photostimulation offset and subsequently exhibit exploration and deposition behaviors in new locations despite the fact that they had already expelled an egg. The light stimulation period is indicated by the presence of a red box in the top left corner that, following completed egg expulsion, diminishes in size to reflect the stimulation time that remains. For the ‘revert’ cohort, the red stimulus box changes to yellow after burrow termination. The background flashes white to indicate the timing of stimulus-countdown trigger (t = 0.0 s; approximately concurrent with egg expulsion). In the final segment, both cohorts are displayed simultaneously (video playback speed 2× throughout).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Cury, K.M., Axel, R. Flexible neural control of transition points within the egg-laying behavioral sequence in Drosophila. Nat Neurosci (2023). https://doi.org/10.1038/s41593-023-01332-5
This article is cited by
Odor-regulated oviposition behavior in an ecological specialist
Nature Communications (2023)