Abstract
An important feature of animal behavior is the ability to switch rapidly between activity states, however, how the brain regulates these spontaneous transitions based on the animal’s perceived environment is not well understood. Here we show a C. elegans sleep-like state on a scalable platform that enables simultaneous control of multiple environmental factors including temperature, mechanical stress, and food availability. This brief quiescent state, which we refer to as microfluidic-induced sleep, occurs spontaneously in microfluidic chambers, which allows us to track animal movement and perform whole-brain imaging. With these capabilities, we establish that microfluidic-induced sleep meets the behavioral requirements of C. elegans sleep and depends on multiple factors, such as satiety and temperature. Additionally, we show that C. elegans sleep can be induced through mechanosensory pathways. Together, these results establish a model system for studying how animals process multiple sensory pathways to regulate behavioral states.
Subject terms: Behavioural methods, Circadian rhythms and sleep
C. elegans sleep can be used to model neural state transitions. Here the authors show that adult C. elegans show quiescent sleep-like behavior when in a microfluidic chamber, and that this is regulated by temperature, mechanosensation and satiety.
Introduction
Understanding how animals select behaviors based on sensory information is a fundamental goal of neuroscience1–3; however, sensorimotor transformations can vary dramatically depending on the state of the animal’s nervous system4–7. Wakefulness and arousal8, locomotor activity states9, satiety10, attention11, and emotions4,12 represent a spectrum of physiological and neural states that can dramatically affect how animals respond to a given stimuli. Small animals like the nematode C. elegans are tractable model organisms for understanding how physiological and neural states combine with information from multiple sensory pathways and give rise to specific behavior3,5,7,10,13,14.
Sleep is one example of a neural state that dramatically alters an animal’s sensorimotor transformations15,16. Studies of sleep across the phylogenetic tree have shown that sensory systems transition to a reduced activity state that leads to a decreased animal response to external stimuli17–21. In addition, sleep and wakefulness have been shown to correspond with distinct patterns of neural activity in humans15,16, rodents16, and fruit flies22. Likewise, whole-brain recordings from C. elegans suggest that the majority of worm brain activity can be represented on a low-dimensional manifold23, and that the activity on this manifold shifts from phasic to fixed-point attractor dynamics during developmental sleep24. In addition, studies with C. elegans have revealed molecular pathways18,25–28, neural circuits25,29–34, and neuropeptides30,33,35,36 that drive nematode sleep and arousal, and some of these mechanisms are conserved in other animals37–39. These reports have paved the way for using C. elegans sleep as a model system to understand spontaneous brain-state transitions between sleep and wakefulness. Given the number of unique regulators of C. elegans sleep, there is a need to identify a behavior that facilitates our understanding of how brain-wide neural circuits transduce multiple external and internal factors to drive sleep-wake transitions. Here, we describe a C. elegans sleep behavior in a microfluidic environment, termed microfluidic-induced sleep, that is amenable to whole-brain imaging and is regulated both by the animal’s physiological state and external sensory queues. While microfluidic-induced sleep is likely a form of previously reported nematode quiescence behaviors, such as stress-induced sleep and episodic swimming31,40, the rapid rate of state transitions and the fact that these quiescence behaviors occur in microfluidic devices provides a number of advantages for studying the mechanisms of state transitions with precise environmental controllability, high-throughput screenings, and whole-brain imaging.
Results
Spontaneous C. elegans quiescent bouts in microfluidics
When confined to microfluidic chambers we found that adult C. elegans rapidly and spontaneously switch between normal activity and brief quiescent bouts without any additional stimuli (Fig. 1a). We initially observed this behavior when immobilizing worms for recording body-wall muscle electrophysiology41. In these electrical recordings we observed minutes-long periods of muscle inactivity that corresponded to whole-animal quiescence41. We have since found that this quiescence occurs in a wide range of microfluidic geometries (Supplementary Movie 1, 2).
We found that the onset, frequency, and duration of quiescent bouts in microfluidic chambers are unique compared with previously reported sleep behaviors in adult C. elegans (Fig. 1). While larval C. elegans display quiescence during lethargus18, quiescence in adult worms occurs in only a few situations, such as after several hours of swimming40,42–44 or after exposure to extreme environmental conditions31,35,36,45,46. To determine how microfluidic-induced quiescence compares with the well-established episodic behavior that occurs in swimming animals and stress-induced quiescence that occurs from a 30 min heat shock, we quantified these behaviors using the same methods to analyze microfluidic-induced sleep (Fig. 1b–f). During a 4 h imaging period, we found that animals partially immobilized in microfluidic channels (50 μm width, ~0.004 μL per chamber, Supplementary Movie 2) displayed short (1.3 ± 0.1 min, mean ± sem, Fig. 1e) bouts that, on average, began within the first hour of imaging (51 ± 4 min, mean ± sem, Fig. 1d). Likewise, we also observed frequent, but longer (2.4 ± 0.3 min, mean ± sem, Fig. 1e) quiescent bouts when the microfluidic chambers were large enough to allow animals to swim (500 μm width, ~0.1 μL per chamber, Supplementary Movie 1). We compared these data with swimming-induced quiescence, where animals alternate between swimming and quiescence in a large multi-well device called WorMotel (Fig. 1b, 8 μL of buffer per well)47. In WorMotel, we recorded 5–7 times less sleep over the imaging period compared with microfluidic chambers (Fig. 1c) and longer quiescent bouts compared with either microfluidic geometry (3.6 ± 0.3 min, mean ± sem, Fig. 1e). In addition, the average quiescence onset time was more than double what we observed for microfluidic-induced sleep (175 ± 6 min, mean ± sem, Fig. 1d). For our final comparison point, we heat-shocked animals in the large microfluidic device for 30 min at 30 °C to induce stress-quiescence, then analyzed animal behavior during the heat shock plus a 30 min recovery period31 (Fig. 1b). As expected, during the noxious heat stimulus animals displayed their first quiescent bout 4–6 times faster than in microfluidic chambers with no external heat applied (13 ± 0.7 min, mean ± sem, Fig. 1d).
These initial data show that compared with episodic swimming in WorMotel, microfluidic-induced sleep occurs with a higher frequency, faster onset and in shorter bouts (Fig. 1c–e). Similarly, microfluidic-induced sleep onset occurs on a significantly different timescale compared with stress-induced sleep (Fig. 1b, d). It is important to note that while the microfluidic-induced sleep phenotype shows a number of quantitative differences when compared with episodic swimming and stress-induced quiescence, it is not clear if microfluidic-induced quiescence can be classified as a new C. elegans behavior. It is possible that the microfluidic environment accelerates episodic swimming or introduces mild stressors that more slowly lead to stress-induced quiescence. Thus, we consider microfluidic-induced quiescence to merely display quantifiably distinct dynamics compared with other reported quiescent behaviors in C. elegans adults and is not necessarily a new behavioral state.
Microfluidic-induced quiescence is a sleep state
Our observation of spontaneous C. elegans quiescence in microfluidic chambers led us to determine whether this behavioral state transition meets the evolutionarily conserved criteria for classification as sleep: reversibility, a decreased response to stimuli, homeostasis, and a stereotypical posture17. C. elegans developmentally timed sleep as larvae meets all requirements18,19,37,48–53. However, reports of sleep in adult worms have only observed reversibility and a decreased response to stimuli31,37. Here, we tested for a stereotyped posture, reversibility, decreased response to stimuli, and a homeostatic rebound.
Similar to previous reports48,50,51, we found that animals exhibited a stereotyped posture during quiescence (Fig. 2a). The body curvature of animals crawling on agar typically decreases during developmental sleep48. In our case, we found that animals swimming in microfluidics show increased body curvature during sleep (from 3.9 ± 0.04 radians during wakefulness to 4.5 ± 0.1 radians during quiescence (mean ± sem), p < 0.0001, Fig. 2a, right). This result is consistent with the fact that C. elegans quiescent posture, a hockey-stick-like shape50, has a higher curvature than the long body wavelengths displayed during swimming locomotion40. To test for reversibility, we used blue light (5-s pulse, 5 mW/cm2) as a strong stimulus and found that this rapidly and reliably reversed the quiescent state, leading to a dramatic increase in both behavioral activity and nose speed (Fig. 2b, Supplementary Movie 3). To test for a decreased response to stimuli, we fabricated microfluidic push-down valves designed to deliver tunable mechanical stimuli. We found that when we applied a strong stimulus (high pressure, 30 psi), both wake and quiescent animals robustly responded with a significant increase in behavioral activity, which provides additional confirmation that the quiescent state is reversible (Fig. 2b, Supplementary Movie 4). When we applied a weak stimulus to wake animals (low pressure, 15 psi), we again reliably recorded a significant increase in activity that matched the response of the strong stimulation (Fig. 2c, Supplementary Movie 5). However, when we delivered a weak stimulus to quiescent animals, they responded weakly, exhibiting an average behavioral activity less than half that of animals in the awake state (Fig. 2c–d, Supplementary Movie 5). In fact, <40% of quiescent animals that received a weak stimulus transitioned to wakefulness, compared with >75% of animals being in the awake state following stimulation for all other experimental conditions (Fig. 2e). Importantly, because the strong stimuli evoked a similar strong behavioral response from both quiescent animals and awake animals, animals in the quiescent state are not less capable of responding to stimuli provided the stimuli is sufficiently intense (Fig. 2c–d). Further analyses also showed that animals in the sleep state are less likely to respond to weak stimuli and transition to wakefulness, compared with animals in the wake state regardless of their activity level prior to the stimulus (Supplementary Fig. 1). When we analyzed data from the wake animals, we found that nearly 70% of animals with activity levels below our sleep threshold for 3 s prior to the weak stimuli transitioned to wakefulness, compared with <40% for animals that we classified to be in the sleep state prior to a weak stimulus (Supplementary Fig 1). These results are consistent with quiescence being a sleep state rather than simply a low-activity state of wakefulness18,19,31,52.
In addition, we also tested for homeostatic rebound, which is found in worm developmental sleep18,34,48. Similar to previous studies with C. elegans developmental sleep48, we hypothesized that longer wake bouts would lead to longer sleep bouts due to micro-homeostatic mechanisms. Indeed, we found that sleep bouts increased from 1.5 ± 0.1 min to 2.5 ± 0.1 min (mean ± sem) as the preceding wake bout increased in length from <1 min to 20 min (Supplementary Fig. 2A). However, even when wake bout lengths increased to longer than an hour, the sleep bouts lengths plateaued to an average of only 2.3 ± 0.1 min, contradicting the hypothesis that extended wake periods lead to sleep deprivation and homeostatic rebound. To directly test the effects of sleep deprivation, we performed optogenetic inhibition of the RIS neuron (Supplementary Fig 2B–D), which is known to be implicated in C. elegans sleep29,30,34. This optogenetic approach allowed us to have a control group (raised in the absence of all-trans retinal) that is also exposed to light but does not have optogenetic inhibition of the RIS neuron, thus controlling for any potential effects of stress produced by light illumination. We found that although RIS inhibition for 30 min did not fully abolish sleep, optically inhibited animals exhibited 324% more sleep and 230% more low-activity behavior compared with control animals during the refractory period following the optogenetic inhibition of the RIS neuron (p < 0.01) (Supplementary Fig. 2D). RIS-inhibited animals also showed sleep bouts lasting 1.5 times longer than control animals (p < 0.01) (Supplementary Fig 2C–D). From our results combined, we conclude that animals show a homeostatic rebound in response to prolonged RIS inhibition. Therefore, microfluidic-induced quiescence indeed meets the behavioral precedents to be called a C. elegans sleep state: stereotyped posture, reversibility, a decreased response to stimuli, and homeostasis.
To further validate that microfluidic-induced sleep is a sleep state, we interrogated the role of two interneurons, RIS and ALA, known to dominate C. elegans developmental and stress-induced sleep, respectively, via at least partially distinct signaling pathways37,54. To test whether microfluidic-induced sleep is also dependent on these neurons, we compared the sleep phenotype of WT, ceh-17(lf), and aptf-1(lf) loss-of-function mutants (Fig. 3). ceh-17(lf) shows defective axonal growth of the ALA neuron26 and less stress-induced sleep31. aptf-1(lf) lacks the transcription factor necessary for RIS to signal quiescence via the FLP-11 neuropeptide and shows defects in developmental sleep29,30. In our experiments, both ceh-17(lf) and aptf-1(lf) mutants showed more than 4.5 times less total microfluidic-induced sleep than WT animals (Fig. 3b). Furthermore, while these behavioral data only represent sleep bouts lasting longer than 30 s to reduce false detections (see “Methods” section), these results—and others throughout this report—were not dependent on this choice of analyses (Supplementary Fig. 3). Together, these data validate that microfluidic-induced sleep is a C. elegans sleep state controlled by previously reported neural mechanisms.
A global brain-state underlies microfluidic-induced sleep
Having established that microfluidic-induced sleep meets the criteria for C. elegans sleep and is hallmarked by a dramatic behavioral state transition, we also sought to confirm that these spontaneous behavioral transitions were accompanied by an underlying global brain-state transition24,55. Previous work in chemically paralyzed animals used brain-wide calcium imaging to establish that the C. elegans nervous system, with the exception of a few neurons, transitions to a large-scale downregulation of neural activity during sleep24,55.
Using whole-brain calcium-sensitive imaging we were able to establish that microfluidic-induced sleep is indeed associated with a global brain state transition (Fig. 4). The major advantage of the microfluidic-induced sleep behavior for whole-brain imaging is that animals can be confined in microfluidic chambers, which facilitates imaging without the use of chemical paralytics that abolish behavioral outputs23,24,55. Furthermore, animal confinement forgoes the need to perform real-time tracking during whole-brain imaging56,57. To exploit this advantage, we developed an imaging protocol using a microfluidic chamber geometry similar to previous studies23 that partially immobilizes animals but allows for enough movement to quantify animal behavior and detect microfluidic-induced sleep during whole-brain calcium imaging (Fig. 4). By incorporating a period of animal habituation to blue excitation light, we were able to image continuously for 10 min using single-plane epifluorescence microscopy and capture spontaneous sleep-wake transitions in ~25% of animals (see Methods). Imaging a single 2D-plane allowed for quantifying both average ganglia activity and the activity of several individual neurons (Fig. 4b, Supplementary Movie 6).
With this imaging protocol, we observed a distinct correlation between animal behavior and neural activity (Fig. 4b, Supplementary Movie 6). During microfluidic-induced sleep both the average ganglia activity and the activity of individual neurons dropped significantly (78 ± 10% and 55 ± 10%, respectively) (Fig. 4c). However, as expected from previous work24,29,30,34,55, we observed that some neurons actually increased in activity during microfluidic-induced sleep (Fig. 4c), some of which corresponded with the approximate location of the RIS interneuron (indicated neuron in Fig. 4a–b), which has been proposed as a sleep-promoting neuron for multiple C. elegans sleep-like states29,30,34. Single-neuron imaging confirmed that the RIS neuron indeed showed more than a twofold increase in calcium activity during microfluidic-induced sleep and strongly correlated with low-behavioral activity (Fig. 5). These results further support the claim that microfluidic-induced sleep is a C. elegans sleep behavior controlled by sleep-promoting circuits and corroborate previous reports that a unique brain state governs C. elegans sleep24,55.
Satiety, thermosensation and mechanosensation regulate sleep
While the combination of behavioral and calcium-imaging data shows that microfluidic-induced sleep is hallmarked by a spontaneous brain and behavioral state transition (Fig. 4) regulated by sleep-promoting neurons like RIS and ALA (Fig. 3, Fig. 5), we also wanted to understand what neural circuits upstream of these neurons are involved in regulating microfluidic-induced sleep. Based on our observation of distinct phenotypes when comparing swimming animals in WorMotel to swimming animals in microfluidic chambers (Fig. 1), we hypothesized that C. elegans sensory circuits detect features unique to the microfluidic environment. To elucidate the cues regulating microfluidic-induced sleep, we used the versatility of microfluidics to perform assays under a variety of conditions and compared the microfluidic-induced sleep phenotype to the baseline behavior observed in a large microfluidic device (Fig. 6a). We defined our baseline experimental conditions as: 20 °C cultivation temperature (Tc); animals are transferred directly from seeded nematode growth media (NGM) into the microfluidic device; the microfluidic media (M9 buffer) contains no food source; the temperature during imaging is 22 °C.
We first tested how food availability affects the microfluidic-induced sleep phenotype. The presence of food is known to change the swimming-induced quiescence phenotype43,44; high quality food induces quiescence58, and extreme starvation also leads to sleep-wake switching34,55. Therefore, we hypothesized that the internal satiety state is a significant regulator of microfluidic-induced sleep. To test this hypothesis, we assayed three satiety states in WT animals: Starved animals were starved for 2 h before being loaded into a chamber with no food; Baseline animals were loaded directly from a NGM food source to a microfluidic device with no food; and +Food animals were loaded from a NGM food source into a microfluidic device with food dissolved in the buffer. As expected, we observed less total microfluidic-induced sleep per worm as satiety increased from Starved (15 ± 2 min, mean ± sem) to Baseline (5.4 ± 0.9 min) to +Food (0.4 ± 0.2 min) (Fig. 6a–b). We also observed that only in the Starved condition did animals show measurably lower behavioral activity during wakefulness (Supplementary Fig. 4A). These results show that satiety is a strong regulator for microfluidic-induced sleep, which may have evolved to optimize the tradeoff between energy conservation and the search for food.
Other well-known drivers of sleep are noxious environmental stressors, which we also tested in the context of our microfluidic chambers. Heat shock at temperatures >30 °C is a common method to induce cellular stress and C. elegans sleep25,31,35,36,45. Although our standard microfluidic-induced sleep assays were conducted at only 22 °C, we investigated whether these small changes from Tc could be a possible environmental regulator of quiescence. Indeed, we discovered that increasing the assay temperature to 25 °C, which is still well below commonly used temperatures for heat shock (30–40 °C), increased the total observed sleep 3.5-fold (Fig. 6a, c). Cooling the device to 18 °C (i.e., below Tc) had the opposite effect and nearly abolished all microfluidic-induced sleep bouts (Fig. 6c). To show that these changes in phenotype are mediated by C. elegans thermosensation, we tested triple knock-out gcy-23(nj37);gcy-8(oy44);gcy-18(nj38) mutants, which show disruption to thermosensation that is specific to the AFD neurons, the primary temperature-sensing neurons in C. elegans59. In AFD-defective animals we observed no significant change in total microfluidic-induced sleep when raising the temperature from 18 to 22 °C (baseline). Under the same conditions, WT animals showed a 540-fold increase in total microfluidic-induced sleep (Fig. 6c). Furthermore, thermosensory-defective mutants displayed 80% less microfluidic-induced sleep at 22 °C (baseline) and 45% less microfluidic-induced sleep at 25 °C when compared with WT animals (Fig. 6c). These results suggest that AFD neurons transduce changes in environmental temperature and drive downstream sleep-promoting circuits. In addition, temperature had no effect on wake-state behavioral activity for either WT or mutant animals (Supplementary Fig. 4B). These results show that temperature changes significantly less than those typically used for heat shock can dramatically change sleep dynamics and that thermosensory input can act bidirectionally to either promote or suppress C. elegans quiescence.
The final environmental factor we investigated was animal confinement. Under baseline conditions, animals swim in large 500 μm-width chambers (Fig. 6d, inset). We found that confining animals to a smaller 110 μm-width chamber, where the primary motion is crawling-like (Fig. 6d inset) leads to the same amount of total microfluidic-induced sleep as the baseline chambers (Fig. 6d). However, when we partially compressed WT animals in small 50 μm-width chambers, we observed nearly a fourfold increase in total sleep compared with baseline (Fig. 6a, d). We hypothesized that this change in phenotype due to immobilization was at least partially mediated by mechanosensory circuits. For example previous reports showed that touch-defective mutants mec-10(tm1552) have a decreased ability to sense spatial patterns in microfluidic arenas60. We tested mec-10(tm1552) as well and found that when minimal mechanical stress was present (i.e., 500 and 110 μm width chambers), total microfluidic-induced sleep remained insignificantly changed compared with WT (Fig. 6d). However, when mec-10(tm1552) animals were compressed, total animal microfluidic-induced sleep decreased by a factor of two compared with WT animals under the same conditions (Fig. 6d), indicating that mechanosensory pathways are necessary for restraint-induced sleep. While animal restraint indeed changed the measured behavioral activity, these differences in sleep between WT and mec-10 animals cannot be explained by changes in behavioral activity during wakefulness (Supplementary Fig. 4C). In addition, we also tested mec-4(e1611) mutants, which are defective in response to gentle touch, but remain sensitive to harsh touch61. These animals showed no significant difference in total microfluidic-induced sleep compared with WT when immobilized (Supplementary Fig. 5), indicating that nociceptive mechanosensory pathways are required to drive microfluidic-induced sleep. Together, these results show that C. elegans microfluidic immobilization induces sleep behavior through harsh mechanosensory pathways.
Given the dependence of microfluidic-induced sleep on satiety, temperature, and mechanical stress (Fig. 6), we hypothesized that each of these factors could act as stressors that contribute to a slow-onset form of stress-induced sleep. To test this hypothesis, we assayed DAF-16::GFP animals in the identical environmental conditions shown in Fig. 6. While normally diffuse in the cytoplasm, under unfavorable environmental conditions, DAF-16::GFP localizes to the nucleus62. We quantified puncta formation in different environmental conditions and observed that DAF-16::GFP localization correlated with microfluidic-induced sleep phenotypes in only some cases (Supplementary Fig. 6). For example, compared with baseline animals, animals assayed at 25 °C showed greater than a 250% increase in the number of cumulative puncta and animals assayed with food showed almost zero puncta formation (Supplementary Fig. 6), which is in agreement with previous reports of stress responses62. These results support the hypothesis that 25 °C and the lack of food in the microfluidic devices increases animal stress and upregulates microfluidic-induced sleep. However, animals partially immobilized in 50 μm-wide chambers showed no significant difference in the number of DAF-16 puncta compared with Baseline (Supplementary Fig. 6), despite displaying dramatically more total microfluidic-induced sleep (Fig. 6). These results suggest that animal stress may not completely explain the changes in microfluidic-induced sleep we observed during environmental manipulations.
In addition to environmental elements like mechanical compression and temperature that change sleep, we ruled out the possibility that O2 depletion, CO2 buildup, or the buildup of other unknown substances dramatically affect microfluidic-induced sleep (Supplementary Fig. 7A–C). To rule out these factors we performed two different experiments. In one, we replaced the static buffers (used for all other experiments) with a gentle buffer flow that is expected to stabilize gas concentration levels and remove any animal byproducts. Surprisingly, we observed that the gentle flow led to more sleep (Supplementary Fig. 7A–C). In another experiment, we considered the possibility that the small volume of liquid in different microfluidic chambers could play a role in driving more sleep through the buildup of gasses or other products. To test this hypothesis, we developed a geometry that maintains the same animal restraint but varies the fluidic volume in the worm chambers (Supplementary Fig. 7D). The total sleep in these chambers was not significantly different (Supplementary Fig. 7E–F). These experiments suggest that indeed the mechanical environment is a much stronger driver of sleep than fluidic volume, and not the buildup of metabolic products.
Finally, we also ruled out the possibility that the process of loading animals into the microfluidic device or changing the fluidic environment leads to a stress response that drives stress-induced sleep. We fabricated large microfluidic chambers that are expected to mimic an open volume of liquid (1200 μm long, 500 μm wide, and 90 μm tall), and observed that animals rarely exhibited sleep behavior despite undergoing the same loading process (Supplementary Fig. 7G–I). Therefore, the stress associated with the loading process and change in the fluidic environment alone is not sufficient to drive stress-induced sleep. In fact, reducing this chamber height to 55 μm re-established the sleep behavior, further strengthening our claims that the mechanical environment is a strong driver of microfluidic-induced sleep (Supplementary Fig 7G–I). Overall, our environmental manipulations conclusively show that the animal’s satiety state, the mechanical environment, and the local temperature strongly regulate the microfluidic-induced sleep phenotype.
Whole-brain imaging of transitions in paralyzed animals
We envision microfluidic-induced sleep as a platform to understand the neural circuits and correlates driving brain-state transitions. To highlight this potential, we performed additional experiments to record from more individual neurons during whole-brain imaging. As shown in previous works, tracking individual neurons in a moving C. elegans brain is a laborious and challenging process56,63. Following examples from other groups23,24,55, we circumvented this challenge by chemically paralyzing animals, performing z-scanning, and capturing the activity of 40–100 neurons simultaneously during volumetric imaging (Supplementary Fig. 8). In a fraction of animals, we observed brain-states that resembled what would be expected from a sleeping animal (decrease in calcium activity in all but a few neurons, see Fig. 4). However, in this paralyzed preparation we cannot unequivocally claim that these states correspond to sleep because we cannot correlate the calcium imaging with animal behavior. Nevertheless, our data is consistent with our expectations for how paralysis should affect the sleep state given the role of mechanoreception. We found that the probability of observing a putative sleep state during a 10-min experiment dropped from a rate of ~25% in behaving animals to <5% in paralyzed animals. This result is consistent with our conclusion that mechanosensation of the environment facilitated by worm movement is a primary driver of microfluidic-induced sleep. Though we are limited here by a relatively slow imaging rate (<3 vol/s) and poor z-sectioning with epifluorescence imaging, these experiments show a path towards using rapid volumetric imaging techniques64 to not only capture brain-wide activity but also enable single-neuron mapping to the C. elegans connectome.
Discussion
Here, we described a spontaneous C. elegans brain and behavioral state transition that is unique to microfluidic chambers, which facilitates whole-brain imaging and precise regulation of the environment. Microfluidic-induced sleep regulation appears to be at least partially linked to a slow-onset form of stress-induced sleep (Supplementary Fig. 6), and may also be related to swimming-induced quiescence40,42,43. Despite these similarities, the behavioral dynamics of quiescence that we measured is quantitatively distinct from these previously reported worm quiescent behaviors (Fig. 1), although it is possible that changes in sleep onset time and bout duration in microfluidics are affected by collisions with the chamber walls or other physical cues. We showed that during microfluidic-induced sleep animals exhibit many behavioral properties of sleep, including a stereotyped posture (Fig. 2a), reversibility (Fig. 2b), a decreased response to sensory stimuli (Fig. 2c–d), and homeostatic rebound (Supplementary Fig. 2). This quiescence behavior is also dependent on known C. elegans sleep-promoting neurons, ALA and RIS (Fig. 3). In addition, we found that thermosensory input via the AFD neuron acts as a bidirectional controller of sleep; cooler temperatures promote wake, while warmer temperatures promote sleep (Fig. 6). Furthermore, we showed that animal restraint can act through mechanosensory pathways to drive sleep behavior (Fig. 6). Finally, a global downregulation of neural activity, with the exception of a few neurons, underlies microfluidic-induced sleep behavioral transitions (Figs. 4 and 5, Supplementary Fig. 8).
Importantly, our results show the drastic effects of microfluidic environments on C. elegans behavior. Microfluidic assays are commonly used to study nematode biology65. Sleep in C. elegans is also commonly studied by confining animals to microfluidic chambers43,44,66. Our data show that the conditions of these micro-environments can strongly affect the sleep phenotype and thus the microfluidic chambers should be carefully designed and their effects should be considered when interpreting the results of these experiments. However, although we observe changes in sleep behavior in the context of microfluidics—and most notably during increased confinement—quiescence behavior may increase in standard agar environments as well due to changes in animal confinement, such as agarose-based confinement chambers66.
Furthermore, it is not difficult to imagine that C. elegans has evolved to use environmental cues to regulate quiescence behavior. One unifying hypothesis for C. elegans microfluidic-induced sleep regulation could be rooted in energy conservation. Factors that decreased microfluidic-induced sleep, such as food and cooler temperatures, may indicate favorable conditions for active roaming behavior. Conversely, factors that increased sleep, such as elevated temperatures and animal restraint, may indicate more harmful environments in which roaming and expending energy is not an optimal survival strategy. Furthermore, the changes we made to the environment may change the animal’s metabolic state. C. elegans metabolism is known to increase with increasing temperature67. Therefore, it is possible that all changes in the sleep phenotypes we observed were rooted in a tradeoff between expending energy to move and the expected value of finding food.
Many questions remain with respect to C. elegans sleep and the role of sensory inputs in driving sleep behavior. The interaction between multiple sensory inputs, the ALA/RIS neurons, and diverse behavioral outputs are likely highly non-linear systems involving multiple signaling pathways and neuromodulators25,29,34–36,44. Future work will help answer these questions and determine the relationship between ALA and RIS and whether these neurons are critical for driving sleep in all the environmental conditions tested in this report (Fig. 6). Furthermore, ALA and RIS themselves are known to respond to mechanical stimulation66,68, potentially providing a mechanism for why animal confinement drives sleep behavior. These sleep-driving neurons that also act as sensory neurons are a prime example of the multimodal nature of the C. elegans nervous system, which adds another element of complexity when dissecting the sensory and sleep circuits involved in environmentally driven sleep.
In a broader context, we have identified microfluidic-induced sleep as a behavior in which experimentally controlled external inputs strongly affect how frequently an animal transitions between behavioral states. Therefore, this sleep behavior provides a testbed for interrogating the biological principles that regulate brain and behavioral state transitions. These studies are made possible by the combination of whole-brain imaging and behavioral recordings with simultaneous control of the microfluidic environment. Combining these modalities in a high-throughput pipeline will lead to a large library of simultaneous behavioral and brain-wide data under many environmental and physiological conditions. These data, combined with computational techniques, would provide a rich resource to understand how many circuits across the C. elegans nervous system regulate behavioral states.
Methods
C. elegans strains and maintenance
All C. elegans strains were maintained at 20 °C on standard NGM seeded with E. coli OP50 as the food source. All experiments were performed with day 1 adult animals at 21–22 °C unless otherwise stated. The strains used for each experiment are as follows:
Figure 1: N2
Figure 2: N2
Figure 3: N2, IB16 ceh-17(np1) I; HBR227 aptf-1(gk794) II
Figure 4: AML32 (wtfIs5 [prab-3::NLS::GCaMP6s; prab-3::NLS::tagRFP])
Figure 5: HRB1361 (goeIs304[pflp-11::SL1-GCaMP3.35-SL2::mKate2-unc-54–3'UTR, unc-119(+)])
Figure 6: N2, IK597 gcy-23(nj37);gcy-8(oy44);gcy-18(nj38) IV, ZB2551 mec-10(tm1552)
Supplementary Figure 1. N2
Supplementary Figure 2: N2, HBR1374 goeIs307[pflp-11::ArchT::SL2mKate2-unc-54- 30UTR,unc-119(+)]; goeIs304[pflp-11::SL1-GCaMP3.35- SL2::mKate2-unc-54-30UTR, unc-119(+)]
Supplementary Figure 3: N2, IB16 ceh-17(np1) I; HBR227 aptf-1(gk794) II
Supplementary Figure 5: N2, CB1611 mec-4(e1611)
Supplementary Figure 6: TJ356 (zIs356 [daf-16p::daf-16a/b::GFP + rol-6(su1006)])
Supplementary Figure 7: N2
Supplementary Figure 8: AML32 (wtfIs5 [prab-3::NLS::GCaMP6s; prab-3::NLS::tagRFP])
Microfluidic device fabrication
Standard photo- and soft-lithography techniques were used to fabricate microfluidic devices65. Microfluidic geometries were custom designed in CAD software. Most photomasks were transparencies (CAD/Art Services Inc.), but glass photomasks (Front Range Photomask) were used for higher-resolution devices (Supplementary Fig. 7). All master molds were fabricated using SU-8 2075 (MicroChem). The SU-8 height for worm behavioral channels was 75 μm (spin: 20 s–500 rpm, 30 s–3000 rpm), but we used a height of 50 μm (spin: 20 s–500 rpm, 30 s–4000 rpm) for whole-brain imaging devices to further constrict animal movement. We used polydimethylsiloxane (PDMS) Sylgard for all microfluidic chips. All behavioral chips were double-layer devices to incorporate push-down valves for sealing the chamber entrances or delivering mechanical stimuli. The bottom worm layer (20:1 ratio, spin: 930 rpm for 30 s) was bonded to the upper valve layer (10:1 ratio) using a 30 s exposure to oxygen plasma (200 W, 330 mTorr), then baked together for at least 12 h. The PDMS devices were permanently bonded to either a standard glass slide for behavior, or a 300-μm-thick quartz wafer (NOVA Electronics Materials) for whole-brain imaging.
Behavioral quantification and sleep detection
To quantify C. elegans activity, we used frame-by-frame subtraction using custom MATLAB (MathWorks) scripts. Not only is frame-by-frame subtraction less computationally expensive than other metrics such as posture or nose-tracking, but we found overall that this technique is less prone to the noise associated with small errors in tracking specific C. elegans body points. This method subtracts consecutive frames from one another, then counts the number of pixels that substantially change value. Worm movement leads to a large number of pixels that change from frame-to-frame. Quiescent animals, which move very little, lead to few pixels that change values from frame-to-frame. We performed frame-by-frame subtraction, drew regions-of-interest around each animal, then counted the number of pixels in the ROI that changed by a value >30 (a number well above the noise level of the CMOS sensor). This yields a raw activity trace for each animal. We also used standardized methods to normalize activity traces43,44, which accounts for changes in brightness across the field-of-view, and allowed us to set a consistent sleep detection threshold across populations. In most cases, we smoothed activity traces across 20 s, then normalized to the top 95th percentile, yielding a normalized activity trace for each animal with values approximately between 0 and 1. For analysis that required finer timescales on the order of <20 s (Fig. 2a–c), we did not smooth activity traces (see Reversibility and Decreased Response to Stimuli subsection).
Once we normalized the activity trace, we thresholded the data to detect sleep. The threshold depended on the microfluidic geometry. For example, in large microfluidic chambers (Supplementary Movie 1), movement could still be detected during microfluidic-induced sleep as animals drifted across the chamber. In smaller microfluidic geometries (Supplementary Movie 2), worm activity was already significantly constrained, so a stricter threshold was needed to detect sleep. We determined thresholds by manually scoring 20 sleep bouts, calculating the mean activity during those bouts, then doubling the mean activity. The thresholds used for each geometry were: WorMotel: 0.15, 500 μm microfluidic chambers: 0.15, 110 μm microfluidic chambers: 0.08, 50 μm chambers: 0.06. A minimum sleep bout time of 30 s was used to reduce false detections. In addition, during a sleep state brief animal twitching lasting <15 s was not counted as a wake period.
Standard microfluidic behavioral assays
Unless otherwise stated, behavioral assays took place on an enclosed AmScope SM-2T-LED stereo microscope. Red transparency was used to filter out LED wavelengths that potentially affect animal behavior. Imaging was performed at 3 fps with either a Point Grey Grasshopper (GS3-U3-23S6M-C) or Basler Ace (acA1920-40um) CMOS cameras, which have nearly identical sensor specifications. While the experiments were typically carried out in a room held at 20 °C, the heat from the LED raised the microfluidic device temperature to 21–22 °C (the Baseline temperature in Fig. 6).
M9 buffer was used for all experiments, with no food added unless otherwise stated. During standard experimental conditions, we used a hair pick to transfer day 1 adults directly from seeded NGM into the buffer of an open syringe cap. We then suctioned animals into Tygon tubing that led to the microfluidic chambers. The process of loading 6–12 animals into the chambers (depending on the geometry used) typically took <5 min. A push-down valve closed off the entrance of all worm chambers to prevent animals from escaping during imaging. After use each day, devices were flushed with ~6 mL of DI water, sonicated for 10 min, flushed again with DI water, boiled for 15 min, and flushed a final time before storage at ~80 °C overnight.
WorMotel assays
A 48-well WorMotel molded from PDMS was provided by the Fang-Yen Lab47. Only 12 wells were used simultaneously. Prior to use, the PDMS was exposed to oxygen plasma for 30 s to make the surface hydrophilic. Each well was then filled with 8 μL of M9 buffer. Using a hair pick, we removed individual animals from seeded NGM, washed them in an M9 droplet, then transferred them into the WorMotel wells. For imaging, the PDMS was inverted and reversibly sealed on a glass slide during imaging (see Churgin et al. [44,47]). The glass slide was treated with Rain-X to prevent condensation. The device was illuminated obliquely with three AmScope Goose-neck LEDs that were filtered with red transparency. As with microfluidic devices, the temperature during imaging was 21–22 oC. We imaged from below at 3 fps with a Point Grey Grasshopper (GS3-U3–23S6M-C).
Heat shock
Device setup and animal loading was performed as previously stated (see Standard Microfluidic Behavioral Assays subsection). However, the device was preheated to 30 °C with two Peltier heaters placed on each side of the glass slide. Heat was applied for the initial 30 min of imaging, after which the current through the Peltier heaters was reversed such that the device was rapidly brought to the standard 22 °C. This heat shock protocol was adapted from that used for agar plates in Hill et al. [37].
Posture and body curvature analysis
Similar to previous reports48, Custom MATLAB scripts were written to quantify body curvature in the Large microfluidic data set from Fig. 1 (where animals are confined to microfluidics, but have enough room to swim). We limited our analyses to the first 2 h of imaging, when a minimal number of eggs are present. Many eggs in the chamber can make it computationally difficult to distinguish between eggs and the animal body. For every video frame, we subtracted the background (an image of the chambers with no animals present) and increased the frame contrast (MATLAB imadjust). These preprocessing steps yielded a high contrast between the animal bodies and image background. We then binarized the video (MATLAB im2bw), removed small objects (MATLAB bwareaopen), smoothed the binarized frame (MATLAB imgaussfilt), skeletonized the smoothed frame (MATLAB bwmorph), and removed spurious pixels (MATLAB bwmorph). These steps gave skeletonized versions of the worm bodies. We used these skeletons to calculate the average body length and placed 20 equally spaced points along the centerline. Occasionally (<5% of frames), this centerline fit performed poorly (e.g., animals completely curl on themselves), but this could be detected by calculating the body length in every frame. Frames where the body length was <80% of the average were not used to calculate curvature. From the centerline points, we fit a circle to every three adjacent points, yielding 18 curvature values along the body (the inverse of the circle radii). These 18 curvature values were averaged and normalized to the body length to give a dimensionless value for the mean animal body curvature in every frame. For every animal, we then smoothed the curvature data over 20 s and found the average curvature during sleep and wakefulness.
Reversibility and decreased response to stimuli
Reversibility assays were conducted on an inverted Nikon microscope and performed with 50 μm-wide microfluidic chambers (Supplementary Movie 3). Animals were loaded into the chambers and left for between 30 and 60 min. Upon visual confirmation of sleep, we initiated a protocol of 60 s of imaging at 10 fps. At 30 s, a strong light stimulus (460 nm light at 5 mW/mm2) was presented for 5 s to awaken animals. Only animals that were asleep for the full 30 s prior to the light stimulus were kept for analysis.
To test for a decreased response to stimuli, we fabricated 110 × 1100 um microfluidic chambers to confine animals (Supplementary Movie 4, 5). In addition to the push-down valve used to keep animals in each chamber, we incorporated two push-down valves used for mechanical stimulation. The two valves ensured that animals were almost always in contact with at least one valve during pressurization. For strong and weak stimulation, we used a valve pressure of 30 and 15 psi, respectively. Seven groups of animals were used for weak stimulation and four for strong stimulation; each group consisted of 8–12 animals. During the hour-long assay, animals received a 0.5 s valve pulse every 3 min. During postprocessing, we analyzed animal activity around each stimulation timepoint. For the 10 s prior to each stimulation timepoint, we classified animals as quiescent, slow moving, or fast moving. Two categories for wake behavior (i.e., slow moving and fast moving) were necessary because a behavioral response could not be detected in animals that were already moving with a high activity. That is, an animal that was clearly awake and moving with high activity in the microfluidic chamber did not display increased activity after receiving mechanical stimuli. However, a detectable behavioral response was apparent in wake, but low-activity animals. We used an activity threshold of <0.08 for quiescent animals, 0.08–0.35 for low-activity animals, and >0.35 for high-activity animals (the average animal activity across all traces was 0.36). This classification was performed for each stimulation (20 stimulations for each animal). These classified groups comprise the heatmaps showed in Fig. 2b. Note that because animals are more likely to be in the wake state, this classification method leads to lower n-values for the sleep condition. From each animal in each group, we also calculated the mean activity for 10 s post stimulation, excluding a 2 s period where the microfluidic valves caused movement artifacts, which make up the data shown in Fig. 2c.
Homeostasis and RIS optogenetic inhibition
This protocol was adapted from Wu et al. [34]. HBR1374 animals expressed the light-gated proton pump ArchT in the RIS neuron and were raised on NGM seeded with 0.2 mM all-trans retinal (+ATR). Control animals were also the HBR1374 strain but were not raised in ATR (-ATR). Experiments were performed on an inverted Nikon microscope. Animals were loaded in 110 μm-wide chambers (see Fig. 6 inset) and imaged at 4 fps with a Basler Ace (acA1920–40um) CMOS camera. Experiments lasted 2 h. Between 1 and 1.5 h, we illuminated animals with 565 nm light (3 mW/mm2).
Whole-brain imaging in behaving animals
Microfluidic devices were fabricated as previously described (see Microfluidic Device Fabrication subsection), and geometries were modeled off of previous methods for whole-brain imaging23,24,55; however, animals were not chemically paralyzed. We used transgenic animals with pan-neuronal expression of GCaMP6s in the nuclei of all neurons56,63. Experiments were performed on an inverted Nikon microscope with a ×40 water-immersion objective (NA = 1.15). An Andor Zyla 4.2 USB 3.0 sCMOS captured the images at 5 fps (50 ms exposures, 2 × 2 binning). Because blue light can wake C. elegans, when animals were immobilized in the chambers, we first initialized a habituation protocol. Here, we flashed the 460 nm excitation light for 0.15 s at 1 Hz for 30 min. This habituated animals without photobleaching the calcium indicator. After the habituation period, we imaged continuously for 15 min, but only analyzed the first 10 min of data due to photobleaching. With this protocol, we captured a sleep-wake transition in ~25% of animals.
To analyze data, we chose ten neurons at random to track by hand in FIJI. An 8 × 8 pixel ROI was then used for each neuron in each frame. A neuron near the center of the ganglia was used to draw an ROI around the head ganglia to calculate average brain fluorescence in each frame. We calculated animal activity in two ways: by frame-by-frame subtraction (sampling the frames a 3 Hz), and by calculating the average displacement of the tracked neurons. Averaged and normalized neuron displacement make up the behavioral traces in Fig. 4, Supplementary Movie 6. Both methods were prone to fluctuating baselines that were not present during behavioral-only recordings, making it difficult to set a standard threshold across animals. However, clear quiescent periods were subjectively apparent. Therefore, for each animal we plotted only the animal behavioral activity and selected sleep bouts manually. As before, only bouts longer than 30 s were counted. We then calculated the mean ganglia and neuron fluorescence during sleep and wake for each worm.
Behavioral activity was smoothed over 3 s and normalized as previously described (see Behavioral Quantification and Sleep Detection subsection). Raw ganglia and neuron activity was smoothed over 3 s before calculating ∆F/F. We denote ∆F/F as [F(t) − F0(t)]/F0(t) where F0(t) is the minimum fluorescence value up to time t.
Whole-brain imaging in paralyzed animals
Whole-brain imaging in paralyzed animals closely followed the protocol for behaving animals (see Whole-Brain Imaging in Behaving Animals subsection); however, 5 mM tetramisole was added to the buffer to chemically paralyze animals, similar to previously reported methods23,24,55. In addition, the ×40 objective was mounted onto a piezo scanner (Physik Instrumente). We used MATLAB to control a data-acquisition box (National Instruments) that output voltage waveforms to trigger both the piezo scanner and Zyla camera. The DAQ output a sawtooth waveform to the piezo, which enabled scanning across 30 μm in the z-axis. At 12 different points along the scan, the piezo would briefly settle for 30 ms while the DAQ also triggered a 10 ms camera frame acquisition. This approach led to a volumetric imaging rate of 2.84 vol/s over 10 min periods.
Following imaging, we used a custom MATLAB GUI to manually choose neuron locations. The GUI allowed users to look at max projections, volumes, or single imaging planes across the duration of the recording. Consecutive planes or volumes could also be averaged to reduce noise. This allowed for the x-y-z positions of neurons to be manually located and stored. The average of a 3 × 3 × 3 pixel ROI was used around each neuron when extracting mean fluorescence. Raw neuron activity was smoothed over 3 s before calculating ∆F/F. We denote ∆F/F as [F(t) − F0(t)]/F0(t) where F0(t) is the minimum fluorescence value up to time t.
RIS Imaging
Overall, 7–10 animals per trial (six trials total) were confined and imaged simultaneously under ×10 magnification in the 50-μm-wide chamber geometry. HRB1361 animals expressed both GCaMP3 and mKate in RIS neurons under the FLP-11 promoter. Experiments took place on an inverted Nikon microscope, with dual excitation and emission for simultaneous two-color imaging (FF01–468/553–25 and F01–512/630–25 BrightLine dual-band bandpass filters for excitation and emission, respectively). An X-Cite XLED1 light source provided both 460 and 565 nm excitation light and a Tucam image splitter (Andor) split the mKate and GCaMP channels onto two Andor Zyla 4.2 CMOS cameras. We imaged animals for 2 h and used a data-acquisition box (National Instruments) controlled with custom MATLAB scripts to simultaneously trigger 10 ms camera exposures and 30 ms XLED flashes at 0.5 Hz (3 × 3 binning). Following experiments, we flushed animals from the device and recorded the background for each color channel.
For postprocessing, we used the mKate channel to quantify behavior and track the location of RIS neurons. After subtracting background, we calculated animal activity by drawing an ROI around each animal and performing the same frame-by-frame subtraction method as previously described (see Behavioral Quantification and Sleep Detection subsection), but here we used a pixel change with a threshold of 400 because of the high dynamic range of the Zyla sensor. After normalizing behavioral activity, a threshold of 0.2 was used to detect sleep bouts, with a minimum sleep time of 30 s. To detect the RIS location in each frame, we again subtracted the image background. We then isolated and binarized each animal ROI, leaving only the RIS neuron and, occasionally, pieces of its processes. The largest object in the ROI was the RIS soma, which we used to attain the soma centroid. To get the average RIS fluorescence in the frame, we drew a 25 × 25 pixel ROI around the centroid in each channel and averaged the 20 largest pixel values. We normalized this raw fluorescence in each channel by calculating ∆F/F = [F(t) − F0(t)]/F0(t), where F0(t) is the minimum fluorescence value up to time t. Following this normalization, we calculated the ratio of each color channel R = (∆F/F)GCaMP/(∆F/F)mKate. Finally, the reported ratio values are ∆R/R = [R(t) − Ro]/Ro, where Ro is the lower 20th percentile value.
Using behavioral data (from frame-by-frame subtraction), we detected sleep bouts and calculated the average RIS ∆R/R activity during wake and sleep (Fig. 5c). To calculate correlation values, across all animals we split behavioral and fluorescence data into 10 min windows and calculated the fluorescence correlation with behavior in each window. ∆R/R data showed a strong negative correlation with behavior (Fig. 5d, green trace). Randomly shuffling the ∆R/R windows as a control removes this strong correlation (Fig. 5d, gray trace). To test for movement artifacts that could possibly lead to a correlation between fluorescence and behavior, we performed the same unshuffled analysis with the mKate channel only (Fig. 5d, red trace).
Environmental control
The microfluidic setup during environmental manipulation was identical to the previously stated (see Standard Microfluidic Behavioral Assays subsection); however, for each condition we manipulated individual aspects of the environment. The baseline phenotype in 500-μm-wide chambers (Supplementary Movie 1, Fig. 6) was chosen because animals could move freely in a manner similar to swimming, thereby reducing the overall effect of the microfluidic confinement.
Most assays involved transferring animals directly from seeded NGM into the microfluidic device. However, under Starved conditions we used a hair pick to remove animals from seeded NGM, washed them in a droplet of M9 buffer, then placed them onto a fresh, unseeded NGM plate. After 2 h, animals were loaded into the microfluidic device with no food in the buffer. Therefore, animals were deprived of a food source for 2 h when imaging began and did not have access to food during the experiment.
Most assays were also performed with no food in the M9 buffer. However, under +Food conditions, we dissolved 4.56 mg/mL of freeze-dried OP50 (LabTie) into the M9 buffer, providing a food source for animals throughout the imaging time.
In +Compression conditions, animals were confined to 50 × 1100-um-wide microfluidic chambers (Supplementary Movie 2).
As previously stated, the standard imaging temperature due to LED lighting was 21–22 °C (see Standard Microfluidic Behavioral Assays subsection). We controlled temperature in the same manner as heat shock experiments, using Peltier devices to heat or cool the microfluidic chips to 24–25 or 17–18 °C, respectively.
DAF-16::GFP Imaging
Experiments took place over the course of 2 h on Nikon inverted scope with an Andor Zyla 4.2 USB 3.0 sCMOS and ×4 magnification for multi-worm imaging. Environmental control took place as described in the Environmental Control subsection. Every 5 min, we captured seven frames (20 ms exposures) at 1 Hz with 1 × 1 binning. Otherwise, animals were in darkness. Following imaging, we flushed animals from the chamber and recorded background frames.
Puncta quantification took place similar to previous methods with custom MATLAB scripts69. We subtracted the background from each frame and smoothed the image with a median filter. We thresholded this image to detect animal bodies and drew an ROI around each. The smoothed image was further processed with a 3 × 3 high frequency filter, which enhanced the contrast of puncta and allowed us to binarize the image to detect most DAF-16 aggregations in the frame. For each animal ROI, we then found puncta by counting all objects with a size between 2 and 30 pixels. To mitigate the effects of animal movement, which caused some animals to appear blurred and reduced puncta count, of the seven frames that were captured every 5 min, we averaged the three largest puncta counts for each ROI. This average makes up the final puncta count for each animal at the given timepoint. The puncta count reported (Supplementary Fig. 6) are likely lower than the true count that would be attained with high-magnification imaging. Low magnification not only increases the number of animals imaged per trial but was also necessary to capture the full length of the large microfluidic chambers. Because we applied the same algorithm to all environmental conditions, we expect the reported trends to remain true in high-magnification conditions.
Quantification and statistical analysis
Boxplots with scatterplots overlaid were constructed in MATLAB. For the boxplots, the top and bottom edges of the box indicated the 25th and 75th percentiles, respectively; the whiskers extend to the most extreme data points not calculated as outliers; and the gray line in the box indicates the median.
All statistical tests are indicated in figure legends. Almost all statistical comparisons were between more than two groups with unequal variances. Thus, the non-parametric Kruskal–Wallis test with a post hoc Dunn–Sidak test was used to test for statistical significance. For data in which we tested whether one group displayed phenotypic differences (either behavioral or neural) during wake and sleep, we used the paired t-test.
Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
Supplementary information
Acknowledgements
We thank the Fang-Yen lab for providing the WorMotel device. Henrik Bringmann provided the HRB1361 strain for RIS imaging and HBR1374 strain for optogenetics. We thank Anne Hart, David Raizen, and Henrik Bringmann for helpful discussions. Several strains were provided by the CGC, which is funded by NIH Office of Research Infrastructure Programs (P40 OD010440). D.L.G. is funded by the National Science Foundation (NSF) Graduate Research Fellowship Program 1842494 and a training fellowship from the Keck Center of the Gulf Coast Consortia on the NSF IGERT: Neuroengineering from Cells to Systems 1250104. D.L.G. and J.Z. are funded by the Smalley-Curl Institute’s Student Training for Advising Research program. We also thank the Rice Shared Equipment Authority where devices were fabricated.
Source data
Author contributions
D.L.G. conceived, performed, and analyzed experiments. J.Z. performed whole-brain imaging experiments. B.F. performed experiments. J.T.R. directed the research. D.L.G. and J.T.R. co-wrote the paper. All authors read and commented on the manuscript.
Data availability
All raw data (e.g., raw animal activities from frame-by-frame subtraction) will be made publicly available at https://rice.box.com/v/Celegans-Microfluidic-Sleep. Raw video files will be provided upon request. Source data underlying Figs. 1–6 and Supplementary Figs. S1–S8 are available as a Source Data file.
Code availability
Custom MATLAB scripts used for data analysis will be provided upon request.
Competing interests
The authors declare no competing interests.
Footnotes
Peer review information Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. Peer reviewer reports are available.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary information is available for this paper at 10.1038/s41467-019-13008-5.
References
- 1.van Atteveldt Nienke, Murray Micah M., Thut Gregor, Schroeder Charles E. Multisensory Integration: Flexible Use of General Operations. Neuron. 2014;81(6):1240–1253. doi: 10.1016/j.neuron.2014.02.044. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Fetsch Christopher R., DeAngelis Gregory C., Angelaki Dora E. Bridging the gap between theories of sensory cue integration and the physiology of multisensory neurons. Nature Reviews Neuroscience. 2013;14(6):429–442. doi: 10.1038/nrn3503. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Clark Damon A., Freifeld Limor, Clandinin Thomas R. Mapping and Cracking Sensorimotor Circuits in Genetic Model Organisms. Neuron. 2013;78(4):583–595. doi: 10.1016/j.neuron.2013.05.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Tye KM. Neural circuit motifs in valence processing. Neuron. 2018;100:436–452. doi: 10.1016/j.neuron.2018.10.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Anderson David J. Circuit modules linking internal states and social behaviour in flies and mice. Nature Reviews Neuroscience. 2016;17(11):692–704. doi: 10.1038/nrn.2016.125. [DOI] [PubMed] [Google Scholar]
- 6.Marder Eve. Neuromodulation of Neuronal Circuits: Back to the Future. Neuron. 2012;76(1):1–11. doi: 10.1016/j.neuron.2012.09.010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Bargmann Cornelia I, Marder Eve. From the connectome to brain function. Nature Methods. 2013;10(6):483–490. doi: 10.1038/nmeth.2451. [DOI] [PubMed] [Google Scholar]
- 8.McGinley Matthew J., Vinck Martin, Reimer Jacob, Batista-Brito Renata, Zagha Edward, Cadwell Cathryn R., Tolias Andreas S., Cardin Jessica A., McCormick David A. Waking State: Rapid Variations Modulate Neural and Behavioral Responses. Neuron. 2015;87(6):1143–1161. doi: 10.1016/j.neuron.2015.09.012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Bennett Corbett, Arroyo Sergio, Hestrin Shaul. Subthreshold Mechanisms Underlying State-Dependent Modulation of Visual Responses. Neuron. 2013;80(2):350–357. doi: 10.1016/j.neuron.2013.08.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Lim Rod S., Eyjólfsdóttir Eyrún, Shin Euncheol, Perona Pietro, Anderson David J. How Food Controls Aggression in Drosophila. PLoS ONE. 2014;9(8):e105626. doi: 10.1371/journal.pone.0105626. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Talsma Durk, Senkowski Daniel, Soto-Faraco Salvador, Woldorff Marty G. The multifaceted interplay between attention and multisensory integration. Trends in Cognitive Sciences. 2010;14(9):400–410. doi: 10.1016/j.tics.2010.06.008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Adolphs Ralph, Anderson David. Social and emotional neuroscience. Current Opinion in Neurobiology. 2013;23(3):291–293. doi: 10.1016/j.conb.2013.04.011. [DOI] [PubMed] [Google Scholar]
- 13.Ghosh D Dipon, Nitabach Michael N, Zhang Yun, Harris Gareth. Multisensory integration in C. elegans. Current Opinion in Neurobiology. 2017;43:110–118. doi: 10.1016/j.conb.2017.01.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Calhoun Adam J, Murthy Mala. Quantifying behavior to solve sensorimotor transformations: advances from worms and flies. Current Opinion in Neurobiology. 2017;46:90–98. doi: 10.1016/j.conb.2017.08.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Saper CB, Fuller PM, Pedersen NP, Lu J, Scammell TE. Sleep state switching. Neuron. 2010;68:1023–1042. doi: 10.1016/j.neuron.2010.11.032. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Brown Ritchie E., Basheer Radhika, McKenna James T., Strecker Robert E., McCarley Robert W. Control of Sleep and Wakefulness. Physiological Reviews. 2012;92(3):1087–1187. doi: 10.1152/physrev.00032.2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Campbell Scott S., Tobler Irene. Animal sleep: A review of sleep duration across phylogeny. Neuroscience & Biobehavioral Reviews. 1984;8(3):269–300. doi: 10.1016/0149-7634(84)90054-x. [DOI] [PubMed] [Google Scholar]
- 18.Raizen DM, et al. Lethargus is a caenorhabditis elegans sleep-like state. Nature. 2008;451:569–572. doi: 10.1038/nature06535. [DOI] [PubMed] [Google Scholar]
- 19.Cho JY, Sternberg PW. Multilevel modulation of a sensory motor circuit during C. elegans sleep and arousal. Cell. 2014;156:249–260. doi: 10.1016/j.cell.2013.11.036. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Hendricks Joan C, Finn Stefanie M, Panckeri Karen A, Chavkin Jessica, Williams Julie A, Sehgal Amita, Pack Allan I. Rest in Drosophila Is a Sleep-like State. Neuron. 2000;25(1):129–138. doi: 10.1016/s0896-6273(00)80877-6. [DOI] [PubMed] [Google Scholar]
- 21.Nath Ravi D., Bedbrook Claire N., Abrams Michael J., Basinger Ty, Bois Justin S., Prober David A., Sternberg Paul W., Gradinaru Viviana, Goentoro Lea. The Jellyfish Cassiopea Exhibits a Sleep-like State. Current Biology. 2017;27(19):2984-2990.e3. doi: 10.1016/j.cub.2017.08.014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Nitz Douglas A, van Swinderen Bruno, Tononi Giulio, Greenspan Ralph J. Electrophysiological Correlates of Rest and Activity in Drosophila melanogaster. Current Biology. 2002;12(22):1934–1940. doi: 10.1016/s0960-9822(02)01300-3. [DOI] [PubMed] [Google Scholar]
- 23.Kato S, et al. Global brain dynamics embed the motor command sequence of caenorhabditis elegans. Cell. 2015;163:656–669. doi: 10.1016/j.cell.2015.09.034. [DOI] [PubMed] [Google Scholar]
- 24.Nichols ALA, Eichler T, Latham R, Zimmer M. A global brain state underlies C. elegans sleep behavior. Science. 2017;356:1–9. doi: 10.1126/science.aam6851. [DOI] [PubMed] [Google Scholar]
- 25.Van Buskirk C, Sternberg PW. Epidermal growth factor signaling induces behavioral quiescence in Caenorhabditis elegans. Nat. Neurosci. 2007;10:1300–1307. doi: 10.1038/nn1981. [DOI] [PubMed] [Google Scholar]
- 26.Van Buskirk C., Sternberg P. W. Paired and LIM class homeodomain proteins coordinate differentiation of the C. elegans ALA neuron. Development. 2010;137(12):2065–2074. doi: 10.1242/dev.040881. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Monsalve Gabriela C., Van Buskirk Cheryl, Frand Alison R. LIN-42/PERIOD Controls Cyclical and Developmental Progression of C. elegans Molts. Current Biology. 2011;21(24):2033–2045. doi: 10.1016/j.cub.2011.10.054. [DOI] [PubMed] [Google Scholar]
- 28.Singh Komudi, Chao Michael Y., Somers Gerard A., Komatsu Hidetoshi, Corkins Mark E., Larkins-Ford Jonah, Tucey Tim, Dionne Heather M., Walsh Melissa B., Beaumont Emma K., Hart Douglas P., Lockery Shawn R., Hart Anne C. C. elegans Notch Signaling Regulates Adult Chemosensory Response and Larval Molting Quiescence. Current Biology. 2011;21(10):825–834. doi: 10.1016/j.cub.2011.04.010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Turek M, Lewandrowski I, Bringmann H. An AP2 transcription factor is required for a sleep-active neuron to induce sleep-like quiescence in C. elegans. Curr. Biol. 2013;23:2215–2223. doi: 10.1016/j.cub.2013.09.028. [DOI] [PubMed] [Google Scholar]
- 30.Turek, M., Besseling, J., Spies, J. P., König, S. & Bringmann, H. Sleep-active neuron specification and sleep induction require FLP-11 neuropeptides to systemically induce sleep. Elife10.7554/eLife.12499 (2016). [DOI] [PMC free article] [PubMed]
- 31.Hill Andrew J., Mansfield Richard, Lopez Jessie M.N.G., Raizen David M., Van Buskirk Cheryl. Cellular Stress Induces a Protective Sleep-like State in C. elegans. Current Biology. 2014;24(20):2399–2405. doi: 10.1016/j.cub.2014.08.040. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Choi S, Chatzigeorgiou M, Taylor KP, Schafer WR, Kaplan JM. Analysis of NPR-1 reveals a circuit mechanism for behavioral quiescence in C.elegans. Neuron. 2013;78:869–880. doi: 10.1016/j.neuron.2013.04.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Nelson, M. D. et al. The neuropeptide NLP-22 regulates a sleep-like state in Caenorhabditis elegans. Nat. Commun. 10.1038/ncomms3846 (2013). [DOI] [PMC free article] [PubMed]
- 34.Wu Y, Masurat F, Preis J, Bringmann H. Sleep counteracts aging phenotypes to survive starvation-induced developmental arrest in C. elegans. Curr. Biol. 2018;28:1–14. doi: 10.1016/j.cub.2018.10.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Nath Ravi D., Chow Elly S., Wang Han, Schwarz Erich M., Sternberg Paul W. C. elegans Stress-Induced Sleep Emerges from the Collective Action of Multiple Neuropeptides. Current Biology. 2016;26(18):2446–2455. doi: 10.1016/j.cub.2016.07.048. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Nelson Matthew D., Lee Kun He, Churgin Matthew A., Hill Andrew J., Van Buskirk Cheryl, Fang-Yen Christopher, Raizen David M. FMRFamide-like FLP-13 Neuropeptides Promote Quiescence following Heat Stress in Caenorhabditis elegans. Current Biology. 2014;24(20):2406–2410. doi: 10.1016/j.cub.2014.08.037. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Trojanowski NF, Raizen DM. Call it worm sleep. Trends Neurosci. 2016;39:54–62. doi: 10.1016/j.tins.2015.12.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Zimmerman John E., Naidoo Nirinjini, Raizen David M., Pack Allan I. Conservation of sleep: insights from non-mammalian model systems. Trends in Neurosciences. 2008;31(7):371–376. doi: 10.1016/j.tins.2008.05.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Kayser Matthew S., Biron David. Sleep and Development in Genetically Tractable Model Organisms. Genetics. 2016;203(1):21–33. doi: 10.1534/genetics.116.189589. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Ghosh R, Emmons SW. Episodic swimming behavior in the nematode C. elegans. J. Exp. Biol. 2008;211:3703–3711. doi: 10.1242/jeb.023606. [DOI] [PubMed] [Google Scholar]
- 41.Gonzales DL, et al. Scalable electrophysiology in intact small animals with nanoscale suspended electrode arrays. Nat. Nanotechnol. 2017;12:694–691. doi: 10.1038/nnano.2017.55. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Ghosh, R. & Emmons, S. W. Calcineurin and Protein kinase G regulate C. Elegans behavioral quiescence during locomotion in liquid. BMC Genet. 10.1186/1471-2156-11-7 (2010). [DOI] [PMC free article] [PubMed]
- 43.McCloskey RJ, Fouad AD, Churgin MA, Fang-Yen C. Food responsiveness regulates episodic behavioral states in caenorhabditis elegans. J. Neurophysiol. jn. 2017;00555:2016. doi: 10.1152/jn.00555.2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Churgin MA, McCloskey RJ, Peters E, Fang-Yen C. Antagonistic serotonergic and octopaminergic neural circuits mediate food-dependent locomotory behavior in caenorhabditis elegans. J. Neurosci. 2017;39:7811–7823. doi: 10.1523/JNEUROSCI.2636-16.2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 45.Iannacone, M. J. et al. The RFamide receptor DMSR-1 regulates stress-induced sleep in C. elegans. Elife10.7554/eLife.19837 (2017). [DOI] [PMC free article] [PubMed]
- 46.DeBardeleben, H. K., Lopes, L. E., Nessel, M. P. & Raizen, D. M. Stress-induced sleep after exposure to ultraviolet light is promoted by p53 in caenorhabditis elegans. Genetics10.1534/genetics.117.300070 (2017). [DOI] [PMC free article] [PubMed]
- 47.Churgin, M. A. et al. Longitudinal imaging of caenorhabditis elegans in a microfabricated device reveals variation in behavioral decline during aging. Elife10.7554/eLife.26652 (2017). [DOI] [PMC free article] [PubMed]
- 48.Iwanir Shachar, Tramm Nora, Nagy Stanislav, Wright Charles, Ish Daniel, Biron David. The Microarchitecture of C. elegans Behavior during Lethargus: Homeostatic Bout Dynamics, a Typical Body Posture, and Regulation by a Central Neuron. Sleep. 2013;36(3):385–395. doi: 10.5665/sleep.2456. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Driver Robert J., Lamb Annesia L., Wyner Abraham J., Raizen David M. DAF-16/FOXO Regulates Homeostasis of Essential Sleep-like Behavior during Larval Transitions in C. elegans. Current Biology. 2013;23(6):501–506. doi: 10.1016/j.cub.2013.02.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Tramm Nora, Oppenheimer Naomi, Nagy Stanislav, Efrati Efi, Biron David. Why Do Sleeping Nematodes Adopt a Hockey-Stick-Like Posture? PLoS ONE. 2014;9(7):e101162. doi: 10.1371/journal.pone.0101162. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 51.Schwarz J, Spies J-P, Bringmann H. Reduced muscle contraction and a relaxed posture during sleep-like Lethargus. Worm. 2012;1:12–14. doi: 10.4161/worm.19499. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.Schwarz J, Lewandrowski I, Bringmann H. Reduced activity of a sensory neuron during a sleep-like state in Caenorhabditis elegans. Curr. Biol. 2011;21:R983–R984. doi: 10.1016/j.cub.2011.10.046. [DOI] [PubMed] [Google Scholar]
- 53.Nagy, S. et al. Homeostasis in C. elegans sleep is characterized by two behaviorally and genetically distinct mechanisms. Elife10.7554/eLife.04380 (2014). [DOI] [PMC free article] [PubMed]
- 54.Trojanowski NF, Nelson MD, Flavell SW, Fang-Yen C, Raizen DM. Distinct mechanisms underlie quiescence during two caenorhabditis elegans sleep-like states. J. Neurosci. 2015;35:14571–14584. doi: 10.1523/JNEUROSCI.1369-15.2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 55.Skora S, Mende F, Zimmer M. Energy scarcity promotes a brain-wide sleep state modulated by insulin signaling in C. elegans. Cell Rep. 2018;22:953–966. doi: 10.1016/j.celrep.2017.12.091. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 56.Nguyen Jeffrey P., Shipley Frederick B., Linder Ashley N., Plummer George S., Liu Mochi, Setru Sagar U., Shaevitz Joshua W., Leifer Andrew M. Whole-brain calcium imaging with cellular resolution in freely behavingCaenorhabditis elegans. Proceedings of the National Academy of Sciences. 2015;113(8):E1074–E1081. doi: 10.1073/pnas.1507110112. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Venkatachalam Vivek, Ji Ni, Wang Xian, Clark Christopher, Mitchell James Kameron, Klein Mason, Tabone Christopher J., Florman Jeremy, Ji Hongfei, Greenwood Joel, Chisholm Andrew D., Srinivasan Jagan, Alkema Mark, Zhen Mei, Samuel Aravinthan D. T. Pan-neuronal imaging in roamingCaenorhabditis elegans. Proceedings of the National Academy of Sciences. 2015;113(8):E1082–E1088. doi: 10.1073/pnas.1507109113. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 58.You Young-jai, Kim Jeongho, Raizen David M., Avery Leon. Insulin, cGMP, and TGF-β Signals Regulate Food Intake and Quiescence in C. elegans: A Model for Satiety. Cell Metabolism. 2008;7(3):249–257. doi: 10.1016/j.cmet.2008.01.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 59.Clark DA, Biron D, Sengupta P, Samuel ADT. The AFD sensory neurons encode multiple functions underlying thermotactic behavior in Caenorhabditis elegans. J. Neurosci. 2006;26:7444–7451. doi: 10.1523/JNEUROSCI.1137-06.2006. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 60.Han B, et al. Dopamine signaling tunes spatial pattern selectivity in C. elegans. Elife. 2017;6:1–14. doi: 10.7554/eLife.22896. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 61.Li, W., Kang, L., Piggott, B. J., Feng, Z. & Xu, X. Z. S. The neural circuits and sensory channels mediating harsh touch sensation in caenorhabditis elegans. Nat. Commun. (2011). 10.1038/ncomms1308 [DOI] [PMC free article] [PubMed]
- 62.Henderson Samuel T., Johnson Thomas E. daf-16 integrates developmental and environmental inputs to mediate aging in the nematode Caenorhabditis elegans. Current Biology. 2001;11(24):1975–1980. doi: 10.1016/s0960-9822(01)00594-2. [DOI] [PubMed] [Google Scholar]
- 63.Nguyen JP, Linder AN, Plummer GS, Shaevitz JW, Leifer AM. Automatically tracking neurons in a moving and deforming brain. PLoS Comput. Biol. 2017;13:e1005517. doi: 10.1371/journal.pcbi.1005517. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 64.Bouchard MB, et al. Swept confocally-aligned planar excitation (SCAPE) microscopy for high speed volumetric imaging of behaving organisms. Nat. Photonics. 2015;9:113–119. doi: 10.1038/nphoton.2014.323. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 65.San-Miguel, A. & Lu, H. Wormbook 1–19 10.1895/wormbook.1.162.1 (2013). [DOI] [PMC free article] [PubMed]
- 66.Spies, J. & Bringmann, H. Automated detection and manipulation of sleep in C. elegans reveals depolarization of a sleep-active neuron during mechanical stimulation-induced sleep deprivation. Sci. Rep. 10.1038/s41598-018-28095-5 (2018). [DOI] [PMC free article] [PubMed]
- 67.Van Voorhies W. A., Ward S. Genetic and environmental conditions that increase longevity in Caenorhabditis elegans decrease metabolic rate. Proceedings of the National Academy of Sciences. 1999;96(20):11399–11403. doi: 10.1073/pnas.96.20.11399. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 68.Sanders, J. et al. The Caenorhabditis elegans interneuron ALA is (also) a high-threshold mechanosensor. Biomed. Cent. (2013). [DOI] [PMC free article] [PubMed]
- 69.Kopito Ronen B., Levine Erel. Durable spatiotemporal surveillance of Caenorhabditis elegans response to environmental cues. Lab Chip. 2014;14(4):764–770. doi: 10.1039/c3lc51061a. [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
All raw data (e.g., raw animal activities from frame-by-frame subtraction) will be made publicly available at https://rice.box.com/v/Celegans-Microfluidic-Sleep. Raw video files will be provided upon request. Source data underlying Figs. 1–6 and Supplementary Figs. S1–S8 are available as a Source Data file.
Custom MATLAB scripts used for data analysis will be provided upon request.