Summary
Natural goal-directed behaviors often involve complex sequences of many stimulus-triggered components. Understanding how brain circuits organize such behaviors requires mapping the interactions between an animal, its environment, and its nervous system. Here, we use brain-wide neuronal imaging to study the full performance of mating by the C. elegans male. We show that as mating unfolds in a sequence of component behaviors, the brain operates similarly between instances of each component, but distinctly between different components. When the full sensory and behavioral context is taken into account, unique roles emerge for each neuron. Functional correlations between neurons are not fixed, but change with behavioral dynamics. From individual neurons to circuits, our study shows how diverse brain-wide dynamics emerge from the integration of sensory perception and motor actions in their natural context.
Graphical Abstract
ETOC:
Brain-wide neuronal imaging of C. elegans shows that most neurons are functionally unique and correlations of activity between neurons are not fixed but depend on behavioral context.
Introduction
Natural behaviors involve strong interactions between animals and their surroundings. When an animal is isolated from its natural context, brain dynamics do not display their full range of mechanisms (Getting, 1989; Krakauer et al., 2017). Recent brain-wide studies in immobilized C. elegans and other animals have uncovered strong activity correlations among large neuron populations (Kato et al., 2015; Stringer et al., 2019). However, circuit activity is more complex when animals freely behave. Studies in mice have uncovered changing functional correlations between brain areas when the animal engages in different behaviors (Markowitz et al., 2018). Freely-moving C. elegans hermaphrodites exhibit less correlated brain activity than immobilized worms (Scholz et al., 2018). In the mouse, increasing task complexity and the sensory richness will progressively decorrelate neurons and brain regions (Pinto et al., 2019). Task-dependent functional reorganization of neuronal circuits has been observed in invertebrate, vertebrate, and artificial systems (Getting, 1989; Briggman and Kristan Jr, 2008; Schilbach et al., 2013; Candadai et al., 2019). Here, we use the mating behavior of the male C. elegans to ask how an entire natural behavior is embedded in brain structure and function.
Mating behavior is highly interactive and involves variable sequences of recurrent behavioral components or motifs that carry the animal towards its goal. The male C. elegans uses a dedicated circuit in his tail – a posterior brain with over 100 sensory neurons, interneurons, and motor neurons – to drive these motifs (Sulston et al., 1980; Jarrell et al., 2012; Cook et al., 2019) (Figures 1A and 1B). He searches for a hermaphrodite by detecting pheromones. When he contacts a hermaphrodite, he presses the sensilla of his tail against her body, and scans to locate the vulva. During scanning, he frequently changes his movement direction, executes sharp turns to move around her head or tail, and slows at the vulva. At the vulva, he attempts to insert his mating spicules. Successful insertion triggers sperm transfer. Copulation is followed by rest (Liu and Sternberg, 1995; Simon and Sternberg, 2002; Leighton et al., 2014; LeBoeuf et al., 2014). All behavioral motifs only occur when freely-moving males interact with a hermaphrodite.
We recorded the activity of nearly every neuron in the posterior brain of freely-moving male C. elegans throughout mating. Brain-wide imaging revealed functional relationships among all neurons at every step. When brain-wide dynamics are considered in the context of an entire natural behavior, nearly every neuron exhibits a unique activity pattern. Each of the many different behavioral motifs has a specific and consistent circuit representation. As behavior unfolds, functional correlations between neurons in the brain are not fixed, but depend on context and change with the dynamic interactions between the animal, the nervous system, and the environment. For one wiring diagram to support many correlation patterns, the relationship between the connectome and activity cannot be one-to-one. By combining functional imaging, behavioral analysis, and single-neuron manipulations, we identify circuit-level mechanisms for several ethologically-relevant computations. We show how brain-wide dynamics are shaped by the flow of sensory inputs and motor actions across the full performance of a natural behavior.
Results
Brain-wide imaging throughout mating
To record the activity of the male’s entire posterior brain, we used a spinning-disc confocal microscope customized for multicolor, multi-neuronal imaging (Venkatachalam et al., 2016). We used strains with panneuronal expression of both nuclear-localized calcium indicator (GCaMP6s) and red fluorescent protein (mNeptune) imaged at 10 volumes per second with single-cell resolution (Figure 1C, Video S1). Panneuronal activity was continuously imaged through every step: initial search, contact, scanning, vulva detection, copulation, and rest.
For comprehensive analysis, we selected datasets of continuous 5-10 min recordings from eight animals with the broadest range of behavioral dynamics (Table S1). Most neurons were recorded in multiple datasets. Each neuron was identified by its relative position, morphology, and expression of cell-specific fluorescent markers (Table S2 and Figure S1A). The selected datasets contained the activities of 76 identifiable neurons. Nearly all pairs of left-right symmetric neurons were highly correlated. Grouping left-right pairs as one neuron type, we recorded 57 neuron types (Figures S1B-S1D). We also acquired datasets focused on specific neuron types or behavioral motifs.
We extracted a set of continuous behavioral features concurrent with circuit activity – velocity, sliding relative to the hermaphrodite, tail curvature, spicule position, and tail position – as well as discrete behavioral motifs (Figures 1D-1F).
The collective activity of neurons predicts behavior across animals.
Does brain-wide activity map to behavioral dynamics in the same way from animal to animal? If so, it should be possible to build a computational model that predicts one animal’s behavior from the brain-wide activity of others. Because we could identify the same neurons in every dataset, we were able to build models that account for the individual contributions of each neuron and test whether models built using one set of animals could predict the behavior of another.
We built brain-to-behavior models using sparse linear regression with short-term memory applied to the concatenated activity of 52 neurons that we recorded in nearly every experiment and a set of continuous behavioral features (Figures 2A and 2B). In each iteration, we used seven of our eight comprehensive datasets for concatenation and model training. We evaluated the model from each iteration by its accuracy in predicting behavioral dynamics from brain-wide activity for the held-out dataset (Figures 2A-2C). We calculated prediction accuracy across eight iterations and compared it to model accuracy tested on datasets with shuffled neuronal ids. Sparse linear regression models tested on the held-out datasets predicted most behavioral features more accurately than models tested on datasets with shuffled ids (Figures 2D and 2E and Table S3). Thus, most behavioral features are represented in the collective activity of the neurons consistently across animals.
How is the representation of behavioral features distributed across neurons? In all cases, we found that excluding single neurons from the datasets before training had only a small effect on prediction accuracy (Figure 2F and Table S4). Models trained using the activities of single neurons performed worse than models trained using all neurons for all behavioral features except spicules position (Figure 2F). Sparse linear regression ranks neurons by their relative contribution to each behavioral feature (Figure 2D). For most behavioral features, fewer than 7 top-ranking neurons were sufficient to achieve 95% of the full model performance (Figure 2F and Table S4). For tail curvature, more than 25 neurons were needed, suggesting its distributed representation in brain-wide activity.
To investigate how continuous behavioral features are represented across circuit layers, we assessed models trained separately on sensory, inter-, and motor neurons (Table S2). Velocity and tail curvature (features associated with motor output) were best predicted by motor neurons (Figure 2E). Models trained using sensory neurons were the least accurate at predicting velocity and tail curvature and were significantly less accurate than models trained on all neurons (t(13.98) = 2.55,p = 0.023 and t(11.55) = 3.85,p = 0.0025 respectively). In contrast, for the features associated with male-hermaphrodite interactions (e.g., relative sliding velocity) nearly full prediction accuracy was achieved with only sensory neurons (Figure 2E).
The brain partitions into functional communities for each behavioral motif.
To better understand how neurons interact during behavior (Figure 3A), we computed neuron-neuron and neuron-behavior correlations for all pairs of neuronal activities and continuous behavioral features. To test if neuron-neuron correlations were consistent across datasets, we selected correlation matrices for the eight comprehensive datasets and calculated pairwise Euclidean distances between them. These distances were significantly less than the distances between matrices with shuffled ids (t(35) = −36.09, p < 0.0001). The same was true for neuron-behavior correlations (t(27) = −47.26, p < 0.0001). Thus, neuron-neuron and neuron-behavior correlations are largely consistent across animals.
To identify groups of functionally-related neurons, we assembled a consensus correlation matrix incorporating data from all experiments. We grouped neurons with similar activities using hierarchical clustering (Figure 3B). Certain clusters reflected commonly recognized behavioral motifs such as searching, scanning, turning, vulva detection, and copulation. Each cluster indicated a group of principal neurons for each motif. Some neurons were strongly correlated with other neurons in more than one cluster (Figure S2A), suggesting that single neurons participate in multiple behavioral motifs. To frame the data for comparison with synaptic connectivity (see below) while allowing each neuron to belong to more than one functional group or community, we used link clustering, an edge-based community detecting algorithm (Ahn et al., 2010; Kalinka and Tomancak, 2011). Link clustering partitioned the mating circuit into overlapping communities that were largely consistent with hierarchical clustering (Figures 3B, 3C and S2B). One community was associated with excretory pore detection, a previously undescribed behavioral motif during mating.
Most neurons have unique activity patterns.
We compared the contributions of neurons by aligning their activities to the onset of discrete motifs such as hermaphrodite contact and turning. Many neurons were consistently activated or inhibited by a different combination of behavioral motifs (Figure 3D).
When considered relative to the full set of behavioral motifs, 79% of neurons exhibited unique activity patterns (Figures 3D and S3).
When we compared the activities of each group of neurons triggered by each behavioral motif, we often observed diverse temporal dynamics (Figures 3E-3J). In many cases, we observed highly consistent sequences of half-peak activities among neurons from the start of a motif (Figure 3K), suggesting different and stepwise functional contributions for each neuron. Considering the temporally-resolved activity of each neuron relative to all steps of mating behavior, virtually every neuron in the circuit is functionally unique.
Functional correlations are specific to behavioral context.
Not only do different and partly overlapping combinations of neurons contribute to different behavioral motifs; the correlations exhibited by these neurons can be different for different motifs. For example, the HOA and HOB hook sensory neurons have been viewed as contributing similarly to detecting and stopping at the vulva. We confirmed that both HOA and HOB are co-active during vulva detection, but we discovered that HOA activity increases and HOB activity decreases during copulation (Figures 3D, 3G and 3I). Thus, motif-specific correlations diversify brain-wide activity during mating.
To compare circuit-wide functional correlations across motifs, we partitioned each dataset into four states: searching, courtship, copulation, and post-copulatory rest. We calculated a separate correlation matrix for each state for each dataset (Figure S4). Neuron-neuron correlations as well as neuron-behavior correlations were more similar comparing the same states exhibited by different animals than comparing different states exhibited by the same animal (Figure 3L). The Euclidean distances between neuron-neuron correlation matrices corresponding to courtship and copulation were significantly smaller than those between randomly selected matrices (t(35.06) = −7.66, p < 0.0001 and t(20.05) = −3.73, p = 0.003 respectively). The Euclidean distances between neuron-behavior correlation matrices for searching, courtship and resting were also significantly smaller than those between randomly selected matrices (t(27.01) = −2.65, p = 0.018; t(35.01) = −11.39, p < 0.0001; and t(20.01) = −3.44, p = 0.005 respectively). In contrast, distances between matrices grouped by individual were not significantly different from randomly selected matrices (Table S5). Motif-specific brain-wide activity patterns were also observed at the onset of discrete behavioral motifs across different individuals (Figure S5). The brain operates similarly between instances of the same component behavior but distinctly between different component behaviors.
Functional communities of neurons are shaped by behavioral context and synaptic interactions.
One wiring diagram of the male has been reconstructed by electron microscopy (Jarrell et al., 2012; Cook et al., 2019). If the same wiring diagram supports context-dependent brain-wide activity patterns, functional correlations cannot be fully predicted by synaptic connectivity, or vice-versa. Activity correlations across all pairs of neurons varied from negative to strongly positive with a mean of 0.11±0.22 (Figure 3B). Among pairs of neurons with positive correlations above the mean (> 0.11), 19% are connected by synapses. This probability is marginally higher than the 15% probability that two randomly sampled neurons are connected by synapses (Figure 4A).
Among neuron pairs with stronger positive functional correlations (>0.3, >0.5, and >0.7), larger fractions were connected by synapses (26%, 40%, and 63%, respectively). When we considered more strongly correlated pairs, we observed larger fractions of connections with only electrical synapses or with both chemical and electrical synapses (Pearson correlation between the functional correlation threshold and the fraction of neurons connected by electrical synapses r = 0.93, p = 0.0017). In contrast, the fraction of connections with only chemical synapses did not increase (r = 0.05, p = 0.91). For neurons connected by synapses, we quantified the dependence of pairwise correlations on the number of electrical or chemical synapses. Functional correlations increased with the number of electrical synapses (partial correlation r = 0.33, p = 0.0007), and weakly increased with the number of chemical synapses (partial correlation r = 0.13, p = 0.014) (Figures 4B and 4C). We also tested how much functional correlation between neurons can be predicted by common synaptic input. Correlation between neurons that had a common presynaptic partner was significantly higher compared to shuffled data (Pearson correlation r =0.43, p<0.0001 and r =0.41, p<0.0001 for electrical and chemical synapses respectively). Thus, functional correlations between individual neurons are prevalent among neurons without direct synaptic connectivity. Functional correlations are significantly predicted by common synaptic input. Among synaptically connected neurons, functional correlations are better predicted by the number of shared electrical synapses than chemical synapses.
Functional correlations partition the mating circuit into overlapping communities for different behavioral motifs (Figures 3C and 4D). For each pair of functional communities, we calculated the density of synaptic connections within each community (in-group connectivity) and between the two communities (out-group connectivity). An interaction between two communities is assortative when in-group connectivity for each community is stronger than the out-group connectivity between them (Betzel et al., 2018). For electrical synapses, the majority of all pairwise interactions between functional communities were assortative (77-86% across different partitioning schemes). For chemical synapses, 31-54% of all pairwise interactions were assortative (Figure 4E and Table S6). In contrast, disassortative interactions, when out-group connectivity between communities is stronger than each ingroup connectivity, were significantly less common than chance in all but one partitioning scheme for electrical synapses (3-10%) and most partitioning schemes for chemical synapses (9-18%) (Figure 4E and Table S6). Compared to electrical synapses, chemical synapses showed a larger fraction of core-periphery interaction motifs. Core-periphery interactions occur when one community (the core) has stronger in-group than out-group connectivity whereas the other community (the periphery) is strongly connected to the core but its ingroup connectivity is weak. In summary, both electrical and chemical connectivity play substantial roles in internal signaling within functional communities. Chemical synapses play the larger role in signaling between functional communities.
Diverse overlapping circuits implement behavioral motifs.
The mechanisms that diversify brain-wide activity patterns and confer unique functional properties to each neuron are driven by stimulus, feedback, and motor patterns that only occur during natural behavior. Here, we explore several of these mechanisms by dissecting circuits for distinct motifs of mating.
Courtship.
Most functional communities within the mating circuit are associated with scanning to locate the vulva. During scanning, the male recognizes the hermaphrodite, distinguishes different locations, and keeps track of his own movements.
Sensorimotor initiation of backward movement.
Scanning begins with the initiation of backward movement when the tail contacts a hermaphrodite. Earlier studies identified neurons required for scanning including ray sensory neurons (Figure 1B) and the PVY interneuron that receives synapses from the rays (Liu and Sternberg, 1995; Sherlekar et al., 2013; Koo et al., 2011). Brain-wide imaging revealed many more neurons involved in scanning: 30% of the mating circuit from sensory neurons (R1AL/R, R2A, R4A, R6A, R9B, PCA) to interneurons (PVY, PDB, EF1-EF3, CP9) to motor neurons (AS10, AS11, VA10-VA12, DA7) (Figures 3B and 3E).
Some of the first neurons to be activated upon contact are the R2A and R6A sensory ray neurons and their postsynaptic partner CP9 (Figures 3E and 3K). Soon afterward, the EF1-3 GABAergic interneurons are activated. EF1-3 share electrical synapses with R2A and R6A, and their activities are strongly positively correlated with both R2A and R6A activities and with backward scanning (Figure 3D). EF1-3 are presynaptic to AVB, a premotor interneuron in the head that drives forward locomotion (Chalfie et al., 1985). Activating R2A, R6A, and EF1-3 might thus lead to GABAergic inhibition of AVB, thereby inhibiting the circuit for forward locomotion during backward scanning.
The PVY interneuron also becomes active with hermaphrodite contact, but its response to contact is delayed compared to other neurons (Figure 3K). This activity pattern and the fact that PVY is specifically active during backward movement (Figure 3D) support previous findings that PVY promotes backward movement through cholinergic excitation of AVA – a premotor interneuron in the head that drives backward locomotion (Sherlekar et al., 2013). AVA is pre-synaptic to the A-type motor neurons that drive backward locomotion (Sherlekar et al., 2013; Kawano et al., 2011; Zhen and Samuel, 2015). Indeed, the A-type motor neurons in the tail (VA10-VA12, DA7) become active with backward scanning. However, VA10-12 tend to reach their peak activity early, before the onset of backward movement. This activity pattern is consistent with VA10-12 roles in ventral bending of the tail upon contact, a maneuver that precedes scanning initiation. Two other motor neurons postsynaptic to AVA – AS10 and AS11, also become active during backward scanning. Thus, hermaphrodite recognition initiates backward movement through a synaptically-connected chain of neurons.
Sensory feedback during backward and forward sliding.
The PCA postcloacal sensilla neuron is active during scanning. Close examination of neuron-behavior correlations revealed a role in sensory feedback: PCA activity is correlated with the relative sliding between the male and hermaphrodite (r = 0.44±0.21), and PCA specifically becomes active at the onset of backward sliding (t(9) = 8.45, p <0.0001) (Figure 3D).
Like A-type sensory ray neurons, PCA has striated rootlets associated with mechanosensation (Sulston et al., 1980; Doroquez et al., 2014; Styczynska-Soczka and Jarman, 2015). Unlike the ray sensory neurons, the synaptic outputs of PCA are to neurons for behavioral motifs other than scanning (Jarrell et al., 2012). Multiple synaptic targets of PCA are involved in vulva detection. PCA is correlated with other neurons involved in scanning, but its functional role is to monitor backward sliding to provide feedback to neurons in other motifs.
Scanning involves long backward movements interrupted by short forward movements. At the onset of forward movements, A-type motor neurons that drive backward movement are inactivated and B-type motor neurons that drive forward movement are activated (Figure 3D). Forward movement during scanning appears to be a form of course correction and is often initiated when the male overshoots the vulva or the ends of the hermaphrodite.
The mating circuit monitors relative forward sliding between the male and hermaphrodite by mechanosensory feedback using the PHC sensory neuron, the apparent sensory counterpart of PCA. Like PCA, PHC has striated rootlets for mechanosensation (Sulston et al., 1980). Both neurons can predict relative sliding between the male and the hermaphrodite (Figure 2D and Table S4). Whereas PCA is positively correlated with backward sliding relative to the hermaphrodite, PHC is negatively correlated with backward sliding relative to the hermaphrodite (r = −0.29±0.09). PHC activates at the onset of forward sliding (t(10) = 9.4, p < 0.0001) (Figure 3D).
PHC has sex-specific connectivity (Jarrell et al., 2012; Serrano-Saiz et al., 2017a). In the male, one of the main synaptic targets of PHC is the PVY interneuron which drives backward movement through AVA. PHC is anticorrelated with PVY (r = −0.29±0.18) (Figure 3B). Thus, a feedback signal from PHC that detects forward sliding may be used to sustain forward sliding by inhibiting PVY. PHC also makes synapses to neurons involved in vulva detection. Thus, both PCA and PHC provide feedback about sliding to modulate other behavioral motifs.
Ventral bending during turning.
When the tail reaches either end of the hermaphrodite, the male turns around her body with a sharp ventral tail bend to maintain contact (Figure 5A). After successful turns, the male continues scanning on her other side. When unsuccessful, the tail loses contact and the male switches to forward swimming to regain contact.
Several neurons become active during turns including the R4A sensory neuron, the PVV interneuron, the DX1–3 inter/motor neurons, and the DD6 motor neuron (Figures 3B, 3C, 3F, 5B and 5C). PVV activates before other neurons and is active during both successful and unsuccessful turns, suggesting a role in turn initiation (Figure 3K). Other neurons, like R4A and DD6, are only active with successful turns (Figure 3D), suggesting roles in turn completion.
PVV ablation severely disrupted turning behavior. Without PVV, males were usually unable to turn around the hermaphrodite and often lost contact (t(16.43) = 14.44, p < 0.001) (Figure 5D). PVV receives inputs from ray sensory neurons and has direct synaptic output to the ventral cord motor neurons and ventral body wall muscles (Jarrell et al., 2012). PVV acts as a trigger for turning behavior by collecting sensory cues associated with the tapering ends of the hermaphrodite and directly signaling to neurons and muscles for ventral bending.
The R4A sensory neuron and DD6 motor neuron reach their peak activity when the male reaches the other side of the hermaphrodite. R4A directly innervates PVV and ventral body wall muscles. DD6 is a GABAergic motor neuron that relaxes dorsal body wall muscles (Zhen and Samuel, 2015). Thus, R4A and DD6 may prolong ventral bending, allowing the male to reach the other side of the hermaphrodite.
Dorsal bending near the vulva.
The tail often makes a sharp dorsal bend when it reaches the vulva to transition to copulation (Whittaker and Sternberg, 2009) (Figure 5A). Several neurons are associated with dorsal bending, including sensory neurons involved in vulva detection, the PDB inter/motor neuron, and the AS11 and DA7 motor neurons (Figure 3B).
PDB receives inputs from multiple neurons including CP7-9, HOA, EF1-3, and ray neurons, and is thus sensitive to different context-dependent signals for regulating tail posture. PDB-ablated males showed no difference from normal males in dorsal bending during searching and resting. However, PDB-ablated males showed less dorsal bending during scanning and vulva detection (t(13.94) = 2.18, p = 0.046 and t(13.98) = 4.14, p = 0.001) (Figure 5E). PDB may directly evoke dorsal bending through its synaptic innervation of dorsal body wall muscles, as well as by activating AS11 (which synapses onto dorsal muscles) and VD13 (which relaxes ventral muscles) (Zhen and Samuel, 2015) (Figure 5B).
The AS11 motor neuron is positively correlated with backward scanning, consistent with its receiving 30% of its synaptic input from the AVA premotor interneuron. AS11 is thus positively correlated with A-type motor neurons for backward movement including VA11 which activates ventral muscles (Figures 3B, 3D, 5B and 5F). Although both AS11 and VA11 are correlated with backward movement, they have contrasting relationships to tail curvature. AS11 is positively correlated with dorsal bending whereas VA11 is negatively correlated with dorsal bending (r = 0.12±0.15 and r = −0.13±0.15). In PDB-ablated males, AS11 and VA11 became more correlated with each other and less correlated with curvature (Figure 5F). AS11 receives 15% of its synapses from PDB. Because PDB is correlated with dorsal curvature (r = 0.29±0.19) (Figure 5F) but not velocity (r = −0.03±0.23), PDB appears to contribute to the curvature-dependent portion of AS11 activity but not its direction-dependent portion. PDB has a similar effect on the VD13 motor neuron, which relaxes ventral muscles. During scanning, VD13 is correlated with PDB and with curvature. PDB ablation lessens the correlation between VD13 and curvature (Figure 5F).
Both PDB and PVV provide mechanisms for context-dependent posture control. These interneurons collect sensory input that provide spatial cues about the vulva and hermaphrodite ends, and target motor neurons and musculature to control dorsal and ventral bending for different purposes.
Excretory pore detection.
When the tail reaches the hermaphrodite’s excretory pore while scanning, the PHA and PHB phasmid sensory neurons become active (Figure 5G). The phasmid neurons have sex-specific synaptic connectivity (White et al., 1986; Jarrell et al., 2012). The hermaphrodite uses her phasmid neurons for chemotactic responses (Hilliard et al., 2002). The male might use his phasmid neurons to detect excretory pore secretions to prevent mistaking the pore for the vulva (Noble et al., 2015) or as a spatial cue to guide him to the vulva.
The excretory pore is anterior to the vulva. If the excretory pore is a guidance cue, its detection should affect movement decisions. Because the vulva is the dominant feature that affects movement decisions on the ventral side of the hermaphrodite, we examined male behavior with mutant hermaphrodites lacking a vulva (let-23 mutants). During scanning with vulvaless hermaphrodites, males pause during 36% of scans on the anterior ventral side but only 8% of scans on the anterior dorsal side (t(28.26)=3.67, p < 0.001) (Figure 5H). Pauses near the excretory pore are sometimes followed by forward slides that return the tail to where the vulva should be. Thus, the excretory pore provides a guidance cue for course correction when the male overshoots the vulva.
Mutant ceh-14 males have defects in phasmid neuron development (Serrano-Saiz et al., 2013; Kagoshima et al., 2013). These males do not respond to the excretory pore (Figure 5H). The phasmid neurons thus likely contribute to triggering pauses. The PGA interneuron is also active when the tail is near the excretory pore (Figures 3B and 3C). However, the wiring diagram does not have direct synaptic connections from the phasmid neurons to PGA.
Vulva recognition.
When the male reaches the vulva, he stops scanning and transitions to vulva recognition. During vulva recognition, the male reduces his movement relative to the hermaphrodite while pushing his spicules toward the vulva. Breaching the vulva leads to copulation. The male is often unable to insert his spicules and loses contact with the vulva. When this happens, he restarts scanning until the next vulva recognition.
The PCB and PCC postcloacal sensilla neurons and the HOA and HOB hook neurons are strongly associated with vulva detection (Figures 3B-3D). These neurons were previously shown to help stop at the vulva (Liu and Sternberg, 1995). Brain-wide imaging revealed many additional neurons for vulva recognition including the R2B sensory neuron, the PVZ, PVX, and EF1-3 interneurons, the PDB inter/motor neuron, and the VD13 motor neuron (Figures 3B-3D, 3G and 5I). As discussed above, PDB and VD13 drive dorsal bending near the vulva. When the tail is aligned with the vulva for copulation, the second ray pair is closest to the vulva suggesting that R2B might be specialized for vulva recognition. Indeed, R2B ablation reduced the likelihood and duration of stopping at the vulva (t(24.29) = 2.54, p = 0.02, t(21.61) = 2.2, p = 0.04) (Figure 5J).
HOA mediates a behavioral switch between scanning and vulva recognition.
Previous studies suggested that HOA contributes to both scanning and vulva recognition but in different ways. Near the vulva, HOA promotes stopping and spicule insertion. Away from the vulva, HOA is thought to suppress other vulva-sensing neurons because its ablation causes the male to spuriously pause anywhere on the hermaphrodite and initiate spicule thrusts (Liu and Sternberg, 1995; Correa et al., 2015). To better understand HOA’s contribution, we combined cell-specific neuron ablation with brain-wide imaging.
In control animals, a group of vulva-detecting neurons – PCB, PCC, HOB, and R2B – is specifically active when the tail is at the vulva (Figures 6A, 6B and S6). In HOA-ablated males, these neurons showed bursts of activity away from the vulva (Figures 6C and S6). These bursts of spurious activity coincided with pauses and spicule thrusts away from the vulva which interfered with scanning. When HOA-ablated animals did reach the vulva, they were unable to maintain contact. This supports the idea that during scanning HOA is needed to inhibit other vulva-detecting neurons. During vulva recognition, HOA is needed to maintain contact and initiate copulation.
HOA makes both electrical and chemical synapses to the PCB vulva-detecting neuron (Figure 6A). Thus, both hyperpolarization or depolarization of HOA may propagate to PCB and hence to other vulva-detecting neurons. Glutamatergic inhibition from PCA has been shown to hyperpolarize HOA (Correa et al., 2015). We found that PCA is active during backward scanning away from the vulva (see above). PCA may thus hyperpolarize HOA during backward scanning. To test whether PCA is part of a context-dependent switch that regulates HOA, we examined PCA-ablated animals. Like HOA-ablated animals, PCA-ablated animals exhibited spurious activity in the neurons for vulva-recognition (Figures 6D and S6). This spurious activity was more common with HOA-ablation than with PCA-ablation, suggesting that other neurons might also inhibit HOA during scanning. The PHC sensory neuron has the second strongest synaptic input to HOA (Figure 6A). Like PCA, PHC is glutamatergic but is active during forward movement. We conclude that HOA changes its effect on synaptic partners in a context-dependent manner. Near the vulva, HOA is activated by vulva detection, and further activates other vulva-detecting neurons. During scanning, PCA provides glutamatergic inhibition to HOA, which leads to hyperpolarization of other vulva-detecting neurons through electrical synapses.
Recurrent connections and a self-reinforced activity state.
After HOA ablation, the vulva-detecting sensory neurons – PCB, PCC, HOB, and R2B – showed bursts of activity during scanning. Because this activity occurs away from the vulva, it might be triggered by the hermaphrodite cuticle itself. One possibility is that the cuticle fully activates one or more of the vulva-detecting neurons away from the vulva. Alternatively, the cuticle might not fully activate one neuron, but, when some neurons become activated at a low level, recurrent excitation amplifies sub-threshold signals into a burst. The wiring diagram reveals many synapses between vulva-detecting neurons that might allow recurrent excitation (Figure 6A).
We released the vulva-detecting circuit from inhibition away from the vulva by ablating HOA. If recurrent excitation plays a role, removing additional neurons should reduce the spurious activation of others. Additionally ablating either PCB or PCC reduced spurious activation of the rest of the vulva-detecting circuit (Figures 6E, 6F and S6) – remaining sensory neurons were less activated by the cuticle, but were activated by the vulva. However, additionally ablating HOB did not suppress the spurious activity of remaining neurons (Figures 6G and S6). PCB and PCC appear to contribute to recurrent excitation, but not HOB.
Recurrent excitation and signal amplification may facilitate the all-or-none switch of circuit activity from scanning to vulva recognition. To confine its activity to the vulva, the vulva-detecting circuit must be under context-dependent inhibition. Integrated mechanisms for recurrent excitation and context-dependent inhibition enable sensitive and robust switching between temporally adjacent behaviors.
Copulation.
Breaching the vulva leads to copulation. Copulation involves spicule insertion, sperm release, and withdrawal. Previous experiments showed that several sensory and motor neurons contribute to these different steps (Liu and Sternberg, 1995; LeBoeuf et al., 2014; LeBoeuf and Garcia, 2017; Hart and Hobert, 2018). We directly visualized the temporal sequence in neuronal activity during copulation (Figures 3H-3K).
The first neurons involved in copulation, the SPD sensory neuron, SPC sensory/motor neuron, and DVB inter/motor neuron, are activated with spicule insertion (Figures 3H, 3J and 3K). Both SPC and DVB innervate the spicule protractor muscles and drive spicule insertion (Liu and Sternberg, 1995; LeBoeuf and Garcia, 2017). SPV, a sensory neuron with endings at the spicule tips, becomes active 1.1±1.7 s following spicule insertion. The timing of SPV activation is consistent with its proposed roles in detecting the internal environment of the uterus and controlling the timing of sperm release. SPV ablation leads to premature sperm release (Liu and Sternberg, 1995; LeBoeuf et al., 2014).
HOA is active during vulva detection, but exhibits peak activity 1.8±2.4 s after spicule insertion (Figure 3K). The PVZ interneuron has similar activity to HOA but with slower dynamics, active during vulva detection and peaking after 6.9±4.8 spicule insertion. The wiring diagram predicts multiple synapses between HOA and PVZ. 2.3±1.7 s after spicule insertion, calcium transients occur in multiple intestinal cells including Int9R (in contrast, LeBoeuf and Garcia (2017) observed no activation of the intestine). Anterograde calcium transients in intestine are known to initiate defecation (Teramoto and Iwasaki, 2006). In the male, defecation and ejaculation have shared components and circuitry (LeBoeuf and Garcia, 2017; Hart and Hobert, 2018). Intestinal calcium transients might have roles in initiating both motor sequences in the male. The PCA postcloacal sensilla neuron becomes active following these intestinal calcium transients (3.6±1 s after spicule insertion). PCA might be involved in the movements of the gubernaculum, as it directly innervates the gubernaculum erector and retractor muscles (LeBoeuf et al., 2014; Jarrell et al., 2012).
The activities of the CA8 and CA9 inter/motor neurons increase 32±14 s after spicule insertion, peak roughly when the male detaches from the vulva, and decrease with spicule retraction (Figure 3J). This activity pattern is consistent with the proposed role of CA neurons in sperm transfer (Schindelman et al., 2006).
Four vulva-detecting sensory neurons – PCB, PCC, HOB, and R2B – decrease their activity upon sperm release even when in contact with the vulva (Figure 3I). As the male transitions to ejaculation, several neurons that are involved in an earlier step in the temporal sequence are deactivated by the circuit. These vulva-detecting neurons might interfere with later steps in copulation requiring their deactivation.
Resting.
After copulation, the male rests for several minutes when his motor activity is suppressed (LeBoeuf et al., 2014). Resting coincides with decreased global activity of the mating circuit (Figure S7A). However, a few neurons have increased activity during resting. The PVZ and CA8-9 interneurons, which become active later during copulation, remain active until spicule retraction. Only DVB, which becomes active when copulation begins, sustains activity throughout rest (Figure 3J).
Searching.
After rest, the male searches for another partner. Most neurons associated with searching are in the head (Srinivasan et al., 2008; LeBoeuf et al., 2014; Narayan et al., 2016). We discovered that several neurons in the posterior brain are also associated with searching (Figures 3B and 3C). Interestingly, the PLM mechanosensory neuron is more active during searching than during hermaphrodite contact. PLM is required to initiate forward movement in an escape response when either males or hermaphrodites are touched at the posterior (Chalfie and Sulston, 1981). We found that PLM activity drops sharply when courtship begins. PLM activity does not immediately rise when the male loses contact. PLM may be suppressed when the male contacts a hermaphrodite, allowing mating to be sustained by inactivating the circuit for escape response.
Discussion
Natural multi-step behaviors challenge the brain to perform diverse tasks across the range of what the brain evolved to do (Krakauer et al., 2017; Gomez-Marin et al., 2014). Here, we analyze how an entire brain in the male C. elegans drives the full performance of mating behavior.
When considering the full behavior, we find little redundancy in the activities of different neurons. Nearly every neuron exhibits different correlations with respect to the rest of the circuit and to behavioral dynamics (Figure 3D). Some neurons are specialized for single behavioral motifs. Others participate in multiple motifs. Each motif engages a unique set of neurons. Different motifs often engage overlapping sets of neurons. During the execution of each motif, neurons may be activated in sequence, revealing stepwise functional contributions as behavior unfolds (Figure 3K).
Functional correlations between neurons in the brain are not fixed, but change with behavioral context (Figure 3L and Table S5). These correlations are produced by the dynamic interactions between the animal, the nervous system, and the environment. A mechanism that produces context-dependent functional correlations is the stimulus-evoked recruitment of sensorimotor pathways.
The hermaphrodite presents different stimulus patterns to the male with different parts of her body and at different mating steps. These stimulus patterns create context-dependent correlations among the sensory neurons of the brain. The diversity of these correlations underlies the diversity of sensorimotor responses in an entire behavior (Figure 7). In recent studies of C. elegans that focused on a small space of fictive or real motor output, brain-wide dynamics exhibited low diversity (Venkatachalam et al., 2016; Kato et al., 2015; Nguyen et al., 2016; Linderman et al., 2019). But across the entirety of mating behavior, the brain orchestrates multiple behavioral motifs. Each motif involves different brain dynamics even when employing the same motor neurons and muscle cells. For example, during mating, tail posture is controlled in different ways in different contexts (Figures 5A-5F). This is accomplished by motif-specific computations by partly overlapping circuits that converge on a common set of motor neurons and musculature. These observations also point to the uncertain equivalency between ‘behavioral primitives’. Similar motor actions can be instantiated by different sensory-motor pathways.
The relationship between the connectome and brain-wide activity is not one-to-one. Throughout the brain, neurons synapse onto both neurons that participate in the same behavioral motif and neurons that participate in other motifs (Figure 4E). Some of the significance of in-group and out-group connectivity is revealed by temporally adjacent motifs like scanning and vulva-detection. In-group connectivity among vulva-detecting neurons provides recurrent excitation that amplifies circuit activity during copulation attempts (Figure 6). Signal amplification within the vulva-detecting circuit presumably enhances its all-or-none sensitivity, but then requires context-dependent inhibition to prevent spurious activation. Context-dependent inhibition is provided by out-group connectivity from the scanning circuit. Circuits for different steps of behavior are not isolated, but continuously interact to stabilize individual behaviors or mediate transitions between behaviors.
Diverse brain-wide dynamics emerge from the complex interactions between a male and his mating partner. The mating circuit recognizes different sets of sensory inputs that only arise in their natural context. These inputs are manifested in brain-wide functional correlations, starting from the diverse properties of sensory neurons. Diverse sensory patterns act on the wiring diagram to recruit different sensorimotor pathways and different communities of neurons for different steps of behavior. Behavioral dynamics must be integrated with neuronal dynamics and wiring to understand how the brain does what it evolved to do.
Limitations of the Study
Due to technological limitations, it was impossible to image both head and tail ganglia simultaneously. The present study focuses on the posterior brain of the C. elegans male, which drives sensory, motor, and decision-making steps during mating. New microscopy techniques in combination with genetically encoded fluorescent markers will further extend neurons available for study. Tracking neurons in a deforming brain represents a challenge. The relatively low throughput of the method limited the ability to resolve aspects of the brain dynamics that require observing tens and hundreds of individuals, such as variable and history-dependent execution of behavioral motifs. Improved methods for automated neuronal tracking will accelerate data collection required for such studies.
STAR Methods
Resource Availability
Lead contact.
Further information and requests for resources and reagents should be directed to the lead contact, Aravinthan D.T. Samuel (samuel@physics.harvard.edu)
Materials availability.
Panneuronal imaging strains created for this study ZM9624 and ADS1002 are deposited with the Caenorhabditis Genetics Center as of day of publication and are available from the AS, MZ, and VV labs.
Data and code availability.
Neuronal activity traces and concurrent behavioral features have been deposited at Mendeley Data: doi:10.17632/922xsfxh2g.1 and are publicly available as of the date of publication. All original code used to analyze the data is available from the Lead Contact upon request. Any additional information required to reanalyze the data reported in this paper is available from the Lead Contact upon request.
Experimental Model and Subject Details
All C. elegans strains were grown at 23°C on nematode growth medium (NGM) plates seeded with E. coli OP50. All strains were allowed to recover from starvation and freezing for at least two generations before experiments.
Method Details
Molecular biology.
A C. elegans imaging strain ZM9624 was designed to co-express GCaMP6s and mNeptune in all neuronal nuclei. For this, lin-15(n765) hermaphrodites were co-injected with lin-15 rescuing plasmid and pJH3971(Prgef-1::GCaMP6s::3xNLS::mNeptune). A transgenic line (hpEx3880) with consistent expression of GCaMP6s and mNeptune was selected for the UV-mediated transgene integration. The integrated line was outcrossed four times with N2.
ADS1002 was created by co-injecting lin-15(n765) with lin-15 rescuing plasmid and pJH34038 (Prgef-1::GCaMP6s::3xNLS). A stable transgenic line (hpEx3931) was generated and outcrossed three times with N2.
Brain-wide recordings of neuronal activity.
We sought to capture multiple motifs of mating behavior within each recording session. The number and order of behavioral motifs varied from trial to trial. For comprehensive analyses, we selected eight datasets capturing a wide range of motifs. Additionally, we collected 14 datasets focusing on specific neurons and behavioral motifs and 23 datasets using ablated males (see below). It was impossible to image both the head and tail simultaneously. In this study, we focused on the neurons in the tail, most of which are male-specific and form a posterior brain that drives mating (Sulston et al., 1980; Jarrell et al., 2012; Cook et al., 2019).
Virgin L4 males were selected and kept on a separate plate for 24 to 40 hours before imaging. This allowed GCaMP6s and mNeptune to accumulate in the neurons of the tail, many of which are born during the L4 stage (Sulston et al., 1980). For the imaging experiments, a single adult male was placed on an NGM agar plate with 2-5 hermaphrodites and a small amount of OP50. We used hermaphrodites that expressed red fluorescent markers in either their muscles or epidermis for tracking (Table S1). The assay plate was covered with a coverslip for oil immersion. Animals could swim freely under the coverslip.
Imaging was performed using a custom spinning-disc confocal microscope described in Venkatachalam et al. (2016), with some modifications (Venkatachalam et al., 2016). Briefly, the emitted light from the samples was split into the red and green channels and images were captured using two Andor Zyla 4.2 sCMOS cameras. Each camera recorded 256 × 512 pixel area of interest at 200 Hz and with the system pixel size of 0.45 μm. Volumetric imaging was done using a 40x, 1.30 NA Nikon Plan Fluor objective mounted on a piezoelectric stage. We sampled 10 brain volumes per second, each volume consisting of 20 optical sections approximately 1.75 μm apart. The tail of the freely-swimming male was tracked continuously by adjusting the microscope stage position with a stage controller.
Identification of neurons.
Neurons were identified based on a combination of features, including their position, morphology, and expression of specific fluorescent markers. Table S2 lists key criteria for assigning ids to each identified neuron. Anatomical drawings in Sulston et al. (1980) were a primary reference for the neurons’ relative positions and morphology (Sulston et al., 1980). Neuronal positions were additionally cross-checked with the annotated electron microscopy data for the N2Y male shared by Scott Emmons. Among other sources, we used fluorescent microphotographs in Serrano-Saiz et al. (2017) which provided a comprehensive account of the expression patterns of multiple sparse markers (Serrano-Saiz et al., 2017b). To test if the same neurons could be reliably identified in different individuals and to confirm neuronal ids, we crossed existing well-characterized marker strains (Table S2) with panneuronal ADS1002 or ZM9624. Cross-examination of the expression patterns with multiple marker strains identified clusters of neurons where neuronal positions and morphology were conserved enough to enable unambiguous identification in the absence of genetically encoded markers (Figure S1A). This approach worked well for the regions with stereotyped cell positions such as preanal ganglion (PAG) and cloacal ganglion (CG) and parts of the ventral nerve cord (VNC). Positions of some neurons in the dorsal root ganglion (DRG) and lumbar ganglion (LG) are known to be variable (Sulston et al., 1980). To confirm identities of neurons in these ganglia we performed panneuronal imaging using sparsely labeled strains, and tested if neuron-specific activity patterns matched. In total, we were able to identify 76 neurons across all datasets. Recorded brain volumes, neuronal ids, activity traces, continuous behavioral features, and ethograms are available via an interactive web-based browser at http://mating-data.worm.world/index.html.
Neuronal ablations.
All ablations were performed in young adult males, 1-4 hours after they completed their final molt. Ablations were done using a MicroPoint pulsed laser system (Andor) mounted on a Nikon microscope equipped with Nomarski optics and a 100x 0.95 NA Nikon Plan Apo objective. Males were placed on a 10% agar pad and immobilized with 0.01 μm latex beads (Polysciences, Inc). Target neurons were identified based on the expression of fluorescent markers. The neuronal nuclei were targeted until a visible damage appeared. Mock ablations were performed by placing males on a slide with latex beads for 5-10 minutes. Males were left to recover overnight, and behavioral assays and imaging experiments were performed on the next day.
Mating assays.
Behavioral arenas were 6 cm NGM agar plates seeded with a thin layer of E. coli OP50 forming a spot approximately 0.5 cm in diameter. One to three young adult hermaphrodites and one male were placed onto each assay plate. Behavior of the male was recorded at 5 frames per second for 30 to 60 minutes using a Grasshopper3 camera and Spinnaker software (Point Grey). Treatment and control trials were recorded on the same day. The recordings were analyzed blindly in MaMuT. Two-sided t-tests were used to compare group means.
For the PVV ablations, we tabulated successful turns and failed turning attempts. A turn was considered failed when the turn initiation was followed by either a permanent or temporary loss of contact.
To quantify pausing at the excretory pore, we performed mating assays with vulvaless let-23 hermaphrodites. We recorded when the male stopped backward scanning for more than 0.2 seconds on the anterior ventral side opposite the terminal bulb of the pharynx. This location corresponds to the excretory pore opening. For comparison, we tabulated pausing on the anterior dorsal side. Pausing was recorded during backward scanning towards the tip of the hermaphrodite’s head (Figure S7B).
For the R2B ablations, we tested if vulva detection and retention were compromised. We calculated the fraction of successful vulva detection events. Vulva detection was considered successful if the male paused scanning at the vulva for more than 0.2 seconds. We also calculated the average vulva retention time. Assays with more than five vulva detection events were included; vulva contacts during copulation were excluded.
Quantification and Statistical Analysis
Statistical details can be found in this section. Results of statistical tests are reported in the text, main and supplemental figures, and tables, and Extended Data, as noted.
Extracting activity traces.
Neuronal activity traces were extracted from raw image volumes following image pre-processing and registration. All red channel volumes were registered to the green channel through rigid transformation. A difference of Gaussian filter was applied to both channels to suppress the background noise. The datasets were subsampled to include every other volume. The volumes were converted into 5D big-data-viewer arrays and used for neuronal segmentation and tracking with MaMuT 0.27, a Fiji plugin (Wolff et al., 2018; Schindelin et al., 2012). Segmentation and tracking were done manually, with some help of the MaMuT’s automated tracking and a custom neuron tracking tool. We tracked all visible neurons for six out of eight main datasets. For the sevenths and eighth datasets, we tracked all identifiable neuron types (see below). For the 14 additional and 23 ablation datasets, only neurons of interest were tracked. Fluorescence intensities (F(red) and F(green)) were extracted by computing mean pixel values for the 2.25 x 2.25 x 3.5 μm volumes surrounding the center of each nucleus in the green and red channels. Savitzky-Golay filtering (polynomial order of 1 and frame length 13) was applied to intensity traces from each channel for noise-reduction (Orfanidis, 1995). We computed neuronal activity as the ratio F(green)/F(red) to minimize the effects of correlated noise and motion artifacts. To mitigate remaining motion artifacts, a singular value decomposition was applied to the main datasets retaining 2/3 of components.
Continuous behavioral features.
We parameterized several continuous features of male behavior. These included swimming velocity and speed, sliding velocity and speed (tail velocity and speed relative to the hermaphrodite body when in contact), tail curvature, distance of the male tail to the head and tail of the hermaphrodite and to the vulva, and spicule protraction. To parameterize velocity, we computed the centroid of the tail from coordinates of three tail neurons (AS11, PLM, EF1). Centroid positions were extracted for each volume and converted into velocity of the worm in the egocentric coordinates. Negative velocity values correspond to swimming forwards, and positive values to swimming backwards. Tail curvature was estimated using the angle between two rays diverging from the center of PVY and intersecting centers of AS11 and PLM (Figure S7C). When the tail is relaxed, the angle formed by the rays is nearly straight. Spicule protraction was estimated indirectly by measuring the distance between spicule neurons SPD and SPC, which move with the spicules, and PCB. As the spicules become protracted, the distance between the spicule neurons and PCB sharply decreases.
To map the position of the tail to the hermaphrodite, we extracted maximum intensity projections (MIPs) of the volumes in which large parts of the hermaphrodite were visible. The images were tiled to cover the entire body and aligned with rigid rotations and translations to produce a straightened representation of the hermaphrodite (Figure S7D). For each data volume, we mapped the position of the tail to the straightened hermaphrodite by matching uniquely identifiable MIP features. Finally, we estimated the best fit for an ellipse of aspect ratio 10 given the x and y coordinates of the tail position on the hermaphrodite, generating a representation of the tail trajectory on an idealized elliptical hermaphrodite (Figure S7D). Using this map, we calculated the male’s scanning velocity and speed and its distance to the vulva and to the head and tail of the hermaphrodite.
The distance of the tail to the vulva is the arc length of the shortest path between the tail and the vulva along a section of the ellipse representing the hermaphrodite. The distance of the tail to the hermaphrodite tips is the arc length of the shortest path between the male tail and either the head or the tail of the hermaphrodite along a section of the ellipse.
Correlation analysis and clustering.
Left-right symmetric pairs of sensory neurons showed positively correlated activity (r =0.73± 0.19) (Figure S1C), with one exception – R1A. We considered each left-right correlated pair to represent a distinct neuronal type and compiled datasets to include the activity traces of 57 neuron types and one non-neuronal cell (int9R). We used 58 activity traces and eight continuous behavioral parameters for cross-correlation analyses. Pairwise cross-correlations between time series were calculated for each dataset, with the lag parameter set to 5 (corresponding to one second). For each pairwise comparison, we calculated mean cross-correlations at each time lag, and the highest absolute mean cross correlation value was included in the consensus cross-correlation matrix. This consensus correlation matrix was used to calculate pairwise Euclidian distances for hierarchical clustering with the Ward’s minimum variance method (Ward Jr, 1963).
To test if neuron-neuron correlations were consistent across datasets, we selected correlation matrices for the eight comprehensive datasets and calculated pairwise Euclidean distances between them. The observed distances were compared to distances between 10,000 correlation matrices with shuffled neuronal identities (Extended Data).
Discrete behavioral motifs.
We recorded discrete behavioral motifs. We manually tabulated the times of ventral contact of the male tail with the hermaphrodite, loss of contact with the hermaphrodite, contact with her vulva, turning onset (successful and unsuccessful, see below), and sperm release. To determine empirical uncertainties in our ability to timestamp these behavioral motifs, we independently tabulated all motifs twice for each comprehensive dataset. We calculated the difference between the two recorded timestamps for each individual behavioral motif. For each behavior, the median difference between the timestamps was 0.2 seconds or less (Figure S7E). For each event instance, we used the median timestamps for the consequent analyses. Additionally, swimming velocity and relative sliding velocity (continuous behavioral features) were used to timestamp transitions between forward and backward swimming and forward and backward sliding relative to the hermaphrodite.
Event-triggered activity averages.
We tested how neurons of the mating circuit responded to the start of specific behavioral motifs (Figures 3D and S3, Extended Data). Motifs included were: ventral contact with the hermaphrodite (both the initial contact and any contact preceded by more than 6 seconds of separation); hermaphrodite loss lasting for more than 6 seconds; turning; failed turning attempts; vulva contact, sperm release (as identified by increased calcium signals in the intestinal cells); switching from forward to backward swimming (tabulated for the entire behavior, and separately for searching, and courtship); switching from backward to forward swimming (tabulated for the entire behavior, and separately for searching, and courtship). Switching from forward to backward sliding (movement of the tail relative to the hermaphrodite); switching from backward to forward sliding. Neuronal signals were extracted for a window spanning 6 seconds before and after the motif onset, and dataset-averaged response curves were calculated for each neuron and motif. We then calculated cross-correlations between these response curves and binarized behavioral event traces, with the lag parameter set to 5. The lag with the maximum absolute mean correlation was selected. One-sample t-test was used to test if the correlation estimate between the neurons’ response traces at that lag and behaviors was greater than zero (Figure S3A). Neuron responses were categorized into significantly increasing, decreasing, and showing no changes. The fraction of neurons with unique activity patterns was calculated using different significance thresholds (Figure S3B). p-values were adjusted using the Benjamini and Hochberg method to control for the false discovery rate (FDR) (Benjamini and Hochberg, 1995). Figure 3D shows neurons with significant changes in activity with the FDR adjusted significance cut-off set at 0.05.
Sequences of neuronal activation.
We tested if the neurons were activated in a sequence which was consistent across multiple instances of the same behavioral motif. We extracted neuronal activity traces for a widow spanning 6 seconds before and 15 seconds after the onset of a behavioral motif. For every motif onset, we selected traces showing event-triggered activation and we calculated the time for each neuron to reach its half-peak activity (Extended Data). To test if neuron A is consistently activated before neuron B, we generated a rank list for the pair by ranking the neurons by their half-peak times. We then calculated the rank product for neuron A as the geometric mean of its ranks:
where k is the number of replicates. To test for significance, we generated 10,000 permutations of the rank list and calculated their rank products. We counted the number of times the rank products from these permuted rank lists were smaller or equal than the observed rank product for neuron A. This gave us the probability of neuron A reaching its half-peak activity before neuron B purely by chance.
Decoding behavior from neuronal activity.
To predict behavior from neuronal activity traces, we used linear regression with elasticnet regularization (Friedman et al., 2010). The procedure was adapted from Scholz et al. (2018) with modifications (Scholz et al., 2018). We sought predictions across different individuals. Activity traces of all neurons were centered and scaled to have a zero sample mean and unit sample variance, and concatenated for all datasets. We also concatenated time series of all behavioral features. Traces of several neurons were absent from some datasets. Missing traces were imputed if they were missing from no more than two datasets. Activity traces missing from more than two datasets were excluded. To instantiate short-term memory, we used time-lags in the neuronal activity traces. Three time lags were used (t = 0, t = 0.6, and t = 1.2 seconds), that maximized the accuracy of predictions.
We partitioned concatenated time series into training and testing sets. For each modeling iteration, we selected seven datasets for training and one for testing the resulting model’s out-of-sample prediction accuracy. The analysis was repeated to include all possible combinations of training and testing data. Model training and evaluation was performed using the R package ‘Caret’ version 6.0-84 (Kuhn et al., 2020) and ‘glmnet’ version 2.0-18 (Friedman et al., 2010, 2020). The algorithm fits a generalized linear model via penalized maximum likelihood. Tuning parameters included the penalty term λ, controlling the penalty strength, and the elastic-net mixing parameter α (where α = 0 is a purely ridge penalty and α = 1 is a purely lasso penalty). We tuned the model’s parameters by searching 11 α values (α ∈ [0,1]) and 101 logarithmically-spaced λ values (λ ∈[10−5,101]). The best tuning parameters were selected based on the root mean square error and 5-fold cross-validation. The model’s prediction accuracy was estimated by calculating the R2 between out-of-sample predictions and target variables. The mean R2 values across eight iterations were used to access our ability to predict target behavioral features.
To further asses the accuracy of predictions we performed analyses where neuronal identities were shuffled for the held-out sets prior model testing. The accuracy of the models tested on the data with shuffled ids were compared to that of models with preserved neuronal identities.
To better understand contributions of individual neurons to specific behavioral features, we ranked neurons by their weight (Table S4), which was calculated for all testing-training iterations i and time lags t:
where Ni is the number of model training-testing iterations, Nt is the number of time lags used, and wit is the absolute value of the coefficients from the trained model.
To investigate how the representation of continuous behavioral features is distributed in the circuit we trained and evaluated additional models where we used (1) single neurons (including their time lags), (2) all neurons except one, (3) sequentially added neurons in the order of their rank, and (4) sequentially removed neurons in the order of their rank. To better understand how behavioral features are represented in different circuit levels, we built and evaluated models using subsets of sensory, inter-, and motor neurons (based on https://www.wormatlas.org/, Table S2). We note that the circuit included similar numbers of sensory, inter-, and motor neurons (22, 15, and 25 respectively). Finally, we trained and evaluated models including 13 overlapping subsets of functionally-linked neurons derived by link-clustering (Figures 3C and S2B, Extended Data). Model performance was compared via t-test to models trained on the full set of neurons and tested using held-out datasets with shuffled neuronal ids. This procedure was repeated 1000 times.
State-specific correlations.
To compare correlation structure across behavioral states, we calculated neuron-neuron correlation matrices for each individual and mating state (searching, courtship, copulation, and resting) (Figure S4, Extended Data). For each behavioral state we calculated Euclidean distances between neuron-neuron correlation matrices corresponding to the same behavioral state. We compared these distances to distances between randomly selected matrices (i.e. matrices corresponding to any individual and state) using a t-test. We also compared distances between neuron-neuron correlations grouped by dataset to distances between randomly selected matrices. Only groups with more than 2 matrices were included. These analyses were repeated using the correlation distance as a distance measure (Table S5). This procedure was also used to compare correlations between neurons and continuous behavioral features (velocity, curvature, and spicules position) across behavioral states and datasets (Table S5).
To project neuron-neuron and neuron-behavior correlation matrices in a 2-dimentional space (Figure 3L), we calculated the Euclidian distances between all pairs of correlation matrices and applied non-metric multidimensional scaling using Sammon’s non-linear mapping (Sammon, 1969).
Correlations and synaptic connectivity.
As a measure of functional weight, we used consensus cross-correlations (Figure 3B). Both members of a left-right neuron pair were included in the analyses, and their activity was assumed to be perfectly correlated, except in the case of R1AL/R. As a measure of synaptic connectivity, we used the number of synapses between neurons from https://wormwiring.org/ (Jarrell et al., 2012; Cook et al., 2019). Identifying connections between neurons, particularly gap junctions, can involve a degree of subjectivity (Mulcahy et al., 2018), so we additionally validated gap junctions of the male tail by screening EM photographs of all annotated gap junctions in the N2Y male. We assigned a confidence score from 1 to 5 to each gap junction.
Synapses with confidence scores 3 and higher were used to compile a validated gap junction connectivity matrix. To minimize the effects of observational noise, we also symmetrized the connectivity for all neurons that are bilaterally symmetrical, except R1 A. Only connections involving more than one synapse were used for all analyses.
To test if the results were sensitive to a particular choice of the connectivity hyperparameters, the analyses were performed using eight variants of connectivity matrices. These matrices were generated using (i) synapse number or weight as a measure of connectivity (Jarrell et al., 2012), (ii) validated or original gap junctions, (iii) symmetrized or original connectivity. The results of these analyses are summarized in Extended Data.
To test for the dependence of neuron-neuron correlations on synaptic connectivity, we calculated Pearson and partial correlation coefficients between the neuron-neuron correlations (Figure 3B) and the number of shared electrical and chemical synapses. We used the absolute value of neuron-neuron correlations for the chemical synapses. We tested for significance using 10,000 correlation matrices with shuffled neuronal ids.
To test if functional correlations can be predicted by common synaptic input, we calculated mean correlations between neurons that share a presynaptic partner. To reduce effects of observational and developmental noise, we only considered postsynaptic partners connected by more than one synapse. We also restricted our analysis to postsynaptic cells that receive at least 10% of their total synaptic input from a given presynaptic neuron. To test if the mean correlation between neurons that had a common presynaptic partner was significantly higher than by chance we used 10,000 permutations of the functional correlation matrix where neuronal ids were shuffled. Comparisons were performed using a shuffling procedure that preserved left-right functional symmetries. Absolute correlation values were used for the chemical synapses to account for different synaptic signs (Extended Data).
Community interaction motifs.
Community interaction motifs were identified as described in Betzel et al. (2018) (Betzel et al., 2018). For each pair of functional communities we calculated the density of synaptic connections within each community (ingroup connectivity) and between the two communities (out-group connectivity):
where Nr and Ns are the number of neurons that belong to each community and Cij is the connectivity strength between two neurons measured either as synaptic count or size (see above). We then assigned one of the three community interaction types: assortative (when the in-group connectivity for each community is stronger than the out-group connectivity between them), disassortative (when the out-group connectivity between communities is stronger than each in-group connectivity) and core-periphery (when the in-group connectivity for only one of the two communities is stronger than the out-group connectivity between them):
The community interaction motifs were calculated using multiple partitioning schemes obtained with link clustering and weighted stochastic block modeling (WSBM) (see below). All analyses were performed on eight different variants of the synaptic connectivity matrix (Extended Data).
Link clustering.
We used link clustering to extract overlapping community structure (Ahn et al., 2010). Link clustering was performed on functional correlations using an R package ‘linkcomm’ version 1.0-11 (Kalinka and Tomancak, 2011). Briefly, the similarity between links eikand ejk that share a node k was calculated via the Jaccard coefficient:
where n+(i) is the first-order neighborhood of node i, including self. The pairwise similarity matrix was used to hierarchically cluster the links with single-linkage clustering, and the resulting dendrogram was cut at a point that maximizes the link density within the clusters (Ahn et al., 2010; Kalinka and Tomancak, 2011). To calculate link similarities, correlations higher than 0.3 were selected from the consensus cross-correlation matrix (Figure 3B); left-right pairs of laterally symmetrical neurons were included. Only nontrivial community clusters with more than two edges were included. To explore community structure at different hierarchical levels, identified link communities were clustered themselves with the Ward’s minimum variance method (Ward Jr, 1963). For this, community similarity was calculated using the Jaccard coefficient and the number of shared nodes between communities i and j:
The resulting dendrogram was cut at different points with the cut-off parameter ranging from 0.5 to 1 and the step size of 0.05. This resulted in ten partitioning schemes with 7 to 19 overlapping communities. The network could not be partitioned into fewer than 7 overlapping communities without some communities being nested. For visualization, the network layout was generated using lgl, a force-based layout for large graphs (Adai et al., 2004). Synaptic connectivity density between and within communities was computed using the number or size of chemical and electrical synaptic connections (see above) (Extended Data).
Partitioning using WSBM.
To confirm results obtained with link clustering we additionally partitioned the mating circuit into hierarchically clustered functional communities with weighted stochastic block model (WSBM) (Aicher et al., 2015). WSBM was fitted with the number of communities varied from 2 to 20 and 1000 random initializations. This resulted in 19 different partitioning schemes. For each partitioning scheme, groups containing more than 2 neurons were selected, and the community interaction motifs (assortative, disassortative, core-periphery) were assigned as described above (Extended Data).
Additional Resources
Interactive web-based browser with brain volumes, neuronal ids, activity traces, and behavioral features: http://mating-data.worm.world/index.html.
Supplementary Material
Brain-wide activity was recorded across a brain’s behavioral repertoire
Each neuron is functionally unique and has a conserved role from animal to animal
Correlations between neurons are not fixed but depend on behavioral context
Motif-specific neuronal dynamics are manifested as behavior unfolds
Acknowledgements
We thank Alkmini Chalofti and Noah Milstein for help with neuronal tracking, Albert Lin for creating hpEx3931, Oliver Hobert for sharing strains, Scott Emmons for sharing EM photographs of the male nervous system. We thank Scott Linderman, Paul Sternberg, Kenneth Blum, and members of the Samuel lab for their comments on the manuscript. Some strains were provided by the CGC, which is funded by NIH Office of Research Infrastructure Programs (P40 OD010440). This work was supported by NSF (IOS-1452593), NIH (R01 NS082525, R01 NS113119, and UF1 NS111697), Canadian Institutes of Health Research (Foundation Scheme 154274), Natural Sciences and Engineering Research Council of Canada (RGPIN-2017-06738), and the Burroughs Wellcome Fund.
Footnotes
Declaration of Interests
The authors declare no competing interests.
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
References
- Adai AT, Date SV, Wieland S, and Marcotte EM (2004). Lgl: creating a map of protein function with an algorithm for visualizing very large biological networks. Journal of molecular biology 340, 179–190. [DOI] [PubMed] [Google Scholar]
- Ahn YY, Bagrow JP, and Lehmann S (2010). Link communities reveal multiscale complexity in networks. nature 466, 761–764. [DOI] [PubMed] [Google Scholar]
- Aicher C, Jacobs AZ, and Clauset A (2015). Learning latent block structure in weighted networks. Journal of Complex Networks 3, 221–248. [Google Scholar]
- Benjamini Y, and Hochberg Y (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal statistical society: series B (Methodological) 57, 289–300. [Google Scholar]
- Betzel RF, Bertolero MA, and Bassett DS (2018). Non-assortative community structure in resting and task-evoked functional brain networks. bioRxiv p. 355016. [Google Scholar]
- Briggman KL, and Kristan W Jr (2008). Multifunctional pattern-generating circuits. Annu. Rev. Neurosci 31, 271–294. [DOI] [PubMed] [Google Scholar]
- Candadai M, Setzler M, Izquierdo EJ, and Froese T (2019). Embodied dyadic interaction increases complexity of neural dynamics: A minimal agent-based simulation model. Frontiers in psychology 10, 540. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chalfie M, and Sulston J (1981). Developmental genetics of the mechanosensory neurons of Caenorhabditis elegans. Developmental biology 82, 358–370. [DOI] [PubMed] [Google Scholar]
- Chalfie M, Sulston JE, White JG, Southgate E, Thomson JN, and Brenner S (1985). The neural circuit for touch sensitivity in Caenorhabditis elegans. Journal of Neuroscience 5, 956–964. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Cook SJ, Jarrell TA, Brittin CA, Wang Y, Bloniarz AE, Yakovlev MA, Nguyen KC, Tang LT, Bayer EA, Duerr JS, et al. (2019). Whole-animal connectomes of both Caenorhabditis elegans sexes. Nature 571, 63–71. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Correa PA, Gruninger T, and García LR (2015). DOP-2 D2-like receptor regulates UNC-7 innexins to attenuate recurrent sensory motor neurons during C. elegans copulation. Journal of Neuroscience 35, 9990–10004. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Doroquez DB, Berciu C, Anderson JR, Sengupta P, and Nicastro D (2014). A high-resolution morphological and ultrastructural map of anterior sensory cilia and glia in Caenorhabditis elegans. Elife 3, e01948. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Friedman J, Hastie T, and Tibshirani R (2010). Regularization paths for generalized linear models via coordinate descent. Journal of statistical software 33, 1. [PMC free article] [PubMed] [Google Scholar]
- Friedman J, Hastie T, Tibshirani R, Narasimhan B, Tay K, Simon N, and Qian J (2020). Package ‘glmnet’. [Google Scholar]
- Getting PA (1989). Emerging principles governing the operation of neural networks. Annual review of neuroscience 12, 185–204. [DOI] [PubMed] [Google Scholar]
- Gomez-Marin A, Paton JJ, Kampff AR, Costa RM, and Mainen ZF (2014). Big behavioral data: psychology, ethology and the foundations of neuroscience. Nature neuroscience 17, 1455. [DOI] [PubMed] [Google Scholar]
- Hart MP, and Hobert O (2018). Neurexin controls plasticity of a mature, sexually dimorphic neuron. Nature 553, 165–170. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hilliard MA, Bargmann CI, and Bazzicalupo P (2002). C. elegans responds to chemical repellents by integrating sensory inputs from the head and the tail. Current Biology 12, 730–734. [DOI] [PubMed] [Google Scholar]
- Jarrell TA, Wang Y, Bloniarz AE, Bloniarz AE, Brittin CA, Xu M, Thomson JN, Albertson DG, Albertson DG, Hall DH, et al. (2012). The connectome of a decision-making neural network. Science (New York, NY) 337, 437–444. [DOI] [PubMed] [Google Scholar]
- Kagoshima H, Cassata G, Tong YG, Pujol N, Niklaus G, and Bürglin TR (2013). The LIM homeobox gene ceh-14 is required for phasmid function and neurite outgrowth. Developmental Biology 380, 314–323. [DOI] [PubMed] [Google Scholar]
- Kalinka AT, and Tomancak P (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27, 2011–2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kato S, Kaplan HS, Schrödel T, Skora S, Lindsay TH, Yemini E, Lockery S, and Zimmer M (2015). Global brain dynamics embed the motor command sequence of Caenorhabditis elegans. Cell 163, 656–669. [DOI] [PubMed] [Google Scholar]
- Kawano T, Po MD, Gao S, Leung G, Ryu WS, and Zhen M (2011). An imbalancing act: gap junctions reduce the backward motor circuit activity to bias C. elegans for forward locomotion. Neuron 72, 572–586. [DOI] [PubMed] [Google Scholar]
- Koo PK, Bian X, Sherlekar AL, Bunkers MR, and Lints R (2011). The robustness of Caenorhabditis elegans male mating behavior depends on the distributed properties of ray sensory neurons and their output through core and male-specific targets. Journal of Neuroscience 31, 7497–7510. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Krakauer JW, Ghazanfar AA, Gomez-Marin A, MacIver MA, and Poeppel D (2017). Neuroscience needs behavior: correcting a reductionist bias. Neuron 93, 480–490. [DOI] [PubMed] [Google Scholar]
- Kuhn M, Wing J, Weston S, Williams A, Keefer C, Engelhardt A, Cooper T, Mayer Z, Kenkel B, Team, R.C., et al. (2020). Package ‘caret’. [Google Scholar]
- LeBoeuf B, Correa P, Jee C, and García LR (2014). Caenorhabditis elegans male sensory-motor neurons and dopaminergic support cells couple ejaculation and post-ejaculatory behaviors. Elife 3, e02938. [DOI] [PMC free article] [PubMed] [Google Scholar]
- LeBoeuf B, and Garcia LR (2017). Caenorhabditis elegans male copulation circuitry incorporates sex-shared defecation components to promote intromission and sperm transfer. G3: Genes, Genomes, Genetics 7, 647–662. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Leighton DH, Choe A, Wu SY, and Sternberg PW (2014). Communication between oocytes and somatic cells regulates volatile pheromone production in Caenorhabditis elegans. Proceedings of the National Academy of Sciences 111, 17905–17910. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Linderman SW, Nichols AL, Blei DM, Zimmer M, and Paninski L (2019). Hierarchical recurrent state space models reveal discrete and continuous dynamics of neural activity in C. elegans. bioRxiv p.621540. [Google Scholar]
- Liu KS, and Sternberg PW (1995). Sensory regulation of male mating behavior in Caenorhabditis elegans. Tech. rep [DOI] [PubMed] [Google Scholar]
- Markowitz JE, Gillis WF, Beron CC, Neufeld SQ, Robertson K, Bhagat ND, Peterson RE, Peterson E, Hyun M, Linderman SW, et al. (2018). The striatum organizes 3D behavior via moment-to-moment action selection. Cell 174, 44–58. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mulcahy B, Witvliet D, Holmyard D, Mitchell J, Chisholm AD, Meirovitch Y, Samuel AD, and Zhen M (2018). A pipeline for volume electron microscopy of the Caenorhabditis elegans nervous system. Frontiers in neural circuits 12, 94. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Narayan A, Venkatachalam V, Durak O, Reilly DK, Bose N, Schroeder FC, Samuel AD, Srinivasan J, and Sternberg PW (2016). Contrasting responses within a single neuron class enable sex-specific attraction in Caenorhabditis elegans. Proceedings of the National Academy of Sciences 113, E1392–E1401. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nguyen JP, Shipley FB, Linder AN, Plummer GS, Liu M, Setru SU, Shaevitz JW, and Leifer AM (2016). Whole-brain calcium imaging with cellular resolution in freely behaving Caenorhabditis elegans. Proceedings of the National Academy of Sciences of the United States of America 113, E1074–E1081. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Noble LM, Chang AS, McNelis D, Kramer M, Yen M, Nicodemus JP, Riccardi DD, Ammerman P, Phillips M, Islam T, et al. (2015). Natural variation in plep-1 causes male-male copulatory behavior in C. elegans. Current Biology 25, 2730–2737. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Oren-Suissa M, Bayer EA, and Hobert O (2016). Sex-specific pruning of neuronal synapses in caenorhabditis elegans. Nature 533, 206–211. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Orfanidis SJ (1995). Introduction to signal processing (Prentice-Hall, Inc.). [Google Scholar]
- Pinto L, Rajan K, DePasquale B, Thiberge SY, Tank DW, and Brody CD (2019). Task-dependent changes in the large-scale dynamics and necessity of cortical regions. Neuron 104, 810–824. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sammon JW (1969). A nonlinear mapping for data structure analysis. IEEE Transactions on computers 100, 401–409. [Google Scholar]
- Schilbach L, Timmermans B, Reddy V, Costall A, Bente G, Schlicht T, and Vogeley K (2013). Toward a second-person neuroscience. Behavioral and brain sciences 36, 393–414. [DOI] [PubMed] [Google Scholar]
- Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B, et al. (2012). Fiji: an open-source platform for biological-image analysis. Nature methods 9, 676–682. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schindelman G, Whittaker AJ, Thum JY, Gharib S, and Sternberg PW (2006). Initiation of male sperm-transfer behavior in Caenorhabditis elegans requires input from the ventral nerve cord. BMC biology 4, 26. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Scholz M, Linder AN, Randi F, Sharma AK, Yu X, Shaevitz JW, and Leifer A (2018). Predicting natural behavior from whole-brain neural dynamics. bioRxiv p. 445643. [Google Scholar]
- Serrano-Saiz E, Oren-Suissa M, Bayer EA, and Hobert O (2017a). Sexually dimorphic differentiation of a c. elegans hub neuron is cell autonomously controlled by a conserved transcription factor. Current Biology 27, 199–209. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Serrano-Saiz E, Pereira L, Gendrel M, Aghayeva U, Bhattacharya A, Howell K, Garcia LR, and Hobert O (2017b). A neurotransmitter atlas of the Caenorhabditis elegans male nervous system reveals sexually dimorphic neurotransmitter usage. Genetics 206, 1251–1269. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Serrano-Saiz E, Poole RJ, Felton T, Zhang F, De La Cruz ED, and Hobert O (2013). XModular control of glutamatergic neuronal identity in C. elegans by distinct homeodomain proteins. Cell 155, 659. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sherlekar AL, Janssen A, Siehr MS, Koo PK, Caflisch L, Boggess M, and Lints R (2013). The C. elegans male exercises directional control during mating through cholinergic regulation of sex-shared command interneurons. PLoS ONE 8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Simon JM, and Sternberg PW (2002). Evidence of a mate-finding cue in the hermaphrodite nematode caenorhabditis elegans. Proceedings of the National Academy of Sciences 99, 1598–1603. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Srinivasan J, Kaplan F, Ajredini R, Zachariah C, Alborn HT, Teal PE, Malik RU, Edison AS, Sternberg PW, and Schroeder FC (2008). A blend of small molecules regulates both mating and development in Caenorhabditis elegans. Nature 454, 1115–1118. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stringer C, Pachitariu M, Steinmetz N, Reddy CB, Carandini M, and Harris KD (2019). Spontaneous behaviors drive multidimensional, brainwide activity. Science 364, eaav7893. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Styczynska-Soczka K, and Jarman AP (2015). The Drosophila homologue of Rootletin is required for mechanosensory function and ciliary rootlet formation in chordotonal sensory neurons. Cilia 4, 9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sulston JE, Albertson DG, and Thomson JN (1980). The Caenorhabditis elegans male: postembryonic development of nongonadal structures. Developmental Biology 78, 542–576. [DOI] [PubMed] [Google Scholar]
- Susoy V, Joyce W, and Rahi S (2019). sto-3 is expressed in r4bl/r and r8bl/r, male-specific ray neurons in c. elegans. microPublication Biology 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Teramoto T, and Iwasaki K (2006). Intestinal calcium waves coordinate a behavioral motor program in C. elegans. Cell calcium 40, 319–327. [DOI] [PubMed] [Google Scholar]
- Venkatachalam V, Ji N, Wang X, Clark C, Mitchell JK, Klein M, Tabone CJ, Florman J, Ji H, Greenwood J, et al. (2016). Pan-neuronal imaging in roaming Caenorhabditis elegans. Proceedings of the National Academy of Sciences of the United States of America 113, E1082–8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ward JH Jr (1963). Hierarchical grouping to optimize an objective function. Journal of the American statistical association 58, 236–244. [Google Scholar]
- White JG, Southgate E, Thomson JN, and Brenner S (1986). The structure of the nervous system of the nematode Caenorhabditis elegans. Philosophical Transactions of the Royal Society B: Biological Sciences 314, 1–340. [DOI] [PubMed] [Google Scholar]
- Whittaker AJ, and Sternberg PW (2009). Coordination of opposing sex-specific and core muscle groups regulates male tail posture during Caenorhabditis elegans male mating behavior. BMC biology 7, 1–15. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wolff C, Tinevez JY, Pietzsch T, Stamataki E, Harich B, Guignard L, Preibisch S, Shorte S, Keller PJ, Tomancak P, et al. (2018). Multi-view light-sheet imaging and tracking with the MaMuT software reveals the cell lineage of a direct developing arthropod limb. Elife 7, e34410. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zhen M, and Samuel AD (2015). C. elegans locomotion: small circuits, complex functions. Current opinion in neurobiology 33, 117–126. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Neuronal activity traces and concurrent behavioral features have been deposited at Mendeley Data: doi:10.17632/922xsfxh2g.1 and are publicly available as of the date of publication. All original code used to analyze the data is available from the Lead Contact upon request. Any additional information required to reanalyze the data reported in this paper is available from the Lead Contact upon request.