Dynamics of pattern formation and emergence of swarming in Caenorhabditis elegans

Many animals collectively form complex patterns to tackle environmental difficulties. Several biological and physical factors, such as animal motility, population densities, and chemical cues, play significant roles in this process. However, very little is known about how sensory information interplays with these factors and controls the dynamics of pattern formation. Here, we study the direct relation between oxygen sensing, pattern formation, and emergence of swarming in active Caenorhabditis elegans aggregates. We find that when thousands of animals gather on food, bacteria-mediated decrease in oxygen level slows down the animals and triggers motility-induced phase separation. Three coupled factors—bacterial accumulation, aerotaxis, and population density—act together and control the entire dynamics. Furthermore, we find that biofilm-forming bacterial lawns including Bacillus subtilis and Pseudomonas aeruginosa strongly alter the collective dynamics due to the limited diffusibility of bacteria. Additionally, our theoretical model captures behavioral differences resulting from genetic variations and oxygen sensitivity.


Introduction
Some animals have remarkable abilities to form complex patterns to cope with environmental challenges [1][2][3][4][5][6][7][8][9] . Formation of these biological patterns is particularly initiated by aggregation. At high population density, animals tend to aggregate as animal to animal interactions cause instability in uniform distribution [9][10][11][12] . Different factors such as motility of animals and chemical cues can trigger these instabilities by altering the behavior of animals. In particular, sensory information plays a primary role in controlling behaviors. Elucidating how environmental factors interplay with the sensory information is essential to improve our understanding of pattern formation in biological systems. However, this is a challenging problem in complex organisms.
Nematode Caenorhabditis elegans allows the use of sophisticated experimental tools and the results provide very precise information regarding the relation between genes, neural circuits, and behaviors [13][14][15][16] . This study is motivated by the possibility of developing a platform that combines both neuronal information and the collective dynamics in this model system.
Oxygen sensitivity is particularly the main source of the variation. Laboratory strain (N2) is known to be solitary nematode with a broad range of oxygen preference while natural isolates exhibit strong aggregation and sharp aerotaxis 27,30 . Further, oxygen sensing, feeding and aggregation behavior are all intricately related in C. elegans. Bacteria utilize oxygen for growth and C. elegans seeks low oxygen levels for locating the bacteria. However, in a dense population, all these factors become extremely coupled [31][32][33] . In this study, we aimed to develop a general model dealing with the dynamics of all these factors.
Here, we report that, C. elegans including the laboratory strain (N2), forms complex patterns during feeding. When thousands of worms are forced to feed together, aggregation-induced bacterial accumulation and oxygen depletion create unstable conditions and further trigger phase separations. The principle of phase separation is mainly based on sudden change in the animal's motility 11,34 . We also found that the dynamics of the entire process is controlled by the sensitivity of the oxygen-sensing neurons, which gives rise to strong variations in animals' collective response. Finally, we also observe the convergence of self-organized patterns to the motile swarming body as a result of complex interactions between oxygen diffusion, bacterial consumption, and motility of animals.

Results
To investigate the collective response of C. elegans, we began by imaging animals during food search in a crowded environment. We collected thousands of animals (N2) in a droplet and let it dry on an agar plate. The droplet was put a few centimeters away from food. After drying, worms spread and searched for food by tracing the attractive chemicals. This experimental procedure allowed us to increase the worm density around a bacterial lawn to observe their collective movement. When animals found the bacteria, they usually slowed down and penetrated the lawn.
However, we observed that, at high densities the majority of the worms did not penetrate the lawn.
After reaching the lawn, they suddenly stopped and started accumulating (Fig. 1a). As the worms accumulated, they formed a huge aggregate which covered the entrance. Eventually, this large aggregate gained motility and swarmed across the lawn (Fig. 1a, 1b, 1c, Supplementary Video 1).
This observation was quite different from the previously reported response of the reference strain N2 which generally behaves solitarily 17,32 . Further, we tested different mutant strains deficient in several sensing mechanisms and essential neuromodulators; we observed similar aggregation and swarming response in a wide range of animals (Supplementary Figure 1). We also used various types of food sources including B. Subtilis biofilm, filamentous bacteria, or extremely thick bacterial lawns. Surprisingly, animals showed very rich collective response ranging from complex pattern formations to large scale swarming (Fig. 1d, 1e, 1f, Supplementary Figure 2). Altogether, these results suggest that the conditions observed in a dense population can broadly trigger the collective response in C. elegans.
This collective response only occurs on a bacterial lawn. Previous studies reported the same conditions for aggregating strains 17,32 . However, how the presence of bacteria contributes to this process is unclear. To clarify this point, we used GFP expressing bacteria (OP50 GFP) to follow the entire dynamics. Time-lapse fluorescence microscopy revealed that the bacteria are concentrated within the aggregates. This bacterial accumulation further promotes the collective behavior of animals (Fig. 1f, SupplementaryFigure 3, Supplementary Video 2, 3). Following the accumulation of bacteria, the motility of animals is strongly suppressed. The naïve hypothesis explaining this observation is that the process is mainly based on the capillary meniscus around the animals 35,36 . When animals form aggregates, the structure becomes porous. Thus, due to the capillary effect, the porous aggregate can hold more bacterial suspension. Eventually, concentrated bacteria could make the formation of aggregate more favorable by conditioning the oxygen levels.
We can conclude that concentrated bacteria is the primary factor triggering the formation and the maintenance of the aggregation. npr-1 suppressed its motility around intermediate oxygen levels (7-10%)and showed a sharp response when oxygen levels exceeded 15%. In contrast, N2 suppressed its motility in more broader range of oxygen levels, but their velocity slowly increased as [O2] reached 21% or more.
These differences appear to be originating from the sensitivity of the oxygen-sensing neurons URX that shape the overall oxygen preferences of the animals 26,28,37 . Although both npr-1 and N2 perform aerotaxis at 7-10% oxygen, N2 show weaker aerotactic response, thus, they have broader range of oxygen preference. All these critical features of the strains can be extracted from oxygendependent response curve V(O) which is directly related to neuronal sensitivity. npr-1 Low High Motility suppression behavior has been observed in a variety of organisms ranging from bacteria to mussels 34,[38][39][40][41][42][43] . Generally, animals tend to slow down when they come together. The entire process is represented by the density dependence of the animal movement which can lead to the formation of patterns. However, in C. elegans we observed indirect density-dependent suppression. Without bacteria, animals move fast (Fig. 2b). In striking contrast, the presence of bacteria results in oxygen depletion and motility suppression. These findings suggest that in the dynamics of oxygen, bacterial concentration and animal motility are the essential physical factors controlling collective behaviors of C. elegans.
To gain a more quantitative representation of pattern formation, we developed a mathematical model. We followed the notation and the framework developed for active chemotactic particles 44 .
We set two separate differential equations to represent worm density (W) and oxygen kinematics (O) in two-dimensional space. V(O) is the oxygen-dependent motility response of individual animals. This factor served as an experimentally measurable sensory curve of the animals. This curve defines competition between diffusivity and aerotactic motility. Both effects became minimal around the optimum oxygen level (7-10 %) at which the animals were almost in a stationary phase (Fig. 2b). In low oxygen region, dispersion and reversal of aerotaxis promoted motility. On the other hand, at high oxygen levels, aerotaxis dominated the dynamics and promoted aggregation (Fig. 2c). These are the Keller-Segel like equations 45 aggregates, stripes, and holes (Fig. 2d). These are the basic patterns that are frequently seen in many biological systems 11,47 .

Figure 3: Combinatorial effect of ambient oxygen and worm density. a Schematics show the response of worm aggregates to changing ambient oxygen levels. As oxygen level increases, the size of the clusters shrink and form circular aggregates which balance the oxygen penetration and diffusion. b Measured oxygen concentration in worm aggregates. The dashed red line shows the ambient oxygen level. c, d Simulation and experimental results of pattern formation under various worm densities and ambient oxygen levels. Patterns are formed when the instability criterion is satisfied. The instability zone is bounded by the uniform stable population.
Our simulations also predict that under low aerotactic response, the increase in population density could complement the instability criteria and give rise to pattern formation. This is because the  similar patterns even at low population density. We tested this hypothesis experimentally (Fig. 2e, 2f, Supplementary Video 9, 10) and found that N2 forms stripes and hole-like patterns only at high population density, whereas npr-1 could form small aggregation patterns even at a low density.  Figure 8, Fig. 3c). We noticed that patterns formed by N2 strain did not change significantly during oxygen scans (Supplementary Figure 9). This was expected, because N2 exhibits low and almost flat aerotactic response within the same range of oxygen levels.
We further explored the combinatorial effects of oxygen and worm density on pattern formation.
As predicted by the instability criterion, in a 2-dimensional parameter space, the onset of dot, stripe and hole patterns is observed around the zone bounded by high and low uniform animal densities ( Fig. 3d, 3e). Increase in worm density or decrease in ambient oxygen levels transforms the dotshaped structure to stripe and hole patterns. The main intuition behind the pattern evolution can be captured by analyzing the oxygen kinematics. Aggregates with circular shapes minimize the perimeter and decrease the lateral surface diffusion of the oxygen from the side. However, elongated shapes can increase the perimeter and oxygen diffusion in a fixed surface area.
The other interesting feature of the pattern formation is the coarsening event. We sought to know how the shape of the patterns evolves in time at a fixed oxygen level. Our time-lapse imaging validates the coarsening (Fig. 4a-c). Interestingly, in later stages, patterns merge and form very large aggregates. This type of coarsening shares visual similarities with our initial swarming experiments (Fig. 1a, 1b). We noticed that in both cases, the consumption of bacteria is significant and may cause an additional impact on the collective dynamics. The similar effect of bacterial depletion was also proposed to explain the motion of the aggregating strain npr-1 25 . To investigate the details, we measured the bacterial concentration. GFP signal revealed different bacterial concentrations across the swarm; the front edge of the swarm has more bacteria than the back (Fig.   4d-f). Worms in the swarm consumed bacteria and the food continually diffused from the front edge towards the back. As the swarm grows, the gradient profile gradually extends into the swarming body with the average decay length of around 3-4 mm (Fig. 4g, 4h).
Next, we tested whether this concentration profile could change the activity of the animals. The activity of the animals increased towards the back which suggests that the animals crawling at the front edge encountered more bacteria than those at the back. To quantify the activity profile, we measured the mean velocity of animals using Particle Image Velocimetry (PIV) analysis. Indeed, the velocity increased towards the back (Supplementary Figure 10). This response is consistent with our V(O) curve where the animals perform off-food response. Without availability of bacteria, animals start moving fast. On the whole, due to the balance between bacterial consumption and diffusion, swarm body gains motility and moves across the bacterial lawn (Supplementary Figure   11).

Discussion
The dynamics of pattern formation in biological systems depend on many intricately related factors. The theory of pattern formation in active particles provides a powerful framework to explain the complex interactions between these factors 38,44 . Using Keller-Segel model 45,46 and motility-induced phase separation principles 11,34 , our study throws light upon new physical and biological insights of this complex dynamics. Our results revealed four essential factors of pattern formation. First, hydrodynamic interactions between worms initiate the process of bacterial accumulation within the aggregates, which is the first, and a critical step in the pattern formation.
Second, oxygen dependent motility of the animals controls the competition between aerotaxis and animal dispersion. This competition links the neuronal sensitivity to the collective response of the animals. Third, the population density can compensate the neuronal sensitivity to convert the behavior of solitary animals to aggregation. Finally, a gradient profile is formed across the aggregate due to the consumption of bacteria, which leads to the initiation of forward motility and swarming behavior. Altogether, experimental results and mathematical models of this study may lead to future studies, which will further aid us in understanding the complex dynamics of biological systems and in designing a new generation of collective robots 48,49 .

C. elegans strains
Strains were grown and maintained under standard conditions unless indicated otherwise. All the strains were obtained from Caenorhabditis Genetics Center (CGC).

Swarming protocol
Nematode growth media (NGM) plates having diameter of 9 cm were used for maintaining the worms. NGM plates were seeded with 1 ml of OP50 culture. After the worms consumed the bacteria, three NGM plates were washed with 1× M9 buffer and the wash was centrifuged twice at 2000 rpm for 30 seconds. Centrifugation was repeated (up to six times) until a clear supernatant was obtained. Since multiple centrifugation cycles might affect the activity of worms, the cycles subsequent to the first two cycles were carried out for 10 seconds at 2000 rpm. After cleaning the worms, a 150 µl l worm droplet was put on a 6 cm plate seeded with 100 µl (0.5 × 1 cm) of OP50 culture. The swarming pattern of the worms was observed from day one to day twelve of the experiment. The optimum swarming pattern was observed in six days old plates and hence six days old plates were used in all further experiments unless indicated otherwise. For NGM plates, M9 buffer preparation and worm synchronization was done based on the standard protocols given in the wormbook.

Effect of Oxygen levels on Swarming
A plexiglass chamber was used to control the ambient [O2] (Supplementary Figure 6). A 50 sccm mixture of O2 and N2 was used and flow rates were controlled by a flow controller.
[O2] was measured by using a normal oxygen sensor (PreSens, Microx TX3). At the beginning of the swarming experiments, the oxygen levels in the chamber were adjusted to 21%. After swarming was first observed, oxygen levels were sequentially decreased to 10%, 7%, 3%, and 1% at an interval of ten minutes. Then, oxygen levels were increased in reverse order. The experiments were recorded using Thorlabs DCC1545M CMOS camera with a Navitar 7000 TV zoom lens.