Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 Sep 1.
Published in final edited form as: J Neurogenet. 2020 Aug 19;34(3-4):453–465. doi: 10.1080/01677063.2020.1804565

Discriminating between sleep and exercise-induced fatigue using computer vision and behavioral genetics

Kelsey N Schuch a,b,#, Lakshmi Narasimhan Govindarajan a,c,#, Yuliang Guo a,c, Saba N Baskoylu a,d, Sarah Kim a,d, Benjamin Kimia a,e, Thomas Serre a,c,#, Anne C Hart a,d,*,#
PMCID: PMC8074569  NIHMSID: NIHMS1693075  PMID: 32811254

Abstract

Following prolonged swimming, Caenorhabditis elegans cycle between active swimming bouts and inactive quiescent bouts. Swimming is exercise for C. elegans and here we suggest that inactive bouts are a recovery state akin to fatigue. It is known that cGMP-dependent kinase (PKG) activity plays a conserved role in sleep, rest, and arousal. Using C. elegans EGL-4 PKG, we first validate a novel learning-based computer vision approach to automatically analyze C. elegans locomotory behavior and an edge detection program that is able to distinguish between activity and inactivity during swimming for long periods of time. We find that C. elegans EGL-4 PKG function impacts timing of exercise-induced quiescent (EIQ) bout onset, fractional quiescence, bout number, and bout duration, suggesting that previously described pathways are engaged during EIQ bouts. However, EIQ bouts are likely not sleep as animals are feeding during the majority of EIQ bouts. We find that genetic perturbation of neurons required for other C. elegans sleep states also does not alter EIQ dynamics. Additionally, we find that EIQ onset is sensitive to age and DAF-16 FOXO function. In summary, we have validated behavioral analysis software that enables a quantitative and detailed assessment of swimming behavior, including EIQ. We found novel EIQ defects in aged animals and animals with mutations in a gene involved in stress tolerance. We anticipate that further use of this software will facilitate the analysis of genes and pathways critical for fatigue and other C. elegans behaviors.

Keywords: fatigue, C. elegans, locomotion, swimming, computer vision, quiescence

Introduction

Fatigue is a commonly experienced phenomenon that is typically defined by a feeling of exhaustion combined with decreased muscle output (Wan et al., 2017). Feelings of fatigue are common after vigorous physical activity or exercise, but fatigue is also a hallmark symptom of a variety of health disorders and diseases, including cancer, mood disorders, neurodegenerative disorders, and chronic fatigue syndrome. Fatigue is not limited to vertebrates; exercise eventually drives decreased spontaneous locomotion in invertebrates as well. The molecular pathways and mechanisms involved in fatigue have not been fully delineated in any animal species.

The nematode Caenorhabditis elegans provides a potentially powerful model system to interrogate genetic mechanisms and cellular pathways underlying fatigue. Several methods have been developed to test the neuromuscular output of C. elegans during locomotion, including burrowing assays through media of varying densities (Beron et al., 2015) and pillar deflection strength measuring assays (Rahman et al., 2018). C. elegans are typically grown on solid media, but swimming exercise in liquid media has been shown to be energetically costly (Laranjeiro et al., 2017). Following prolonged swimming, C. elegans begin to spontaneously cycle between periods of active swimming with vigorous body undulations (active bouts) and periods of immobility that lack body undulations (quiescent bouts) (Ghosh & Emmons, 2008). Because swimming is exercise for C. elegans, these quiescent bouts may be fatigue, as they occur after the exertion of swimming and represent a decline in muscle output. The initial vigorous swimming activity could also be a result of introduction to a new environment; however, previous studies show that C. elegans have a reduction in recovery crawl distance with longer swimming duration, indicating that the animals are likely fatigued (Laranjeiro et al., 2017). Definition and dissection of exercise-induced quiescence (EIQ) pave the way to study conserved mechanisms fundamental to fatigue in all animals.

However, using C. elegans to study EIQ and fatigue requires analysis of swimming behavior over long periods of time, and therefore presents logistical and computational challenges. Several methods have been specifically developed for automatically estimating the pose of small laboratory animals, including C. elegans (Gomez-Marin et al., 2012; Jung et al., 2014; Patel et al., 2014; Restif et al., 2014). For the most part, methods developed for automatically estimating the pose of small laboratory animals rely on simple image processing (e.g., background subtraction) to extract the silhouette of a body before computing a medial axis transform. A major drawback of such methods, with non-parameterized poses, is their inability to discriminate between the front and rear ends of the body, forcing researchers to rely on simple heuristics instead (Jung et al., 2014; Restif et al., 2014) (e.g., by computing the direction of movement and assuming that the animal moves forward). Moreover, the performance of these methods relied heavily on certain hyperparameter choices. For example, methods which perform background subtraction are dictated by factors including the granularity of temporal sampling and thresholds for change detection. Though these are in principle automated methods, some choices for method hyperparameters can yield erroneous pose estimates, making the end user’s workflow tedious. Additionally, in the context of biological research, these failures need to be detected – either automatically (Restif et al., 2014) or manually (Jung et al., 2014; Stephens et al., 2008) to exclude the corresponding frames from further behavioral analysis. These human-in-the-loop systems suffer from two drawbacks; (i) the effective throughput of the system is conditioned on the required frequency of human intervention, and (ii) opportunistic pose tracking may lead to biases in behavioral analyses if those system failures co-occur more frequently with certain behaviors (e.g., for those behaviors that yield significant self-contact and/or self-occlusion such as omega turns and coiling). Other high-throughput computer vision systems have attempted to screen the body postures of up to 120 individual animals at a time (Swierczek et al., 2011). However, with an increasing number of animals, the pixel resolution on each of these individuals decreases, which can yield either coarse or unreliable pose metrics.

In this study, we extended previous computer-vision work (Yang & Ramanan, 2013) with a learning-based approach (see Methods and Guo et al. (2018) for details) which outperforms competing solutions including a representative deep neural network that exhibits state-of-the-art accuracy for human tracking. Unlike humans, C. elegans lack distinctive body parts, presenting a significant challenge for deep neural networks and related approaches that rely heavily on appearance alone. Moreover, the employment of machine learning alleviates the need for manual parameter tuning, and instead yields a model that best describes an animal’s posture directly from the data. This system can efficiently distinguish between periods of activity and inactivity in freely swimming C. elegans (Guo et al., 2018) – addressing the need for high-resolution analysis that can handle both extended periods of swimming and quiescent behaviors in C. elegans. Unlike automated tracking systems that limit body “pose” to just a center of mass, our system permits fine-grained analysis of body movements and assessment of locomotion changes in C. elegans swimming over time and additionally handles complex postures more accurately. Here, we refer to this computer vision system as poseEIQ.

Using poseEIQ, we examined C. elegans locomotory behaviors and EIQ after prolonged swimming. To more efficiently determine only whether animals are active or inactive, we also developed a new behavioural analysis system called edgeEIQ, which we validated using mutant strains known to have altered EIQ (Ghosh & Emmons, 2008). With this, we describe how EIQ changes over time with extended free swimming and report previously undescribed changes in EIQ as animals age. We also determined that most EIQ bouts are not a sleep state. These new computer-vision analysis systems should be valuable for C. elegans researchers in any field that requires accurate assessment of locomotory behavior over extended time intervals.

Methods

Strains and maintenance

Wild type N2 Bristol, MT1072 egl-4(n477), DA521 egl-4(ad450), HBR227 aptf-1(gk794), HBR232 aptf-1(tm3287), IB16 ceh-17(np1), GR1307 daf-16(mgDf50), and CF1038 daf-16(mu86) strains were used. C. elegans were grown on NGM agar plates with E. coli OP50 bacterial food at 20°C (Brenner, 1974). Animals were obtained by selecting L4 larval stage animals; after 24 hours, animals were used in assays as day 1 adult animals. For aging assays, 5-fluoro-2’-deoxyuridine (FUDR) was not used to suppress progeny production. Animals were gently serially passaged using bacteria on a pick to avoid overcrowding of plates with progeny.

Microfluidic chip preparation

PDMS microfluidic chips with 24 wells (1.6 mm wide, 0.07 mm deep, 0.4 mm gap between wells) organized in 4 rows and 6 columns were created using a custom mold. A Sylgard 184 silicone elastomer kit (Dow Chemical) was used to make PDMS, which was poured onto the mold to a thickness of 4 mm. Freshly poured PDMS was degassed in a desiccator using a vacuum until air bubbles had dissipated, then placed in a 55°C oven for 18 hours to cure. PDMS was removed from the mold and cut into chips using a razor. To decrease hydrophobicity before use in swimming assays, these chips were then soaked in E. coli OP50 culture overnight, washed with water and ethanol, then left to dry for a week.

Kanamycin-treated E. coli OP50 preparation

Kanamycin-treated E. coli OP50 food solution was prepared as previously described (Huang et al., 2017). In brief, E. coli OP50 was streaked onto LB agar plates and cultured overnight at 37°C. A single colony was used to inoculate 100 mL of liquid LB and cultured at 30°C shaking at 220 rpm for approximately 12 hours. The culture was grown until it reached an optical density of 2-2.5 at 550 nm and concentrated to a final OD550 of 10 (OD determinations made using diluted cultures to stay within the linear range of the spectrophotometer). 0.2 mg/mL Kanamycin was added and the culture was placed at 4°C for one week to yield a static bacterial culture. Kanamycin-treated OP50 was discarded after 6 weeks of antibiotic treatment. Immediately prior to assays, 200 microliters of kanamycin-treated OP50 was pelleted and resuspended in 300 microliters of liquid NGM.

Swimming behavioral assays

Chips were cleaned of dust and debris using laboratory tape. Microfluidic chips were then placed into 35 x 10 mm Petri dishes. Each well was loaded with kanamycin-treated OP50 in liquid NGM until a dome of the liquid droplet was visible, but no dark shadows were visible (approximately 0.5 microliters). Water was added to the Petri dish until just level with the chip surface and paraffin oil was layered over droplets and surrounding water to prevent evaporation. To conserve oil, water was used underneath paraffin oil. Before loading in individual wells, animals were picked to an unseeded plate to avoid contaminating wells with additional food. In assays with multiple genotypes, loading order always changed between trials. Animals were recorded swimming at 30 frames per second for six hours with a Grasshopper3 4.1MP Mono USB3 Vision camera (GS3-U3-41C6M) mounted on a Zeiss Discovery V20 microscope with a 1.25x objective providing 14.8x magnification. For image capture, we used FlyCap2 version 2.12.3.2 or SpinView version 1.13.0.33. Image resolution was 2048 x 1600 pixels, 270 x 270 pixels per chamber with approximately 1,800 pixels per animal. Representative video available at DOI: 10.5281/zenodo.3604455.

For pumping analysis, videos were recorded using the same setup but at 72.0x magnification to allow for visualization of the pharynx. For quiescent bout analysis, these videos were scaled to match the resolution of all other videos to ensure that quiescent bouts were called in a similar manner. After identification of quiescent bouts, the original videos were manually analyzed for pumping status. If the pharynx was for any reason not visible during a bout (self-occlusion or debris), those bouts were not counted (5 instances).

Beat rate was manually collected by analyzing the first minute of swimming. One beat was defined as a full-body bend by the animal in both directions. The experimenter was blinded during this analysis.

Automated well detection

As a pre-processing stage, wells were automatically segmented using MATLAB’s connected component algorithm (function bwboundaries) on the output of an edge detector (Kimia et al., 2018). The top 24 connected components were then selected – each corresponding to a different well.

edgeEIQ and activity level analysis

The behavior of each animal was analyzed for each well independently. We implemented a simple ‘active’ vs. ‘quiescent’ classifier by considering the binary output of an edge detector (Kimia et al., 2018) and computing the edge difference between consecutive frames using the Jaccard index defined as: IoU = Area of Overlap / Area of Union, where Area of Overlap is the number of edge pixels present in two consecutive frames and Area of Union is the sum of the total number of edge pixels across consecutive frames. If the IoU was above a threshold θ = 0.9, the behavior was set to quiescent. Otherwise, the behavior was set to active. Using edges rather than pixels yielded robustness to noise compared to simpler systems based on pixels (Restif et al., 2014). A final class label was computed by voting between the two behaviors over a 1 second (30 frames) time window. The activity threshold θ was treated as a hyperparameter and a grid search strategy was employed to identify the optimal value. By systematically varying θ from 0.1 to 1 (with a step size of 0.05) and computing the Jaccard index between the estimations and manually-annotated labels, we were able to automatically determine optimal θ* that yielded the highest agreement. The annotated dataset comprised active/quiescent labels from video recordings of 8 held out animals, each video lasting 20 minutes at 30 frames per second. The optimal threshold value θ* was identified to be 0.9, and yielded an agreement of 92%.

Analysis of binary quiescence data

For each hour, binary quiescence data for each animal were analyzed using MATLAB to determine fractional quiescence, time to first bout, bout number, and bout duration. First, data for each animal was iterated through to determine the start and end times for every quiescent bout across the six-hour assay. Arbitrarily, we defined the minimum duration of a quiescent bout as three seconds. Fractional quiescence for each hour was determined by summing the duration of quiescent bouts observed that hour and dividing this by time in that hour. To determine bout number per hour, the number of bouts observed in an hour was tallied. For this metric, if a bout crossed over multiple hours, this bout was counted as a fractional bout. Bout duration was determined by dividing the total time spent in quiescent bouts by the number of bouts that occurred in that hour. For bout duration, if a bout crossed over multiple hours it was counted in each hour for its full duration to more accurately portray the demographics of quiescent bouts observed during each hour. This rarely resulted in bouts being counted more than once in bout duration calculations. For fractional quiescence, if a bout crossed over multiple hours, only the portion of the bout occurring in the given hour contributed to the fractional quiescence for that hour. The time to first bout was calculated by determining the second in which the first quiescent bout for an animal occurred.

poseEIQ and kinematic analysis

The approach is based on a pose tracking algorithm developed in-house (Guo et al., 2018). Briefly, nine body points were chosen along the medial axis of the animal body from head to tail. We collected ten representative video sequences (each corresponding to a different animal) with a total length of 1,200 frames (30 frames per second). Ground-truth poses were manually annotated every 10 frames by marking the location of the nine body points. To train and test our computer vision system, we used a leave-one-video out procedure. Detailed evaluation can be found in (Guo et al., 2018). On average, 83% of the points were correctly detected (i.e., within a 5px radius around the ground-truth landmark). This strategy outperformed competing systems for human pose estimation, specifically the original deformable part model (Yang & Ramanan, 2013) and a leading neural network architecture for human pose estimation, the convolutional pose machine (Wei et al., 2016). These positional points were then used to compute metrics informative of body movements, as defined by Restif et al. (2014). Since these measures rely heavily on canonical reorientation of the worm with respect to its head, differentiating the head from the tail becomes particularly important. To alleviate this concern, we specifically ran a second round of tracking, using the Hungarian algorithm (Kuhn, 1955), with the initial head assignment manually checked by a trained expert. Representative video of tracking available at DOI: 10.5281/zenodo.3606717.

Statistical analysis

Statistical analysis was performed using GraphPad Prism 7.0 software (La Jolla, CA). Statistical significance in fractional quiescence, bout number, and bout duration was determined using a 2-way ANOVA and Dunnett’s multiple comparisons testing. Statistical significance for time to first quiescent bout was determined using Kruskal-Wallis and Dunn’s multiple-comparison tests. A value of p < 0.05 was used to determine statistical significance (* p < 0.05, ** p < 0.01, *** p < 0.001). Error bars in figures represent the standard error of the mean.

Results

Behavioral analysis of swimming C. elegans

Analysis of C. elegans movements during swimming is critical for the analysis of diverse circuits and behavior. To further characterize C. elegans locomotion in liquid media, we took advantage of a new computer-vision system for analysis of swimming animals briefly described by Guo et al. (2018), referred to here as poseEIQ (Figure 1A), and assessed changes in C. elegans locomotory behaviors during prolonged swimming. This method addresses several problems common in current image analysis methods. With respect to background subtraction methods, the temporal granularity of sampling can lead to scenarios where the animal is construed as part of the background if it is not moving. Image analysis tracking algorithms are also sensitive to other hyperparameter choices that can vary drastically across imaging sessions because of changes in illumination, background contrast, and imaging resolution. The poseEIQ method is a supervised machine learning algorithm, which learns appropriate configurations of body pose model parameters by optimizing an objective function that factors in both the local visual appearance of body parts and their global geometry. This alleviates the need for explicit background selection and the hand-selection of hyperparameters. poseEIQ is more robust by design as long as representative image samples are included in the training phase of this model.

Figure 1:

Figure 1:

Visual representations of poseEIQ (A) and edgeEIQ (B). (A) poseEIQ uses a shape-consistent flexible mixture of parts model to track C. elegans locomotion. Image adapted from Guo et al. (2018). (B) edgeEIQ compares edge overlap between consecutive frames to determine activity level.

For this analysis, individual young adult animals were placed in small liquid drops with static bacteria as food and high-frame-rate, high-resolution videos were obtained over a 6-hour period. We examined both control animals and egl-4 mutant animals, which are known to have altered locomotion. The cGMP dependent protein kinase encoded by the egl-4 gene is critical for a wide range of behaviors, including arousal, locomotion, and sleep (Raizen et al., 2008). egl-4(n477) loss of function animals and egl-4(ad450) gain of function animals were expected to show opposing differences in locomotory behaviors, as increased EGL-4 function promotes quiescent behaviour in swimming animals (Ghosh & Emmons, 2008; McCloskey et al., 2017).

Accurate assessment of locomotory behaviors during swimming

To determine if poseEIQ detected changes in locomotion, we analyzed recordings of 12 wild type animals and 12 animals for each of the egl-4 mutant alleles. We used poseEIQ for two time intervals within the 6-hour recording window: the first 30 minutes of swimming (early), when quiescent bouts are unlikely to occur were compared to 30 minutes of swimming (late) about 4 hours (228.25 ± 4.28 minutes) into the videos. Behavioral outputs are for both active and quiescent animals, but outputs can easily be changed to analysis of only active or quiescent bouts. For ease of comparison to previous work, we used locomotion parameters that were previously defined in Restif et al. (2014) (Supplementary Table 1). To undertake analysis for these locomotion parameters, it was necessary to assign the head and tail of each animal. Initial head and tail assignments were made computationally and verified manually. As the poseEIQ system performs shape-based pose tracking, these associations were maintained over the course of the video in most scenarios, alleviating the need for further human intervention. The resulting description of locomotion parameters is shown in Figure 2 (statistics in Table 1). Swimming beat rate was manually counted to validate poseEIQ derived wave initiation rate, a similar metric. One beat was defined as a full body movement in both directions. This yielded comparable values (Supplementary Figure 1), and values obtained running the swimming tracking program CeleST on our videos were also comparable (Restif et al., 2014) (Supplementary Table 2).

Figure 2:

Figure 2:

Locomotion analysis of egl-4 mutant animals during prolonged swimming. Evaluation of parameters (A) Wave Initiation Rate (B) Activity Index (C) Curling (D) Stretch (E) Attenuation (F) Brush Stroke (G) Body Wave Number (H) Asymmetry; each indicative of different aspects of locomotion over two windows of 30 minutes each. For a detailed explanation of these parameters, please refer to Restif et al. (2014). The ‘early’ time point is at the very beginning of the 6-hour long behavioral assay while the ‘late’ time point is approximately at the 4 hour mark (228.25 ± 4.28 minutes). The choice of these time points was motivated by the ethograms of Figure 3A. Behavioral parameters for 12 animals from each of the three genotypes: wild type (WT, black), egl-4(n477lf) (egl-4(lf), red), and egl-4(ad450gf) (egl-4(gf), blue) are shown here. The within-group mean temporal course of each parameter is shown as insets in the respective panel, with the early time point on the top left and the late time point on the top right. The average parameter value (over the 30 minute window) for each individual animal is shown in the respective panel; corresponding early/late points are connected by dashed/straight lines. Activity index and brush stroke were normalized to body size (calculated in pixels). Statistical analysis available in Table 1.

Table 1:

Statistical analysis of egl-4 mutant animal locomotion parameters during prolonged swimming. The non-parametric Kruskal-Wallis test (with Bonferroni correction for multiple comparisons) was used for testing significance of inter-group differences within and across time points, as well as within-group differences across time points. Error bars indicate ± S.E.M.

Early Late Early vs. late
WT vs.
egl-4(lf)
WT vs.
egl-4(gf)
WT vs.
egl-4(lf)
WT vs.
egl-4(gf)
WT egl-4(lf) egl-4(gf)
A. Wave initiation rate * *** ** ** *** ** ***
B. Activity index n.s. ** * ** ** ** ***
C. Curling *** *** ** *** ** n.s. n.s.
D. Stretch * ** ** n.s. * n.s. n.s.
E. Attenuation ** * * n.s. n.s. n.s. n.s.
F. Brush stroke n.s. n.s. * * *** n.s. ***
G. Body wave number n.s. n.s. n.s. ** *** n.s. ***
H. Asymmetry n.s. n.s. n.s. n.s. n.s. n.s. n.s.
*

P < 0.05

**

P < 0.01

***

P < 0.001. WT = wild type; egl-4(lf) = egl-4(n477lf); egl-4(gf) = egl-4(ad450gf).

As expected, the locomotory behavior of egl-4 animals differed from wild type animals; loss and gain of function animals are expected to have a diametrically opposed impact on behaviors. For example, at both early and late time points, average wave initiation rate and activity index were decreased in egl-4(ad450gf) animals and increased in egl-4(n477lf) animals, compared to wild type animals (Figure 2A-B, Table 1). We also found increased curling activity in egl-4(ad450gf) animals and decreased curling activity in egl-4(n477lf) animals compared to wild type at both early and late time points (Figure 2C, Table 1). At the early time point, differences in stretch were observed, as curvature range was found to be increased in egl-4(ad450gf) animals and decreased in egl-4(n477lf) animals when compared to wild type (Figure 2D, Table 1). Differences from wild type were also observed in attenuation during the early time point, with increased body wave attenuation in egl-4(ad450gf) animals and decreased body wave attenuation in egl-4(n477lf) animals (Figure 2E, Table 1). At the later time point, egl-4(n477lf) animals showed increased brush stroke and egl-4(ad450gf) animals showed decreased brush stroke compared to wild type (Figure 2F, Table 1). We also observed a significant increase in body wave number of egl-4(ad450gf) animals compared to wild type (Figure 2G, Table 1). egl-4(n477lf) animals at the late time point showed increased curvature range and body wave attenuation compared to wild type (Figure 2D-E, Table 1). The large number of diametrically opposed differences observed in egl-4 animals suggests that poseEIQ can accurately discriminate between normal and mutant locomotion.

Prolonged swimming changes locomotory behaviors

We compared locomotion parameters across time, comparing early versus late time points after prolonged swimming within genotypes. Wave initiation rate and activity index decreased in wild type, egl-4(n477lf), and egl-4(ad450gf) animals over time (Figure 2A-B, Table 1). Body wave number increased and brush stroke decreased in wild type and egl-4(ad450gf) animals between early and late time points (Figure 2F-G, Table 1). Finally, curling activity and stretch increased in wild type animals over time (Figure 2C-D, Table 1). The differences observed in each genotype show that not only can this approach measure the effects of prolonged exercise on locomotion using poseEIQ and these parameters, but that changes in locomotion after prolonged swimming differ based on genotype. Overall, the changes observed at the late time point are consistent with less vigorous locomotion after four hours of swimming.

Swimming behavioral states can be represented and analyzed using binary data or unsupervised Hidden Markov models (HMM)

One drawback of detecting locomotion changes using poseEIQ is that the analysis is computationally intensive and takes a substantial amount of time to run (approximately 10 seconds/frame for pose estimation). Therefore, we focused on quiescent behavior during prolonged swimming and developed an edge-detection program, edgeEIQ (Figure 1B), that more efficiently identifies EIQ bouts in swimming animals. Knowing that diminished EGL-4 activity decreases quiescent behavior after prolonged swimming (Ghosh & Emmons, 2008), we used edgeEIQ to detect quiescent bouts on the video used above. Ethograms constructed after analysis of wild type and egl-4 mutant animals showed clear differences in EIQ bouts for each genotype. The downside of this approach was that the activity threshold was a manually selected parameter (manual optimization of the threshold for behavior to be determined quiescent and EIQ set at a minimum duration of 3 seconds). As an alternative, we explored using an unsupervised Hidden Markov Model (HMM) to extract latent underlying state temporal sequences of activity. This circumvented the need for an explicit selection of EIQ minimum duration or other model parameters. Modeling was done using the open-source package hmmlearn in Python. The two-state HMM yielded a latent state sequence that was qualitatively similar to the ethogram constructed from the manually thresholded edgeEIQ binary data (Figure 3A). In a three-state HMM, the state that seems to correspond best to the inactive state from the manually thresholded binary ethogram seems to be atomic in nature, and thus cannot be further decomposed. The state corresponding best to the active state from the manually thresholded binary ethogram decomposed into two states (Supplementary Figure 2A). We found that HMMs with more than three states resulted in degenerate latent states, i.e., states for which more than one observation is very rare. We can identify such states from analyzing the transition matrices (Supplementary Figure 2B-C) and locating states for which all outgoing transition probabilities are close to zero.

Figure 3:

Figure 3:

Analysis of exercise-induced quiescence in egl-4 mutant animals. 24 animals per genotype. (A) Left panel: Ethograms generated using an unsupervised Hidden Markov Model for wild type, egl-4(n477lf), and egl-4(ad450gf) animals. Each row represents the latent states of a single animal over the course of the 6 hour experiment. Right panel: Ethograms constructed from manually thresholded binary activity data. Filled (or empty) regions can be interpreted as an ‘active’ (or ‘inactive’) state, respectively. (B) On average, the egl-4(n477lf) animals showed decreased fractional quiescence (fraction of each hour spent in quiescent bouts) compared to wild type animals during hours 4 through 6. egl-4(ad450gf) animals showed increased average fractional quiescence at all time points compared to wild type animals. (C) egl-4(n477lf) animals showed decreased average number of bouts (per hour) in hours 3 through 6, compared to wild type animals. egl-4(ad450gf) animals showed increased average number of bouts for hours 1 and 2, and decreased average number of bouts in hours 4 through 6, compared to wild type. (D) Average duration of quiescent bouts did not differ between wild type and the egl-4(n477lf) animals. egl-4(ad450gf) animals showed increased average bout duration during hours 3, 4, and 6. Animals from three independent biological replicates (3 different days). 2-way ANOVA and Dunnett’s multiple comparisons test. (E) egl-4(ad450gf) animals initiated quiescent bouts earlier than wild type animals, while egl-4(n477lf) animals were not different. Kruskal-Wallis test and Dunn’s multiple comparisons test. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

To explore transitions between states predicted by HMM modeling, we computed the log-transformed transition count matrices (Supplementary Figure 2B-C). Prior to this, the per-frame latent state sequences were clumped into bouts of length 30-seconds. The equivalent latent state of the bout was assigned as the statistical mode of the latent states of the constituent frames. The complete absence of state 2 in egl-4(ad450) gain of function animals, coupled with the relative infrequency of transitions between states 1 and 2 in the wild type animals lends support to the aforementioned atomicity of the latent states, i.e., whether or not a given state can be decomposed further into unique latent states (Supplementary Figure 2B-C). The most straightforward conclusion from HMM modeling of locomotory behavior is that swimming C. elegans have a single inactivity state, based on activity. Additionally, swimming C. elegans likely have two active states, which is consistent with previous work (McCloskey, Fouad, Churgin, & Fang-Yen, 2017).

Using our two-state HMM, we randomly sampled body poses of animals in states that likely represent activity and quiescence (Supplementary Figure 3A). Similar to previous studies, eigen decomposition revealed three modes that account for >95% of the total variance in body postures (Stephens et al., 2008; Brown et al., 2013), and the statistical mean body posture of active and quiescent animals appears quite similar (Supplementary Figure 3B-C). Although quiescent animals sometimes assume a straight posture (Supplementary Figure 3A), this similarity between active and quiescent postures contrasts with previous observations reporting that quiescent animals in liquid gradually assume a rod-like posture (Ghosh & Emmons, 2008). The posture discrepancy is likely explained by differences in the definition of quiescent bouts and sampling rates. Here, short quiescent bouts are included; these were not detected or excluded in the previous study. The lack of a straight posture in a quiescent animal can be observed in the representative video available at DOI: 10.5281/zenodo.3606717. C. elegans display stereotypical body postures during sleep (Schwarz et al., 2012; Iwanir et al., 2013; Tramm et al, 2014); the lack of clear difference between active and quiescent body postures here indicates that EIQ is likely distinct from sleep.

We also examined whether the duration of an active bout was related to the duration of the following quiescent bout and found that poor correlation was seen for bout durations (Spearman’s r = −0.29) (Supplementary Figure 4A). This differs from the relationship between active and subsequent quiescent bouts observed during developmentally-timed sleep, as a positive correlation was found between active and quiescent bout durations (Iwanir et al., 2013). To explore this further, we used the raw edge-overlap data output by edgeEIQ (which is indicative of how much an animal is moving from frame to frame) to determine whether the intensity of an active bout affects the following quiescent bout. To look at animals with differing intensities of activity before entering a quiescent bout, we split animals into two groups, more active and less active, by the median activity prior to entering quiescence. We saw no difference in quiescent bout duration between the two groups (Supplementary Figure 4B). We also found that the less active animals returned to their initial activity level after leaving a quiescent bout – this was also true of the more active animals (Supplementary Figure 4B). We conclude that the relationship between active and quiescent bouts is more complicated than a linear relationship where increased activity leads to increased rest.

Accurate assessment of quiescent behavior during prolonged swimming

To confirm that our edgeEIQ program could detect previously described differences in EIQ, we compared wild type animals swimming in the presence of food to animals carrying previously described egl-4 mutant alleles. egl-4(n477) loss of function animals were predicted to show decreased EIQ and egl-4(ad450) gain of function animals were expected to show increased EIQ. New six-hour videos of swimming animals were recorded and analyzed with the program. The fraction of time quiescent (fractional quiescence) was determined for each hour in individual animals across the six-hour experiment (Figure 3B). At every time point, egl-4(ad450) gain of function animals showed increased fractional quiescence compared to wild type, while egl-4(n477) loss of function animals showed decreased fractional quiescence for hours four, five, and six, which is consistent with our prediction and previous work (Ghosh & Emmons, 2008). Next, we examined the average number of quiescent bouts in each hour and the average quiescence bout duration for each hour. egl-4(n477) animals had decreased bout numbers, starting in hour three and onward (Figure 3C). egl-4(ad450) gain of function animals showed increased bout numbers per hour during the first two hours of swimming and decreased bout numbers for hours four through six (Figure 3C) and had increased bout durations at almost all time points, with the exception of hour one (Figure 3D). Finally, we examined when wild type and egl-4 mutant animals first entered a quiescent bout after prolonged swimming. On average, egl-4(ad450) gain of function animals showed quiescence at an earlier time than wild type animals (first quiescent bout of ≥3 seconds, Figure 3E). The loss of egl-4 function did not alter quiescent bout onset. Overall, these results obtained are entirely consistent with previous work and suggest that the edgeEIQ program can robustly identify differences in EIQ and other quiescent behaviors of swimming animals.

EIQ does not require pathways necessary for developmentally-timed sleep or stress-induced sleep

A well-characterized quiescent state in C. elegans is sleep (Hill et al., 2014; Raizen et al., 2008). To determine whether sleep was occurring during EIQ bouts, we manually examined quiescent bouts in wild type animals to determine if feeding was occurring. In C. elegans, pharyngeal pumping can be used as a metric for food intake and feeding. During each hour, pharyngeal pumping was observed in the majority of quiescent bouts; very few bouts were observed where no pharyngeal pumping occurred (Figure 4A). However, during several quiescent bouts, animals did not pump in the first part of the quiescent bout, then resumed pumping for the remainder of the bout. We called these ‘mixed bouts’ and found that the percentage of mixed bouts increased as quiescent bout duration increased (right panel, Figure 4A). However, in the majority of quiescent bouts animals were pumping, suggesting that most C. elegans EIQ bouts are not sleep.

Figure 4:

Figure 4:

Exercise-induced quiescent bouts are not sleep. (A) Behavior of wild type animals during quiescent bouts was classified as ‘pumping’ (exhibited pharyngeal pumping throughout a quiescent bout), ‘mixed’ (began a quiescent bout without pumping, and resumed pumping midway through the bout), and ‘not pumping’ (no pharyngeal pumping). Left panel: The majority of quiescent bouts were classified as pumping, regardless of when they occurred. Right panel: When classified based on bout duration, most bouts lasting 3 minutes or less were classified as not pumping, while bouts longer than 4 minutes were usually classified as mixed bouts. 199 total quiescent bouts classified drawn from 5 animals. Loss of function aptf-1(gk794lf) and aptf-1(tm3287lf) animals did not differ from wild type in fractional quiescence (A), bout number (B), or bout duration (C), with the exception of fractional quiescence (B) and bout duration (B) of aptf-1(tm3287lf) animals at hour 5. 2-way ANOVA and Dunnett’s multiple comparisons test. (E) Average time to first bout was slightly sooner in aptf-1(tm3287lf), but not aptf-1(gk794lf), animals versus wild type. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 24 per genotype. Loss of function ceh-17(np1lf) showed no difference in fractional quiescence (F), bout number (G), and bout duration (H), with the exception of increased fractional quiescence at hour 5 (F). 2-way ANOVA and Dunnett’s multiple comparisons test. (I) No difference in time to first bout was observed between ceh-17(np1lf) animals and wild type. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 24 per genotype. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

Examination of mutant strains confirms that there is little mechanistic overlap between EIQ and previously defined C. elegans sleep states. Changes in EGL-4 kinase activity impact all known types of C. elegans sleep (Hill et al., 2014; Raizen et al., 2008; You et al., 2008). Perturbation of EGL-4 also alters sensory response and changes locomotion in waking animals (Figure 2). The AP2 transcription factor APTF-1 is specifically required for locomotion quiescence during C. elegans developmentally-timed sleep (Turek et al, 2013) and the paired homeodomain transcription factor CEH-17 is required for locomotion quiescence in stress-induced sleep (Hill et al., 2014). We tested aptf-1(gk794) and aptf-1(tm3287) loss of function mutants for defects in EIQ and found that loss of APTF-1 does not alter fractional quiescence, bout number, bout duration, or time to first bout, when compared to wild type animals (Figure 4B-E). Although aptf-1(tm3287) differed from wild type in time to first bout as well as fractional quiescence and bout duration at hour five, similar changes were not observed in aptf-1(gk794) animals, decreasing confidence that these changes can be attributed to decreased aptf-1 function (Figure 4B,D,E). We found that ceh-17(np1) loss of function animals were not different than wild type animals in fractional quiescence, bout number, bout duration, or time to first bout (Figure 4F-I). Combined, these results suggest that different molecular mechanisms underlie EIQ versus C. elegans locomotion quiescence during sleep.

DAF-16/FOXO function delays initiation of quiescent bout cycling after prolonged swimming

The DAF-16/FOXO transcription factor plays a critical role in response to multiple stressors, including sleep restriction (Driver et al., 2013; Henderson & Johnson, 2001). In fasting conditions, daf-16(mu86) loss of function animals have total quiescent activity equivalent to wild type animals (McCloskey et al., 2017). We examined both daf-16(mgDf50) and daf-16(mu86) loss of function mutant animals for changes in EIQ timing. daf-16(mgDf50) animals showed increased fractional quiescence at hours three, four, and six (Figure 5A), as well as increased bout number and bout duration at hours three and four (Figure 5B-C). However, these differences were not observed in daf-16(mu86) animals. Both loss of function strains showed decreased time to first quiescent bout (Figure 5D). Because this last defect was seen in both mutant daf-16 strains, we suggest that DAF-16 plays a role in the response to stress caused by prolonged swimming that is important to determining EIQ onset.

Figure 5:

Figure 5:

Analysis of exercise-induced quiescence in daf-16 mutant animals. (A) Loss of function daf-16(mgDf50lf) animals showed increased average fractional quiescence, compared to wild type at hours 3, 4, and 6. This difference was not repeated in daf-16(mu86lf) animals. (B) daf-16(mu86lf) animals showed increased average number of bouts per hour, compared to wild type in hour 4, and daf-16(mgDf50lf) animals showed an increase during hours 3 and 4. (C) daf-16(mgDf50lf) animals showed increased average bout duration, compared to wild type during hours 3 and 4, while daf-16(mu86lf) animals showed no difference. 2-way ANOVA and Dunnett’s multiple comparisons test. (D) The daf-16(mgDf50lf) and daf-16(mu86lf) animals both showed decreased average time to first bout, compared to wild type. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 32 per genotype. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

Aged animals enter quiescence at an earlier time and show increased quiescence during prolonged swimming

With age, organisms experience loss of muscle mass, known as sarcopenia, which is believed to contribute to increased frailty, decreased muscle strength, and fatigue in aged populations (Marty et al., 2017). Age-related muscle deterioration has previously been observed in C. elegans body wall muscle (Herndon et al., 2002), and aged C. elegans have deficits in various locomotion assays, including swim rate (Mulcahy et al., 2013; Restif et al., 2014). To test whether aged animals show defective EIQ, we aged wild type animals for 1, 2, 3, 4, 7, and 10 days into adulthood. Then, we quantified differences in EIQ timing. Day 7 and 10 adult animals showed increased fractional quiescence compared to day 1 adults, while day 2, 3, and 4 adults were generally indistinguishable from day 1 adults (Figure 6A). No dramatic differences in bout duration were seen between different aged animals. However, bout number was increased from day 7 at hours two, three, and six and increased in day 10 adults at hours one, two, three, five, and six (compared to day 1; Figure 6B-C). On days 3, 4, 7, and 10, animals began cycling between activity and inactivity more quickly than day 1 adults (Figure 6D). A similar decrease in beat rate per minute was also observed at days 2, 3, 4, 7, and 10 (Supplementary Figure 5). These results suggest that locomotory output declines in aged animals, consistent with diminished muscle function in aging animals. Additionally, we noted that different aspects of EIQ metrics decline with age at different rates; time to first EIQ bout decreased with age more rapidly than fractional EIQ increased with age.

Figure 6:

Figure 6:

Analysis of exercise-induced quiescence in aged animals. Wild type animals were aged 1, 2, 3, 4, 7, and 10 days into adulthood. (A) Day 3 adult animals showed increased average fractional quiescence, compared to day 1 adult animals at hour 1. Compared to day 1 adult animals, day 7 adult animals showed increased average fractional quiescence at all timepoints, while day 10 animals showed increased average fractional quiescence at hours 2 through 5. (B) An increase in average number of bouts per hour, compared to day 1 adult animals, was observed at day 7 adult animals during hours 2, 3, and 6. Day 10 adult animals also showed increased average number of bouts (per hour) during hours 1, 2, 3, 5, and 6, compared to day 1 adult animals. (C) No difference in average bout duration was found amongst the different age groups, with the exception of increased average bout duration in day 3 adult animals at hour 1 and at day 7 adult animals at hours 1 and 3. 2-way ANOVA and Dunnett’s multiple comparisons test. (D) Day 3, 4, 7, and 10 adult animals all showed decreased average time to first bout, compared to day 1 adult animals. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 36 per group. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

Discussion

Here, we work with the computer vision programs poseEIQ and edgeEIQ, which reveal in finer detail changes in C. elegans locomotion after prolonged periods of swimming. Increased inactivity was observed after extended swimming, as were differences in swimming locomotory behaviors between wild type and mutant animals. Loss of the EGL-4 cGMP-dependent kinase and DAF-16 FOXO function altered EIQ after prolonged swimming. However, loss of the proteins APTF-1 and CEH-17, which are required for developmentally-timed sleep and stress-induced sleep in C. elegans, respectively, did not affect EIQ. Aged animals showed increased EIQ. Based on examining pharyngeal pumping, animals are actively feeding during the majority of EIQ bouts, indicating that EIQ is usually not a sleep state. Computer-vision programs used here enabled in-depth analysis of EIQ and locomotory behaviors across time and revealed previously undescribed defects. This work and development of these automated analysis strategies enables future work that will interrogate the molecular pathways underlying behaviors associated with exercise and fatigue.

C. elegans locomotory behavior after prolonged swimming has not been thoroughly studied. Previous studies were limited by reliance on manual annotation, which hinders research depth, or by reliance on constrictive microfluidic devices, which may induce mechanical stress (Ghosh & Emmons, 2008; Gonzales et al., 2019). Using both of our new systems, we can provide a detailed analysis of how C. elegans locomotory behaviors change after prolonged swimming. When comparing wild type and egl-4 mutant animals, differences were found in multiple parameters, including wave initiation rate at early and late time points. Interestingly, there were also differences in which locomotion parameters changed over time between wild type and mutant animals. For example, curling activity and stretch were found to change over time in wild type animals, but not in egl-4 mutant animals. In future studies of C. elegans fatigue, parameters like wave initiation rate and brush stroke will likely provide information about how vigorously an animal swims and can be used to track decreased muscle output after prolonged swimming exercise. We note that quiescence levels can vary across experiments, even in wild type animals. This may be caused by differences in ambient conditions during rearing (e.g. humidity levels, vibration). Here, all experimental groups in a trial were reared in tandem to control for these differences.

It is important to note that poseEIQ, used herein for analysis of swimming locomotory behaviour, is computationally expensive and requires substantial time for processing. To increase efficiency, we developed edgeEIQ which is faster, but less comprehensive, as it only distinguishes active and inactive states during swimming. Loss of function of the gene egl-4 has previously been associated with decreased quiescence after prolonged swimming (Ghosh & Emmons, 2008, 2010). To test whether edgeEIQ could detect the impact of egl-4 mutations on EIQ, we analyzed the behavior of gain and loss of function mutants of egl-4. As expected, gain and loss of function mutations in egl-4 were associated with increased and decreased EIQ activity, respectively. cGMP-dependent protein kinase EGL-4 is also known to promote quiescent activity during all known forms of C. elegans sleep (Hill et al., 2014; Raizen et al., 2008). We originally hypothesized that the quiescent behavior after prolonged swimming might also be a sleep state. Usually sleeping animals will stop both feeding and locomotion. But, we found that pharyngeal pumping was usually observed in animals during EIQ bouts, suggesting that EIQ bouts are usually not sleep. We also used genetic strategies to explore the relationship between sleep and EIQ bouts. The RIS neuron is critical for developmentally-timed sleep, and function of the APTF-1 transcription factor is required for RIS-mediated sleep induction (Turek et al., 2013). Likewise, the ALA sensory neuron is required for quiescent behavior during stress-induced sleep (Hill et al., 2014). CEH-17 loss alters gene expression in the ALA neuron, and loss of this protein leads to shortened ALA axons and inability to enter a sleep state following cellular stress (Hill et al., 2014; Pujol et al, 2000; Van Buskirk & Sternberg, 2010). We tested animals lacking aptf-1 and ceh-17 function for defects in EIQ to determine whether exercise-induced locomotion quiescence was mediated by pathways involved in mediating locomotion quiescence in developmentally-timed or stress-induced sleep. We found that these mutant animals had normal locomotion quiescence. Therefore, EIQ and sleep are not identical and are likely mediated by overlapping, but distinct molecular and cellular pathways.

Prolonged exercise is stressful. In C. elegans, the transcription factor DAF-16/FOXO localizes to the nucleus during cellular stress, where it upregulates genes involved with stress response, including oxidative stress response genes (Henderson & Johnson, 2001; Murphy et al., 2003). As prolonged swimming by C. elegans leads to transcriptional changes in oxidative stress response genes (Laranjeiro et al., 2017), we reasoned that DAF-16 might play a role in EIQ and stress response. Loss of function daf-16 mutant animals initiated EIQ earlier than wild type animals, suggesting that DAF-16 normally promotes expression of genes that allow animals to endure the stress of exercise for a longer initial swim period of time.

As they age, animals experience deterioration that can result in fatigue, weakness, and sarcopenia. We examined EIQ as C. elegans age and, as predicted, older animals showed increased EIQ. Surprisingly, a dramatic decrease in initial swim period time was seen in animals 3 or more days into adulthood. This deterioration is not mirrored in fractional EIQ, as animals only show an increase in fractional EIQ at 7 or more days into adulthood. Further analysis of EIQ should provide insight into the effects of the aging process on muscle function over time. Changes in EIQ in aged C. elegans are likely a marker of healthspan and the mechanisms underlying these changes may be conserved mechanisms relevant to fatigue in aging humans.

Here, we developed systems for automatic analysis of C. elegans swimming locomotory behavior with a long-range goal of understanding locomotion quiescience and associated mechanisms. The cellular and molecular pathways that communicate fatigue from muscles to the nervous system during exercise remain obscure. In complex animals, afferent neuronal pathways are thought to carry information from the periphery to the central nervous system, which eventually results in a ‘feeling of exhaustion’ that results in decreased locomotion. Energy depletion in peripheral organs could also result in decreased locomotion. Results presented here and other works (Beron et al., 2015; Lesanpezeshki et al., 2019; Rahman et al., 2018) have demonstrated that invertebrates show aspects of fatigue, even though they lack extensive afferent neuronal pathways. Further dissection of these behaviors in invertebrates should provide insight into conserved cellular and molecular pathways involved in fatigue, as well as other aspects of endurance and exercise.

Conclusions

Computer-vision systems have been developed for accurate analysis of C. elegans locomotory behavior during prolonged swimming exercise (over 6 hours). This system is complemented by a faster edge-detection-based system that can detect pauses in locomotion. We find that most prolonged swimming results in exercise-induced quiescence (EIQ) bouts that are dependent on EGL-4/PKG function, but not on the function of genes that are specifically required for C. elegans sleep. The timing of EIQ bout initiation is dependent on DAF-16/FOXO function. As C. elegans age, the timing, duration, and frequency of EIQ bouts change, consistent with diminished healthspan.

Supplementary Material

Supp

Supplementary Figure 1: Swimming beat rate was manually observed (beats/min) and compared to wave initiation rate (waves/min) determined by the poseEIQ program for the first minute of swimming. No significant difference was found between these values. Welch’s t test, p = 0.32. n = 36.

Supplementary Figure 2: Additional state-space analysis of exercise-induced quiescence in egl-4 mutant animals. (A) Ethograms generated using an unsupervised Hidden Markov Model for wild type, egl-4(n477lf), and egl-4(ad450gf) animals similar to Figure 3A. The HMM here was constructed with three latent states. The coloring scheme from Figure 3A is maintained with the only difference being that the new latent state is shown in green. Log-transformed bout transition count matrices are shown for the two state HMM (subpanel B) and the three state HMM (subpanel C).

Supplementary Figure 3: Active and quiescent body postures. (A) Representative body postures of wild type animals during an EIQ bout (blue) and an active bout (red). Postures in this grid are from frames that were randomly selected from the subset of video frames that were inferred to belong to an EIQ or active state by our Hidden Markov Model. (B) Worm posture is parameterized as a skeleton consisting of 9 joints. Eigen decomposition on approximately 350,000 quiescent skeletons and approximately 986,000 active skeletons reveals three primary modes (left) that account for >95% of the total variance in body postures (right). The procedure adopted was as described in Stephens (2008). Only wild type animals were used for this analysis. H indicates the head of an animal, and T indicates the tail. (C) The statistical mean body posture of a quiescent and active animal computer over every posture after reconstruction using only the first three primary modes. The angular standard deviation (in degrees) is denoted by the grey shaded region.

Supplementary Figure 4: Comparisons between active bouts and subsequent quiescent bouts of wild type animals using edgeEIQ for the first three hours of swimming. (A) Little correlation (Spearman’s r = −0.29) was found when comparing active bout duration with durations of the subsequent quiescent bout. Bouts had a minimum duration of 3 seconds. N = 407 bouts. (B) Onset of quiescent bouts were aligned and average edge-overlap was plotted for 8 seconds before and after bout onset. Half of the animals were designated as active; half as less active. n = 1552 bouts. Animals were not included in this analysis if there was another quiescent bout in the 8 seconds preceding bout onset.

Supplementary Figure 5: Swimming beat rate in aged animals. Swimming beat rate was manually observed in wild type animals that were aged 1, 2, 3, 4, 7, and 10 days into adulthood. A decrease in beat rate per minute compared to day 1 adult animals was observed in all ages. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 36 per group. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

Supplementary Table 1: Swimming behavior parameters, adapted from Restif et al. (2014). See Restif (2014) for equations.

Supplementary Table 2: Swimming behavior parameter comparison between edgeEIQ versus CeleST (Restif et al., 2014). As a verification step, a total of n=9, 33.3 second long video clips from 3 individual animals (one from each wild type, egl-4(n477lf), and egl-4(ad450gf)), were processed side-by-side using strategies in Guo (2018) and CeleST from Restif (2014) to generate swimming behavior parameters. Values for curling reported here represent seconds of curling (i.e. self-contact distance is less than a threshold value) per minute of swimming and not self-contact distance per se. CeleST’s tracking algorithm often failed on videos acquired using our setup (potentially due to a combination of image resolution, background illumination, worm-background contrast and challenging body poses). To keep the focus on ensuring comparable behavior parameters, here we provided CeleST with tracked worm skeletons from Guo (2018) to obtain parameter values.

Acknowledgments

This research was supported by funds from Brown’s Office for the Vice-President for Research (A.C.H. and T.S.). Additional support provided by the Carney Institute for Brain Science, the Center for Vision Research (CVR) and the Center for Computation and Visualization (CCV) at Brown University and a Karen T. Romer Undergraduate Teaching and Research Awards (S.K.). We acknowledge the Cloud TPU hardware resources that Google made available via the TensorFlow Research Cloud (TFRC) program. Some strains were provided by the CGC, which is funded by the NIH Office of Research Infrastructure Programs (P40 OD010440).

Biography

Kelsey N. Schuch: Kelsey Schuch obtained a B.S. in Biology and a B.A. in Psychology from Syracuse University. She is currently pursuing her Ph.D. in Molecular Biology, Cell Biology, and Biochemistry from Brown University in the laboratory of Dr. Anne Hart. Her research focuses on the molecular mechanisms underlying fatigue.

Lakshmi Narasimhan Govindarajan: Lakshmi Narasimhan Govindarajan obtained his Bachelor's degree in Computer Science and Biophysics from National University of Singapore. He is currently pursuing his Ph. D. in Cognitive Science at Brown University under the guidance of Dr. Thomas Serre, focusing on computational neuroscience models of vision as well as applications of computer vision for automating animal behavior analysis. Prior to Brown, he undertook research training in Statistical Machine Learning with the Agency for Science, Technology, and Research (A*STAR, Singapore).

Yuliang Guo: Dr. Guo is a Senior Research Scientist at OPPO U.S. Research Center. He received his M.S. (2011) and Ph.D. (2018) in Computer Engineering from Brown University. His research interests involve Computer Vision, 3D Geometry and their applications in perception systems for autonomous driving and augmented/mixed reality.

Saba N. Baskoylu: Dr. Saba Baskoylu obtained her Ph.D. in Neuroscience at Brown University with Dr. Anne Hart working on C. elegans models of neurodegenerative disease. She is currently working as a postdoctoral associate with Dr. Steven Flavell in The Picower Institute for Learning and Memory at Massachusetts Institute of Technology.

Sarah Kim: Sarah Kim obtained a B.S. in Computational Biology from Brown University and conducted research in the laboratory of Dr. Anne Hart during her time there.

Benjamin Kimia: Dr. Kimia is a professor in Engineering and an affiliate of the Carney Institute for Brain Science at Brown University. He received a Ph.D. in Engineering from McGill University in 1991. His research interests are computational vision, human vision, robotics, AI, and medical imaging.

Thomas Serre: Dr. Serre is an Associate Professor in Cognitive Linguistic & Psychological Sciences and an affiliate of the Carney Institute for Brain Science at Brown University. He received a Ph.D. in Neuroscience from MIT in 2006 and an MSc in EECS from Télécom Bretagne (France) in 2000. His research seeks to understand the neural computations supporting visual perception.

Anne C. Hart: Dr. Anne Hart obtained her Ph.D. in Neuroscience at UCLA with Dr. S.L. Zipursky working on cell fate specification in the Drosophila eye. She undertook her postdoctoral training in C. elegans genetics with Dr. J. Kaplan in the Department of Molecular Biology at Massachusetts General Hospital. Dr. Hart joined the Center for Cancer Research at the Massachusetts General Hospital and the Harvard Medical School Department of Pathology as an assistant professor. She moved to the Department of Neuroscience at Brown University in the fall of 2009. Her research focuses on the molecular and cellular mechanisms underlying neurological disease, sensory signaling, sleep, and fatigue.

References

  1. Beron C, Vidal-Gadea AG, Cohn J, Parikh A, Hwang G, & Pierce-Shimomura JT (2015). The burrowing behavior of the nematode Caenorhabditis elegans: a new assay for the study of neuromuscular disorders. Genes, Brain, and Behavior, 14(4), 357–368. [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. Brenner S (1974). The genetics of Caenorhabditis elegans. Genetics, 77(1), 71–94. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Brown AEX, Yemini EI, Grundy LJ, Jucikas T, & Schafer WR (2013). A dictionary of behavioural motifs reveals clusters of genes affecting Caenorhabditis elegans locomotion. PNAS, 110(2), 791–796. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Driver RJ, Lamb AL, Wyner AJ, & Raizen DM (2013). DAF-16/FOXO regulates homeostasis of essential sleep-like behavior during larval transitions in C. elegans. Current Biology, 23(6), 501–506. [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Ghosh R, & Emmons SW (2008). Episodic swimming behavior in the nematode C. elegans. Journal of Experimental Biology, 211(Pt 23), 3703–3711. [DOI] [PubMed] [Google Scholar]
  6. Ghosh R, & Emmons SW (2010). Calcineurin and protein kinase G regulate C. elegans behavioral quiescence during locomotion in liquid. BMC Genetics, 11. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Gomez-Marin A, Partoune N, Stephens GJ, & Louis M (2012). Automated tracking of animal posture and movement during exploration and sensory orientation behaviors. PloS One, 7(8). [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Gonzales DL, Zhou J, Fan B, & Robinson JT (2019). A microfluidic-induced C. elegans sleep state. Nature Communications, 10. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Guo Y, Govindarajan L, Kimia B, & Serre T (2018). Robust pose tracking with a joint model of appearance and shape. arXiv. [Google Scholar]
  10. Henderson ST, & Johnson TE (2001). daf-16 integrates developmental and environmental inputs to mediate aging in the nematode Caenorhabditis elegans. Current Biology, 11(24), 1975–1980. [DOI] [PubMed] [Google Scholar]
  11. Herndon LA, Schmeissner PJ, Dudaronek JM, Brown PA, Listner KM, Sakano Y, … Driscoll M (2002). Stochastic and genetic factors influence tissue-specific decline in ageing C. elegans. Nature, 419(6909), 808–814. [DOI] [PubMed] [Google Scholar]
  12. Hill AJ, Mansfield R, Lopez JMNG, Raizen DM, & Van Buskirk C (2014). Cellular stress induces a protective sleep-like state in C. elegans. Current Biology , 24(20), 2399–2405. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Huang H, Singh K, & Hart AC (2017). Measuring Caenorhabditis elegans sleep during the transition to adulthood using a microfluidics-based system. Bio-protocol, 7(6). [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Iwanir S, Tramm N, Nagy S, Wright C, Ish D, & Biron D (2013). The microarchitecture of C. elegans behavior during lethargus: homeostatic bout dynamics, a typical body posture, and regulation by a central neuron. Sleep, 36(3), 385–395. [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Jung S-K, Aleman-Meza B, Riepe C, & Zhong W (2014). QuantWorm: a comprehensive software package for Caenorhabditis elegans phenotypic assays. PloS One, 9(1). [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Kimia BB, Li X, Guo Y, & Tamrakar A (2018). Differential geometry in edge detection: accurate estimation of position, orientation and curvature. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(7), 1573–1586. [DOI] [PubMed] [Google Scholar]
  17. Kuhn HW (1955). The Hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2. [Google Scholar]
  18. Laranjeiro R, Harinath G, Burke D, Braeckman BP, & Driscoll M (2017). Single swim sessions in C. elegans induce key features of mammalian exercise. BMC Biology, 15(1). [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Lesanpezeshki L, Hewitt JE, Laranjeiro R, Antebi A, Driscoll M, Szewczyk NJ, Lacerda CMR, & Vanapalli SA (2019). Pluronic gel-based burrowing assay for rapid assessment of neuromuscular health in C. elegans. Scientific Reports, 9(1). [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Marty E, Liu Y, Samuel A, Or O, & Lane J (2017). A review of sarcopenia: enhancing awareness of an increasingly prevalent disease. Bone, 105, 276–286. [DOI] [PubMed] [Google Scholar]
  21. McCloskey RJ, Fouad AD, Churgin MA, & Fang-Yen C (2017). Food responsiveness regulates episodic behavioral states in Caenorhabditis elegans. Journal of Neurophysiology, 117(5), 1911–1934. [DOI] [PMC free article] [PubMed] [Google Scholar]
  22. Mulcahy B, Holden-Dye L, & O’Connor V (2013). Pharmacological assays reveal age-related changes in synaptic transmission at the Caenorhabditis elegans neuromuscular junction that are modified by reduced insulin signalling. The Journal of Experimental Biology, 216(3), 492–501. [DOI] [PubMed] [Google Scholar]
  23. Murphy CT, McCarroll SA, Bargmann CI, Fraser A, Kamath RS, Ahringer J, Li H, & Kenyon C (2003). Genes that act downstream of DAF-16 to influence the lifespan of Caenorhabditis elegans. Nature, 424(6946), 277–283. [DOI] [PubMed] [Google Scholar]
  24. Patel TP, Gullotti DM, Hernandez P, O’Brien WT, Capehart BP, Morrison B, Bass C, Eberwine JE, Abel T, & Meaney DF (2014). An open-source toolbox for automated phenotyping of mice in behavioral tasks. Frontiers in Behavioral Neuroscience, 8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Pujol N, Torregrossa P, Ewbank JJ, & Brunet JF (2000). The homeodomain protein CePHOX2/CEH-17 controls antero-posterior axonal growth in C. elegans. Development, 127(15), 3361–3371. [DOI] [PubMed] [Google Scholar]
  26. Rahman M, Hewitt JE, Van-Bussel F, Edwards H, Blawzdziewicz J, Szewczyk NJ, Driscoll M, & Vanapalli SA (2018). NemaFlex: a microfluidics-based technology for standardized measurement of muscular strength of C. elegans. Lab on a Chip, 18(15), 2187–2201. [DOI] [PMC free article] [PubMed] [Google Scholar]
  27. Raizen DM, Zimmerman JE, Maycock MH, Ta UD, You Y-J, Sundaram MV, & Pack AI (2008). Lethargus is a Caenorhabditis elegans sleep-like state. Nature, 451(7178), 569–572. [DOI] [PubMed] [Google Scholar]
  28. Restif C, Ibáñez-Ventoso C, Vora MM, Guo S, Metaxas D, & Driscoll M (2014). CeleST: computer vision software for quantitative analysis of C. elegans swim behavior reveals novel features of locomotion. PLoS Computational Biology, 10(7). [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Schwarz J, Spies J-P, & Bringmann H (2012). Reduced muscle contraction and a relaxed posture during sleep-like lethargus. Worm, 1(1), 12–14. [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Stephens GJ, Johnson-Kerner B, Bialek W, & Ryu WS (2008). Dimensionality and dynamics in the behavior of C. elegans. PLoS Computational Biology, 4(4). [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Swierczek NA, Giles AC, Rankin CH, & Kerr RA (2011). High-throughput behavioural analysis in C. elegans. Nature Methods,8(7), 592–598. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Tramm N, Oppenheimer N, Nagy S, Efrati E, & Biron D (2014). Why do sleeping nematodes adopt a hockey-stick-like posture? PLoS One, 9(7). [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Turek M, Lewandrowski I, & Bringmann H (2013). An AP2 transcription factor is required for a sleep-active neuron to induce sleep-like quiescence in C. elegans. Current Biology, 23(22), 2215–2223. [DOI] [PubMed] [Google Scholar]
  34. Van Buskirk C, & Sternberg PW (2010). Paired and LIM class homeodomain proteins coordinate differentiation of the C. elegans ALA neuron. Development, 137(12), 2065–2074. [DOI] [PMC free article] [PubMed] [Google Scholar]
  35. Wan J-J, Qin Z, Wang P-Y, Sun Y, & Liu X (2017) Muscle fatigue: general understanding and treatment. Experimental and Molecular Medicine, 49(10). [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Wei S-E, Ramakrishna V, Kanade T, & Sheikh Y (2016). Convolutional pose machines. arXiv. [Google Scholar]
  37. Yang Y, & Ramanan D (2013). Articulated human detection with flexible mixtures of parts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(12), 2878–2890. [DOI] [PubMed] [Google Scholar]
  38. You Y-J, Kim J, Raizen DM, & Avery L (2008). Insulin, cGMP, and TGF-beta signals regulate food intake and quiescence in C. elegans: a model for satiety. Cell Metabolism, 7(3), 249–257. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supp

Supplementary Figure 1: Swimming beat rate was manually observed (beats/min) and compared to wave initiation rate (waves/min) determined by the poseEIQ program for the first minute of swimming. No significant difference was found between these values. Welch’s t test, p = 0.32. n = 36.

Supplementary Figure 2: Additional state-space analysis of exercise-induced quiescence in egl-4 mutant animals. (A) Ethograms generated using an unsupervised Hidden Markov Model for wild type, egl-4(n477lf), and egl-4(ad450gf) animals similar to Figure 3A. The HMM here was constructed with three latent states. The coloring scheme from Figure 3A is maintained with the only difference being that the new latent state is shown in green. Log-transformed bout transition count matrices are shown for the two state HMM (subpanel B) and the three state HMM (subpanel C).

Supplementary Figure 3: Active and quiescent body postures. (A) Representative body postures of wild type animals during an EIQ bout (blue) and an active bout (red). Postures in this grid are from frames that were randomly selected from the subset of video frames that were inferred to belong to an EIQ or active state by our Hidden Markov Model. (B) Worm posture is parameterized as a skeleton consisting of 9 joints. Eigen decomposition on approximately 350,000 quiescent skeletons and approximately 986,000 active skeletons reveals three primary modes (left) that account for >95% of the total variance in body postures (right). The procedure adopted was as described in Stephens (2008). Only wild type animals were used for this analysis. H indicates the head of an animal, and T indicates the tail. (C) The statistical mean body posture of a quiescent and active animal computer over every posture after reconstruction using only the first three primary modes. The angular standard deviation (in degrees) is denoted by the grey shaded region.

Supplementary Figure 4: Comparisons between active bouts and subsequent quiescent bouts of wild type animals using edgeEIQ for the first three hours of swimming. (A) Little correlation (Spearman’s r = −0.29) was found when comparing active bout duration with durations of the subsequent quiescent bout. Bouts had a minimum duration of 3 seconds. N = 407 bouts. (B) Onset of quiescent bouts were aligned and average edge-overlap was plotted for 8 seconds before and after bout onset. Half of the animals were designated as active; half as less active. n = 1552 bouts. Animals were not included in this analysis if there was another quiescent bout in the 8 seconds preceding bout onset.

Supplementary Figure 5: Swimming beat rate in aged animals. Swimming beat rate was manually observed in wild type animals that were aged 1, 2, 3, 4, 7, and 10 days into adulthood. A decrease in beat rate per minute compared to day 1 adult animals was observed in all ages. Kruskal-Wallis test and Dunn’s multiple comparisons test. n = 36 per group. Error bars indicate ± S.E.M. * P < 0.05; ** P < 0.01; *** P < 0.001.

Supplementary Table 1: Swimming behavior parameters, adapted from Restif et al. (2014). See Restif (2014) for equations.

Supplementary Table 2: Swimming behavior parameter comparison between edgeEIQ versus CeleST (Restif et al., 2014). As a verification step, a total of n=9, 33.3 second long video clips from 3 individual animals (one from each wild type, egl-4(n477lf), and egl-4(ad450gf)), were processed side-by-side using strategies in Guo (2018) and CeleST from Restif (2014) to generate swimming behavior parameters. Values for curling reported here represent seconds of curling (i.e. self-contact distance is less than a threshold value) per minute of swimming and not self-contact distance per se. CeleST’s tracking algorithm often failed on videos acquired using our setup (potentially due to a combination of image resolution, background illumination, worm-background contrast and challenging body poses). To keep the focus on ensuring comparable behavior parameters, here we provided CeleST with tracked worm skeletons from Guo (2018) to obtain parameter values.

RESOURCES