Introduction

Microorganisms inhabit a variety of complex confined environments. Sperm swimming in the reproductive tract of a female animal (1), bacteria navigating through host cells and tissues (2), cells moving in the wrinkle of biofilm (3), and swarm cells maneuvering in crowded cell clusters (4) are all examples of organisms operating in geometrically confined environments. Furthermore, many diseases have been found to be related to bacterial motion in confinement, such as urinary tract infections and neonatal sepsis.

Previous research has explored the motion of bacteria in confined environments. Studies have shown that flagellated bacteria tend to accumulate near both solid-liquid (5, 6) and air-liquid interfaces (7), and exhibit a specific direction of circular swimming (8). For example, E. coli swim clockwise when observed from above a solid surface (8-11). Moreover, Tang et al. found that flagellated bacteria orbit within the thin fluid film around micrometer-sized particles (12). Bacteria also display different motion behaviors in porous media and tubes (13-19), as well as in other types of confinement (20-22).

E. coli can sense and move in chemical gradients through a set of chemotactic proteins (23, 24). The transmembrane chemoreceptors detect attractants or repellents and transmit signals into the cell by changing the concentration of the response regulator protein CheY-P (24-27). CheY-P binds to the cytoplasmic domain of flagellar motors, altering the probability of their clockwise rotation (28, 29). Clockwise and counterclockwise rotations of motors lead to reorientation (tumble) and smooth swimming (run) modes of the cell body, respectively (30). The adaptation enzymes CheR and CheB(p) methylate and demethylate the receptors, respectively, facilitating adaptation (31, 32).

Research has shown that bacterial chemotactic drift velocity decreases sharply near sample chamber surfaces compared to bulk liquid, a phenomenon attributed to circular cell movement at these interfaces (33). This observation suggests that surface effects can significantly impair bacterial chemotactic performance. However, a study of chemotaxis in two-dimensional bacterial swarms on semisolid agar surfaces has demonstrated that E. coli can exhibit effective chemotaxis in attractant gradients, especially at high cell densities (4). This apparent contradiction is likely due to cell-cell interactions mitigating surface effects in dense populations. While previous studies have investigated bacterial motility in confined environments, especially under surface effects, research on chemotaxis under these conditions remains limited.

Here, we study the chemotaxis of E. coli on surfaces within lanes of different widths, exposed to a linear concentration gradient of L-aspartate using a hydrogel-based microfluidic device. Our findings reveal enhanced chemotactic performance in the presence of sidewalls compared to their absence. Cells in the middle area (MA) exhibited no drift and did not contribute to overall chemotaxis. However, cells near the left sidewall (LSW) and right sidewall (RSW) demonstrated negative and positive drift, respectively, with the positive drift velocity from the RSW exceeding the negative drift velocity from the LSW.

Furthermore, by comparing lanes of different widths within the same stable linear gradient field, we observed that cells exhibited the highest drift velocity in 8 μm-wide lanes, which approximates the peak value in the distribution of circular swimming radii on surfaces. This optimal width for maximal chemotaxis resulted from the largest percentage of cells occupying the right sidewalls. Stochastic simulations of bacterial chemotaxis corroborated that the optimized lane width varies with the bacteria’s circular swimming radius. Our findings have important implications for the screening of swimming organisms and the study of chemotactic behavior in real-world scenarios.

Results

Chemotaxis of E. coli within lane confinements

To study bacterial chemotaxis in confined environments such as tubes or interstitial tissues, we developed a hydrogel-based microfluidic device featuring lanes of different widths. The device design, illustrated in Fig. 1A, incorporates two 2% (w/v) agarose walls inserted between three main channels: a sink channel, a cell channel, and a source channel. These walls prevent cell passage while allowing chemical diffusion. The agarose walls and main channels measure 100 μm and 400 μm in width, respectively, with the device having a depth of 30 μm.

A. Microfluidic device used in the experiment (top view). B. Thirty bacterial trajectories selected from the data of 44-μm-wide lane in gradient assays. C. The relationship between Δx and Δt calculated from all trajectories in the lanes with a width of 44 µm. The black dots represent the gradient assay (c=0.05 μM/μm) with a total of 3206 tracks from 6 movies, while the gray dots represent no gradient (∇c=0) with a total of 4755 tracks from 10 movies. The light-yellow and light-blue shadows represent the standard error of the mean (SEM) of different trajectories in the gradient assays and the control assays, respectively. Linear fitting was performed to obtain Vd = 1.6 ± 0.3 μm/s (black solid line) and Vd = 0.2 ± 0.2 μm/s (gray solid line) for gradient and control assays respectively. Error in drift velocity represents standard deviation.

We established a linear concentration gradient (0.05 μM/μm) of L-aspartate, an attractant sensed by the Tar receptor, by flowing motility medium through the sink channel and 50 μM L-aspartate solution (prepared in motility medium) through the source channel at a constant rate of 10 μL/min. The resulting gradient across the cell channel is depicted in Fig. S1.

The lanes of various widths were created using parallel PDMS (polydimethylsiloxane) pillars spaced at different distances. Each lane, approximately 160 μm in length, is highlighted by a yellow rectangular box in Fig. 1A. E. coli cells, confined to the cell channel, sensed the attractant gradient and performed chemotaxis within these lanes of different widths.

To enhance imaging contrast, we introduced a plasmid expressing mCherry fluorescent protein (pTrc99a-mcherry) into wild-type Escherichia coli HCB1, denoting it as HCB1-pTrc99a-mcherry. A high-sensitivity CMOS camera was used to record bacterial movement trajectories on the bottom surfaces of the lanes in the cell channel, where most cells accumulate.

We recorded the movement of HCB1-pTrc99a-mcherry cells on the liquid-glass surface of a 44-μm-wide lane with and without a L-aspartate concentration gradient, respectively. An example video is shown in Movie S1, and several representative trajectories are illustrated in Fig. 1B.

We then calculated the drift velocities vd of the trajectories from both assays along the x-direction (up-gradient) by fitting the relation ⟨x(i+n)−x(i)⟩∼nΔt(n=1, 3, 5, …, 39) with a linear function, the slope of which is the drift velocity. Here, x(i) represents the cell’s x-position in the i-th frame, and Δt denotes the time interval between two frames (0.05 s). As shown in Fig. 1C, the drift velocity vd was 1.6±0.3 μm/s and 0.2±0.2 μm/s (mean±SD) for the gradient and control (no-gradient) assays, respectively. Thus, bacteria in the L-aspartate gradient exhibited obvious chemotaxis on the lane surfaces, contrasting with previous findings on liquid-solid surfaces without sidewalls (33).

The cells in the right sidewall region dominated the chemotaxis of E. coli within lane confinements

To elucidate the mechanism of bacterial chemotaxis within lane confinements, we analyzed cell trajectories, identifying three distinct motion states due to the presence of sidewalls. As illustrated in Fig. 2A, cells exhibited straight-line swimming along sidewalls, movement towards or away from sidewalls, or circular swimming. Fig. 2B displays three representative trajectories. Circular swimming is characteristic of typical E. coli surface motion (8).

A. Schematic drawing of three typical motion states. B. Trajectories for three typical motion states. Red dots represent the start of each trajectory. C. Calculating the rotational exponent for each trajectory, γR, by fitting the mean-squared orientational displacement ⟨MSOD⟩. Dots were experimental data calculated from the tracks in Fig. 2B. Solid lines were fitting results with . The fitted γR values are 0, 0.77, and 1.80 for gray, brown, and black tracks, respectively. D. Relationship between the rotational exponent γR and the mean y position of the bacterial trajectories. Errors denote SEM. Red and purple shaded area represent the region 3 μm from the LSW and RSW, respectively. Green shaded area represents the MA region. E&F. Normalized distribution of tumble angle for tracks along the sidewalls (E) and in the MA region (F). Red solid lines are fitting results with an exponential function: y = a * exp(x/b). G. Distribution of bacteria along the y-axis in the lanes with a width of 44 μm. The shades of different colors denote the same meaning as in Fig. 2D. H. Drift velocity of bacterial cells in the three regions. I. Proportions of bacterial trajectories in the three regions. Errors are standard deviations (SD).

We distinguished these motion states by calculating the rotational exponent (γR) for each trajectory, fitting the mean-squared orientational displacement ⟨MSOD⟩ for τ < 0.4 s:

where θ(t) is the angle between the swimming direction and the positive x-axis direction at time t, τ is the lag time, CR is a constant, and γR is the rotational exponent. Fig. 2C shows the γR values for the three trajectories in Fig. 2B, while Fig. 2D illustrates the relationship between γR and average y-coordinate. Trajectories further from sidewalls exhibit larger γR, indicating more curved paths, while γR decreases sharply as the cells approach sidewalls, representing straighter trajectories.

We also analyzed tumble kinematics for cells swimming along and away from sidewalls. Fig. 2E and 2F show normalized tumble angle distributions for cells in sidewalls (SW) and middle areas (MA), respectively. Red solid lines represent exponential function fits y = a * exp(x/b), with fitted b values of 0.25 rad (SW) and 1.35 rad (MA). Consistent with previous reports, we observed a higher occurrence of large reorientation angles for surface-swimming cells in the MA region (Fig. 2F). Interestingly, we also found large tumble angles in the SW region, albeit with a smaller characteristic angle than in the MA region. Movie S2 demonstrates an example of a large reorientation angle during tumbling.

Given the strong spatial dependence of trajectory characteristics, we classified the cells into three distinct populations. The distribution of cells along the y-axis is shown in Fig. 2G. Based on mean distances from the sidewalls, we divided the lane into three areas (viewing along the positive x-axis): the left sidewall (LSW), the middle area (MA), and the right sidewall (RSW). As shown by different shaded colors in Fig. 2D and 2G, we defined cells in LSW, RSW and MA for trajectories with ⟨y⟩ ≤ d, ⟨y⟩ ≥ wd, and d < ⟨y⟩ < wd, respectively. The threshold d was set at 3 µm (approximately the average length of a cell body), and w represents the lane width. The proportion of trajectories in different regions is shown in Fig. 2I. For the gradient assay, the probabilities of trajectories being in LSW, MA and RSW regions were 0.20 ± 0.01, 0.59 ± 0.02, and 0.21 ± 0.03, respectively. In the control assay without gradient, these values were 0.18 ± 0.03, 0.70 ± 0.03, and 0.12 ± 0.01, respectively.

We then compared the drift velocity of cells in the three areas separately for both gradient and control assays. As shown in Fig. 2H, cells in the LSW region tended to display a negative drift with and -5.0 ± 2.0μm/s for gradient and control assays, respectively. Cells in the MA region exhibited minimal drift with and 0.4 ± 0.6 μm/s for gradient and control assays, respectively. Cells in the RSW region displayed a typical positive drift with μm/s and 6.2 ± 1.9 μm/s for gradient and control assays, respectively. Thus, cells in the RSW region dominated the difference in drift velocity between the two assays.

In summary, cells swim on the right-hand side under the effect of the bottom surface of lanes (9). The LSW and RSW cells swim down and up the gradient, respectively, while MA cells swim in circles without any drift. RSW cells demonstrated more persistent swimming towards the attractant in the L-aspartate gradient, exhibiting a higher positive drift velocity. Detailed information on the difference in drift velocity between LSW and RSW cells can be found in the supplemental materials. Notably, the attractant gradient minimally affects the ratio of bacteria in different regions.

The dependence of chemotactic performance on lane width

Having established that E. coli chemotaxis on lane surfaces is closely related to sidewall confinement, we investigated chemotaxis in lanes of different widths to mimic bacterial chemotactic behavior in interstitial tissues or tubes of varying sizes. We compared five lanes with widths of 6 μm, 8 μm, 10 μm, 25 μm, and 44 μm. Drift velocity was calculated using the same method as in Fig. 1C, with results shown in Fig. 3A. The mean drift velocities were 1.8 ± 1.3 μm/s, 7.5 ± 1.4 μm/s, 4.6 ± 1.7 μm/s, 2.5 ± 0.5 μm/s, and 2.6 ± 0.4 μm/s for lanes of width 6 μm, 8 μm, 10 μm, 25 μm, and 44 μm, respectively. Bacteria exhibited optimal chemotaxis (highest drift velocity) in lanes that were 8 μm wide.

A. The drift velocity for the experiments in lanes of different widths. The error in drift velocity is the standard deviation. B. The distribution of the radius of circular swimming from 382 trajectories in the MA regions. The peak value of the radius is ∼10 μm. C. The swimming speed of cells in lanes with different widths. The mean swimming speeds and standard deviations for lanes with widths of 6 µm, 8 µm, 10 µm, 15 µm, 25 µm, and 44 µm are 22.7 ± 8.7 µm/s, 25.4 ± 7.7 µm/s, 27.1 ± 7.9 µm/s, 21.9 ± 7.8 µm/s, 22.1 ± 7.7 µm/s, and 22.6 ± 7.5 µm/s, respectively.

Noting that this optimal width is of the same order of magnitude as the radius of bacterial circular swimming on a solid surface, we measured the radius of circular swimming for cells in the MA region. As shown in Fig. 3B, the peak radius in the distribution of circular swimming radii is ∼10 μm, which is close to the lane width supporting optimal chemotaxis.

It has been reported that bacteria swimming in capillaries of different radii possess different swimming speeds (34). Therefore, we calculated the cell swimming speeds for all lane widths. As shown in Fig. 3C, swimming speed remains relatively constant across different lane widths. This indicates that the optimized chemotaxis is not a result of varying swimming speeds.

The optimal chemotaxis resulted from more cells moving towards the attractant along the right sidewall

To identify the underlying mechanism of optimal lane width for chemotaxis, we evaluated the drift velocity for cells in the LSW, MA, and RSW regions separately. The results are shown in Fig. 4A. Cells in the MA region did not exhibit effective drift, while LSW and RSW cells demonstrated negative and positive drift, respectively, consistent with the findings in Fig. 2H. The drift velocity for RSW cells increased with lane width, and remained relatively constant above a lane width of 8 μm, thus not exhibiting a highest value in the 8 μm-wide lanes. Therefore, the width-dependent optimal chemotaxis is not attributable to an optimal drift velocity for RSW cells.

A. Mean drift velocities in the LSW, MA, and RSW regions of lanes with different widths. The errors are SD. B. The proportion of bacterial cells in the LSW, MA, and RSW regions of lanes with different widths. Errors represent SD. C. The proportion of RSW-UG (cells swimming up-gradient in the RSW) and RSW-DG (cells swimming down-gradient in the RSW) for lanes with different widths.

We then sought a comparison of cell proportions in the three areas, as plotted in Fig. 4B. The proportion of cells in the MA region increased gradually with lane width due to the increase in area. Notably, the largest proportion of RSW cells appears in the 8 μm-wide lane. In other words, the lane width-dependent optimal chemotaxis primarily resulted from changes in cell numbers on the sidewalls.

To further investigate changes in up- and down-gradient cell numbers in the RSW region, we calculated the proportion of RSW-UG (cells swimming up-gradient in the RSW) and RSW-DG (cells swimming down-gradient in the RSW) cells. As shown in Fig. 4C, more cells moved towards the attractant in the 8 μm-wide lane. Thus, the optimal chemotaxis in the 8 μm-wide lane resulted from a higher number of cells moving towards the attractant along the right sidewall.

Simulation of E. coli chemotaxis within lane confinements

To explore the relationship between the circular swimming of bacteria on lane surfaces and optimal chemotaxis, we simulated two-dimensional chemotaxis of bacteria with varying circular swimming radii on lanes of different widths in a steady linear gradient of L-aspartate.

In our simulation, cells were treated as self-propelled particles performing a random walk in a run-and-tumble mode within a two-dimensional space. Cells could be in either a run or tumble state, determined by the intracellular chemotaxis signal. During a run, cells swam smoothly at a constant speed of 20 μm/s. The effect of the bottom surface on bacterial swimming was modeled by adding a directional bias term to the swimming direction:

where θ denotes the angle between the swimming direction and the positive x-axis, Δt is the time step, bdirection is the directional bias coefficient, Dr is the rotational diffusion coefficient, and n(0, 1) represents a random number drawn from a standard normal distribution. When cells collided with sidewalls, their velocities instantly aligned with the sidewall, and could potentially leave the sidewall after their next tumble. During a tumble, cells stopped moving, and their swimming direction changed. The change in θ was selected from the distribution of tumble angles observed in Fig. 2E and F for different areas.

Initially, 100 cells were evenly distributed on the surface of a lane measuring 160 μm in length and w in width. A linear concentration gradient of L-aspartate, identical to the experimental conditions, was established along the x-axis according to:

with the concentration c in μM and the position x in μm. The simulation for each set of parameters ran for 150 s with a timestep of 0.05 s and was repeated 50 times.

Figure 5A illustrates the relationship between chemotactic drift velocity and lane width for cells with a 10 μm-radius circular swim. The highest drift velocity was observed at a lane width of 8 μm. Figure 5B shows the proportions of cells in the three regions (LSW, MA, RSW) for different lane widths, presenting profiles similar to those observed experimentally in Fig. 4B. Results for different swimming radii are presented in Fig. 5C, demonstrating that the optimal lane width for chemotaxis is closely related to the radius of circular swimming.

Simulation of bacterial chemotaxis on the surface of lanes. A. The relationship between drift velocity Vd of cells with 10 μm-radius circular swim and the lane width w. Errors denote SEM. B. The proportion of bacterial trajectories in the LSW, MA, and RSW regions of lanes with different widths, for cells with 10 μm-radius circular swim. C. The drift velocity Vd of cells with different radii of circular swim in lanes of different widths. D. The relationship between circular swim radius and lane width for optimal chemotaxis (maximal drift velocity) in Fig. 5C. The widths were extracted by fitting the peak value of w in Fig. 5A with a gaussian function. The red solid line represents a linear fit. The slope is 0.66 ± 0.03. Errors denote SD.

As shown in Fig. 5D, the relationship between optimal lane width (w) and circular swimming radius (r) was fitted with a linear function w = kr, with k = 0.66 ± 0.03. This indicates a clear proportional relationship between the lane width for optimal chemotaxis and the circular swimming radius of bacteria.

Geometrical analysis of optimal lane width for chemotaxis

We have established that the optimal lane width for chemotaxis (8 μm) primarily results from a higher proportion of cells in the RSW region swimming up-gradient. Additionally, this optimal width is directly proportional to the circular swimming radius of the bacteria. To further elucidate the underlying mechanism of this phenomenon, we employed geometrical analysis.

We assumed an initial uniform distribution of cells across the lane width. As shown in Fig. 6A-C, we divide the width of the lane into three scenarios:

Geometrical analysis of optimal lane width for chemotaxis. A. Case 1: 0 < wr. B. Case 2: r < w ≤ 2r. C. Case 3: w > 2r. The red arrows denote the velocity direction. The black solid lines represent the sidewalls. Dashed circles are trajectories. The up-gradient direction is along the positive x-axis. The green shade areas label the swim direction of cells that can swim up-gradient in the RSW. D. Relationship between probability (P) of cells swimming up-gradient in the RSW and m, where m = w/r. Red shaded area denotes m for maximal P, m ∈ (0.7,0.8).

  1. 0 < wr: For a cell at any point P in the channel, its swimming direction can be arbitrary. However, only cells swimming in directions between θ1 and θ2 (highlighted in green) can swim up-gradient in the RSW after their first collision with the sidewall. The proportion of these cells can be calculated as:

    where m = w/r ≤ 1.

  2. r < w ≤ 2r: Only the cells in the region y < r and with velocity direction between θ1 and θ2 can swim up-gradient in the RSW after their first collision with the sidewall. The proportion of cells in this region is:

  3. w > 2r: The proportion of cells that can swim up-gradient in the RSW is calculated the same as in case 2:

The complete relationship between the proportion of cells that can swim up-gradient in the RSW (P) and m is plotted in Fig. 6D. The maximum P occurs when m ∈ (0.7,0.8), marked by the red shaded area. This value is consistent with the slope k in Fig. 5D and results in the optimal width of about 8 µm in Fig. 3A for a circular swimming radius of 10 µm.

Discussions

Bacterial behavior in confined environments differs significantly from that in free environments. Previous studies have reported that cells tend to swim in circles and accumulate near a solid-liquid interface, leading to diminished chemotaxis. However, recent research on chemotaxis of swarm cells suggests that crowded environments may enhance bacterial chemotaxis on surfaces. In this study, we examined the chemotaxis of E. coli on the bottom surface of microfluidic lanes, exploring the effects of lane confinement on bacterial chemotaxis.

We found that in the presence of sidewalls, cells that would otherwise have been unable to exhibit chemotaxis showed significant chemotactic behavior in a linear gradient of L-aspartate. Cells in different regions of the lanes demonstrated distinct motion behaviors. In the MA region, cells showed no drift, similar to observations in chemotaxis near surfaces. Conversely, cells exhibited positive and negative drift when in the RSW and LSW regions, respectively.

Further investigation into chemotaxis in lanes of varying widths demonstrated that cells exhibited the highest chemotactic drift velocity in lanes that were 8 μm wide. This width is close to the radius of bacterial swimming circles. By analyzing the proportion and drift velocity of cells in different regions, we determined that this optimal lane width was primarily due to the higher proportion of cells swimming up-gradient along the right sidewall.

To explore the relationship between chemotactic drift velocity and circular swimming radius of bacteria, we conducted systematic simulations of E. coli chemotaxis with different circular swimming radii in lanes of varying widths under a linear concentration gradient of L-aspartate. We found that optimal chemotaxis occurred when the swimming radius was close to the lane width, with w = 0.66r. This suggests a significant proportional relationship between the optimal lane width for chemotaxis and the circular swimming radius of bacteria.

To elucidate the mechanism underlying this phenomenon, we employed geometric analysis. We demonstrated that bacteria in lanes could swim up-gradient in the RSW with maximal probability when the lane width was 0.7-0.8 times the radius of circular swimming. This finding is consistent with the experimental results presented in Fig. 4C.

Our findings have important implications for the screening of single-celled swimming organisms and the study of restricted chemotactic behavior. This research provides insights into how confinement affects bacterial chemotaxis and may inform the design of microfluidic devices for bacterial manipulation and analysis.

Bacteria frequently inhabit confined spaces such as soil pores, sediment interstices, rock crevices, biological tissues, and hydrogels. In these constrained environments, bacterial behavior often deviates significantly from that observed in unconfined conditions, typically resulting in reduced chemotactic ability. However, our findings challenge this notion, suggesting that certain types of environmental confinement may actually enhance bacterial chemotaxis. This discovery could contribute to our understanding of microbial ecology across various habitats, including soil, oceans, and the human body.

Furthermore, these insights could have potential applications. In biotechnology, optimizing confinement conditions could improve the efficiency of bioremediation processes or the production of microbial products. In medicine, understanding how pathogens navigate confined spaces within the body could lead to novel strategies for preventing or treating infections.

Materials and methods

Strain and plasmids

The plasmid pTrc99a-mCherry expresses mCherry under an IPTG-inducible promoter. The wild-type E. coli K12 strain AW405 (HCB1) transformed with pTrc99a-mCherry was used for fluorescent tracking of cell trajectories. Cells were streaked on a Petri dish containing 1.5% agar and lysogeny broth (1% tryptone, 0.5% NaCl, 0.5% yeast extract, supplemented with the appropriate antibiotic: 100 µg/ml ampicillin). A single colony was inoculated into lysogeny broth and grown overnight at 33 °C with 200 rpm rotation. The saturated culture was then diluted 1:100 (100 μl in 10 ml) into tryptone broth (1% tryptone, 0.5% NaCl, supplemented with the appropriate inducer and antibiotic: 0.1 mM IPTG, 100 µg/ml ampicillin) and grown at 33 °C with 200 rpm rotation to OD600=0.53. Cells were then harvested from culture media by centrifugation at 1.2×g for 6 min at room temperature. The pellet was resuspended by gently mixing in motility medium (10 mM potassium phosphate, 0.1 mM ethylenediaminetetraacetic acid (EDTA), 10 mM lactic acid, and 1 μM methionine at pH 7.0). The cells were washed three times to replace growth medium with motility medium. One hour after fluorescence maturation in a 33°C incubator, cells were placed in a 4°C refrigerator ready for microfluidic experiments.

Microfluidic device design and fabrication

A hydrogel-based microfluidic device containing lanes of different width was designed using L-edit based on previous work (34). The silicon mold with the positive relief features was fabricated using the standard soft lithography technique performed in our laboratory. Firstly, a 4-inch diameter silicon wafer was spin washed sequentially using water, acetone, methanol and isopropanol. The wafer was thoroughly dried on a 150 °C hot plate to ensure that organics has volatilized completely. Then, the wafer was treated with air plasma (Harrick plasma, PDC-002, 30W) for 10 min before the SU-8 2025 photoresist (Microchem) was spin-coated according to the products protocols. The spin-coated wafer was placed on a hot plate at 65°C for 3 min followed by 6 min at 95°C, then exposed to UV light using a maskless lithography machine (Heidelberg, μMLA) at 800 mJ/cm2 with defocus was set to 0. The post-exposure bake was performed at 65°C for 2 min followed by 6 min at 95°C. Development procedure lasted about 6 minutes with constant shaking in the SU-8 developer. The wafer was rinsed with fresh developer followed by isopropanol. Finally, an approximately 30-μm-high photoresist layer was created as the master mold. The mold was fixed on a glass petri dish using double-sided tape.

Polydimethylsiloxane (PDMS) and curing agent was mixed with a 10:1 ratio (Sylgard 184, Dow Corning) and centrifuged at 3500 rpm for 5 min to remove air bubbles. The mixture was poured over the mold in glass petri dish and then placed at 4°C for an hour to avoid interference from very small air bubbles. The PDMS was cured at 80°C for 3 h, then separated from the wafer and cut into pieces, and holes were punched for inlets and outlets. The punched PDMS was cleaned with adhesive tape. The cleaned PDMS was bonded to a glass slide after air plasma treatment (Harrick plasma, PDC-002, 30W). The fabricated device was baked at 80°C overnight to establish covalent bonding.

The hydrogel agarose was used at 2% (w/v) concentration in motility medium to create diffusion-permeable walls. Agarose was slowly injected through the inlet port using a syringe pump at a constant flow rate of 2 µL/min, and the injection process was carried out in a drying oven at a constant temperature of 68 °C.

Microscopy and data acquisition

The PDMS microfluidic chip was placed on a Nikon Ti-E inverted optical microscope equipped with a specific filter set, a 20× objective (Nikon, CFI S Plan Fluor ELWD, 20×, NA 0.45), and a CMOS camera (Hamamatsu, ORCA-Flash4.0, pixel size = 6.5 μm). We set the objective lens’s correction collar to 1.2 mm to match the glass slide thickness. A halogen lamp serves as the bright-field light source to help locate the observation area, while a xenon lamp serves as the excitation light source for fluorescence experiments.

1) Gradient profile calibration

Fluorescein solution (Sigma) was used for visualizing the chemical concentration field in the microfluidic device. 100 μM fluorescein and motility medium were flowed into the source and sink channels respectively, at a constant flow rate of 10 µL/min. One fluorescent image was captured per minute. To avoid the impact of photobleaching on the results, we only illuminated the sample during the imaging process.

2) Chemotaxis assays

The aspartic acid and motility medium solutions were respectively introduced into the source and sink channels, and left for more than 1 hour to allow aspartic acid to diffuse through the agarose wall and form a stable concentration gradient field. Then, bacteria were introduced into the cell channel at a rate of 5 μL/min using a syringe pump for a duration of 90 seconds. After the bacteria injection was complete, the microvalves were closed to seal the cell channel. Bacteria then performed chemotaxis due to the perception of the concentration gradient field. After waiting for 2 minutes, the shutter was opened to illuminate the fluorescent bacteria with the excitation light, and video recording began. During the video acquisition process, fluorescence excitation light was continuously illuminated onto the bacteria. For each recording, 9600 frames (2048×2048 pixels) were captured at a frame rate of 20 fps and an exposure of 50 ms. Although the long-term illumination caused a decrease in the brightness of the fluorescent bacteria, the position information of the bacteria could still be accurately distinguished within the video duration (8 min).

Data analysis

Tracking

Image analysis was performed with the ImageJ (National Institutes of Health) TrackMate plugin. We chose the Log detector with an estimated blob diameter of 70 μm and a threshold of 800 μm to effectively recognize bacteria, based on the diameter of bacteria and the use of a 20× objective. Then, we used the LAP Tracker and set the maximum distance for frame-to-frame linking to 50 μm.

Swimming speed

The velocity is calculated using the fourth order central difference method by (35):

The magnitude of the velocity is given by . The speed of each trajectory is defined as the average of vi. The swimming speeds of bacteria in lanes of different widths are represented by the mean and standard deviation of all trajectories.

Calculation of the radius of circular motion on the solid surface

A total of 382 trajectories with a rotational exponent greater than 1.6 in the MA region of the w = 44 µm lanes were selected for analysis. The trajectories were smoothed using the Savitzky-Golay filter with a window size of 5. The least squares method was then applied to solve the linear equations, yielding the center and radius of the fitted circles. The principle of this process is briefly described as follows:

The standard equation of a circle can be written as:

where (a, b) are the coordinates of the circle’s center, and r is the radius. Expanding and rearranging the standard equation of a circle, it can be rewritten as:

where c = r2a2b2.

Rewriting the above equation in matrix form, we have:

where

is the response vector, and

is the design matrix. The coefficients are given by:

Tumble angle

A tumble is defined as points where the velocity is lower than the average velocity of the trajectory ⟨vi⟩ and shows a substantial drop from the previous time point. Specifically, a tumble is identified when:

where n ≥ 2, α = 1/6 is the threshold, and t1 and tn represent the start and end times of a tumble, respectively.

Simulation of bacterial chemotaxis within lanes

In our simulation, we introduced the effects of bottom surface and sidewalls into the 2-dimensional chemotaxis of E. coli. The simulations were carried out in a rectangular area of size 160 μm × w, where w denotes the lane width. Cells were treated as self-propelled particles. They could sense and adapt to the ligand in the surrounding environment via the intracellular chemotaxis signaling pathway, which could be described by a coarse-grained model of bacterial chemotaxis (36, 37):

where a, m, and c represent the activity of the receptor-kinase complex, the methylation level of receptors, and the ligand concentration, respectively. N denotes the number of chemoreceptors in a Monod-Wyman-Changeux cluster (38). The values of parameters we used were the same as before (4, 38, 39): N = 4.6, Koff = 1.7 µm, Kon = 12 µm, α = 1.7, m0 = 1.0, kR = 0.005 s−1, kB = 0.010 s−1.

The concentration of CheY-P, which changes due to the receptor-kinase phosphorylation on CheY, could be calculated by Yp = 7.86a. Consequently, the CW bias (B) of flagellar motors would also vary (40):

It has been reported that the average run time in the near-surface region for wildtype cells is ∼2.0 s (11). Thus, the switching rate from run to tumble of cells was set to be equivalent to that from CCW to CW rotation of the motors, which could be calculated by . The switching rate from tumble to run was 5 s−1 due to the constant tumble duration of 0.2 s (41).

In this way, the motion states of each cell at any moment are determined. During a run, cells swim smoothly with a constant speed of 20 μm/s, influenced by rotational diffusion and the effect of the bottom surface on bacterial swimming:

where θ is the angle between the swimming direction and the positive x-axis, v0 = 20 µm/s is the swimming speed, r is the radius of circular swimming due to the effect of the bottom surface, and n(0, 2DrΔt) represents a normal distribution with zero mean and variance 2DrΔt. The rotational diffusion coefficient was 0.062 rad2/s (42). During a tumble, cells stop swimming and a tumble angle is selected from the distribution that we have measured. Cells will swim along the sidewalls for 2 s (the average dwell time from Fig. S2B), then escape from it with an angle selected from Fig. 2E. They will get a random y-coordinate at the other side when they swim through the x boundary.

Acknowledgements

This work was supported by National Natural Science Foundation of China Grants (11925406, 12090053, and 12104436) and a grant from the Ministry of science and technology of China (2019YFA0709303).

Additional information

Author Contributions

J. Y., R.Z., and C. Z. designed the work. C. Z. and C. Y. performed the experiments. All authors wrote the manuscripts.

Competing financial interests

The authors declare no competing financial interests.

Supplemental materials

Explanation of difference in drift velocity between LSW and RSW cells

We observed obvious chemotaxis of E. coli on the surface of lanes, closely related to cells swimming along sidewalls. As shown in Fig. S2A, cells swimming along sidewalls in an attractant gradient can be divided into four states: Cells on the right sidewall swimming up-gradient (RSW-UG), cells on the right sidewall swimming down-gradient (RSW-DG), cells on the left sidewall swimming up-gradient (LSW-UG), and cells on the left sidewall swimming down-gradient (LSW-DG). These cells can escape from sidewalls with rates:

where B+ and B represent the probability of tumble when cells swim up-gradient and down-gradient, respectively, and kT and kR denote the escape rates during tumble and run, respectively. Cells swimming on the sidewalls experience a force fs from the bottom surface, causing them to swim to the right. RSW-UG and LSW-DG cells can swim away from the sidewalls via tumble, while RSW-DG and LSW-UG cells can escape via tumble or run. The gradient field direction ensures that 0 ≤ B+ < B ≤ 1.

Dwell times for the four states are plotted in Fig. S2B, suggesting that τRSWUG > τLSWDG > τRSWDG > τLSWUG. Thus, kR > kT > 0.

The drift velocity for cells on right and left sidewall can be calculated as:

where v0 represents the swimming speed. Given that 0 ≤ B+ < B ≤ 1 and kR > kT > 0, we can conclude that:

Supplemental figures

Gradient calibration of microfluidics with fluorescein A. Fluorescence image of the stable gradient field. B. Normalized gradient in lanes of different widths. Red, green, and blue lines represent relative concentration values of the substance at different x positions for lanes with widths of 15 μm, 25 μm, and 44 μm, respectively. The red rectangle represents the ROI in Fig. S1A. C. Change in concentration gradient perceived by bacteria over time in lanes of different widths. Red circles (15 μm), green diamonds (25 μm), and blue asterisks (44 μm) show 11 calibration measurements. Shaded areas represent SEM.

A. Four motion states of cells swimming along sidewalls. Black arrows denote the direction of force fs generated by the bottom surface on the cell body. B. Dwell times of the four motion states from experiments in 44 μm-wide lanes. The values are 1.3±0.04 s, 1.87±0.36 s, 2.27±0.5 s, and 1.75±0.18 s for LSW-UG, LSW-DG, RSW-UG, and RSW-DG respectively. Errors represent SDs.