<figure><img src="image_1.png" /></figure>

# Natural variation in the *Caenorhabditis elegans* egg-laying circuit modulates an intergenerational fitness trade-off

Laure Mignerot¹†, Clotilde Gimond¹†, Lucie Bolelli¹, Charlotte Bouleau¹, Asma Sandjak¹, Thomas Boulin², Christian Braendle¹*

¹Université Côte d'Azur, CNRS, Inserm, IBV, Nice, France; ²Institut NeuroMyoGène, CNRS, Inserm, Université de Lyon, Lyon, France

**Abstract** Evolutionary transitions from egg laying (oviparity) to live birth (viviparity) are common across various taxa. Many species also exhibit genetic variation in egg-laying mode or display an intermediate mode with laid eggs containing embryos at various stages of development. Understanding the mechanistic basis and fitness consequences of such variation remains experimentally challenging. Here, we report highly variable intra-uterine egg retention across 316 *Caenorhabditis elegans* wild strains, some exhibiting strong retention, followed by internal hatching. We identify multiple evolutionary origins of such phenotypic extremes and pinpoint underlying candidate loci. Behavioral analysis and genetic manipulation indicates that this variation arises from genetic differences in the neuromodulatory architecture of the egg-laying circuitry. We provide experimental evidence that while strong egg retention can decrease maternal fitness due to in utero hatching, it may enhance offspring protection and confer a competitive advantage. Therefore, natural variation in *C. elegans* egg-laying behaviour can alter an apparent trade-off between different fitness components across generations. Our findings highlight underappreciated diversity in *C. elegans* egg-laying behavior and shed light on its fitness consequences. This behavioral variation offers a promising model to elucidate the molecular changes in a simple neural circuit underlying evolutionary shifts between alternative egg-laying modes in invertebrates.

## eLife assessment

This **important** work provides a thorough and detailed analysis of natural variation in *C. elegans* egg-laying behavior. The authors present **convincing** evidence to support their hypothesis that variations in egg-laying behavior are influenced by trade-offs between maternal and offspring fitness. This study establishes a framework for elucidating the molecular mechanisms underlying this paradigm of behavioral evolution.

## Introduction

Reproductive strategies reflect higher-order phenotypes that emerge through integration of developmental, morphological, physiological, and behavioural phenotypes. Understanding how these different phenotypes integrate and co-evolve to explain the diversification in reproductive strategies is a central goal of life history research (Flatt and Heyland, 2011). One such fundamental aspect of reproduction in internally fertilizing animals is the duration of intra-uterine embryonic development, which can be highly variable and is influenced by an interplay of genetic and environmental factors. While oviparity and viviparity reflect opposite extremes, many taxa display intermediate modes by laying eggs containing embryos at variably advanced stages of development (sometimes termed

<footnote>*For correspondence: braendle@unice.fr</footnote>

<footnote>†These authors contributed equally to this work</footnote>

<footnote>**Competing interest:** The authors declare that no competing interests exist.</footnote>

<footnote>**Funding:** See page 31</footnote>

<footnote>**Preprint posted**
12 March 2023</footnote>

<footnote>**Sent for Review**
05 April 2023</footnote>

<footnote>**Reviewed preprint posted**
28 June 2023</footnote>

<footnote>**Reviewed preprint revised**
23 January 2024</footnote>

<footnote>**Version of Record published**
02 April 2024</footnote>

<footnote>**Reviewing Editor:** Patrick J Hu, Vanderbilt University Medical Center, United States</footnote>

<footnote>© Copyright Mignerot, Gimond et al. This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.</footnote>
ovoviviparity). The degree of such maternal retention of fertilized eggs may vary significantly between closely related species or even between genotypes of the same species, for example in insects, snails, or reptiles, and is further influenced by diverse environmental factors, such as mating status or food availability (Meier et al., 1999; Markow et al., 2009; Bleu et al., 2012; Kalinka, 2015). Viviparity – and prolonged egg retention in general – are thought to promote maternal control over the offspring environment, providing an extended opportunity for offspring resource provisioning as well as improved offspring protection against environmental fluctuations, stressors, pathogens or predators (Blackburn, 1999; Avise, 2013; Kalinka, 2015; Ostrovsky et al., 2016). In addition, laying of advanced-stage embryos or larvae may generate an advantage during intra- and interspecific competition by reducing external egg-to-adult developmental time, for example, in insects (Bakker, 1961; Kalinka, 2015; Mueller and Bitner, 2015). Despite these apparent benefits, prolonged egg retention and viviparity are generally presumed to incur fitness costs, expressed as reduced maternal survival and fecundity, for example, due to higher metabolic costs as a result of prolonged gestation (Kalinka, 2015). How variation in ecological niche drives the evolution of different egg-laying modes given these apparent trade-offs has been a major focus of evolutionary ecological research (Blackburn, 1999; Avise, 2013; Kalinka, 2015; Ostrovsky et al., 2016).

The study of evolutionary transitions between ovi- and viviparity has concentrated on comparisons between species, so that evidence is mainly correlative and the genetic changes underlying such transitions can only rarely be determined (Horváth and Kalinka, 2018; Recknagel et al., 2021). Relatively few studies have examined quantitative intraspecific variation in egg retention although this approach may facilitate disentangling its relative costs and benefits. Intraspecific analysis may further allow for identification of genomic loci contributing to this variation and potentially provide insights into the molecular changes during incipient stages of evolutionary transitions towards obligate viviparity. One such study was performed for natural quantitative variation in egg retention of fertilized *Drosophila* females (Horváth and Kalinka, 2018): Genome-wide association (GWA) mapping yielded 15 potential candidate genes harbouring natural polymorphisms contributing to variation in egg retention. These variants have not yet been validated and it remains unclear which particular traits, such as fecundity or egg-laying behaviour, contribute to observed variation in egg retention (Horváth and Kalinka, 2018). In this study, prolonged *Drosophila* egg retention was correlated with a reduction in fecundity, in line with the prediction that evolutionary transitions towards viviparity impose fitness costs (Clutton-Brock, 1991; Blackburn, 1999; Avise, 2013; Kalinka, 2015; Ostrovsky et al., 2016). Analysis of intraspecific variation may thus be valuable to determine genetic causes and fitness consequences of divergent egg retention, providing an entry point into understanding evolutionary transitions between ovi- and viviparity.

In our study, to characterize intraspecific differences in egg retention, we focused on natural variation in egg laying of the male-hermaphrodite (andro dioecious) *Caenorhabditis elegans*. In optimal conditions, this primarily self-fertilizing nematode completes its life cycle within 3–4 days, and hermaphrodites generate around 150–300 offspring over a period of 2–3 days. During the reproductive phase, animals of the reference strain (N2) accumulate up to ~15 fertilized eggs in the uterus, caused by a delay between ovulation and egg laying (Schafer, 2006). Embryonic development takes around 15 hours and occurs independently of whether eggs are laid or retained in the uterus. On average, embryos spend two to three hours in utero, reaching the early gastrula (~30-cell) stage when they are being laid (Sulston et al., 1983). At any given time, the number of eggs retained in utero will therefore depend on rates of both egg production and egg laying. Reduced egg-laying rates lead to the accumulation of advanced stage embryos in utero. Egg laying is a rhythmic behaviour that alternates between inactive (~20min) and active (~2min) phases (Waggoner et al., 1998), regulated by a structurally simple neural circuit (White et al., 1986). During active egg-laying phases, the neurotransmitter serotonin and neuropeptides signal via the hermaphrodite-specific neurons (HSN) to increase excitability of vulva muscle cells, causing the rapid sequential release of four to six eggs (Waggoner et al., 1998; Shyn et al., 2003; Zhang et al., 2008; Collins et al., 2016; Brewer et al., 2019). Additional neuromodulatory signals and mechanosensory feedback regulate temporal patterns of egg-laying activity, which are further modulated by physiological and environmental inputs (Trent et al., 1983; Schafer, 2005; Ringstad and Horvitz, 2008; Koelle, 2018; Fernandez et al., 2020; Ravi et al., 2021; Aprison et al., 2022; Medrano and Collins, 2023). Food signals are required for sustained egg-laying activity (Horvitz et al., 1982; Trent, 1982; Waggoner et al., 1998; Daniels et al., 2000;
Dong et al., 2000), whereas diverse stressors, such as starvation, hypoxia, thermal stress, osmotic stress, or pathogens, inhibit egg laying (Trent, 1982; Aballay et al., 2000; Waggoner et al., 2000; Chen and Caswell-Chen, 2003; Schafer, 2005; Zhang et al., 2008; McMullen et al., 2012; Fenk and de Bono, 2015). Prolonged stress exposure will lead to intra-uterine egg retention and internal (matricidal) hatching, so that larvae develop inside their mother, often leading to premature maternal death (Maupas, 1900; Trent, 1982; Chen and Caswell-Chen, 2003; Chen and Caswell-Chen, 2004). Environmentally induced egg retention and internal hatching in *C. elegans* can be considered a plastic switch from oviparity to viviparity, also termed facultative viviparity (*Chen and Caswell-Chen, 2004*). In *C. elegans*, while eggs can no longer be provisioned after fertilization, larvae in utero may feed on decaying maternal tissues allowing them to develop into advanced larval stages, even in nutrient-scarce environments (*Chen and Caswell-Chen, 2004*). Stress-induced internal hatching in *C. elegans* may thus reflect adaptive phenotypic plasticity allowing for offspring provisioning, in particular, by enabling larvae to develop into the diapausing, starvation-resistant dauer larval stage (*Chen and Caswell-Chen, 2004*), which also represents the key dispersal developmental stage, able to colonize novel favourable environments (*Félix and Braendle, 2010*).

The detailed genetic understanding of *C. elegans* egg-laying behaviour has been obtained through the study of a single wild-type genotype, the laboratory strain N2, and its mutant derivatives (*Schafer, 2006*). It therefore remains unclear to what extent the egg-laying circuit harbours intraspecific variation. Although wild strains are highly isogenic due to a predominant self-fertilization (selfing) (*Barrière and Félix, 2005; Lee et al., 2021), *C. elegans* retains considerable genetic (and phenotypic) diversity across the globe, with strains differing genetically, often in localized, highly divergent genomic regions (*Andersen et al., 2012; Crombie et al., 2019; Lee et al., 2021; Gilbert et al., 2022). While egg-laying responses to diverse stimuli seem to be largely invariant across many *C. elegans* populations (*Chen and Caswell-Chen, 2004; Chen et al., 2020; Vigne et al., 2021), wild strains may exhibit strongly divergent egg-laying behaviour (*Vigne et al., 2021). These rare strains display constitutively strong egg retention (up to ~50 eggs in utero) and internal hatching irrespective of the environment (partial viviparity). A single, major-effect variant explains this derived phenotype: a single amino acid substitution (V530L) in KCNL-1, a small-conductance calcium-activated potassium channel subunit. This gain-of-function mutation causes vulval muscle hyperpolarization to reduce egg-laying activity, leading to constitutively strong egg retention and internal hatching (*Vigne et al., 2021*). The apparent evolutionary maintenance of the KCNL-1 V530L variant in natural *C. elegans* populations seems puzzling given its highly deleterious fitness effects caused by matricidal hatching. Competition experiments indicate, however, that this variant allele can be maintained in more natural conditions mimicking fluctuations in resource availability and/or if reproduction preferentially occurs during early adulthood (*Vigne et al., 2021*). Nevertheless, it remains unknown how constitutively strong egg retention may be beneficial in such conditions, and more generally, how different degrees of *C. elegans* egg retention affect alternative fitness components.

Here, extending our previous work (*Vigne et al., 2021*), we quantified the full spectrum of natural variation in *C. elegans* egg retention using a world-wide panel of strains covering much of the species' genetic diversity (*Lee et al., 2021*). Our first aim was to characterize variation in egg laying, and to identify phylogenetic patterns and genomic regions (QTL) associated with observed phenotypic variation. We show that, while most strains differed only subtly in egg retention, a subset of strains exhibit deviant, strongly increased or reduced, egg retention. We provide evidence for repeated evolution of such extreme egg retention phenotypes through distinct genetic changes. We then characterized a subset of wild strains with divergent egg retention to determine how they differ in egg-laying behaviour and underlying neuromodulatory architecture. These results show that the *C. elegans* egg-laying system harbours surprisingly high natural diversity in the sensitivity to neuromodulators, such as serotonin, suggesting rapid evolution of the involved neural circuitry. In a second objective, we explored why variation in egg retention might be maintained in natural *C. elegans* populations. To address this question, we tested for the presence of fitness costs and benefits associated with variable egg retention of wild *C. elegans* strains. We experimentally demonstrate that strong egg retention usually reduces maternal fertility and survival, mostly due to frequent internal (matricidal) hatching. On the other hand, these genotypes with strong egg retention may be able to benefit from improved offspring protection against environmental insults and from a competitive advantage caused by a significantly reduced extra-uterine egg-to-adult developmental time. Observed natural
variation in *C. elegans* egg-laying behaviour may therefore modify a trade-off between fitness compo-
nents expressed in mothers versus offspring. Altogether, we present an integrative analysis of natural
variation in *C. elegans* egg laying providing first insights into the genetic basis, fitness consequences
and possible evolutionary ecological significance of this central reproductive behaviour.

Results

Natural variation in *C. elegans* egg retention

Examining a world-wide panel of 316 genetically distinct *C. elegans* wild strains, we found highly variable average egg number in utero (a proxy for egg retention) in self-fertilizing adult hermaphrodites (mid-L4 +48 hr), ranging from approximately 5–50 eggs retained in utero (Figure 1A–C). To simplify further analysis of natural variation in egg retention, we defined three phenotypic classes: most strains (81%, N=256) differed relatively subtly in the number of eggs in utero (Class II canonical egg retention: 10–25 eggs), including the laboratory reference strain N2. A small number of strains consistently showed either strongly reduced (Class I weak egg retention:<10 eggs, 15%, N=46) or increased egg retention (Class III: strong egg retention: >25 eggs or larvae in utero, 4%, N=14). Several Class III strains also exhibited internal hatching (Figure 1—source data 1).

Strains with extreme egg retention phenotypes at either end of the spectrum were reminiscent of mutants uncovered by screens for egg-laying-defects (egl mutants) with major alterations in neural function or neuromodulation (Trent, 1982; Trent et al., 1983; Desai and Horvitz, 1989; Schafer, 2006). All examined wild strains showed, however, some egg-laying activity and none of the Class III strains exhibited any obvious, penetrant defects in vulval development or morphogenesis.

To examine if natural variation in egg retention may be linked to strain differences in ecological
niche, we tested for effects of geographical and climatic parameters (e.g. latitude/longitude, eleva-
tion) (Spearman rank correlations, all p>0.05; data not shown) (**Figure 1—figure supplement 1A**)
and substrate type (**Figure 1—figure supplement 1B**) on mean egg retention but found no obvious
evidence for such relationships. Strains of all three phenotypic Classes were found across the globe
and may co-occur in the same locality, or even in the same microhabitat or substrate (**Figure 1—
source data 1**), as previously reported (**Vigne et al., 2021**). A majority (11 out of 14) of Class III strains
were isolated in Europe (**Figure 1—figure supplement 1A**), but this may be simply due to increased
sampling efforts of this region.

Both common and rare genetic variants underlie natural differences in
egg retention

The presence of significant variation in egg retention allows for mapping of genomic regions that contribute to this variation using GWA mapping. This GWA approach is limited to the detection of common variants as variants below 5% minor allele frequency are excluded from analysis (Cook et al., 2017; Widmayer et al., 2022). Performing GWA mapping using data for 316 unique strains (isotypes), mapping of mean egg retention yielded a single QTL located on chromosome III spanning 1.48 Mb (Figure 2A). This QTL explained 24% of the observed phenotypic variance (Table 1). Among the 257 genes found in this QTL region, five have known roles in the egg-laying system (https://www.wormbase.org) and display various natural polymorphisms (Table 2). However, we did not detect any obvious candidate polymorphisms in these genes that could explain variable levels of egg retention. Two additional QTL on chromosomes II and IV were detected for variance in egg retention (CV) (Figure 2B). The three QTLs do not align with any of the recently identified hyper-divergent regions of the genome (Lee et al., 2021). The phenotypic distributions and detection of several QTL by GWA indicates that natural variation in *C. elegans* egg retention is likely polygenic, influenced by multiple common variants.

Examining the phylogenetic distribution of extreme egg retention phenotypes based on whole-
genome sequence data (Cook et al., 2017; Lee et al., 2021) indicates that Class I and III phenotypes
have been derived multiple times. On average, egg retention did not differ between genetically diver-
gent, likely ancestral, strains (mostly from Hawaii) (N=41) and strains with swept haplotypes (N=275)
found across the globe (Crombie et al., 2019; Lee et al., 2021; Gilbert et al., 2022); however, most
Class III strains (13 out of 14) exhibited swept haplotypes (Figure 1—figure supplement 2). Among
the Class III strains with very strong egg retention, four strains (including the newly isolated strain
<figure><img src="image_2.png" /><figcaption>**Figure 1.** Natural variation in *C. elegans* egg retention. (A) The number of eggs in utero in hermaphrodites (mid-L4 +48 hr) of 316 genetically distinct strains (isotypes) often strongly deviated from values observed in the laboratory strain N2 (~15 eggs in utero). We defined three classes of strains with distinct levels of egg retention: Class I weak: <10 eggs in utero (N=34), Class II canonical: 10–25 eggs in utero (N=230), Class III strong: >25 eggs in utero (N=14). N=18–150 individuals per strain were scored. (B) Geographic distribution of 316 *C. elegans* wild strains. Strains with different degrees of egg retention are labelled in different colours. For a detailed comparison of geographic distribution of the three phenotypic Classes, see **Figure 1—figure supplement 1A**. (C) Nomarski microscopy images of adult hermaphrodites (mid-L4 +48 hr) in wild strains with divergent egg retention. Eggs (coloured) contain embryos at different stages of development.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 1:

**Source data 1.** Excel file containing source data for Figure 1.

**Figure supplement 1.** Natural variation of *C. elegans* egg number in utero.

**Figure supplement 1—source data 1.** Excel file containing source data for Figure 1—figure supplement 1.

**Figure supplement 2.** Egg number in utero in swept versus divergent *C. elegans* strains.

**Figure supplement 2—source data 1.** Excel file containing source data for Figure 1—figure supplement 2.

NIC1832) are known to carry a single amino acid substitution (V530L) in KCNL-1 (Vigne et al., 2021). This variant has been shown to strongly reduce egg-laying activity (Vigne et al., 2021), thus explaining strong egg retention in these four French strains. As previously suggested (Vigne et al., 2021), we confirmed that the KCNL-1 V530L is likely derived from a single mutational event, as inferred by local haplotype analysis of the genomic region surrounding *kcnl-1* (Figure 2C). In additional Class III strains,
<figure><img src="image_3.png" /><figcaption>**Figure 2.** Common and rare genetic variants underlie natural differences in egg retention. (A–B) Manhattan plots of single-marker based GWA mappings for *C. elegans* egg retention phenotypes (N=316). Each dot represents a SNV that is present in at least 5% of the assayed population. The genomic location of each single-nucleotide variant (SNV) is plotted on the X-axis against its log10(p) value on the y-axis. SNVs that pass the genome-wide EIGEN threshold (dotted line) or the Bonferroni threshold (solid line) are marked in red. (A) Manhattan plot of single-marker based GWA mapping region for mean number of eggs in utero. (B) Manhattan plot of single-marker-based GWA mapping region for the coefficient of variation (CV) (mean number of eggs in utero). (C) Neighbour-joining tree based on the 2 Mb region surrounding the *kcnl-1* genomic region using a subset of 48 *C. elegans* wild strains. The four strains with the KCNL-1 V530L variant are shown in red.</figcaption></figure>

The online version of this article includes the following source data for figure 2:

**Source data 1.** Excel file containing source data for **Figure 2**.

which do not carry this variant (N=10), the derived state of constitutively high egg retention must thus be explained by alternative genetic variants. Therefore, natural variation in *C. elegans* egg retention is shaped by both common variants and multiple rare variants, including KCNL-1 V530L, explaining extreme phenotypic divergence.

## Temporal progression of egg retention and internal hatching

To better characterize natural variation in *C. elegans* egg retention, we focused on a subset of 15 strains from divergent phenotypic Classes I-III, with an emphasis on Class III strains exhibiting strong egg retention (at mid-L4 +30 h; **Figure 3A and B**). Class III strains were further distinguished depending on the absence (Class IIIA) or presence (Class IIIB) of the KCNL-1 V530L variant explaining strong egg

<table><caption>**Table 1.** QTL detected by GWA mapping for mean and coefficient of variation (CV) of egg number in utero (N=316 strains).</caption><thead><tr><th>Trait</th><th>Chromosome</th><th>Interval (bp)</th><th>Peak</th><th>Log10(p)</th><th>Variance explained (%)</th></tr></thead><tbody><tr><td>Mean</td><td>III</td><td>8,532,784–10,019,713</td><td>9,312,552</td><td>6.01</td><td>24.14</td></tr><tr><td>CV</td><td>II</td><td>13,477,760–14,077,923</td><td>13,790,719</td><td>4.45</td><td>6.74</td></tr><tr><td>CV</td><td>IV</td><td>15,491,767–16,170,655</td><td>15,885,539</td><td>4.81</td><td>6.74</td></tr></tbody></table>
<caption>**Table 2.** Potential candidate genes (with known roles in *C. elegans* egg laying) and variants in the QTL interval on chromosome III (GWA mapping for egg number in utero).</caption>

Potential high-impact variants are predicted to disrupt gene function, for example, through nonsense or frameshift mutations; low impact variants are predicted to have little or no impact on gene function, such as synonymous mutations (Cook et al., 2017).

<table><thead><tr><th>Gene</th><th>Chromosome</th><th>Interval (bp)</th><th>Number of variants (predicted high impact)</th><th>Number of variants (predicted low impact)</th></tr></thead><tbody><tr><td>pat-2</td><td>III</td><td>8,818,898–8,825,266</td><td>1</td><td>2</td></tr><tr><td>lin-12</td><td>III</td><td>9,060,220–9,071,472</td><td>0</td><td>2</td></tr><tr><td>ina-1</td><td>III</td><td>9,168,072–9,172,802</td><td>1</td><td>2</td></tr><tr><td>lin-52</td><td>III</td><td>9,824,082–9,824,750</td><td>0</td><td>1</td></tr><tr><td>cbp-2</td><td>III</td><td>9,923,173–9,924,800</td><td>20</td><td>11</td></tr></tbody></table>

retention (Vigne et al., 2021). In addition, we included the strain QX1430 (Class II), a derivative of the N2 reference strain, in which the major-effect, N2-specific *npr-1* allele, impacting ovulation and egg laying (Andersen et al., 2014; Zhao et al., 2018), has been replaced by its natural version (Andersen et al., 2015); this allowed us to directly assess the effect of the N2 *npr-1* allele on examined phenotypes. Note that this strain selection, especially concerning the largest Class II, is unlikely to reflect the overall strain diversity observed across the species.

The temporal dynamics of egg number in utero varied strongly across the hermaphrodite reproductive span (Figure 3C), in line with progeny production and presumptive ovulation rates, coupled to the number of remaining self-sperm (Ward and Carrel, 1979; McCarter et al., 1997; Kosinski et al., 2005; McMullen et al., 2012; Large et al., 2017; Zhao et al., 2018). Towards the end of the reproductive period (between mid-L4 +48 hr to mid-L4 +72 hr), surviving animals in all phenotypic Classes showed strongly reduced offspring numbers in utero (Figure 3C). Scoring the age distribution of progeny in utero of young (mid-L4 +30 hr) adult hermaphrodites confirmed that increased egg number in utero was linked to prolonged intra-uterine embryonic development (Figure 3D). At this developmental stage, most Class III strains contained more advanced embryonic stages (or L1 larvae) compared to Class I and II strains (Figure 3D, Figure 3—figure supplement 1A). Examining the temporal dynamics of internal hatching across the entire reproductive span, we found that internal hatching occurred consistently in the six strains with highest egg retention: all Class IIIB strains and in two Class IIIA strains (JU830, JU2829; Figure 3E).

Using the 15 focal strains, we further tested if strain differences in egg retention correlate with differences in body or egg size, that is, morphological characteristics likely modulating the capacity to retain eggs. Both egg and body size (of early adults at beginning of fertilization, containing 1–2 eggs in utero) showed significant differences across strains (Figure 3—figure supplement 1B and C); in addition, there was a trend for a correlation between body and egg size across strains (Figure 3—figure supplement 1D). However, egg and body size did not correlate with measures of mean egg retention across strains (Figure 3—figure supplement 1E and F), suggesting that the capacity to retain eggs is not simply a function of body or egg size.

## Natural variation in egg-laying behaviour

Given that egg number in utero is modulated by temporal changes in rates of both ovulation and egg laying (Figure 3C), we wanted to determine to what extent natural variation in *C. elegans* egg retention can be attributed to differences in egg-laying behaviour. We first examined the temporal dynamics of egg-laying activity across the hermaphrodite reproductive span by measuring the number of eggs laid during a two-hour window at five distinct adult ages (Figure 4). In line with the temporal progression of egg retention (Figure 3C), egg-laying activity was highly dynamic, peaking between mid-L4 +24 hr and mid-L4 +30 hr for most strains, followed by a decline until cessation of reproduction (Figure 4). Most Class III strains exhibited a shortened time window of egg-laying activity, with few eggs being laid from mid-L4 +48 hr onwards (Figure 4).

We next quantified natural variation in behavioural patterns of egg laying during peak activity (mid-L4 +30 hr). Based on continuous video imaging of the reference strain N2, *C. elegans* egg laying
<figure><img src="image_4.png" /><figcaption>**Figure 3.** Temporal progression of egg retention and internal hatching. (A) Egg retention in a subset of 15 strains with divergent egg retention, divided into the three phenotypic classes. Class I weak:<10 eggs in utero (N=34), Class II canonical: 10–25 eggs in utero (N=230), Class III strong: >25 eggs in utero (N=14). Class III strains were further distinguished depending on the absence (Class IIIA) or presence (Class IIIB) of the KCNL-1 V530L variant explaining strong egg retention. Estimates of Class effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p>0.05) based on results of a Two-Way ANOVA, fixed effect *Class*: F<sub>3,577</sub>=710.38, p<0.0001, fixed effect *Strain(nested in Class)*: F<sub>11,577</sub>=33.58, p<0.0001. (B) Geographic distribution of the 15 focal strains with divergent egg retention. (C) Temporal dynamics of offspring number in utero in the 15 focal strains. Number of eggs and larvae in utero at three stages covering the reproductive span of self-fertilizing hermaphrodites. N=28–96 individuals per strain per time point (except for JU2593: at mid-L4 +72 hr: only four individuals were scored as most animals were dead by this time point). (D) Age distribution of embryos retained in utero of hermaphrodites (mid-L4 +30 hr) in the 15 focal strains. Embryonic stages were divided into five age groups according to the following characteristics using Nomarski microscopy (Hall and Altun, 2007): 1–2 cell stage, 4–26 cell stage, 44 cell to gastrula stage, bean to two-fold stage, three-fold stage, L1 larva. (Data from same cohort of animals used for experiment shown in **A**). (E) Frequency of internal hatching across three time points of the reproductive span of self-fertilizing hermaphrodites (extracted from data shown in **D**). Red bars indicate the proportion of individuals carrying at least one L1 larva in the uterus; blue bars indicate the proportion of individuals carrying only embryos in the uterus. Dead mothers were excluded from analyses.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 3:

**Source data 1.** Excel file containing source data for *Figure 3*, *Figure 3—figure supplement 1A*.

**Figure supplement 1.** Temporal progression of egg retention and internal hatching.

**Figure supplement 1—source data 1.** Excel file containing source data for *Figure 3—figure supplement 1B–F*.
<figure><img src="image_5.png" /><figcaption>**Figure 4.** Natural variation in egg-laying activity. Temporal dynamics of egg-laying activity in the 15 focal strains. Number of eggs laid (within a two-hour window) at five time points across the reproductive span of self-fertilizing hermaphrodites. N=20 individuals per strain per time point except for JU2593 (at mid-L4 +72 hr: only four individuals could be scored as most animals were dead by this time point). Note that several Class III strains laid eggs containing advanced-stage embryos, evidenced by L1 hatching within the two-hour window of the experiment (Figure 4—source data 1).</figcaption></figure>

The online version of this article includes the following source data for figure 4:

**Source data 1.** Excel file containing source data for Figure 4.

has been described as a rhythmic two-state behaviour with inactive (~20 min) and active (~2 min) phases, during which multiple eggs are expelled (Waggoner et al., 1998). Here, we used a simplified, non-continuous (scan-sampling) method to detect variation in egg-laying behavioural patterns across the 15 focal strains: we scored the presence and number of eggs laid by isolated adults every 5 min over a 3-hr period (Figure 5A). This assay enables to estimate egg-laying frequency and to derive an approximate duration of prolonged inactive egg-laying periods, but it does not provide the means to determine the precise timing and structure of active egg-laying periods. Our assay results indicate the presence of significant natural variation in *C. elegans* egg-laying behaviour. The number of intervals with egg laying varied significantly between strains and Classes (Figure 5B and C). In line with their egg retention phenotype, Class I strains exhibited an increased number of intervals with egg laying, whereas Class IIIB strains showed a reduced number of such intervals (Figure 5C). In contrast, the number of intervals with egg laying did not significantly differ between Class II and IIIA strains (Figure 5C). Moreover, strains with strong egg retention tended to exhibit prolonged periods during which egg laying was inactive (Figure 5D). In addition, the reference strain N2 (Class II) expelled significantly more eggs per interval (with egg laying) compared to all other strains, including QX1430 – therefore, this atypical phenotype likely caused by the N2-specific *npr-1* allele (Figure 5E). Taken together, these observations show that strain and Class differences in *C. elegans* egg-laying behaviour partly align with observed differences in egg retention.

We next wanted to examine how strain differences in egg retention relate to possible differences in the initial onset of egg laying as a function of egg accumulation (Ravi et al., 2018). We therefore tested how egg accumulation in utero correlates with the beginning of egg-laying behaviour by measuring measured the timing and onset of the first egg-laying event in the 15 focal strains. Tracking individual hermaphrodites from mid-L4 onwards, we determined the time interval between the time points of first fertilization (presence of one or two eggs in utero) and first egg-laying event (when we also measured egg number in utero). Hermaphrodites of Class II strains laid their first egg after accumulating ~5–10 eggs in utero, that is approximately 1–2 hr after first fertilization, similar to what has been reported previously for the reference strain N2 (Ravi et al., 2018; Figure 6A and B). By comparison, the time points of the first egg-laying event for Class I and III strains were significantly advanced and delayed, respectively, with corresponding differences in the number of eggs accumulated in utero (Figure 6A and B).

The above experiments demonstrate that a substantial portion of the natural variation in *C. elegans* egg retention can be attributed to differences in egg-laying behaviour. First, strain differences in egg retention are established prior to the onset of egg-laying behaviour through a differential delay of the first egg-laying event (Figure 6A and B). Hence, the sensitivity to stimuli that trigger the onset of
<figure><img src="image_6.png" /><figcaption>**Figure 5.** Natural variation in egg-laying behaviour. (A) Cartoon depicting the design of our scan-sampling experiment to quantify temporal patterns of *C. elegans* egg-laying behaviour in the 15 focal strains (B–E). We scored the presence and number of eggs laid by isolated adults (at mid-L4 +30 hr every 5 min across a 3-hr period, resulting in a total of 36 observations [intervals] per individual [N=17–18 individuals per strain]). Intervals with and without egg laying are marked in green and red, respectively. (B) Raster plots illustrating strain variation in temporal patterns of egg-laying behaviour across 3 hr of observation. Each horizontal line represents single individual and vertical bars indicate 5-min intervals during which one or more eggs were laid. For a detailed figure of the same data, see *Figure 5—figure supplement 1A*. (C) The number of 5-min intervals with egg laying differed significantly between strains and Classes. Two-Way ANOVA, fixed effect *Class*: F<sub>3,248</sub>=19.94, p<0.0001, fixed effect *Strain(nested in Class)*: F<sub>11,248</sub>=5.20, p<0.0001. Estimates of *Class* effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p<0.05). Each dot represents the number of intervals with egg laying (out of a total of 37 intervals) per individual (N=17–18 individuals per strain). (D) The estimated mean duration of inactive periods (min) differed significantly between strains and Classes. Two-Way ANOVA, fixed effect *Class*: F<sub>3,248</sub>=8.46, p<0.0001, fixed effect *Strain(nested in Class)*: F<sub>11,248</sub>=2.93, p=0.0012. Estimates of *Class* effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p>0.05). For each individual, this value was estimated as the mean time (corresponding to the number of intervals without egg laying) separating successive intervals with egg laying. Each dot represents the mean duration of inactive periods (min) per individual (N=17–18 individuals per strain). (E) The mean number of eggs laid per interval with egg laying differed between strains and Classes. Two-Way ANOVA, fixed effect *Class*: F<sub>3,248</sub>=12.41, p<0.0001, fixed effect *Strain(nested in Class)*: F<sub>11,248</sub>=6.30, p<0.0001. Estimates of *Class* effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p>0.05). These significant effects are exclusively explained by the higher value of the N2 strain (Class II) relative to all other strains (p<0.05); none of the strains other than N2 did differ significantly from each other. Each dot represents the mean number of eggs laid per interval with egg laying per individual (N=17–18 individuals per strain). For data on total number of eggs laid during the three-hour experiment, see *Figure 5—figure supplement 1B*.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 5:

**Source data 1.** Excel file containing source data for Figure 5.

**Figure supplement 1.** *Natural variation in egg-laying behaviour.*
<figure><img src="image_7.png" /><figcaption>B</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Figure 6.** Natural variation in egg retention at the first egg-laying event. (A) The time (min) between first fertilization and first egg-laying event differed between strains and Classes. Two-Way ANOVA, fixed effect *Class*: *F*<sub>3,261</sub>=102.38, p<0.0001, fixed effect *Strain(nested in Class)*: *F*<sub>11,261</sub>=9.40, p<0.0001. Estimates of *Class* effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p>0.05). *N*=16–22 individuals per strain. (B) The number of eggs in utero at first egg-laying event differed between strains and Classes. Two-Way ANOVA, fixed effect *Class*: *F*<sub>3,261</sub>=198.73, p<0.0001, fixed effect *Strain(nested in Class)*: *F*<sub>11,261</sub>=13.00, p<0.0001. Estimates of *Class* effects labelled with the same letter are not significantly different from each other (Tukey's honestly significant difference, p>0.05). *N*=16–22 individuals per strain; measured in the same individuals as shown in (A).</figcaption></figure>

The online version of this article includes the following source data for figure 6:

**Source data 1.** Excel file containing source data for Figure 6.

egg-laying behaviour – probably mechanical stretch signals modulated by the accumulation of eggs
in utero (Collins et al., 2016; Ravi et al., 2018; Ravi et al., 2021; Medrano and Collins, 2023) –
seems to vary across different strains. Differential mechanosensory perception of egg accumulation
could therefore represent a principal mechanism driving natural variation in egg retention. Second, we
observed more subtle strain differences in certain behavioural phenotypes at the peak of egg-laying
activity, such as the duration of inactive egg-laying periods, which in part correlated with differences in
egg retention (Figure 5C and D). Consequently, natural variation in egg retention arises from variation
in multiple phenotypes that manifest at distinct time points during adulthood, collectively defining C.
elegans egg laying.

Natural variation in C. elegans egg-laying in response to neuromodulatory inputs

Observed strain differences in *C. elegans* egg-laying behaviour (Figure 5, Figure 6) potentially arise through genetic variation in the neuromodulatory architecture of the egg-laying circuit (Figure 7A). Multiple neurotransmitters, in particular, serotonin (5-HT), play a central role in synaptic and extra-synaptic neuromodulation of egg laying, with HSN-mediated serotonin bursts triggering egg laying (Trent et al., 1983; Waggoner et al., 1998; Shyn et al., 2003; Collins et al., 2016; Figure 7A). Exogenous application of serotonin, and other neurotransmitters and neuromodulatory drugs, have been extensively used to study their roles in regulating *C. elegans* egg-laying activity (*Horvitz et al.*, 1982; *Trent et al.*, 1983; *Schafer*, 2006). We therefore tested if the 15 focal strains differ in their response to exogenous serotonin known to stimulate *C. elegans* egg laying (*Horvitz et al.*, 1982; *Schafer*, 2006). We used standard assays, in which animals are reared on NGM agar plates with bacterial food, and then at the start of the egg-laying assay, are transferred to liquid M9 buffer without bacterial food. This liquid treatment inhibits egg laying, but adding serotonin overrides inhibition and stimulates egg laying, as reported for the N2 reference strain (*Horvitz et al.*, 1982; *Trent et al.*, 1983;
<figure><img src="image_9.png" /><figcaption>**Figure 7.** Natural variation in *C. elegans* egg-laying in response to neuromodulatory agents. (A) Cartoon of the neural circuit controlling *C. elegans* egg laying (*Collins et al., 2016; Kopchock et al., 2021*). The structure of the *C. elegans* egg-laying circuit is simple, containing two classes of motoneurons, the two serotonergic hermaphrodite-specific motoneurons (HSN) and the six ventral cord motoneurons (VC), which provide synaptic input to the egg-laying muscles (VM). Serotonin from HSN act through vulval muscle receptors to increase muscle excitability, which together with rhythmic signals from motor neurons, causes contractions of VM during egg laying (*Collins et al., 2016; Kopchock et al., 2021*). Mechanical feedback in response to egg accumulation favours exit from the inactive state (*Collins et al., 2016; Medrano and Collins, 2023*). Muscles are indicated by rectangles, neurons by circles, and neurosecretory cells (uv1) by triangles. Principal neurotransmitters released by neurons are indicated next to neurons (ACh: Acetylcholine). (B) Natural variation in egg-laying activity in response to exogenous serotonin, fluoxetine, and imipramine. Adult hermaphrodites (mid-L4 +30 hr) were placed in M9 buffer without food (control) or in M9 containing the indicated concentrations of serotonin, fluoxetine, and imipramine. The number of eggs laid were scored after two hours. Assays for each of the three treatments were carried out independently; the 15 strains were scored in parallel in both control and treatment conditions for each of the three assays. Serotonin: for each strain, 11–24 replicates (each containing 3.73±0.36 individuals on average) were scored for serotonin and control (M9 buffer) conditions. Align Rank Transform ANOVA, fixed effect *Treatment*: *F*<sub>1,390</sub>=432.62, *p*<0.0001, fixed effect *Strain*: *F*<sub>14,390</sub>=42.94, *p*<0.0001; interaction *Treatment* x *Strain*: *F*<sub>14,390</sub>=34.40, *p*<0.0001. Serotonin stimulated egg-laying in Class, II and III A strains but had no effect on egg laying in Class III B and JU2829 (Class III A) (Tukey's honestly significant difference, ***p<0.0001; ns: not significant). Imipramine: for each strain, 6–18 replicates/wells (each containing 4.62±0.50 individuals on average) were scored for serotonin and control (M9 buffer) conditions. Align Rank Transform ANOVA, fixed effect *Treatment*: *F*<sub>1,222</sub>=562, *p*<0.0001, fixed effect *Strain*: *F*<sub>14,222</sub>=23.86, *p*<0.0001; interaction *Treatment* x *Strain*: *F*<sub>14,222</sub>=8.52, *p*<0.0001. Imipramine stimulated egg laying in strains from the 4 Class (Tukey's honestly significant difference, ***p<0.0001; ns: not significant). Fluoxetine: for each strain, 12–24 replicates/wells (each containing 3.31±0.37 individuals on average) were scored for serotonin and control (M9) conditions. Align Rank Transform ANOVA, fixed effect *Treatment*: *F*<sub>1,378</sub>=1005, *p*<0.0001, fixed effect *Strain*: *F*<sub>14,378</sub>=30.09, *p*<0.0001; interaction *Treatment* x *Strain*: *F*<sub>14,378</sub>=16.35, *p*<0.0001. Imipramine stimulated egg-laying in strains from the 4 Class (Tukey's honestly significant difference, ***p<0.0001; ns: not significant). For detailed statistical results, see **Figure 7—source data 2**. (C) Effects of exogenous serotonin (25 mM) on egg laying activity in strains with strongly divergent egg retention due to variation in a single amino acid residue of KCNL-1.</figcaption></figure>

*Figure 7 continued on next page*
Figure 7 continued

Strains JU1200<sub>WT</sub> (canonical egg retention), JU751<sub>KCNL-1 L530V</sub> (CRISPR-Cas9-engineered, weak egg retention), JU1200<sub>KCNL-1 V530L</sub> (CRISPR-Cas9-engineered, strong egg retention) and JU751<sub>WT</sub> (strong egg retention). Adult hermaphrodites (mid-L4 +30 hr) were placed into M9 buffer without food (control) or M9 with serotonin (25 mM). Serotonin stimulated egg-laying in JU751<sub>KCNL-1 L530V</sub> and JU1200<sub>WT</sub> but inhibited egg laying in JU751<sub>WT</sub> and JU1200<sub>KCNL-1 V530L</sub> (Kruskal-Wallis Tests were performed separately for each strain to test for the effect of serotonin on the number of eggs laid; \*p<0.05). For each strain, six replicates (each containing 5.50±0.92 individuals on average) were scored for serotonin and control conditions. For additional data, see **Figure 7—figure supplement 1**.

The online version of this article includes the following source data and figure supplement(s) for figure 7:

**Source data 1.** Excel file containing source data for **Figure 7B and C**.

**Source data 2.** Excel file containing statistical results for analyses of data shown in **Figure 7B and C, Figure 7—figure supplement 1**.

**Figure supplement 1.** Effects of exogenous serotonin, Imipramine and Fluoxetine on egg laying activity in strains with strongly divergent egg retention due to variation in a single amino acid residue of KCNL-1.

Weinshenker et al., 1995). We found exposure to a high dose of serotonin (25 mM) to generate a consistent increase in egg laying in both Class I and II strains (Figure 7B). In contrast, responses were highly variable in Class III strains: among the five Class IIIA strains without the *kcnl-1* variant, serotonin stimulated egg laying in all strains except for JU2829, in which serotonin strongly inhibited egg laying as compared to basal egg laying in controls (Figure 7B). In addition, serotonin induced a much stronger egg-laying response in the strain ED3005 than in other Class IIIA strains with similar levels of egg retention (Figure 7B). ED3005 may thus exhibit serotonin hypersensitivity, which has been observed in certain egg-laying mutants where perturbed synaptic transmission impacts serotonin signalling (Schafer and Kenyon, 1995; Schafer et al., 1996). In Class IIIB strains carrying the KCNL-1 V530L variant allele, serotonin had no effect on, or a trend towards inhibiting, an already weak egg laying activity (Figure 7B). Strains within Classes I, II, and IIIA further showed subtle but significative quantitative differences in the egg-laying response triggered by serotonin despite showing grossly similar egg-laying behaviour in control conditions (Figure 7B). Stimulation of egg-laying activity by exogenous serotonin was thus strongly genotype-dependent. We conclude that genetic differences in neuromodulatory architecture of the C. elegans egg-laying circuit contribute to natural diversity in egg-laying behaviour.

The action of diverse drugs in clinical use, such as serotonin-reuptake inhibitors (SSRI) and tricyclic antidepressants, have been characterized through genetic analysis of their action on neurotransmitters regulating C. elegans egg-laying behaviour (Trent et al., 1983; Weinshenker et al., 1995; Weinshenker et al., 1999; Ranganathan et al., 2001; Dempsey et al., 2005; Kullyev et al., 2010; Branicky et al., 2014). As reported for the reference strain N2 (Dempsey et al., 2005), we find that the SSRI fluoxetine (Prozac) and the tricyclic antidepressant imipramine strongly stimulated egg-laying activity in all 15 focal strains, which only showed slight (although significant) quantitative differences in drug sensitivity (Figure 7B). Both drugs also stimulated egg laying in the Class IIIB strains and the Class IIIA strain JU2829 for which exogenous serotonin either inhibited egg laying or had no effect on it (Figure 7B). In the past, mutants unresponsive to serotonin yet responsive to other drugs, including fluoxetine and imipramine, have been interpreted as being defective in the serotonin response of vulval muscles (Trent et al., 1983; Reiner et al., 1995; Weinshenker et al., 1995). This is indeed the likely case of Class IIIB strains carrying the KCNL-1 V530L variant thought to specifically reduce excitability of vulval muscles (Vigne et al., 2021). Our results therefore suggest that JU2829 (Class IIIA) may exhibit a similar defect in vulval muscle activation via serotonin caused by an alternative genetic change. Overall, these pharmacological assays do not allow us to conclude if and how HSN function has diverged among strains because the mode of action and targets of tested drugs has not been resolved. Nevertheless, our results are consistent with previous models proposing that these drugs do not simply block serotonin reuptake but can stimulate egg laying, to some extent, through mechanisms independent of serotonergic signalling (Trent et al., 1983; Desai and Horvitz, 1989; Reiner et al., 1995; Weinshenker et al., 1995; Weinshenker et al., 1999; Dempsey et al., 2005; Kullyev et al., 2010; Branicky et al., 2014; Yue et al., 2018).

As shown above, serotonin may also inhibit, rather than stimulate, egg laying, specifically in the Class IIIA strain JU2829, and a similar tendency was observed for Class IIIB strains (Figure 7B). This result is in line with past research reporting a dual role of serotonin signalling in C. elegans egg laying by generating both excitatory and inhibitory inputs (Carnell et al., 2005; Dempsey et al., 2005;
Hobson et al., 2006; Hapiak et al., 2009). In the reference wild type strain (N2), serotonin-mediated inhibitory inputs are masked by its stronger excitatory inputs and are only revealed when function of certain serotonin receptors has been mutationally disrupted (Carnell et al., 2005; Hobson et al., 2006; Hapiak et al., 2009). In analogous fashion, our observations suggest that serotonin-mediated inhibitory effects become only visible in wild strains whose egg-laying response cannot be stimulated by serotonin. In the case of Class IIIB strains, the KCNL-1 V530L variant likely hyperpolarizes vulval muscles to such an extent that exogenous serotonin is insufficient to induce successful egg laying while the negative serotonin-mediated inputs are able to exert their effects, likely through HSN, as previously shown for N2 (Carnell et al., 2005; Hobson et al., 2006; Hapiak et al., 2009). To test if KCNL1- V530L is indeed sufficient to unmask inhibitory inputs of serotonin, we examined the effects of this variant introduced into a Class II genetic background (strain JU1200); the resulting CRISPR-Cas9-engineered strain (JU1200<sub>KCNL-1 V530L</sub>) recapitulates reduced egg laying and strong egg retention (Vigne et al., 2021). Very similar to what we found for JU751 (Class IIIB), serotonin had a negative effect on egg laying in JU1200<sub>KCNL-1 V530L</sub>, suggesting that altering vulval muscle excitability by means of KCNL-1 V530L was indeed sufficient to abrogate positive but not negative serotonin inputs acting in the *C. elegans* egg-laying system (Figure 7C). In addition, both fluoxetine and imipramine stimulated egg laying in JU1200<sub>KCNL-1 V530L</sub> (Figure 7—figure supplement 1), very similar to what we observed in JU751 and other Class IIIB strains (Figure 7B). In addition, introducing the canonical KCNL-1 sequence into JU751 (strain JU751<sub>KCNL-1 L530V</sub>) fully restores egg-laying responses as for the ones observed in JU1200 (Figure 7C, Figure 7—figure supplement 1). These results thus further confirm that variation in a single amino acid residue of KCNL-1 is sufficient to explain drastic differences in the *C. elegans* egg-laying system and its response to various neuromodulatory inputs.

## CRISPR-Cas9-mediated manipulation of endogenous serotonin levels uncovers natural variation in the neuromodulatory architecture of the *C. elegans* egg-laying system

To consolidate the finding that *C. elegans* harbours natural variation in the neuromodulatory architecture of the egg-laying system, we examined how an identical genetic modification – which increases availability of endogenous serotonin levels – affects egg-laying activity in different genetic backgrounds. The *C. elegans* genome encodes a single serotonin transporter (SERT), *mod-5*, which is involved in serotonin re-uptake (Ranganathan et al., 2001). We introduced a point mutation corresponding to the *mod-5(n822)* loss-of-function allele, increasing endogenous serotonin signalling (Ranganathan et al., 2001; Dempsey et al., 2005; Kullyev et al., 2010; Jafari et al., 2011), into 10 wild strains of the three classes with divergent egg retention using CRISPR-Cas9 genome editing (Figure 8A). Consistent with past reports, we found that *mod-5(n822)* tended to increase basal egg-laying activity in liquid M9 buffer without food. However, the size of this effect was genotype-dependent, and several strains did not show a significantly increased egg-laying response (Class I: JU3166, QG2873, Class IIIA:

<table><caption>**Table 3.** Natural variation in egg laying in response to a gradient of low exogenous serotonin concentrations in wild type and *mod-5(n822)* animals (Figure 8C, Figure 8—figure supplement 1B). Results for statistical analyses testing for the effects of and interactions between genetic background, presence of *mod-5(lf)* and Treatment (concentration of serotonin) on egg laying (ANOVA).</caption><thead><tr><th>Source</th><th>DF</th><th>Sum of Squares</th><th>F Ratio</th><th>p</th></tr></thead><tbody><tr><td>mod-5</td><td>1</td><td>67.45</td><td>186.42</td><td>&lt;.0001*</td></tr><tr><td>Background</td><td>7</td><td>149.21</td><td>58.91</td><td>&lt;.0001*</td></tr><tr><td>Treatment</td><td>3</td><td>120.21</td><td>110.73</td><td>&lt;.0001*</td></tr><tr><td>mod-5 x Background</td><td>7</td><td>8.94</td><td>3.53</td><td>0.0010*</td></tr><tr><td>mod-5 x Treatment</td><td>3</td><td>15.77</td><td>14.53</td><td>&lt;.0001*</td></tr><tr><td>Background x Treatment</td><td>21</td><td>95.77</td><td>12.60</td><td>&lt;.0001*</td></tr><tr><td>mod-5 x Background x Treatment</td><td>21</td><td>13.31</td><td>1.75</td><td>0.021*</td></tr><tr><td>Error</td><td>510</td><td>184.55</td><td></td><td></td></tr></tbody></table>
<figure><img src="image_10.png" /><figcaption>**Figure 8.** Manipulating endogenous serotonin levels uncovers natural variation in the neuromodulatory architecture of the *C. elegans* egg-laying system. (A) Cartoon outlining the experimental design to introduce (by CRISPR-Cas9 technology) the loss-of-function mutation *mod-5(n822)* (*Ranganathan et al., 2001*) into 10 *C. elegans* strains with divergent egg-laying behaviour. (B) Natural variation in the effect of *mod-5(lf)* on egg laying (adult hermaphrodites, mid-L4 +30 hr). *mod-5(lf)* increased basal egg-laying activity relative to wild type in the absence of food (M9 buffer), except for the two Class I strains and the Class III strains JU830 and JU751. The stimulatory effect of *mod-5(lf)* on egg laying also varied quantitatively between strains within the same Class, that is, within Class II and Class IIIA. Align Rank Transform ANOVA, fixed effect *mod-5*: F₁,₇₀₉=175.55, p<0.0001, fixed effect *Background*: F₉,₇₀₉ = 20.98, p<0.0001; interaction *mod-5* x *Background*: F₉,₇₀₉ = 5.34, p<0.0001. N=23–60 replicates per strain, with each replicate containing 3.15±0.18 individuals on average were scored. (C) Natural variation in egg laying in response to a gradient of low exogenous serotonin concentrations in wild type and *mod-5(n822)* animals. Adult hermaphrodites (mid-L4 +30 hr) were placed into M9 buffer without food containing four different concentrations of serotonin (0.0 mM, 3.7 mM, 6.0 mM, 12.3 mM). Strains differed strongly in sensitivity to specific concentrations of exogenous serotonin and these effects of genetic background were further contingent on the presence of *mod-5(lf)* as indicated by the significant three-way interaction term *genetic background x mod-5 allele x serotonin treatment (Table 3)*. For complete results of statistical analyses, see *Table 3*; for an alternative representation of the same data, see **Figure 8—figure supplement 1B**. For each concentration, 8–10 replicates (each containing 3.15±0.22 individuals on average) were scored per strain.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 8:

**Source data 1.** Excel file containing source data for **Figure 8**, **Figure 8—figure supplement 1A** and **B**.

**Source data 2.** Excel file containing statistical results for analyses of data shown in **Figure 8B** and **Figure 8—figure supplement 1A**.

**Figure supplement 1.** Manipulating endogenous serotonin levels uncovers natural variation in the neuromodulatory architecture of the *C. elegans* egg-laying system.
JU830, Class IIIB: JU751) (Figure 8B). The effect of *mod-5* was also quantitatively different for certain strains within the same phenotypic Class (Class II and Class IIIA), indicating that serotonin sensitivity of the egg laying system varies genetically despite generating similar behavioural outputs (Figure 8B).

Introducing the mutation *mod-5(n822)* did not further increase egg laying when wild strains were exposed to 25 mM serotonin (except for the strain ED3005), likely because egg-laying activity was already at its maximum at such a high dose of serotonin (Figure 8—figure supplement 1A). In contrast, exposure to a range of lower serotonin concentrations uncovered significant strain differences in sensitivity to exogenous serotonin and these effects of genetic background were further contingent on the presence of *mod-5(lf)* (Figure 8C, Figure 8—figure supplement 1B, Table 3). Low exogenous serotonin concentrations strongly stimulated egg laying in Class I strains and ED3005 (Class IIIA), and this stimulation was significantly amplified in the presence of *mod-5(lf)* (Figure 8C), consistent with the previously observed serotonin hypersensitivity of ED3005 (Figure 7B). By contrast, in Class II strains, including N2, low exogenous serotonin only marginally increased egg-laying, and *mod-5(lf)* had little effect (Figure 8C). As in previous experiments (Figure 7B, Figure 8B), we find again that strains sharing the same egg retention phenotype may differ strongly in egg-laying behaviour in response to modulation of both exo- and endogenous serotonin levels (Class IIIA: ED3005 and JU2829) (Figure 8C, Figure 8—figure supplement 1B).

C. elegans wild strains differ in their egg-laying activity in response to the same dose of exoge-
nous serotonin and in response to the same genetic alteration that causes an increase in endoge-
nous serotonin levels. Such significant differences between genotypes in effect sizes of a focal allele
are evidence for epistasis (non-linear genetic interactions) (Gibson and Dworkin, 2004). Hence, C.
elegans harbours natural variation in its genetic architecture affecting sensitivity to neuromodulatory
inputs of the egg-laying circuit. This genetic variation can occur in elements of the egg-laying circuit,
such as the only known natural variant (KCNL-1 V530L) affecting vulval muscle excitability (Vigne
et al., 2021), but likely also in components acting outside of the core circuit, including head neurons
and signalling pathways mediating sensory inputs affecting egg-laying activity (Aprison et al., 2022;
Schafer, 2006).

Evaluating potential costs and benefits of variation in egg retention

The existence of pronounced natural variation in *C. elegans* egg-laying phenotypes raises the ques-
tions of why this variation is maintained and how it might impact alternative fitness components. We

<figure><img src="image_11.png" /><figcaption>**Figure 9.** Strains with stronger egg retention show reduced lifetime self-fertility and survival. (A) Dynamics of lifetime offspring production in self-fertilizing hermaphrodites of the 15 focal strains with divergent egg retention. Hermaphrodites at the mid-L4 stage were isolated to individual NGM plates and their offspring production was scored every 24 hr until reproduction had ceased (~mid-L4+96 hr). N=28–30 individuals per strain. (B) Significant differences in total lifetime offspring number between the 15 focal strains (Kruskal-Wallis Test, $\chi^2=290.79$, df=14, p<0.0001). Same experiment as shown in (A), N=28–30 individuals per strain. (C) Significant negative correlation between mean lifetime offspring number and mean egg retention across the 15 focal strains with divergent egg retention (at mid-L4 +30 hr) ($\rho_{Spearman}=-0.85$, p<0.0001).</figcaption></figure>

The online version of this article includes the following source data for figure 9:

**Source data 1.** Excel file containing source data for **Figure 9**.
<figure><img src="image_12.png" /><figcaption>B</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>C</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>**Figure 10.** Strains with strong egg retention show reduced survival and increased internal hatching. (A) Hermaphrodite survival in the 15 focal strains with divergent egg retention, separated by phenotypic classes. Survival was scored every 24 hr across the first eight days of adulthood. For each strain, two to three replicates were scored, with each replicate containing 30–36 individuals. On day 5, the fraction of surviving individuals was significantly different between all four Classes (Tukey's honestly significant difference, all p<0.05) (Two-Way ANOVA, fixed effect *Class*: F<sub>3,29</sub>=178.49, p<0.0001, fixed effect *Strain(nested in Class)*: F<sub>11,29</sub>=6.41, p<0.0001). (B) Significant negative correlation between mean percentage of survival (day 5) and mean egg retention across the 15 focal strains with divergent egg retention (at mid-L4 +30 hr) (ρ<sub>Spearman</sub>=-0.84, p=0.00013). (C) Temporal progression of internal hatching during the survival assay (from data shown in (A)) in the 15 focal strains, measured as the cumulative percentage of dead mothers containing one or more internally hatched larva. For each strain, two to three replicates were scored, and each replicate consisted of 30–36 individuals. No individuals were censored.</figcaption></figure>

The online version of this article includes the following source data for figure 10:

**Source data 1.** Excel file containing source data for Figure 10.

therefore experimentally explored potential fitness costs and benefits associated with variable egg retention of *C. elegans* wild strains. We previously reported an apparent fitness cost of strong egg retention but only for a single strain (JU751, Class IIIB), in which mothers die prior to the end of the reproductive span due to internal (matricidal) hatching (*Vigne et al., 2021*). Here, using comparisons between multiple focal strains with variable degrees of egg retention, we tested if increased egg retention consistently generates negative fitness effects. Consistent with this hypothesis, strains with stronger egg retention generally showed reduced lifetime self-fertility and reduced survival, with strongest reductions observed in Class IIIB strains (*Figure 9A-C*). Class III strains showed frequent internal hatching, with mothers dying prematurely, sometimes before the end of the reproductive span (*Figure 10A-C*). Internal hatching in Class I and II strains was absent or occurred only in rare instances at the end of the reproductive period (*Figure 10C*), similar to what has been previously observed for the strain N2 (*Pickett and Kornfeld, 2013*).

To further test when and how strong egg retention and internal hatching may perturb self-fertilization, we screened DAPI-stained hermaphrodites at different adult stages to count remaining self-sperm and internally hatched larvae, and we scored animals for physical damage of the maternal germline and soma. First, a fraction of adults in multiple Class III (but not Class I or II) strains had self-sperm remaining at the time of internal hatching (*Figure 11*), confirming that internal hatching can indeed occur during the reproductive span, potentially disrupting self-fertilization. Consistent with this latter scenario, in the Class IIIB strain JU2593, the total number of self-sperm greatly exceeded the number of lifetime progeny (*Figure 11—figure supplement 1A*). Second, internally hatched larvae in
<figure><img src="image_15.png" /><figcaption>**Figure 11.** Internal hatching may occur during the reproductive span of hermaphrodites. Quantifying hermaphrodite self-sperm numbers in select focal strains with divergent egg retention and testing for the co-occurrence of internally hatched larvae and self-sperm. Adult hermaphrodites derived from age-synchronized populations were collected across multiple time points of their reproductive span, then stained with DAPI to visualize and count spermatids (N=46–175 individuals per strain). Sperm and internally hatched larvae were found to co-occur in multiple Class III strains but not in strains of Class I or II.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 11:

**Source data 1.** Excel file containing source data for Figure 11.

**Figure supplement 1.** Internal hatching may have deleterious effects on germline integrity and reproduction.

**Figure supplement 1—source data 1.** Excel file containing source data for Figure 11—figure supplement 1.

live mothers with remaining self-sperm (limited to Class III strains) caused apparent physical damage to the maternal gonad and somatic tissues due to larval movement, sometimes disrupting the uterine wall (Figure 11—figure supplement 1B). Third, larval movement also appeared to scatter sperm away from the uterine regions adjacent to spermathecae, which likely reduces fertilization efficacy as certain Class III strains had large numbers of unfertilized oocytes in the uterus before self-sperm was depleted (Figure 11—figure supplement 1C and D).

The above experiments show that strong egg retention (and internal hatching) correlates with reduced self-fertility (Figure 9C) and reduced maternal survival (Figure 10B). Class IIIB strains exhibited the most drastic reduction in reproductive output, only using a fraction of available self-sperm. In contrast, in Class IIIA strains (ED3005, JU440, NIC1786) internal hatching occurred mainly after reproduction had ceased (Figure 10C), suggesting that strong egg retention has limited detrimental fitness effects in these strains.

**Strong egg retention may provide a competitive advantage in resource-limited environments**

Given its frequent deleterious effects on survival and fecundity, we asked if there could be any counteracting beneficial effects associated with increased egg retention. Strong egg retention reflects prolonged intra-uterine embryonic development (Figure 3D), which results in laying of eggs holding advanced-stage embryos, as confirmed by scoring the age distribution of embryos contained in eggs laid by young adults of the 15 focal wild strains (Figure 12A). Within laid eggs of Class I and II strains, embryos rarely exceeded the 26-cell stage, whilst in Class III, many embryos had started to differentiate, containing hundreds of cells, including late-stage embryos, sometimes close to hatching (Figure 12A). In the context of the rapid *C. elegans* life cycle (~80 hr egg-to-adult developmental
<figure><img src="image_16.png" /><figcaption>**Figure 12.** Strong egg retention may provide a competitive advantage in resource-limited environments. (A) Age distribution of embryos contained within eggs laid by hermaphrodites (mid-L4 +40 hr) of the 15 focal strains. Embryonic stages were divided into five age groups according to the following characteristics using Nomarski microscopy (Hall and Altun, 2007): 1–2 cell stage, 4–26 cell stage, 44 cell to gastrula stage, bean to two-fold stage, three-fold stage, L1 larva. N=45–72 eggs per strain. (B) Significant negative correlation between hatching time of laid eggs and mean egg retention across the 15 focal strains with divergent egg retention (at mid-L4 +30 hr) (ρ<sub>Spearman</sub>=-0.92, p<0.0001). Values are estimates of the time point at which 50% of the eggs had hatched. For each strain, 10–20 adult hermaphrodites (mid-L4 +30 hr) were allowed to lay eggs within an 1-hr window (N=48–177 eggs per strain). The fraction of hatched eggs was scored every hour until all eggs had hatched. (C) Significant negative correlation between egg-to-adult developmental time and mean egg retention across the 15 focal strains with divergent egg retention (at mid-L4 +30 hr) (ρ<sub>Spearman</sub>=-0.69, p=0.0041). Values are estimates of the time point at which 50% of individuals had reached reproductive maturity (one or two eggs in utero). For each strain, 10–20 adult hermaphrodites (mid-L4 +30 hr) were allowed to lay eggs within a one-hour window (N=77–318 eggs per strain). After removal of adults, eggs were allowed to hatch and after 45 hr of development, populations were surveyed every two hours to count the fraction of adults that had reached reproductive maturity. (D) Short-term competition of JU1200<sub>WT</sub> and JU1200<sub>KCNL-1 VS30L</sub> against a GFP-tester strain (myo-2::gfp) with a genotype starting frequencies of 50:50. The strain JU1200<sub>KCNL-1 VS30L</sub> (strong egg retention, Class III phenotype) outperformed JU1200<sub>WT</sub> (regular egg retention, Class II phenotype). For each replicate, 20 laid eggs of either genotype were mixed with 20 laid eggs of the GFP-tester strain on a NGM plate; after 4–5 days (when food became exhausted) the fraction of GFP-positive adult individuals was determined. Relative to the GFP-tester strain, JU1200<sub>KCNL-1 VS30L</sub> showed a significantly higher fraction of adults compared to JU1200<sub>WT</sub> (Kruskal-Wallis Test, χ²=11.57, df=1, p=0.0007). N=10 replicates per genotype. (E) Short-term competition of JU751 (Class IIIIB, strong egg retention) against each of five wild strains (Class II, canonical egg retention) isolated from the same locality. For each of the five strains, 20 freshly laid eggs were mixed with 20 freshly laid eggs from JU751 and allowed to develop. Adult population size and genotype frequencies were determined after 4–5 days (when food became exhausted). In each of the five competition experiments, JU751 showed a significantly higher number of adults (Wilcoxon signed-rank test for matched pairs, all p<0.05). N=10 replicates per strain.</figcaption></figure>

The online version of this article includes the following source data for figure 12:

**Source data 1.** Excel file containing source data for Figure 12.
time), observed strain differences in embryonic age are considerable: it takes approximately 2–3 hr to reach the 26-cell stage but around 9–12 hr to develop into late-stage embryos (*Hall and Altun, 2007*). Prolonged egg retention should thus result in earlier hatching ex utero, so that intraspecific differences in the timing of hatching could potentially affect competitive fitness when different genotypes compete for the same resource. Specifically, rapid external hatching may provide an advantage when exploiting resource-limited environments as only a few hours of ‘head start’ in larval development can be decisive for competitive outcomes, for example, as shown in *Drosophila* flies (*Bakker, 1961*; *Mueller and Bitner, 2015*).

Here, we tested to what extent strain differences in egg retention (of young adults) affect external egg-to-adult developmental time and competitive ability. First, comparing the average timing of larval hatching between the 15 focal strains with variable egg retention, we found that eggs of all Class IIIB strains and some Class IIIA strains hatched on average ~2–5 hours earlier compared to Class I and II strains (*Figure 12B*). Second, to test if earlier larval hatching indeed translates into corresponding earlier onset of reproductive maturity in the 15 focal strains, we measured the time interval between egg laying and reproductive maturity, defined as the onset of fertilization, that is by the presence of 1–2 eggs in utero. Although many Class III strains with strong egg retention reached age at maturity (~2–6 hr) earlier than Class I and II strains, some Class III strains did not maintain their initial head start in larval development (*Figure 12C*). Overall, these measurements confirm that strains with prolonged egg retention benefit from a relatively shorter developmental time from laying to reproductive maturity, which might improve competitive ability. The above experiment only examined eggs laid by young adults (mid-L4 +30 hr); in Class III strains, the observed head start in larval development should thus be further amplified in older hermaphrodites (from mid-L4 +48 hr onwards), containing not only advanced-stage embryos but also larvae as shown earlier (*Figure 3E*).

To quantify the possible effects of egg retention on short-term competitive ability in the absence of confounding genetic variation, we compared the Class II strain JU1200 (wild type) to the engineered JU1200<sub>KCNL-1 V530L</sub> strain, i.e. two genetically identical strains with the exception of the engineered KCNL-1 V530L mutation in the latter strain, causing very strong egg retention and laying of advanced-stage embryos: JU1200<sub>WT</sub> (~15 eggs in utero) versus JU1200<sub>KCNL-1 V530L</sub> (~40 eggs in utero; Vigne et al., 2021). We competed each strain separately against a green fluorescent protein (GFP)-tester strain by inoculating NGM plates with 20 freshly laid eggs from either genotype. Estimating adult population number and genotype frequencies relative to the GFP-tester strain 5 days after inoculation (around the time point of food exhaustion), the KCNL-1 V530L variant performed significantly better (*Figure 12D*). Given that the principal phenotypic effect of KCNL-1 V530L is reduced egg laying and consequently increased egg retention (Vigne et al., 2021), we conclude that strong egg retention can improve competitive ability in food-limited environments.

Finally, to mimic scenarios of ecologically relevant short-term competition between naturally co-occurring wild strains with divergent egg retention, we compared the competitive ability of the Class IIIB strain JU751 (strong egg retention caused by the variant KCNL-1 V530L; ~40 eggs in utero at mid-L4 +30 hr) against strains isolated around the same time from the same habitat (compost heap, Le Perreux-sur-Marne, France) (*Barrière and Félix, 2007*) but exhibiting canonical egg retention (Class II phenotype; hermaphrodites at mid-L4 +30 h; Vigne et al., 2021). For each of five of these strains, 20 freshly laid eggs were mixed with 20 freshly laid eggs from JU751 and allowed to develop. We then estimated adult population size and genotype frequencies 5 days after inoculation (around the time point of food exhaustion). In all five cases, JU751 reached higher adult population sizes at this stage (*Figure 12E*). These experimental results offer preliminary evidence (bearing in mind that our analysis was primarily centered on a single genetic background) that laying of advanced-stage embryos may enhance intraspecific competitive ability, particularly in scenarios where multiple genotypes compete for colonization and exploitation of limited, patchily distributed resources. Similar to our experiments, increased egg-to-adult developmental time has previously been shown to be disadvantageous for *C. elegans* population growth when analysing mutants with increased hermaphrodite sperm production, which incurs a cost as the onset of reproductive maturity will be delayed; thus, although these mutants have the potential to produce overall many more self-progeny, they will be rapidly outcompeted because of delayed maturity whenever resources are limited (*Hodgkin and Barnes, 1991; Barker, 1992; Cutter, 2004*). Together with theoretical and experimental evidence in insects (*Bakker, 1961; Mueller and Bitner, 2015; Horváth and Kalinka, 2018*), these observations indicate that maternal
features accelerating offspring development after oviposition can confer fitness benefits in ephemeral habitats with rapidly decaying resources.

## Strong egg retention improves offspring protection when facing sudden environmental stress

Prolonged intra-uterine embryonic development, as observed in viviparous organisms, is thought to provide improved protection of developing embryos against deleterious environmental fluctuations and stressors (Blackburn, 1999; Kalinka, 2015; Horváth and Kalinka, 2018). Whether prolonged egg retention in *C. elegans* can increase such protection is unclear, in particular, because embryos seem already well protected: they are encapsulated within a multi-layered egg shell that is highly resistant to diverse environmental insults, such as osmotic stress or pathogen infections (Schierenberg and Junkersdorf, 1992; Johnston and Dennis, 2012; Stein and Golden, 2018; Sandhu et al., 2021). Nevertheless, eggs developing ex utero are still vulnerable to a variety of abiotic and biotic stressors (Van Voorhies and Ward, 2000; Garsin et al., 2001; Padilla et al., 2002; Burton et al., 2021; Fausett et al., 2021). If eggs in utero are indeed more effectively shielded against environmental insults compared to eggs laid in the external environment, genotypes with strong egg retention may thus benefit from improved offspring protection. Here, we tested this hypothesis by comparing the effects of environmental perturbations on eggs developing in utero versus ex utero using a subset of wild strains with different levels of egg retention.

<figure><img src="image_17.png" /><figcaption>**Figure 13.** Strong egg retention improves progeny protection when facing sudden environmental stress. (A) Differences in survival of eggs developing ex utero versus in utero when exposed to a high concentration of ethanol (96%, 10-min exposure). A subset of the 15 focal strains with divergent egg retention was selected to compare the number of surviving eggs ex utero (extracted by dissection) versus in utero (eggs retained in mothers) exposed to ethanol. Overall, the number of surviving eggs tended to be greater when exposed to ethanol in utero compared to ex utero (Kruskal-Wallis Tests performed separately for each strain to compare the number of surviving offspring in utero versus ex utero when exposed to ethanol; \*p<0.05, ns: not significant). Class III strains tended to have a higher number of surviving offspring than Class I and II strains. N=5-10 replicates per genotype and treatment (10 hermaphrodites at mid-L4 +30 hr per replicate). See Figure 13—figure supplement 1A, for additional (control) data of the experiment. (B) Differences in survival of eggs developing ex utero versus in utero when exposed to a high concentration of acetic acid (10 M, 15-min exposure). A subset of the 15 focal strains with divergent egg retention was selected to compare the number of surviving eggs ex utero (extracted by dissection) versus in utero (eggs retained in mothers) exposed to acetic acid. For all strains, the number of surviving eggs was significantly greater when exposed to acetic acid in utero compared to ex utero (Kruskal-Wallis Tests performed separately for each strain to compare the number of surviving offspring in utero versus ex utero when exposed to acetic acid; \*p<0.05, ns: not significant). Class III strains tended to have a higher number of surviving offspring than Class I and II strains. N=5 replicates per genotype and treatment (10 hermaphrodites at mid-L4 +30 hr per replicate). See Figure 13—figure supplement 1B for additional (control) data of the experiment.</figcaption></figure>

The online version of this article includes the following source data and figure supplement(s) for figure 13:

**Source data 1.** Excel file containing source data for Figure 13, Figure 13—figure supplement 1A and B.

**Figure supplement 1.** Additional data for experiment shown in Figure 13A and B, including data for control conditions (M9 buffer).
<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /></figure>

<figure><img src="image_20.png" /></figure>

**Figure 14.** Differences in survival of eggs developing ex utero versus in utero when exposed to environmental stress. (A) Differences in survival of eggs developing ex utero versus in utero when exposed to acetic acid (10 M, 15-min exposure). Comparison of the strain JU751 (Class IIIB, strong retention) to four strains (Class II, canonical retention) isolated from the same locality. Examining only data for eggs exposed in utero, JU751 exhibited a significantly higher number of surviving offspring compared to all other strains (ANOVA, effect *Strain*: F<sub>4,20</sub>=15.96, p<0.0001; Tukey's honestly significant difference, all p<0.05). N=5 replicates per genotype and treatment (10 hermaphrodites at mid-L4 +30 hr per replicate). See Figure 14—figure supplement 1 for additional (control) data of the experiment. (B) Comparing the Class II strain JU1200<sub>WT</sub> (canonical retention) and the JU1200<sub>KCNL-1 VS30L</sub> strain (strong retention): differences in the number of surviving eggs ex utero (extracted by dissection) versus in utero (eggs retained in mothers) exposed to a high concentration of acetic acid (10 M, 15-min exposure). JU1200<sub>KCNL-1 VS30L</sub> exhibited a significantly higher number of surviving offspring in utero when exposed to acetic acid compared to JU1200<sub>WT</sub> (Kruskal-Wallis Test, χ<sup>2</sup>=14.35, df=1, p=0.0002). N=10 replicates per genotype per treatment. (C) Differences in the number of surviving internally hatched larvae exposed to acetic acid (10 M, 15-min exposure) using the strain JU1200<sub>KCNL-1 VS30L</sub>: ex utero (extracted by dissection) versus in utero (larvae retained in mothers). The number of live larvae per mother was significantly higher in utero compared to ex utero (Kruskal-Wallis Test, χ<sup>2</sup>=13.89, df=1, p=0.0002). N=10 replicates per genotype per treatment.

The online version of this article includes the following source data and figure supplement(s) for figure 14:

**Source data 1.** Excel file containing source data for *Figure 14*, *Figure 14—figure supplement 1*.

**Figure supplement 1.** Additional data for the experiment shown in *Figure 14A*.

We first examined the effects of short-term, acute exposure to high concentrations of ethanol and acetic acid, chemicals that are present in decaying plant matter, that is the natural *C. elegans* habitat (*Félix and Braendle*, 2010). Across strains, most eggs removed from mothers and directly exposed to these chemical treatments were killed, whereas eggs inside mothers exhibited significantly higher survival in most strains, particularly when exposed to acetic acid (*Figure 13A and B*). Eggs in utero were thus partly protected by the body of the mothers, even though mothers instantly died upon treatment exposure. Consequently, increased egg retention resulted in overall higher numbers of surviving offspring per mother in both stress treatments (*Figure 13A and B*).

To corroborate this result, we tested if the Class III strain JU751 displays better maternal protection relative to strains with a canonical egg retention phenotype (Class II) from same habitat, isolated around the same time (*Barrière and Félix*, 2007). Exposure to acetic acid confirmed that higher egg retention of JU751 increased the number of surviving offspring compared to strains with lower retention (*Figure 14A*). In the same fashion, we found the number of surviving offspring in the Class II strain JU1200<sub>WT</sub> (~15 eggs in utero) to be much reduced compared to JU1200<sub>KCNL-1 VS30L</sub> (~40 eggs in utero) when exposed to acetic acid (*Figure 14B*). In addition, larvae in utero present at the time of treatment were also efficiently protected (*Figure 14C*). Offspring in utero may therefore benefit from maternal protection, so that strains with constitutively higher egg retention will protect overall more progeny when confronting a sudden environmental insult.
A Osmotic stress (NaCl)

B Osmotic stress (NaCl)

C Acetic acid (mild)

D Acetic acid (mild)

<figure><img src="image_21.png" /></figure>

<figure><img src="image_22.png" /></figure>

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

**Figure 15.** Increased egg retention protects offspring viability and fertility under mild environmental stress. (A) Effects of osmotic stress on survival of embryos from eggs developing ex utero in the strain JU751. Eggs were extracted from adult hermaphrodites (mid-L4 +36 hr) by dissection and exposed to variable concentrations of NaCl (and M9 control condition) for 15 hr. Embryonic survival was estimated by counting the fraction of live larvae 24 hr later. N=120-288 eggs per treatment. (B) Differences in total lifetime offspring production of selfing JU751 animals derived from surviving eggs developing ex utero (dissected from adults at mid-L4 +36 hr) versus in utero when exposed to mild osmotic stress (0.3 M NaCl) for 15 hr; in parallel, ex utero eggs (dissected from adults at mid-L4 +36 hr) were exposed to a control treatment (M9 buffer) for 15 hr. 24 hr after the treatment, larvae from each of the three treatments were allowed to develop and reproduce for 3 days and scored for total offspring production. Animals derived from eggs developing in utero showed significantly higher fertility than animals derived from eggs developing ex utero when exposed to osmotic stress (Kruskal-Wallis Test, $\chi^2=4.66$, df=2, p=0.03). N=18-19 animals per treatment. (C) Differences in developmental time of JU751 animals derived from surviving eggs developing ex utero (dissected from adults at mid-L4 +36 hr) versus in utero when exposed to a low concentration of acetic acid (1 M) for 15 min; in parallel, ex utero eggs (dissected from adults at mid-L4 +36 hr) were exposed to a control treatment (M9 buffer). Eggs were then allowed to hatch and develop for 45 hr, at which time we determined their developmental stages. Each stage was assigned a score of development as follows: L3=1; early mid-L4=2; midL4=3; lateL4=4; Adult=5. Each dot represents the mean score reached by offspring produced by one single mother (N=30) mothers per treatment, producing between surviving 9-57 larval offspring. Animals derived from in utero eggs had a significantly higher mean developmental time score, that is they exhibited accelerated development compared to animals derived from ex utero eggs (Kruskal-Wallis Test, $\chi^2=38.93$, df=1, p<0.0001). (D) Differences in total lifetime offspring production of selfing JU751 animals derived from eggs developing ex utero versus eggs and L1 larvae in utero when exposed to a low concentration of acetic acid (1 M) for 15 min; in parallel, ex utero eggs (dissected from adults at mid-L4 +36 hr) were exposed to a control treatment (M9 buffer). Note that L1 larvae directly exposed to 1 M acetic acid died immediately. Twenty-four hr after the treatment, larvae from each of the four treatments were allowed to develop and reproduce for four days until cessation of reproduction; total offspring production was then scored 24 hr later. There were no significant differences in mean fertility between the four different treatment groups (Kruskal-Wallis Test, $\chi^2=4.00$, df=3, p=0.26). N=15 animals per treatment. Eggs were dissected from adults at mid-L4 +36 hr and L1 larvae at mid-L4 +48 hr.

The online version of this article includes the following source data for figure 15:

**Source data 1.** Excel file containing source data for Figure 15.

To test how exposure to milder environmental perturbations affects the reproductive fitness of descendants from eggs exposed in utero versus ex utero, we focused on a single strain (JU751, Class IIIB) with constitutively strong egg retention. First, we selected an osmotic stress condition (15-hr exposure to 0.3 M NaCl), which caused relatively low embryonic mortality when eggs were exposed to this treatment ex utero (Figure 15A). We then followed surviving individuals to score their lifetime reproductive success under selfing. We found that fertility of individuals derived from stress-exposed eggs ex utero was reduced compared to the ones derived from eggs in utero (Figure 15B). Second, we treated eggs in utero versus ex utero with a low concentration of acetic acid (1 M) for 15 min. This treatment was lethal for mothers but did not cause any mortality of embryos laid ex utero. Yet, individuals derived from ex utero eggs developed more slowly and exhibited significantly
delayed reproductive maturity (but not reduced fertility) compared to individuals that hatched from eggs in utero (Figure 15C and D). In addition, larvae in utero at the time of stress exposure were also protected by their mother's body and produced as many offspring as animals in control conditions (Figure 15C). In contrast, larvae were killed instantly if exposed to this stress in utero. Together, our experimental results suggest that constitutively strong egg retention can enhance maternal protection of offspring by protecting a relatively larger number of eggs in utero when facing a sudden environmental perturbation. Prolonged egg retention will also reduce the total time of external exposure of the immobile embryonic stage, thus likely lowering risks associated with diverse environmental threats, including exposure to predators and pathogens.

## Natural variation in *Caenorhabditis elegans* egg laying modulates an intergenerational fitness trade-off

Taken together, our experimental results suggest that the degree of *C. elegans* egg retention alters the interplay of antagonistic effects on maternal versus offspring fitness. On the one hand, strong egg retention reduces maternal survival and reproduction (Figure 9C, Figure 10B); on the other, by prolonging intra-uterine embryonic development, offspring may benefit from improved competitive ability (Figure 12) and protection against environmental insults (Figure 13, Figure 14, Figure 15). Therefore, variable egg retention, as observed in natural *C. elegans* populations, may reflect genetic differences in the adjustment of an intergenerational fitness trade-off. In extreme cases of strong constitutive egg retention, *C. elegans* strains exhibit partial viviparity, associated with significantly reduced maternal reproduction and survival. Overall, observed genetically variable duration of intra-uterine development in *C. elegans* thus seems to align well with past reports showing that transitions towards viviparity incur maternal fitness costs as observed for diverse invertebrate and vertebrate taxa with both inter- and intraspecific differences in egg-laying modes (Avise, 2013; Blackburn, 2015; Kalinka, 2015; Ostrovsky et al., 2016; Horváth and Kalinka, 2018; Whittington et al., 2022). To what extent this apparent intergenerational fitness trade-off in *C. elegans* could involve parent-offspring conflict (Trivers, 1974) is uncertain. However, given the nearly exclusive selfing mode of reproduction in *C. elegans* (Barrière and Félix, 2005; Lee et al., 2021), we expect none to very little genetic disparity between hermaphrodite mothers and offspring, indicating much reduced opportunities for intergenerational conflict. Observed natural differences in *C. elegans* egg retention are therefore predicted to reflect properties of genetically distinct (effectively clonally propagating) genotypes, likely resulting from adaptation to distinct ecological niches differing in nature, fluctuations, and predictability of resource availability (Blackburn, 1999; Meier et al., 1999; Trexler and DeAngelis, 2003; Kalinka, 2015; Mueller and Bitner, 2015; Dey et al., 2016; Horváth and Kalinka, 2018).

## Discussion

Our study has quantified and characterized natural variation in *C. elegans* egg retention and egg-laying behaviour, resulting in the following main findings: (1) *C. elegans* exhibits quantitative variation in egg retention, with rare instances of extreme phenotypes at either end of the spectrum. (2) Both common and rare genetic variants underlie observed phenotypic variation. (3) Strain differences in egg retention can be largely explained by differences in egg-laying behaviour, such as the onset of egg laying activity and timing of the rhythm between active and inactive egg-laying phases. (4) These behavioural differences map, at least partly, to genetic differences in the sensitivity to various neuromodulators, indicative of natural variation in the *C. elegans* egg-laying circuitry. (5) Modified egg-laying behaviour causing strong egg retention – linked to frequent larval hatching in utero – negatively impacts maternal fitness, but (6) prolonged intra-uterine embryonic development may benefit offspring by improving their competitive ability and protection against environmental insults. (7) Hence, variation in *C. elegans* egg retention may reflect variation in a trade-off between antagonistic effects acting on maternal versus offspring fitness.

*C. elegans* egg retention is a quantitative (complex) trait: observed phenotypic distribution and GWA mapping indicate that this trait is likely influenced by multiple loci of small effect (Mackay et al., 2009). In addition, large-effect variants, such as KCNL-1 V530L (Vigne et al., 2021), occur but they seem to be relatively rare. Although variation in reproductive processes, such as self-sperm production and ovulation rates, contributes to observed variation in egg number in utero, we also
present clear evidence for natural variation in egg-laying behaviour and involved neuromodulatory
processes. How such behavioural differences arise through modification of specific cellular and phys-
iological processes and how these, in turn, are mediated by specific molecular alterations of genes
in the *C. elegans* egg-laying system remains to be elucidated. The genetics of the *C. elegans* egg-
laying circuit has been studied for decades, and dozens of genes have been identified by mutations,
which either reduce or increase egg-laying activity (Trent et al., 1983; Schafer, 2006). Some of the
identified genes encode ion channels regulating cell and synaptic electrical excitability, others encode
components of G-protein signalling pathways that act in specific cells of the circuit. Many more genes
transmitting environmental and physiological signals via sensory processing are known to regulate *C.
elegans* egg laying (Schafer, 2006; Ringstad and Horvitz, 2008; Fenk and de Bono, 2015; Banerjee
et al., 2017). Recent research has further uncovered an important role of muscle-directed mecha-
nisms regulating egg laying through sensation of internal stretch mediated by egg accumulation in
utero (Collins et al., 2016; Ravi et al., 2018; Ravi et al., 2021; Medrano and Collins, 2023). This
stretch-dependent homeostat directly targets vulval muscles and is sufficient to trigger egg laying
when synaptic transmission is reduced or defective, for example, in the absence of HSN command
neurons (Ravi et al., 2018; Ravi et al., 2021; Medrano and Collins, 2023). As indicated by our
results (Figure 6B), changes in such muscle-directed signalling components in response to egg accu-
mulation are likely key factors driving the evolution of *C. elegans* egg retention. Future experiments
should therefore be aimed at understanding how such modifications in mechanosensory feedback
interact with other potential changes in synaptic transmission to explain the natural diversity in the *C.
elegans* egg-laying neural circuit. In addition, we cannot exclude that natural variation in egg-laying
behaviour may arise through differential activity of developmental genes generating variation in the
neuroanatomy of the egg-laying circuit itself, for example as observed between different *Caenorhab-
ditis* species (Loer and Rivard, 2007).

Currently, the only known natural variant modulating *C. elegans* egg laying is the major-effect variant KCNL-1 V530L, which reduces egg laying through likely hyperpolarization of vulval muscles (*Vigne et al., 2021*), so that stimuli, such as mechanosensory inputs, are insufficient to trigger regular and successful egg-laying events. Our new results show that other unknown variants must cause the strong reduction of egg-laying activity in Class IIIA strains. Although our experimental results do not hint at any variants in specific candidate genes or processes, we detected strong differences in the serotonin response between Class IIIA strains (*Figure 7B*). Exogenous serotonin stimulated egg laying in all Class IIIA strains except in JU2829, where it inhibited egg laying as observed for Class IIIB strains (*Figure 7B*). This suggests that JU2829 might carry a variant with effects like KCNL-1 V530L, whereas variants with distinct functional effects would explain reduced egg-laying activity in other Class IIIA strains. The detection of both strong and subtle strain variation in egg-laying activity (also among strains within the same Class), as revealed by our pharmacological assays and when analysing the effects of *mod-5(lf)* in different strains (*Figure 8*), indicates the presence of many different natural variants that modulate egg-laying circuitry in *C. elegans*. Molecular identification of specific variants will thus be essential to explore how the nematode egg-laying circuit evolves at the intraspecific level.

Consistent with previous reports on the apparent costs of transitioning from oviparity to obligate and facultative viviparity (Avise, 2013; Kalinka, 2015; Horváth and Kalinka, 2018), we found that increased *C. elegans* egg retention lowers maternal survival and fecundity. We then show that fitness costs associated with strong egg retention are potentially offset by improved offspring competitive ability and protection against environmental perturbations. To what extent our highly simplified experimental conditions recapitulate relevant ecological scenarios encountered by natural *C. elegans* populations remains to be explored. The likely ecological factors shaping natural variation in *C. elegans* egg retention are thus unknown and we have not found any obvious links between the degree of egg retention and habitat parameters, such as substrate type or climate. However, the likely ancestral (divergent) strains only very rarely exhibited a Class III phenotype, which could indicate that derived state of strong egg retention may have been favoured by the exploitation of novel microhabitats during the historically recent expansion of *C. elegans* reflected by globally distributed, swept haplotypes (Lee et al., 2019; Lee et al., 2021).

The typical *C. elegans* habitat is highly ephemeral in nature, exhibiting extreme fluctuations in
nutrient availability and occurrence of diverse abiotic and biotic variables, including stressors and
pathogens (*Frézal and Félix, 2015; Schulenburg and Félix, 2017). A critical omission in our study
is therefore the analysis of plasticity in egg retention and egg-laying behaviour in different or fluc-
tuating environments. *C. elegans* egg laying is known to be highly plastic, strongly modulated by
subtle and very diverse environmental factors, so that our analyses in standard laboratory conditions
can only capture fractions of the complexity. Most prominently, diverse environmental stimuli (food
quantity and quality, osmotic or hypoxic stress, pathogens, etc.) have inhibitory effects on egg laying
and long-term exposure to these stimuli will lead to strong egg retention and matricidal hatching
*(Trent, 1982; Aballay et al., 2000; Waggoner et al., 2000; Chen and Caswell-Chen, 2003; Schafer,
2005; Zhang et al., 2008; McMullen et al., 2012; Fenk and de Bono, 2015; Vigne et al., 2021)*.
Future research will therefore require to carefully examine how such environmental effects modulate
egg laying and fitness consequences in strains with the here reported differences in constitutive egg
retention. In particular, plastically induced egg retention and matricidal hatching by prolonged star-
vation may allow for nutrient provisioning of internally hatched larvae as they can consume debris
stemming from the decaying mother, hence allowing for developmental growth in the absence of
external food (*Chen and Caswell-Chen, 2003; Chen and Caswell-Chen, 2004*). Future experiments
should therefore specifically test if internally hatched larvae in Class III strains (*Figure 3E*) may gain a
further advantage through maternal provisioning while developing in utero, specifically when exposed
to long-term conditions inhibiting egg laying, such as starvation.

The existence of pronounced natural variation in *C. elegans* egg retention and egg-laying behaviour
generates novel opportunities to dissect the molecular genetic basis of intraspecific variation in egg
retention, providing an entry point to understand the proximate mechanisms underlying evolutionary
transitions between invertebrate ovi- and viviparity. In contrast to vertebrate taxa with intraspecific
variation in egg-laying mode, such as certain lizards (*Recknagel et al., 2021; Whittington et al.,
2022*), the *C. elegans* model allows for rapid and powerful genetic analysis, for example through
linkage mapping of natural variants and subsequent functional validation of variants by CRISPR-Cas9
gene editing in multiple strains (*Evans et al., 2021*). Identifying the precise changes in *C. elegans* egg-
laying circuitry that have led to variation in egg retention may also generate insights into the genetic
basis of evolutionary diversification of egg-laying modes across species and genera. Nematodes
display frequent transitions from oviparity to obligate viviparity in many distinct genera (*Sudhaus,
1976; Ostrovsky et al., 2016*), including in the genus *Caenorhabditis*, with at least one viviparous
species, *C. vivipara* (*Stevens et al., 2019*). Although evidence exists for the evolution of egg-laying
circuitry across oviparous *Caenorhabditis* species (*Loer and Rivard, 2007*), the specific cellular and
genetic changes responsible for the transition to obligate viviparity in *C. vivipara* have yet to be exam-
ined. Resolving the genetic basis of intraspecific variation in *C. elegans* egg retention, including partial
or facultative viviparity, may thus shed light on the molecular changes underlying the initial steps of
evolutionary transitions from oviparity to obligate viviparity in invertebrates.

**Materials and methods**

**Materials availability statement**

Requests for additional information, data and strains generated in this study (Supplementary file 1)
should be directed to the lead contact, Christian Braendle (braendle@unice.fr).

**C. elegans strains and culture conditions**

A complete list of strains used in this study is provided in *Supplementary file 1*. *C. elegans* stocks
were maintained on 2.5% agar NGM (Nematode Growth Medium) plates (55 mm diameter) seeded
with *E. coli* strain OP50 at 15 °C or 20 °C (*Stiernagle, 2006*). All strains were decontaminated by
hypochlorite treatment (*Stiernagle, 2006*) in the third generation after thawing and kept in ad libitum
food conditions on NGM plates. Detailed information for *C. elegans* wild strains used in this study
is available at the CaeNDR website (https://caendr.org/) (*Crombie et al., 2023*). Most experiments
also included the strain QX1430, a derivative of the N2 reference strain, in which the major-effect and
N2-specific *npr-1* allele has been replaced by its natural version (*Andersen et al., 2015*). For exper-
iments, all strains were maintained on 2.5% agar NGM (Nematode Growth Medium) plates (55 mm
diameter) at 20 °C unless noted otherwise. All data are reported for exclusively selfing (self-fertilizing)
hermaphrodites. Liquid assays were performed in 0.1 ml M9 buffer in 96-well microplates (Greiner
Bio-One, Ref: 655180); each well was treated as an independent replicate, containing approximately three worms on average. During the incubation period, plates were mildly agitated on a shaker.

## Method details

### Age-synchronization and identification of developmental stages

Mixed-age hermaphrodite stock cultures were hypochlorite-treated to obtain age-synchronized, arrested L1 larval populations (*Stiernagle, 2006*). Hermaphrodites were then picked at the mid-L4 stage based on the morphology of the vulval invagination (*Mok et al., 2015*).

### Quantification of progeny number in utero and determination of embryonic stages

Progeny number (eggs and larvae) in utero was measured in age-synchronized hermaphrodites, mounted directly on microscopy slides and gently squashed with a coverslip. The number of offspring was then counted using a 20 x DIC microscope objective. An individual was considered to exhibit internal hatching when one or more larvae were visible in the uterus. Embryonic stages in utero were determined using DIC microscopy, and we distinguished six stages: 2 cell stage, 3–20 cell stage, early gastrula stage (21+ cells), comma stage, twofold stage, threefold stage, and L1 larva. To determine the age distribution of embryos contained in laid eggs (*Figure 12A*), age-synchronized hermaphrodite populations (mid-L4 +30 hr) were allowed to lay eggs for 30 min, after which embryonic stages were determined within 20 min.

### Egg size measurements (*Figure 3—figure supplement 1*)

Laid eggs of age-synchronized hermaphrodites (mid-L4 +30 hr) were collected in M9 buffer and mounted on 4% agar pads on glass slides. Microscopy images were acquired with a 40 x DIC microscope objective using Fiji (*Schindelin et al., 2012*). Length and width of eggs were measured to calculate egg volume with the ellipsoid volume function: $4/3 \times \pi \times (\text{length}/2) \times (\text{width}/2)^2$ (*Fausett et al., 2021*).

### Body size measurements (*Figure 3—figure supplement 1*)

Hermaphrodite body size was measured at the early adult stage prior to the accumulation of eggs in utero, i.e., when they contained 1 or 2 eggs in utero. Animals were collected in M9 and mounted on 4% agar pads on glass slides and microscopy images (10 X objective) were acquired and processed using Fiji (*Schindelin et al., 2012*). As an estimate of body size, we measured the length of each animal from the tip of the head to the end of the tail using the segmented line tool and width was measured at the site of the vulval opening. The volume of the animal was calculated as that of a cylinder: $\pi \times (\text{width}/2)^2 \times \text{length}$ (*Vielle et al., 2016*).

### Quantification of egg-laying behaviour (*Figure 5*)

Unlike the reference behavioural protocol based on continuous video imaging (*Waggoner et al., 1998*), we used a non-continuous, scan-sampling method (*Vigne et al., 2021*) to estimate variation in egg-laying behavioural patterns across the 15 focal strains. Individual animals at peak activity of egg laying (mid-L4 +30 hr) were isolated onto seeded NGM plates. Using a dissecting microscope, we then scored the presence and number of eggs laid by isolated adults every 5 min over a 3-hr period. We therefore screened a total of 36 successive 5-min intervals (N=17–18 individuals per strain). This assay allows for the estimation of egg-laying frequency and the derivation of an approximate duration for extended inactive egg-laying periods. However, this assay does not have sufficient resolution to determine the exact timing and structure of active egg-laying periods.

### Serotonin, imipramine, and fluoxetine assays (*Figures 6 and 7*)

Experiments testing for the effects of serotonin (5-hydroxytryptamine creatinine sulfate monohydrate, Sigma, Ref: H7752), fluoxetine (Fluoxetine hydrochloride, Sigma, Ref: PHR1394) and imipramine (imipramine hydrochloride, Sigma, Ref: I0899) on egg laying were based on previously established liquid culture protocols and drug concentrations (*Trent et al., 1983; Weinshenker et al., 1995; Weinshenker et al., 1999; Ranganathan et al., 2001; Dempsey et al., 2005; Kullyev et al., 2010*;
**Branicky et al., 2014).** Approximately three age-synchronized adults (mid-L4 +30 hr) were transferred to individual wells of a 96-well microplate containing serotonin or drugs dissolved in 100 µl of M9 buffer (without bacterial food); in parallel, control animals were transferred to wells containing only M9 buffer. The number of eggs released was scored after 2 hr at 20 °C.

## Introduction of *mod-5(n822)* into wild strains using CRISPR-Cas9 gene editing (Figure 8)

To alter endogenous serotonin levels (Ranganathan et al., 2001; Dempsey et al., 2005; Kullyev et al., 2010), we introduced a point mutation corresponding to the *mod-5(n822)* loss-of-function allele using CRISPR-Cas9 genome editing. This mutation changes cysteine 225 (codon TGT) to an opal stop codon (TGA) (Ranganathan et al., 2001). Gene editing was performed according to previously described procedures (Ben Soussia et al., 2019). In brief, the in vitro-synthetized crRNA crNB040 (GAAGUUCCGUGGGCGUCAUG) was used to target purified Cas9 protein to the *mod-5* locus. The single-strand DNA oligonucleotide oNB322 (TCTAGATATTGTCACGTTGAGGTCATCTGAGC ATCTCGGaGTgTTCCAgGGgTTtgCtCATGACGCCCACGGAACTTCGGAATCCCAAATTTTctgaaat tttattgataaattgaacaa) was co-injected as a repair template with the Cas9 complex to introduce the Cys225Opal nonsense mutation. oNB322 also carries silent polymorphisms used for PCR detection using the oNB325/oNB328 (GCGTCATGaGcaAAcCCc/CAGACGACTGTGGACCCTTC) nucleotide pair. Final sequence validation was performed by Sanger sequencing on homozygous lines using the oNB327/oNB328 (ATCATCGCTCAAGCCGTCTA /CAGACGACTGTGGACCCTTC) primer pair.

## Determination of reproductive schedules and lifetime offspring production (Figure 9)

Lifetime production of (viable) offspring was analysed by isolating mid-L4 hermaphrodites onto individual NGM plates and transferring them daily to fresh NGM plates until egg-laying ceased. The number of live larvae was counted 24–36 hr after each transfer. Larvae in dead mothers were counted once they had exited the maternal body. Alternatively, mothers were squashed between slide and coverslip to count offspring in the uterus. All strains were scored in parallel.

## Analysis of lifespan and internal hatching (Figure 10)

Young adult hermaphrodites (mid-L4 +24 hr) were transferred to NGM plates seeded with fresh E. coli OP50. Individuals were transferred daily onto fresh plates until the end of egg laying, and every 3 days afterwards. Animals were scored as dead if they failed to respond to gentle touch with a platinum wire (N=90–102 individuals per strain, except for QG2873 with N=60).

## Quantification of hermaphrodite self-sperm number (Figure 11—figure supplement 1)

The total number of self-sperm was quantified in age-synchronized young adult hermaphrodites of the JU2593 strain containing between one to six eggs in utero. A single, usually the anterior, spermatheca was imaged at ×60 magnification by performing Z-sections (1 µm) covering the entire gonad (Gimond et al., 2019). Sperm number was determined by identifying condensed sperm nuclei visible in each focal plane using the Fiji plugin Cell Counter (Schindelin et al., 2012). For a given individual, sperm count was assessed for a single gonad arm and then multiplied by two to extrapolate the total sperm count. (N=19 individuals). In parallel, a cohort of individuals in the same experiment was used to count lifetime offspring production.

## Effects of internal hatching on physical integrity of the germline and scoring the presence of sperm (Figure 11, Figure 11—figure supplement 1)

Gravid hermaphrodites were fixed in methanol at different stages of reproductive adulthood and stained with DAPI to check for germline damage and the potential concomitant presence of sperm, unfertilized oocytes, and hatched larvae. Animals were fixed in cold methanol (–20 °C) for at least 30 min, washed three times with PBTw (PBS: phosphate-buffered saline, 137 mM NaCl, 2.7 mM KCl, 10 mM Na2HPO4, 2 mM KH2PO4, pH 7.4 containing 0.1% Tween 20) and squashed on a glass slide with Vectashield mounting medium containing 4,6-diamidino-2-phenylindole (DAPI; Vector
Laboratories, Newark, California, USA). Observations were performed using an Olympus BX61 microscope (N=45-193 individuals per strain).

## Measuring the time until hatching of laid eggs (Figure 12B)

For each strain, 10-20 adult hermaphrodites (mid-L4 +30 hr) were allowed to lay eggs for one hour on NGM plates seeded with *E. coli* OP50 and then removed from plates. The initial number of laid eggs was counted (N=30-170 eggs per strain) and the proportion of non-hatched eggs was determined every 60 min until all eggs had hatched. Mean values represented as bars correspond to the time at which 50% of eggs have hatched.

## Measuring egg-to-adult developmental time of laid eggs (Figure 12C)

For each strain, 10-20 adult hermaphrodites (mid-L4 +30 hr) were allowed to lay eggs for one hour on NGM plates seeded with *E. coli* OP50 (N=77-318 eggs per strain) and then removed from plates. Starting at 40 hr after egg laying, developmental progression of resulting progeny was surveyed using a high-resolution dissecting microscope to determine age at reproductive maturity, defined as the time point at which an animal had one to two eggs in the uterus. Animals that had reached reproductive maturity were progressively eliminated from the plate. Populations were scanned for mature adults every 1-2 hr until all individuals had reached reproductive maturity, that is for a maximum period of 16 hr. Mean values shown in Figure 12C correspond to the time at which 50% of individuals have reached maturity.

## Short-term competition assays (Figure 12D and E)

Short-term competition experiments of JU1200<sub>WT</sub> and JU1200<sub>KCNL-1 V530L</sub> against a GFP-tester strain with genotype starting frequencies of 50:50 were carried out in parallel (Figure 12D). The two strains were competed separately against the GFP-tester strain PD4790, containing an integrated transgene [mls12 (myo-2::GFP, pes-10::GFP, F22B7.9::GFP)] in the N2 background, expressing green fluorescent protein (GFP) in the pharynx (Figure 12D). For each replicate, 20 laid eggs of either genotype were mixed with 20 laid eggs of the GFP-tester strain on a NGM plate; eggs were derived from a one-hour egg-laying window of adult hermaphrodites (midL4 +30 hr). After 4-5 days (when food became exhausted), the fraction of GFP-positive adult individuals was estimated by quantifying the fraction of GFP-positive individuals among a subpopulation of ~200-400 individuals per replicate using a fluorescence dissecting microscope. N=10 replicates per genotype.

Direct competition between JU751 (containing the V530L KCNL-1 variant) and other wild strains (JU651, JU660, JU814, JU820, JU822) isolated from the same compost substrate in Le Perreux-sur-Marne, France (*Barrière and Félix, 2007; Billard et al., 2020; Vigne et al., 2021; Fausett et al., 2022; Figure 12E). For each of the five strains, 20 freshly laid eggs were mixed with 20 freshly laid eggs from JU751 on a NGM plate; eggs were derived from a 1-hr egg-laying window of adult hermaphrodites (midL4 +30 hr). After 4-5 days (when food became exhausted), all adults present on each plate were transferred to fresh plates to allow for growth for 24 hr, after which the strong egg retention phenotype of JU751 was used to infer genotype frequencies (*Vigne et al., 2021*). N=10 replicates per strain.

## Effect of strong egg retention on progeny protection in response to strong environmental stress (Figures 13 and 14)

We examined the differences in survival of eggs and/or larvae developing ex utero versus in utero in response to different environmental stressors. For ex utero exposure, 10 synchronized mid-L4 +36 hr gravid mothers were dissected to extract eggs, which were transferred together to a single spot next to (but not directly on) the bacterial lawn on a single fresh NGM plate. A drop (20 microlitres) of M9 (control) or M9 containing ethanol or acetic acid in indicated concentrations was then deposited directly on eggs, which was absorbed by the agar in ~15 min. For in utero exposure (in parallel to ex utero exposure), 10 synchronized mid-L4 +36 hr gravid mothers were deposited into a drop (20 microlitres) of M9 containing ethanol or acetic acid in indicated concentrations (which was absorbed by the agar in ~15 min). Mothers were killed within a few minutes; no M9 control treatment as live adults can leave the drop rapidly. Forty-eight hr after the treatment, the number of live larval offspring was
counted. For each strain per treatment (ex utero versus in utero), 5–10 replicates were established (Figure 13A and B, Figure 13—figure supplement 1, Figure 14A, Figure 14—figure supplement 1). For experiment shown in Figure 14B and C, single mothers (instead of 10) were picked to individual plates (N=10 per treatment). For the experiment shown in Figure 14C, we used older hermaphrodites (mid-L4 +48 hr) containing larger numbers of internally hatched larvae to compare larval survival ex utero (extracted by dissection) versus in utero (larvae retained in mothers).

## Effect of strong egg retention on progeny development and reproduction in response to mild environmental stressors (Figure 15)

Eggs from adult JU751 hermaphrodites (mid-L4 +36 hr) or L1 larvae from mid-L4 +48 hr mothers were exposed either directly (ex utero) or indirectly (in utero) to mild environmental stressors: hyperosmotic stress (0.3M to 1M NaCl) (Figure 15A and B) and 1 M acetic acid (Figure 15C and D). Eggs were then allowed to hatch and develop for 45 hr, at which time we determined their developmental stages. To calculate differences in developmental maturation, we used a semi-quantitative scoring system (Poullet et al., 2016) to assign each developmental stage a specific index as follows: L3=1; early mid-L4=2; midL4=3; lateL4=4; Adult = 5. Lifetime offspring production of individuals descending from eggs and L1 larvae that had survived environmental insult and reached maturity was assayed as described in the material and methods section for Figure 9.

## Genome-wide association mapping

GWA mapping was performed using the NemaScan pipeline (Cook et al., 2017; Widmayer et al., 2022; Crombie et al., 2023).

## Local haplotype analysis

A neighbour-joining network of a region extending 1 Mb on either side of *kcnl-1* gene were established based on the VCF file dataset of CeNDR release 20220216 including 15 focal strains of a total of 48 isotypes. The region flanking the *kcnl-1* gene was extracted using the vcftools command line and the 48 isotypes from were then extracted using vcfselectsamples command line from galaxy (https://usegalaxy.org). The distance matrix and unrooted neighbour-joining trees were generated using the vk phylo tree nj command-line from the VCF-kit tools (Cook et al., 2017; Widmayer et al., 2022). Tree figures were made using the software iTOL (v5.6.3) (Letunic and Bork, 2019).

## Statistical analyses

Statistical tests were performed using R (R Development Core Team, 2018) and JMP 16.0 software. Data for parametric tests were transformed where necessary to meet the requirements for ANOVA procedures. Box-plots: The median is shown by the horizontal line in the middle of the box, which indicates the 25th to 75th quantiles of the data. The 1.5 interquartile range is indicated by the vertical line.

## Acknowledgements

C. elegans strains and substrate samples were kindly provided by the Caenorhabditis Natural Diversity Resource (CaeNDR), Marie-Anne Félix and Jean-Antoine Lepesant. We thank all students and technicians, including Céline Ferrari, Alex Lassagne, Ghada Bouzouida, Nicolas Schwartz, Matthieu Duval, for contributing to egg retention measurements. We thank the team of Erik Andersen, particularly Sam Widmayer, for helping with GWA mapping procedures. For helpful discussion and comments, we thank Kevin M Collins, Henrique Teotónio and the reviewers and editors. We would also like to thank CaeNDR (https://caendr.org) and WormBase (https://wormbase.org/) for providing resources and tools without which the analyses performed here would not have been possible.
# Additional information

## Funding

<table><thead><tr><th>Funder</th><th>Grant reference number</th><th>Author</th></tr></thead><tbody><tr><td>Agence Nationale de la Recherche</td><td>ANR-22-CE13-0030-02</td><td>Thomas Boulin<br>Christian Braendle</td></tr><tr><td>Agence Nationale de la Recherche</td><td>ANR-17-CE02-0017</td><td>Christian Braendle</td></tr><tr><td>Agence Nationale de la Recherche</td><td>ANR-15-IDEX-01</td><td>Laure Mignerot<br>Christian Braendle</td></tr><tr><td>Centre National de la Recherche Scientifique</td><td></td><td>Laure Mignerot<br>Clotilde Gimond<br>Lucie Bolelli<br>Charlotte Bouleau<br>Asma Sandjak<br>Thomas Boulin<br>Christian Braendle</td></tr><tr><td>Université Côte d'Azur</td><td></td><td>Laure Mignerot<br>Clotilde Gimond<br>Lucie Bolelli<br>Charlotte Bouleau<br>Asma Sandjak<br>Christian Braendle</td></tr><tr><td>Institut National de la Santé et de la Recherche Médicale</td><td></td><td>Thomas Boulin<br>Christian Braendle</td></tr></tbody></table>

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

## Author contributions

Laure Mignerot, Conceptualization, Data curation, Formal analysis, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing; Clotilde Gimond, Conceptualization, Formal analysis, Validation, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing; Lucie Bolelli, Charlotte Bouleau, Asma Sandjak, Investigation, Methodology; Thomas Boulin, Investigation, Methodology, Writing – review and editing; Christian Braendle, Conceptualization, Resources, Formal analysis, Supervision, Funding acquisition, Validation, Investigation, Methodology, Writing – original draft, Project administration

## Author ORCIDs

Laure Mignerot http://orcid.org/0000-0003-3306-6244

Thomas Boulin http://orcid.org/0000-0002-1734-1915

Christian Braendle http://orcid.org/0000-0003-0203-4581

## Peer review material

Reviewer #1 (Public Review): https://doi.org/10.7554/eLife.88253.3sa1

Reviewer #2 (Public Review): https://doi.org/10.7554/eLife.88253.3sa2

Author Response https://doi.org/10.7554/eLife.88253.3sa3

# Additional files

## Supplementary files

* Supplementary file 1. A table of strains used in this study.

* MDAR checklist

## Data availability

All data generated or analysed in this study are included in the manuscript and supporting files. Source data files have been provided for all figures.
## References

Aballay A, Yorgey P, Ausubel FM. 2000. *Salmonella* typhimurium proliferates and establishes a persistent infection in the intestine of *Caenorhabditis elegans*. *Current Biology* **10**:1539–1542. DOI: https://doi.org/10.1016/S0960-9822(00)00830-7

Andersen EC, Gerke JP, Shapiro JA, Crissman JR, Ghosh R, Bloom JS, Félix M-A, Kruglyak L. 2012. Chromosome-scale selective sweeps shape *Caenorhabditis elegans* genomic diversity. *Nature Genetics* **44**:285–290. DOI: https://doi.org/10.1038/ng.1050

Andersen EC, Bloom JS, Gerke JP, Kruglyak L. 2014. A variant in the neuropeptide receptor npr-1 is a major determinant of *Caenorhabditis elegans* growth and physiology. *PLOS Genetics* **10**:e1004156. DOI: https://doi.org/10.1371/journal.pgen.1004156, PMID: 24586193

Andersen EC, Shimko TC, Crissman JR, Ghosh R. 2015. A powerful new quantitative genetics platform, combining *Caenorhabditis elegans* high-throughput fitness assays with a large collection of recombinant strains. *G3: Genes, Genomes, Genetics* **5**:911–920. DOI: https://doi.org/10.1534/g3.115.017178

Aprison EZ, Dzitoyeva S, Ruvinsky I. 2022. The serotonin circuit that coordinates germline proliferation and egg laying with other reproductive functions in *Caenorhabditis elegans Proceedings. Biological Sciences* **289**:20220913. DOI: https://doi.org/10.1098/rspb.2022.0913, PMID: 36448283

Avise J. 2013. *Evolutionary Perspectives on Pregnancy*. Columbia University Press. DOI: https://doi.org/10.7312/columbia/9780231160605.001.0001

Bakker K. 1961. An analysis of factors which determine success in competition for food among larvae of *Drosophila melanogaster*. *Archives Néerlandaises de Zoologie* **14**:200–281. DOI: https://doi.org/10.1163/036551661X00061

Banerjee N, Bhattacharya R, Gorczyca M, Collins KM, Francis MM. 2017. Local neuropeptide signaling modulates serotonergic transmission to shape the temporal organization of *C. elegans* egg-laying behavior. *PLOS Genetics* **13**:e1006697. DOI: https://doi.org/10.1371/journal.pgen.1006697

Barker DM. 1992. Evolution of sperm shortage in a selfing hermaphrodite. *Evolution; International Journal of Organic Evolution* **46**:1951–1955. DOI: https://doi.org/10.1111/j.1558-5646.1992.tb01181.x, PMID: 28567744

Barrière A, Félix MA. 2005. High local genetic diversity and low outcrossing rate in *Caenorhabditis elegans* natural populations. *Current Biology* **15**:1176–1184. DOI: https://doi.org/10.1016/j.cub.2005.06.022, PMID: 16005289

Barrière A, Félix MA. 2007. Temporal dynamics and linkage disequilibrium in natural *Caenorhabditis elegans* populations. *Genetics* **176**:999–1011. DOI: https://doi.org/10.1534/genetics.106.067223, PMID: 17409084

Ben Soussia I, El Mouridi S, Kang D, Leclercq-Blondel A, Khoubza L, Tardy P, Zariohi N, Gendrel M, Lesage F, Kim EJ, Bichet D, Andrini O, Boulin T. 2019. Mutation of a single residue promotes gating of vertebrate and invertebrate two-pore domain potassium channels. *Nature Communications* **10**:787. DOI: https://doi.org/10.1038/s41467-019-08710-3, PMID: 30770809

Billard B, Vigne P, Braendle C. 2020. A natural mutational event uncovers a life history trade-off via hormonal pleiotropy. *Current Biology* **30**:4142–4154. DOI: https://doi.org/10.1016/j.cub.2020.08.004, PMID: 32888477

Blackburn DG. 1999. *Viviparity and Oviparity: Evolution and Reproductive Strategies*. Academic Press.

Blackburn DG. 2015. Evolution of vertebrate viviparity and specializations for fetal nutrition: A quantitative and qualitative analysis. *Journal of Morphology* **276**:961–990. DOI: https://doi.org/10.1002/jmor.20272, PMID: 24652663

Bleu J, Heulin B, Haussy C, Meylan S, Massot M. 2012. Experimental evidence of early costs of reproduction in conspecific viviparous and oviparous lizards. *Journal of Evolutionary Biology* **25**:1264–1274. DOI: https://doi.org/10.1111/j.1420-9101.2012.02518.x, PMID: 22537030

Branicky R, Miyazaki H, Strange K, Schafer WR. 2014. The voltage-gated anion channels encoded by clh-3 regulate egg laying in *C. elegans* by modulating motor neuron excitability. *The Journal of Neuroscience* **34**:764–775. DOI: https://doi.org/10.1523/JNEUROSCI.3112-13.2014, PMID: 24431435

Brewer JC, Olson AC, Collins KM, Koelle MR. 2019. Serotonin and neuropeptides are both released by the HSN command neuron to initiate *Caenorhabditis elegans* egg laying. *PLOS Genetics* **15**:e1007896. DOI: https://doi.org/10.1371/journal.pgen.1007896, PMID: 30677018

Burton NO, Willis A, Fisher K, Braukmann F, Price J, Stevens L, Baugh LR, Reinke A, Miska EA. 2021. Intergenerational adaptations to stress are evolutionarily conserved, stress-specific, and have deleterious trade-offs. *eLife* **10**:e73425. DOI: https://doi.org/10.7554/eLife.73425, PMID: 34622777

Carnell L, Illi J, Hong SW, McIntire SL. 2005. The G-protein-coupled serotonin receptor SER-1 regulates egg laying and male mating behaviors in *Caenorhabditis elegans*. *The Journal of Neuroscience* **25**:10671–10681. DOI: https://doi.org/10.1523/JNEUROSCI.3399-05.2005, PMID: 16291940

Chen J, Caswell-Chen EP. 2003. Why *Caenorhabditis elegans* adults sacrifice their bodies to progeny. *Nematology* **5**:641–645. DOI: https://doi.org/10.1163/156854103322683355

Chen J, Caswell-Chen EP. 2004. Facultative vivipary is a life-history trait in *Caenorhabditis elegans*. *Journal of Nematology* **36**:107–113 PMID: 19262794.

Chen YC, Seyedsayamdost MR, Ringstad N. 2020. A microbial metabolite synergizes with endogenous serotonin to trigger *C. elegans* reproductive behavior. *PNAS* **117**:30589–30598. DOI: https://doi.org/10.1073/pnas.2017918117

Clutton-Brock TH. 1991. *The Evolution of Parental Care*. Princeton University Press. DOI: https://doi.org/10.1515/9780691206981
Collins KM, Bode A, Fernandez RW, Tanis JE, Brewer JC, Creamer MS, Koelle MR. 2016. Activity of the C. elegans egg-laying behavior circuit is controlled by competing activation and feedback inhibition. *eLife* 5:e21126. DOI: https://doi.org/10.7554/eLife.21126, PMID: 27849154

Cook DE, Zdraljevic S, Roberts JP, Andersen EC. 2017. CeNDR, the *Caenorhabditis elegans* natural diversity resource. *Nucleic Acids Research* 45:D650–D657. DOI: https://doi.org/10.1093/nar/gkw893, PMID: 27701074

Crombie TA, Zdraljevic S, Cook DE, Tanny RE, Brady SC, Wang Y, Evans KS, Hahnel S, Lee D, Rodriguez BC, Zhang G, van der Zwagg J, Kiontke K, Andersen EC. 2019. Deep sampling of Hawaiian *Caenorhabditis elegans* reveals high genetic diversity and admixture with global populations. *eLife* 8:e50465. DOI: https://doi.org/10.7554/eLife.50465, PMID: 31793880

Crombie TA, McKeown R, Moya ND, Evans KS, Widmayer SJ, LaGrassa V, Roman N, Tursunova O, Zhang G, Gibson SB, Buchanan CM, Roberto NM, Vieira R, Tanny RE, Andersen EC. 2023. CaeNDR, the *caenorhabditis* natural diversity resource. *Nucleic Acids Res* 45:D650–D657. DOI: https://doi.org/10.1093/nar/gkad887

Cutter AD. 2004. Sperm-limited fecundity in nematodes: how many sperm are enough? *Evolution* 58:651–655. DOI: https://doi.org/10.1111/j.0014-3820.2004.tb01687.x

Daniels SA, Ailion M, Thomas JH, Sengupta P. 2000. egl-4 acts through a transforming growth factor-beta/SMAD pathway in *Caenorhabditis elegans* to regulate multiple neuronal circuits in response to sensory cues. *Genetics* 156:123–141. DOI: https://doi.org/10.1093/genetics/156.1.123, PMID: 10978280

Dempsey CM, Mackenzie SM, Gargus A, Blanco G, Sze JY. 2005. Serotonin (5HT), fluoxetine, imipramine and dopamine target distinct 5HT receptor signaling to modulate *Caenorhabditis elegans* egg-laying behavior. *Genetics* 169:1425–1436. DOI: https://doi.org/10.1534/genetics.104.032540, PMID: 15654117

Desai C, Horvitz HR. 1989. *Caenorhabditis elegans* mutants defective in the functioning of the motor neurons responsible for egg laying. *Genetics* 121:703–721. DOI: https://doi.org/10.1093/genetics/121.4.703, PMID: 2721931

Dey S, Proulx SR, Teotónio H. 2016. Adaptation to temporally fluctuating environments by the evolution of maternal effects. *PLOS Biology* 14:e1002388. DOI: https://doi.org/10.1371/journal.pbio.1002388, PMID: 26910440

Dong MQ, Chase D, Patikoglou GA, Koelle MR. 2000. Multiple RGS proteins alter neural G protein signaling to allow C. elegans to rapidly change behavior when fed. *Genes & Development* 14:2003–2014. DOI: https://doi.org/10.1101/gad.14.16.2003

Evans KS, vanMH, Mcgrath PT, Andersen EC, Sterken MG. 2021. From QTL to gene: C. elegans facilitates discoveries of the genetic mechanisms underlying natural variation. *Trends Genet* 37:933–947. DOI: https://doi.org/10.1016/j.tig.2021.06.005

Fausett S, Poullet N, Gimond C, Vielle A, Bellone M, Braendle C. 2021. Germ cell apoptosis is critical to maintain *Caenorhabditis elegans* offspring viability in stressful environments. *PLOS ONE* 16:e0260573. DOI: https://doi.org/10.1371/journal.pone.0260573, PMID: 34879088

Fausett SR, Sandjak A, Billard B, Braendle C. 2022. Higher-order epistasis shapes natural variation in germ stem cell niche activity. *bioRxiv*. DOI: https://doi.org/10.1101/2022.11.04.515229

Félix MA, Braendle C. 2010. The natural history of *Caenorhabditis elegans*. *Current Biology* 20:R965–R969. DOI: https://doi.org/10.1016/j.cub.2010.09.050, PMID: 21093785

Fenk LA, de Bono M. 2015. Environmental CO2 inhibits *Caenorhabditis elegans* egg-laying by modulating olfactory neurons and evokes widespread changes in neural activity. *PNAS* 112:E3525–E3534. DOI: https://doi.org/10.1073/pnas.1423808112, PMID: 26100886

Fernandez RW, Wei K, Wang EY, Mikalauskaitė D, Olson A, Pepper J, Christie N, Kim S, Weissenborn S, Sarov M, Koelle MR. 2020. Cellular expression and functional roles of all 26 neurotransmitter GPCRs in the C. elegans egg-laying circuit. *The Journal of Neuroscience* 40:7475–7488. DOI: https://doi.org/10.1523/JNEUROSCI.1357-20.2020, PMID: 32847964

Flatt T, Heyland A 2011. Mechanisms of Life History Evolution: The Genetics and Physiology of Life History Traits and Trade-Offs. Oxford University Press.

Frézal L, Félix MA. 2015. C. elegans outside the Petri dish. *eLife* 4:e05849. DOI: https://doi.org/10.7554/eLife.05849, PMID: 25822066

Garsin DA, Sifri CD, Mylonakis E, Qin X, Singh KV, Murray BE, Calderwood SB, Ausubel FM. 2001. A simple model host for identifying Gram-positive virulence factors. *PNAS* 98:10892–10897. DOI: https://doi.org/10.1073/pnas.191378698, PMID: 11535834

Gibson G, Dworkin I. 2004. Uncovering cryptic genetic variation. *Nature Reviews. Genetics* 5:681–690. DOI: https://doi.org/10.1038/nrg1426, PMID: 15372091

Gilbert KJ, Zdraljevic S, Cook DE, Cutter AD, Andersen EC, Baer CF. 2022. The distribution of mutational effects on fitness in *Caenorhabditis elegans* inferred from standing genetic variation. *Genetics* 220:iyab166. DOI: https://doi.org/10.1093/genetics/iyab166, PMID: 34791202

Gimond C, Vielle A, Silva-Soares N, Zdraljevic S, McGrath PT, Andersen EC, Braendle C. 2019. Natural variation and genetic determinants of *Caenorhabditis elegans* sperm size. *Genetics* 213:615–632. DOI: https://doi.org/10.1534/genetics.119.302462, PMID: 31395653

Hall DH, Altun ZF. 2007. C. elegans *Atlas*. Cold Spring Harbor Laboratory Press.

Hapiak VM, Hobson RJ, Hughes L, Smith K, Harris G, Condon C, Komuniecki P, Komuniecki RW. 2009. Dual excitatory and inhibitory serotonergic inputs modulate egg laying in *Caenorhabditis elegans*. *Genetics* 181:153–163. DOI: https://doi.org/10.1534/genetics.108.096891, PMID: 19001289
Hobson RJ, Hapiak VM, Xiao H, Buehrer KL, Komuniecki PR, Komuniecki RW. 2006. SER-7, a *Caenorhabditis elegans* 5-HT7-like receptor, is essential for the 5-HT stimulation of pharyngeal pumping and egg laying. *Genetics* **172**:159–169. DOI: https://doi.org/10.1534/genetics.105.044495, PMID: 16204223

Hodgkin J, Barnes TM. 1991. More is not better: brood size and population growth in a self-fertilizing nematode. *Proceedings. Biological Sciences* **246**:19–24. DOI: https://doi.org/10.1098/rspb.1991.0119, PMID: 1684664

Horváth B, Kalinka AT. 2018. The genetics of egg retention and fertilization success in *Drosophila*: One step closer to understanding the transition from facultative to obligate viviparity. *Evolution; International Journal of Organic Evolution* **72**:318–336. DOI: https://doi.org/10.1111/evo.13411, PMID: 29265369

Horvitz HR, Chalfie M, Trent C, Sulston JE, Evans PD. 1982. Serotonin and octopamine in the nematode *Caenorhabditis elegans*. *Science* **216**:1012–1014. DOI: https://doi.org/10.1126/science.6805073, PMID: 6805073

Jafari G, Xie Y, Kullyev A, Liang B, Sze JY. 2011. Regulation of extrasynaptic 5-HT by serotonin reuptake transporter function in 5-HT-absorbing neurons underscores adaptation behavior in *Caenorhabditis elegans*. *The Journal of Neuroscience* **31**:8948–8957. DOI: https://doi.org/10.1523/JNEUROSCI.1692-11.2011, PMID: 21677178

Johnston WL, Dennis JW. 2012. The eggshell in the *C. elegans* oocyte-to-embryo transition. *Genesis* **50**:333–349. DOI: https://doi.org/10.1002/dvg.20823, PMID: 22083685

Kalinka AT. 2015. How did viviparity originate and evolve? Of conflict, co-option, and cryptic choice. *BioEssays* **37**:721–731. DOI: https://doi.org/10.1002/bies.201400200, PMID: 25904118

Koelle MR. 2018. Neurotransmitter signaling through heterotrimeric G proteins: insights from studies in *C. elegans*. *WormBook* **2018**:1–52. DOI: https://doi.org/10.1895/wormbook.1.75.2, PMID: 26937633

Kopchock RJ, Ravi B, Bode A, Collins KM. 2021. The sex-specific vc neurons are mechanically activated motor neurons that facilitate serotonin-induced egg laying in *C. elegans*. *The Journal of Neuroscience* **41**:3635–3650. DOI: https://doi.org/10.1523/JNEUROSCI.2150-20.2021, PMID: 33687965

Kosinski M, McDonald K, Schwartz J, Yamamoto I, Greenstein D. 2005. *C. elegans* sperm bud vesicles to deliver a meiotic maturation signal to distant oocytes. *Development* **132**:3357–3369. DOI: https://doi.org/10.1242/dev.01916

Kullyev A, Dempsey CM, Miller S, Kuan CJ, Hapiak VM, Komuniecki RW, Griffin CT, Sze JY. 2010. A genetic survey of fluoxetine action on synaptic transmission in *Caenorhabditis elegans*. *Genetics* **186**:929–941. DOI: https://doi.org/10.1534/genetics.110.118877

Large EE, Padmanabhan R, Watkins KL, Campbell RF, Xu W, McGrath PT. 2017. Modeling of a negative feedback mechanism explains antagonistic pleiotropy in reproduction in domesticated *Caenorhabditis elegans* strains. *PLOS Genetics* **13:e1006769. DOI: https://doi.org/10.1371/journal.pgen.1006769, PMID: 28493873

Lee D, Zdraljevic S, Cook DE, Frézal L, Hsu JC, Sterken MG, Riksen JAG, Wang J, Kammenga JE, Braendle C, Félix MA, Schroeder FC, Andersen EC. 2019. Selection and gene flow shape niche-associated variation in pheromone response. *Nature Ecology & Evolution* **3**:1455–1463. DOI: https://doi.org/10.1038/s41559-019-0982-3

Lee D, Zdraljevic S, Stevens L, Wang Y, Tanny RE, Crombie TA, Cook DE, Webster AK, Chirakar R, Baugh LR, Sterken MG, Braendle C, Félix MA, Rockman MV, Andersen EC. 2021. Balancing selection maintains hyper-divergent haplotypes in *Caenorhabditis elegans*. *Nature Ecology & Evolution* **5**:794–807. DOI: https://doi.org/10.1038/s41559-021-01435-x

Letunic I, Bork P. 2019. Interactive Tree Of Life (iTOL) v4: recent updates and new developments. *Nucleic Acids Research* **47**:W256–W259. DOI: https://doi.org/10.1093/nar/gkz239

Loer CM, Rivard L. 2007. Evolution of neuronal patterning in free-living rabbitid nematodes I: Sex-specific serotonin-containing neurons. *The Journal of Comparative Neurology* **502**:736–767. DOI: https://doi.org/10.1002/cne.21288, PMID: 17436291

Mackay TFC, Stone EA, Ayroles JF. 2009. The genetics of quantitative traits: challenges and prospects. *Nature Reviews Genetics* **10**:565–577. DOI: https://doi.org/10.1038/nrg2612

Markow TA, Beall S, Matzkin LM. 2009. Egg size, embryonic development time and ovoviviparity in *Drosophila* species. *Journal of Evolutionary Biology* **22**:430–434. DOI: https://doi.org/10.1111/j.1420-9101.2008.01649.x, PMID: 19032497

Maupas E. 1900. *Modes et Formes de Reproduction Des Nématodes*. Worldcat.

McCarter J, Bartlett B, Dang T, Schedl T. 1997. Soma-germ cell interactions in *Caenorhabditis elegans*: multiple events of hermaphrodite germline development require the somatic sheath and spermathecal lineages. *Developmental Biology* **181**:121–143. DOI: https://doi.org/10.1006/dbio.1996.8429, PMID: 9013925

McMullen PD, Aprison EZ, Winter PB, Amaral LAN, Morimoto RI, Ruvinsky I. 2012. Macro-level modeling of the response of *C. elegans* reproduction to chronic heat stress. *PLOS Computational Biology* **8:e1002338. DOI: https://doi.org/10.1371/journal.pcbi.1002338, PMID: 22291584

Medrano E, Collins KM. 2023. Muscle-directed mechanosensory feedback activates egg-laying circuit activity and behavior in *Caenorhabditis elegans*. *Current Biology* **33**:2330–2339. DOI: https://doi.org/10.1016/j.cub.2023.05.008, PMID: 37236183

Meier R, Kotrba M, Ferrar P. 1999. Ovoviviparity and viviparity in the Diptera. *Biological Reviews* **74**:199–258. DOI: https://doi.org/10.1111/j.1469-185X.1999.tb00186.x

Mok DZL, Sternberg PW, Inoue T. 2015. Morphologically defined sub-stages of *C. elegans* vulval development in the fourth larval stage. *BMC Developmental Biology* **15**:26. DOI: https://doi.org/10.1186/s12861-015-0076-7, PMID: 26066484
Mueller LD, Bitner K. 2015. The evolution of ovoviviparity in a temporally varying environment. *The American Naturalist* **186**:708–715. DOI: https://doi.org/10.1086/683661, PMID: 26655978

Ostrovsky AN, Lidgard S, Gordon DP, Schwaha T, Genikhovich G, Ereskovsky AV. 2016. Matrotrophy and placentation in invertebrates: a new paradigm. *Biological Reviews of the Cambridge Philosophical Society* **91**:673–711. DOI: https://doi.org/10.1111/brv.12189, PMID: 25925633

Padilla PA, Nystul TG, Zager RA, Johnson ACM, Roth MB. 2002. Dephosphorylation of cell cycle-regulated proteins correlates with anoxia-induced suspended animation in *Caenorhabditis elegans*. *Molecular Biology of the Cell* **13**:1473–1483. DOI: https://doi.org/10.1091/mbc.01-12-0594, PMID: 12006646

Pickett CL, Kornfeld K. 2013. Age-related degeneration of the egg-laying system promotes matricidal hatching in *Caenorhabditis elegans*. *Aging Cell* **12**:544–553. DOI: https://doi.org/10.1111/acel.12079, PMID: 23551912

Poullet N, Vielle A, Gimond C, Carvalho S, Teotónio H, Braendle C. 2016. Complex heterochrony underlies the evolution of *Caenorhabditis elegans* hermaphrodite sex allocation. *Evolution; International Journal of Organic Evolution* **70**:2357–2369. DOI: https://doi.org/10.1111/evo.13032, PMID: 27501095

Ranganathan R, Sawin ER, Trent C, Horvitz HR. 2001. Mutations in the *Caenorhabditis elegans* serotonin reuptake transporter MOD-5 reveal serotonin-dependent and -independent activities of fluoxetine. *The Journal of Neuroscience* **21**:5871–5884. DOI: https://doi.org/10.1523/JNEUROSCI.21-16-05871.2001, PMID: 11487610

Ravi B, Garcia J, Collins KM. 2018. Homeostatic feedback modulates the development of two-state patterned activity in a model serotonin motor circuit in *Caenorhabditis elegans*. *The Journal of Neuroscience* **38**:6283–6298. DOI: https://doi.org/10.1523/JNEUROSCI.3658-17.2018, PMID: 29891728

Ravi B, Zhao J, Chaudhry SI, Signorelli R, Bartole M, Kopchock RJ, Guijarro C, Kaplan JM, Kang L, Collins KM. 2021. Presynaptic Gαα (GOA-1) signals to depress command neuron excitability and allow stretch-dependent modulation of egg laying in *Caenorhabditis elegans*. *Genetics* **218**:iyab080. DOI: https://doi.org/10.1093/genetics/iyab080, PMID: 34037773

**R Development Core Team.** 2018. R: A language and environment for statistical computing. Vienna, Austria. R Foundation for Statistical Computing. https://www.r-project.org/

Recknagel H, Carruthers M, Yurchenko AA, Nokhbatolfoghahai M, Kamenos NA, Bain MM, Elmer KR. 2021. The functional genetic architecture of egg-laying and live-bearing reproduction in common lizards. *Nature Ecology & Evolution* **5**:1546–1556. DOI: https://doi.org/10.1038/s41559-021-01555-4, PMID: 34621056

Reiner DJ, Weinshenker D, Thomas JH. 1995. Analysis of dominant mutations affecting muscle excitation in *Caenorhabditis elegans*. *Genetics* **141**:961–976. DOI: https://doi.org/10.1093/genetics/141.3.961

Ringstad N, Horvitz HR. 2008. FMRFamide neuropeptides and acetylcholine synergistically inhibit egg-laying by *C. elegans*. *Nature Neuroscience* **11**:1168–1176. DOI: https://doi.org/10.1038/nn.2186, PMID: 18806786

Sandhu A, Badal D, Sheokand R, Tyagi S, Singh V. 2021. Specific collagens maintain the cuticle permeability barrier in *Caenorhabditis elegans*. *Genetics* **217**:iyaa047. DOI: https://doi.org/10.1093/genetics/iyaa047, PMID: 33789349

Schafer WR, Kenyon CJ. 1995. A calcium-channel homologue required for adaptation to dopamine and serotonin in *Caenorhabditis elegans*. *Nature* **375**:73–78. DOI: https://doi.org/10.1038/375073a0, PMID: 7723846

Schafer WR, Sanchez BM, Kenyon CJ. 1996. Genes affecting sensitivity to serotonin in *Caenorhabditis elegans*. *Genetics* **143**:1219–1230. DOI: https://doi.org/10.1093/genetics/143.3.1219

Schafer WR. 2005. Egg-laying. *WormBook* **1**:7. DOI: https://doi.org/10.1895/wormbook.1.38.1, PMID: 18050396

Schafer WR. 2006. Genetics of egg-laying in worms. *Annual Review of Genetics* **40**:487–509. DOI: https://doi.org/10.1146/annurev.genet.40.110405.090527

Schierenberg E, Junkersdorf B. 1992. The role of eggshell and underlying vitelline membrane for normal pattern formation in the early *C. elegans* embryo. *Roux's Archives of Developmental Biology* **202**:10–16. DOI: https://doi.org/10.1007/BF00364592, PMID: 28305999

Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B, Tinevez JY, White DJ, Hartenstein V, Eliceiri K, Tomancak P, Cardona A. 2012. Fiji: an open-source platform for biological-image analysis. *Nature Methods* **9**:676–682. DOI: https://doi.org/10.1038/nmeth.2019, PMID: 22743772

Schulenburg H, Félix MA. 2017. The natural biotic environment of *Caenorhabditis elegans*. *Genetics* **206**:55–86. DOI: https://doi.org/10.1534/genetics.116.195511, PMID: 28476862

Shyn SI, Kerr R, Schafer WR. 2003. Serotonin and Go modulate functional states of neurons and muscles controlling *C. elegans* egg-laying behavior. *Current Biology* **13**:1910–1915. DOI: https://doi.org/10.1016/j.cub.2003.10.025, PMID: 14588249

Stein KK, Golden A. 2018. The *C. elegans* eggshell. *WormBook* **2018**:1–36. DOI: https://doi.org/10.1895/wormbook.1.179.1, PMID: 26715360

Stevens L, Félix MA, Beltran T, Braendle C, Caurcel C, Fausett S, Fitch D, Frézal L, Gosse C, Kaur T, Kiontke K, Newton MD, Noble LM, Richaud A, Rockman MV, Sudhaus W, Blaxter M. 2019. Comparative genomics of 10 new *Caenorhabditis* species. *Evolution Letters* **3**:217–236. DOI: https://doi.org/10.1002/evl3.110

Stiernagle T. 2006. Maintenance of *C. elegans*. *WormBook* **1**:11. DOI: https://doi.org/10.1895/wormbook.1.101.1, PMID: 18050451

Sudhaus W. 1976. Vergleichende Untersuchungen Zur Phylogenie, Systematik, Ökologie, Biologie Und Ethologie Der Rhabditidae (Nematoda). Zoologica.
Sulston JE, Schierenberg E, White JG, Thomson JN. 1983. The embryonic cell lineage of the nematode *Caenorhabditis elegans*. *Developmental Biology* **100**:64–119. DOI: https://doi.org/10.1016/0012-1606(83)90201-4

Trent C. 1982. *Genetic and Behavioral Studies of the Egg-Laying System of Caenorhabditis elegans*. Massachusetts Institute of Technology.

Trent C, Tsuing N, Horvitz HR. 1983. Egg-laying defective mutants of the nematode *Caenorhabditis elegans*. *Genetics* **104**:619–647. DOI: https://doi.org/10.1093/genetics/104.4.619, PMID: 11813735

Trexler JC, DeAngelis DL. 2003. Resource allocation in offspring provisioning: an evaluation of the conditions favoring the evolution of matrotrophy. *The American Naturalist* **162**:574–585. DOI: https://doi.org/10.1086/378822

Trivers RL. 1974. Parent-Offspring Conflict. *American Zoologist* **14**:249–264. DOI: https://doi.org/10.1093/icb/14.1.249

Van Voorhies WA, Ward S. 2000. Broad oxygen tolerance in the nematode *Caenorhabditis elegans*. *The Journal of Experimental Biology* **203**:2467–2478. DOI: https://doi.org/10.1242/jeb.203.16.2467, PMID: 10903161

Vielle A, Callemeyn-Torre N, Gimond C, Poullet N, Gray JC, Cutter AD, Braendle C. 2016. Convergent evolution of sperm gigantism and the developmental origins of sperm size variability in *Caenorhabditis* nematodes. *Evolution* **70**:2485–2503. DOI: https://doi.org/10.1111/evo.13043

Vigne P, Gimond C, Ferrari C, Vielle A, Hallin J, Pino-Querido A, El Mouridi S, Mignerot L, Frøkjær-Jensen C, Boulin T, Teotónio H, Braendle C. 2021. A single-nucleotide change underlies the genetic assimilation of A plastic trait. *Science Advances* **7**:eabd9941. DOI: https://doi.org/10.1126/sciadv.abd9941, PMID: 33536214

Waggoner LE, Zhou GT, Schafer RW, Schafer WR. 1998. Control of alternative behavioral states by serotonin in *Caenorhabditis elegans*. *Neuron* **21**:203–214. DOI: https://doi.org/10.1016/s0896-6273(00)80527-9, PMID: 9697864

Waggoner LE, Hardaker LA, Golik S, Schafer WR. 2000. Effect of a neuropeptide gene on behavioral states in *Caenorhabditis elegans* egg-laying. *Genetics* **154**:1181–1192. DOI: https://doi.org/10.1093/genetics/154.3.1181, PMID: 10757762

Ward S, Carrel JS. 1979. Fertilization and sperm competition in the nematode *Caenorhabditis elegans*. *Developmental Biology* **73**:304–321. DOI: https://doi.org/10.1016/0012-1606(79)90069-1, PMID: 499670

Weinshenker D, Garriga G, Thomas JH. 1995. Genetic and pharmacological analysis of neurotransmitters controlling egg laying in *C. elegans*. *The Journal of Neuroscience* **15**:6975–6985. DOI: https://doi.org/10.1523/JNEUROSCI.15-10-06975.1995, PMID: 7472454

Weinshenker D, Wei A, Salkoff L, Thomas JH. 1999. Block of an ether-a-go-go-like K(+) channel by imipramine rescues egl-2 excitation defects in *Caenorhabditis elegans*. *The Journal of Neuroscience* **19**:9831–9840. DOI: https://doi.org/10.1523/JNEUROSCI.19-22-09831.1999, PMID: 10559392

White JG, Southgate E, Thomson JN, Brenner S. 1986. The structure of the nervous system of the nematode *Caenorhabditis elegans*. *Philosophical Transactions of the Royal Society of London. B, Biological Sciences* **314**:1–340. DOI: https://doi.org/10.1098/rstb.1986.0056

Whittington CM, Van Dyke JU, Liang SQT, Edwards SV, Shine R, Thompson MB, Grueber CE. 2022. Understanding the evolution of viviparity using intraspecific variation in reproductive mode and transitional forms of pregnancy. *Biological Reviews of the Cambridge Philosophical Society* **97**:1179–1192. DOI: https://doi.org/10.1111/brv.12836, PMID: 35098647

Widmayer SJ, Evans KS, Zdraljevic S, Andersen EC. 2022. Evaluating the power and limitations of genome-wide association studies in *Caenorhabditis elegans*. G3 **12**:jkac114. DOI: https://doi.org/10.1093/g3journal/jkac114, PMID: 35536194

Yue X, Zhao J, Li X, Fan Y, Duan D, Zhang X, Zou W, Sheng Y, Zhang T, Yang Q, Luo J, Duan S, Xiao R, Kang L. 2018. TMC proteins modulate egg laying and membrane excitability through a background leak conductance in *C. elegans*. *Neuron* **97**:571–585. DOI: https://doi.org/10.1016/j.neuron.2017.12.041

Zhang M, Chung SH, Fang-Yen C, Craig C, Kerr RA, Suzuki H, Samuel ADT, Mazur E, Schafer WR. 2008. A self-regulating feed-forward circuit controlling *C. elegans* egg-laying behavior. *Current Biology* **18**:1445. DOI: https://doi.org/10.1016/j.cub.2008.08.047, PMID: 18818084

Zhao Y, Long L, Xu W, Campbell RF, Large EE, Greene JS, McGrath PT. 2018. Changes to social feeding behaviors are not sufficient for fitness gains of the *Caenorhabditis elegans* N2 reference strain. *eLife* **7**:e38675. DOI: https://doi.org/10.7554/eLife.38675, PMID: 30328811