## Figures

## Abstract

Sensory systems have evolved to respond to input stimuli of certain statistical properties, and to reliably transmit this information through biochemical pathways. Hence, for an experimentally well-characterized sensory system, one ought to be able to extract valuable information about the statistics of the stimuli. Based on dose-response curves from *in vivo* fluorescence resonance energy transfer (FRET) experiments of the bacterial chemotaxis sensory system, we predict the chemical gradients chemotactic *Escherichia coli* cells typically encounter in their natural environment. To predict average gradients cells experience, we revaluate the phenomenological Weber's law and its generalizations to the Weber-Fechner law and fold-change detection. To obtain full distributions of gradients we use information theory and simulations, considering limitations of information transmission from both cell-external and internal noise. We identify broad distributions of exponential gradients, which lead to log-normal stimuli and maximal drift velocity. Our results thus provide a first step towards deciphering the chemical nature of complex, experimentally inaccessible cellular microenvironments, such as the human intestine.

## Author Summary

Outside the laboratory, bacteria live in complex microenvironments characterized by competition for space and available nutrients. Although often inaccessible by experiments, understanding the spatio-temporal dynamics of bacterial microenvironments is biomedically important. For instance, the chemical environment that symbiotic *Escherichia coli* encounter in the human gut relates to health of the gastrointestinal tract, gut metabolism, immune response, and tissue homeostasis. Other complex microenvironments include soil and biofilms. Assuming that bacterial sensory systems have evolved to optimally sense typical gradients, we treat signaling data, the signaling pathway with its architecture and reaction rates, and computer simulations of swimming bacteria in different gradients as “prior knowledge” to “reverse engineer” *E. coli*'s habitat. Our identified gradients are exponentially shaped with wide-ranging rate values. These microenvironments most likely stem from local fluctuating nutrient sources and degradation by competing species, in which bacteria have evolved to swim with optimal performance.

**Citation: **Clausznitzer D, Micali G, Neumann S, Sourjik V, Endres RG (2014) Predicting Chemical Environments of Bacteria from Receptor Signaling. PLoS Comput Biol10(10):
e1003870.
https://doi.org/10.1371/journal.pcbi.1003870

**Editor: **Christopher V. Rao, University of Illinois at Urbana-Champaign, United States of America

**Received: **May 29, 2014; **Accepted: **August 19, 2014; **Published: ** October 23, 2014

**Copyright: ** © 2014 Clausznitzer et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **The authors confirm that all data underlying the findings are fully available without restriction. All relevant data are within the paper and its Supporting Information files.

**Funding: **VS acknowledges support from the European Research Council Advanced Grant Nr. 294761-MicRobE. GM and RGE were supported by the European Research Council Starting Grant Nr. 280492-PPHPI. Link to European Research Council grants: http://erc.europa.eu/funding-schemes. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Bacteria live in complex chemical microenvironments with the spatio-temporal chemical concentration profiles shaped by nutrient supply, as well as nutrient depletion by surrounding bacteria of the same or other species (Fig. 1). From studies of the composition of commensal bacteria in our intestines, it is emerging that these bacterial communities have important roles for breaking down undigested food, and for increasing resistance against colonization by pathogens [1]. Although of physiological importance, we currently do not have a good understanding of what chemical gradients microorganisms in the gut typically encounter. One way forward is to exploit our accumulated knowledge about their sensory systems, evolved to detect typical stimuli relevant to the organism, e.g. the concentration of a particular nutrient. Therefore, knowing the design and functioning of sensory systems we ought to be able to predict typical stimuli such as concentration gradients.

Influences such as motile behavior, chemical sources (e.g. patchy food gradients in the human intestine), and the multitude of other organisms shape the typical concentrations sampled by a bacterium, leading to typical input distributions of chemical concentrations. Through signal transduction the sensory system produces (intracellular) output distributions. Evolution is expected to have selected the optimal shape of the input-output (dose-response) curve to allow for an appropriate response to typical stimuli.

The best-characterized bacterium is *Escherichia coli*, inhabiting the gastrointestinal tract of humans and animals. This bacterium grows in the mucus layer secreted by the intestinal epithelium [2], [3]. The chemotaxis sensory system enables these bacteria to detect and migrate in chemical gradients of nutrients and toxins. Unlike many sensory systems, it is relatively simple with only a few components and well understood at the molecular level [4]–[8]. This and other sensory systems share common design principles including Weber's law, the Weber-Fechner law and fold-change detection (FCD) [9]–[15] (see Text S1 and Fig. S1A for an introduction). Weber's law predicts that the minimum change in stimulus perceived against a background stimulus increases proportionally to the background stimulus, thus implementing efficient contrast coding [11], [16], [17]. The integrated version of Weber's law is the Weber-Fechner law, stressing the internal representation of stimuli [12]. FCD is a generalization of Weber's law to large stimuli and dynamics [18] that postulates the invariance of responses to time-dependent stimuli when scaled up or down by a constant factor [15], [19]. While these laws relate to average gradients [19], [20], they do not quantify the complexity of the chemical environment in terms of distributions of concentrations and gradients, or provide information on their functional importance in terms of cell-swimming behavior.

To fully characterize the chemical environment of chemotactic bacteria in terms of distributions, we expect a matching between the statistical properties of typical stimuli and the corresponding cellular responses assuming certain optimization criteria. For instance, taking into account cellular limitations of signal processing due to noise and limited energy resources, a reasonable assumption is that cells translate a stimulus (input) into a cellular response (output) in a way that maximizes the transmission of information [21]–[24]. An appropriate measure for the information contained in the output about the input is Shannon's mutual information (see Text S1 and Fig. S1B for an introduction to information theory) [25], which effectively describes the correlations between the inputs and outputs in bits, with a fundamental link to thermodynamics [26]. It is furthermore unclear how the above mentioned phenomenological laws follow from first principles, such as information theory.

Here, we demonstrate the ability to predict distributions of typical gradients of chemoattractant aspartate *E. coli* likely encounters in its physiological microenvironment. For this purpose we use quantitative dose-response curves from *in vivo* fluorescence resonance energy transfer (FRET) measurements of the chemotactic sensory pathway, information theory, as well as measurements and simulations of swimming bacteria. Using our multidisciplinary approach, we show that maximizing mutual information implies maximizing the alignment of cell trajectories with the gradient (chemotactic index), and hence the drift velocity of cells swimming up the gradient. We thus go significantly beyond Weber's law, Weber-Fechner law and fold-change detection, which only predict average chemical gradients. Our approach is a first step towards the prediction of typical chemical environments of bacteria, shaped by cellular communities and dynamic turnover of nutrients. These environments are difficult to determine experimentally, but are biomedically highly important for gut metabolism, tissue homeostasis, and disease development in the gastrointestinal tract [27], [28].

## Results

### Prior knowledge of receptor signaling

*E. coli* chemotaxis is well known for its high sensitivity to detect minute changes in chemical concentration (attractant and repellents) due to cooperative receptor complexes [29]. Furthermore, cells adapt precisely to persistent chemical stimulation due to covalent receptor modification (methylation and demethylation) [30]. As a result, cells can chemotax in a wide range of chemical concentrations. The final pathway output are the flagellated rotary motors, which lead to runs (swimming) or tumbling (random reorientation) [31], and hence biased random walk in the gradient.

The Monod-Wyman-Changeux (MWC) model was developed to describe the chemoreceptor signaling activity [32]–[36]. The average signaling activity of a receptor complex composed of *N* receptors, which can switch between an *on* and an *off* state, is given by (1)where the free-energy difference *F*(*c*, *m*) between the *on* and *off* state is (2)with [32] (see *Materials and Methods* for parameters value). The free-energy difference is a function of the ligand concentration *c* and the average modification level *m* of a receptor in the complex. Here, we consider two receptor types mixed in a complex, Tar (indicated by index *a*) with fraction of receptors in the complex, and Tsr (indicated by index *s*) with fraction of receptors. Receptors are sensitive to attractant with dissociation constants and in the *on* and *off* state, respectively. Wild-type cells have a receptor ratio of [35], whereas Tar-only cells have and . This model quantitatively describes the signaling activity of non-adapting cells as measured by FRET [35].

In adapting cells, we additionally need to describe the process of receptor modification dynamically. In this model, we describe the dynamics by the following ordinary differential equation [37] (3)with and the methylation and demethylation rate constants from enzymes CheR and phosphorylated CheB, respectively. According to this model, receptors are methylated when the complex is inactive and demethylated when the complex is active, leading to precise adaptation [30], [36] (see *Materials and Methods* for parameter values and Fig. S2). The model in Eq. 3 is able to describe a wide range of time-course data from FRET but other dependencies of the rates on activity *A* may also work [38].

Using multiple measurements of the response to the same stimulus from FRET [39], we characterize the input-output relationship of receptor signaling, including noise from the experiments and the sensory system, respectively, for an information-theoretic approach. Specifically, we use the fast response of chemoreceptors and intracellular signaling to the chemoattractant *α*-methyl-DL-aspartate (MeAsp), a non-metabolizable analogue of aspartate, to characterize the initial steps in the chemotaxis sensory system. Two different data sets were used in this paper: Firstly, dose-response curves for adapting wild-type cells (WT 1) expressing both Tar and Tsr receptors, shown in Fig. 2A and B [37]. This data is ideal to investigate Weber's law, as sensory adaptation adjusts the sensory system to the current background attractant concentration, and step changes in concentration probe the instantaneous intracellular signaling response. Secondly, we use dose-response curves shown in Fig. 3A [32] of mutants expressing only the Tar chemoreceptor which are either adapting (WT 2) or genetically engineered to have the amino acids glutamate (E) or glutamine (Q) at the four receptor modification sites for methylation and demethylation. Specifically, E is an unmethylated modification site, while Q resembles a methylated modification site, allowing us to mimic the various methylated states receptors can assume. Hence, these engineered bacterial strains are more tractable experimentally, enabling us to study the receptor response in defined adaptation states.

(A) Example time course of a FRET measurement in response to added (↓) and subsequently removed (↑) step changes of MeAsp (background concentration 0.1 mM MeAsp). The adapted activity *A*^{*} and the adaptation half-time , the time to reach half of the pre-stimulus activity are indicated. (B) Dose-response curves for cells adapted to ambient concentrations of 0, 0.1, 0.5 and 2 mM MeAsp and subjected to increasing concentration step changes Δ*c* of MeAsp (curves from left to right). Filled and open circles correspond to response to addition and removal of attractant, respectively [39]. Solid lines represent the MWC model of mixed Tar/Tsr-receptor complexes [37]. FRET and MWC model activities were normalized by adapted pre-stimulus values at each ambient concentration. The adapted activity *A*^{*} (thin black line) and example threshold activities *A*^{*}±Δ*A* (dashed- dotted lines) for removal (upper curve) and addition (lower curve) of concentration step changes are also indicated. The threshold stimulus Δ*c _{t}* corresponds to the concentration change Δ

*c*where the activity reaches the threshold activity. (C) Dose-response curves from panel B plotted as function of fractional changes in concentrations Δ

*c*/

*c*

_{0}for background concentrations of 0.1, 0.5 and 2 mM MeAsp. (

*C, Inset*) Dose-response curves from panel B plotted as function of changes in perception Δ

*F*for background concentrations 0, 0.1, 0.5 and 2 mM MeAsp. Note 0 mM background curve can be plotted as a function of Δ

*R*but not as a function of Δ

*c*/

*c*

_{0}. (D) Adaptation half-times for various concentration step changes as function of the fractional concentration change for 0.1, 0.3 and 5 mM MeAsp ambient concentration. (

*D Inset*) The same adaptation times as a function of change in perception. (E) Threshold stimulus Δ

*c*for addition and removal of MeAsp to achieve the response threshold Δ

_{t}*A*= 0.08

*A*

^{*}, plotted as function of background concentration

*c*

_{0}(data, symbols). MWC model (solid and dashed lines) and a linear fit of the experimental data points (dotted line) are shown as well. (

*E, Inset*) Experimental data points (symbols) and linear fits (dotted lines) are plotted on a linear scale for two different response thresholds. Threshold 1: Δ

*A*= 0.08

*A*

^{*}(circles), threshold 2: Δ

*A*= 0.16

*A*

^{*}(squares). Filled and open symbols represent addition and removal of MeAsp, respectively. Slopes of linear fits are 0.054 (threshold 1) and 0.115 (threshold 2). (F) Different spatial concentration profiles with equal concentrations at distances

*x*= 0 and

*x*= 3 mm, spanned by grey box.

(A) Dose-response curves for adapting (WT 2) cells and non-adapting mutants in specific receptor-modification states as taken from [32]. Cells express the Tar receptor using an inducible plasmid with all receptors removed from chromosome. Data points for various measurements of the FRET activity at different concentrations of MeAsp (filled symbols), as well as their mean values are shown (open symbols). Strains: cells adapted to zero 0 mM MeAsp(black circles) and 0.1 mM MeAsp (black triangles) background concentration, QEEE (red), QEQE (green), QEQQ (blue) and QQQQ (orange) mutant. Corresponding solid lines are the fits of the MWC model [32]. Receptor complex and FRET activities were normalized to maximal activity. (B) Predicted input and output distributions. (*Left*) Standard deviation (SD) of activity measured by FRET in panel A (open and filled symbols for including and excluding receptor expression noise, respectively). Fits to the standard deviations are shown as well (dashed and solid lines, respectively). (*Middle*) Predicted distributions of attractant concentrations (input). Note input distributions for low activity curves (0 mM MeAps and QEEE) look noticeably different from high activity curves (0.1 mM MeAsp, QEQE, QEQQ, and QQQQ). (*Right*) Predicted distributions of signaling activities (output). (C) Log-normal scaling of the predicted input concentrations. All curves are normalized with area of one. Symbols are the predicted input distributions panel B (QEQE, green; WT 2 (0.1 mM), black; QEQQ, blue; QQQQ, orange) and colored lines are log-normal fits to the distributions. (*Inset*) Log-normal fits from the main panel scaled to the peak position of the input distribution from cells adapted to 0.1 mM MeAps. See Tables S1 and S2 for fitting parameters with assessment of confidence. The calculated mutual information between inputs and outputs is ∼10 bits for different modifications from adapting and mutant cells (WT 0 mM, 23.3; WT 0.1 mM, 7.7; QEEE, 6.6; QEQE, 6.8; QEQQ, 4.5; QQQQ, 18.9 in bits).

### Fold-change detection and Weber's law

To obtain information about the preferred average gradients of *E. coli* cells, we first critically reevaluate fold-change detection (FCD) and Weber's law in *E. coli* chemotaxis using our data. FCD is characterized by the invariance of the response to scaling up or down the ligand concentration. This means that when the background (*c*_{0}) and difference (Δ*c*) concentrations are scaled by the same factor, i.e. and , the response amplitude remains the same. Expressing the change in free-energy difference upon stimulation of initially adapted receptors as (4)the ratios in the logarithm can be re-written (5)which is only a function of the fraction Δ*c*/*c*_{0} in two concentration regimes: (*i*) and (*ii*) for . Hence, the change in free-energy difference Δ*F*, as well as the change in receptor-complex activity Δ*A*, are only a function of the fractional concentration change for background concentrations between the dissociation constants of each receptor type, i.e. when receptor are most responsive. The change in free-energy difference in these regimes is (6)and Δ*F*≈0 otherwise. Therefore, there are two concentration regimes corresponding to the responsive ranges of the two receptor types, Tar and Tsr, for which fold-change detection is expected. Indeed, these two regimes of FCD are consistent with recent experiments for small periodic stimuli [19]. Based on our ligand dissociation constants from the *Materials and Methods* section, our regime I corresponds to their first FCD regime, the transition from our regime I to regime II coincides with their second FCD regime. Finally, our regime II corresponds to their osmotic stress regime. Our interpretation is supported by the low response amplitude of their second FCD regime (see also Fig. 3B in [36]).

To investigate FCD even for large stimuli, we use FRET time courses and dose-response curves, as well as the dynamic MWC model for adapting wild-type cells (WT 1). Fig. 2A and B define the adapted activity, adaptation time and change in activity Δ*A*. Specifically, adaptation time is defined here as the duration from the onset of the concentration change to the time at which the response is restored to half the pre-stimulus level. Fig. 2C shows that FCD approximately holds for small response amplitudes Δ*A* since all the dose-response curves approximately collapse onto a single curve when plotted as a function of the fractional concentration change. However, FCD requires that also adaptation time only depends on the fractional change in concentration to yield an invariant temporal response. From our model, we expect FCD to extend to adaptation time as the adaptation dynamics in Eq. 3 only depend on the receptor complex activity. Fig. 2D shows that similar to the response amplitudes, small fractional changes yield similar adaptation times (cf. [19]) with significant deviations at large fractional changes. These deviations might be due to the fact that large concentration changes Δ*c* exceed regime I. The breakdown of FCD with respect to adaptation time may additionally reflect the previous observation in single cells that the precision of adaptation is robust, but not the adaptation time [40].

Weber's law is a special case of FCD for small fractional changes. Using the FRET dose-response curves and the dynamic MWC model for adapting wild-type cells (WT 1) we extract the threshold stimulus for different background concentrations (Fig. 2B): we define the threshold stimulus Δ*c _{t}* to be the concentration increment, which produces the noticeable activity response Δ

*A*relative to the adapted level

*A*

^{*}. Experimental dose-response curves and our modeling indeed confirm the validity of Weber's law for the chemotactic sensory system (Fig. 2E). Note the precise value of Δ

*A*is not essential in obtaining Weber's law (Fig. 2E, inset) but can also be estimated from theory (see Text S1). To obtain an analytical formula for Weber's law for given Δ

*A*, we Taylor-expand Eq. 1 for the receptor-complex activity up to linear order about the steady-state activity

*A*

^{*}, leading to Δ

*A*∼Δ

*c*/

_{t}*c*

_{0}(see Text S1). This explicitly shows that Weber's law Δ

*c*∼c

_{t}_{0}is valid in both FCD regimes.

### Weber-Fechner law predicts chemotactic perception

The Weber-Fechner law predicts an internal representation of the ligand concentration, perception *R*, to follow *R*∼ln*c* [12]. This law results from the postulate that the threshold concentration for a particular background concentration corresponds to an increment Δ*R* in the internal representation of the concentration in the sensory system. This increment is a function of the fractional change in concentration Δ*c*/*c*. Hence, integrating Δ*R*∼Δ*c*/*c* yields *R*∼ln*c*.

To derive the Weber-Fechner law we cannot integrate the activity response Δ*A* (Eq. 8 in Text S1) to obtain the perception with its logarithmic dependence (since factor depends implicitly on the attractant concentration). However, Δ*F* = *k*⋅Δ*c*/*c* (Eq. 4 for small Δ*c*/*c*_{0}) can be integrated to result in the logarithmic perception *R* given by the receptor complex free-energy difference (7)valid for concentrations , with *r* = *a*, *s* (cf. Eq. 2). In the insets of Fig. 2C and D, we show the dose-response curves and adaptation times as function of a change in perception Δ*R*. Clearly, the resulting data collapse holds well. This indicates that perception is a quantity relevant to the cell, thus favoring Weber-Fechner law over fold-change detection. Note the free-energy difference, Eq. 7, was previously identified as the cause of logarithmic sensing [17]. As shown in Fig. S3A perception depends on the receptor-modification level *m*. At constant concentration, adaptation produces a perception equal to *F*^{*}, corresponding to adapted activity *A*^{*}. A sudden concentration change moves the perception along the logarithmic curve for a specific modification level with the perception deviating from adapted value *F*^{*}. Subsequent adaptation shifts the perception according to the *m*-dependent term in Eq. 7 so that *R* returns to *F*^{*} for the new concentration.

### Predicting typical gradients from Weber-Fechner law

To identify the gradients bacteria likely experience in their natural environment, we compare how moving bacteria perceive different gradients. We assume that spatial gradients which can be perceived over a wide range of concentrations, i.e. in which the perception neither diminishes due to adaptation nor saturates, may be the typical gradients the sensory system has evolved to detect. To gain intuition we consider a number of spatial gradients which arise from diffusion processes. Free diffusion of a fixed number of ligand molecules deposited at a point produces a Gaussian gradient [20], [41]. Diffusion from a point source expelling molecules at a constant rate results in a hyperbolic gradient [41]. Diffusion between points with constant rates of production and absorption produces a linear gradient [20], [42]. Finally, diffusion from a constant source and homogeneous degradation in the medium results in an exponential gradient [43]. Fig. 2F shows examples of these concentration gradients, where we have kept the value of the concentration the same at two points in space to make the gradients comparable.

We consider simple unidirectional one-dimensional swimming of bacteria with constant velocity *v _{s}* = 20

*µ*m s

^{−1}. This way, we can translate the spatial gradient into a temporal gradient, which is easier to analyze. To make progress, we approximate the free-energy difference by its logarithmic form Eq. 7, which is valid for the range of concentrations where Weber's law applies, e.g. . We find that an exponential gradient is perceived as constant as previously found by experiment [17] and computer simulation [20] (Fig. S3B). In Supporting Text S1 we further demonstrate this for cells in exponential ramps in line with data [44] (Fig. S3C,D). In contrast, the perception of the other gradients either attenuates by sensory adaptation (Gaussian and linear gradients), or increases, eventually saturating the response (hyperbolic gradient) along the swimming path (Fig. S3B). This may indicate that chemotactic

*E. coli*typically encounters exponential gradients in its natural habitat, since its pathway has evolved to maintain perception in these. Although the Weber-Fechner law makes no predictions about the distribution of gradients, i.e. their statistics of occurrence, its focus on perception views changes in concentration as bearers of useful information for the cell. In the following we quantify this view of signaling.

### Maximizing information transmission with noise

Sensory systems convert inputs (here ligand concentration) into cellular outputs (here receptor activity) using noisy signal transduction pathways. Furthermore, inputs themselves carry uncertainty, and this input noise is transmitted through the pathway as well. Hence, to deal with the noise information transmission in a cell needs to be described in terms of probability distributions. Particularly useful is the mutual information, expressed as a function of the probability distributions of inputs and outputs, *p _{c}*(

*c*) and

*p*(

_{A}*A*), respectively, the joint probability distribution

*p*(

*c*,

*A*), and the conditional probability distribution for output

*A*given input

*c*,

*p*(

*A*|

*c*) (see Text S1 for details).

Here, we assume that for a given input value *c* the output of a single cell is distributed normally around a mean output value with variance due to transmitted input (cell-external) and output (cell-internal) noise. We further assume that the transmitted input () and output () noise are independent. Hence, the output variance is given as the sum . The mutual information can be calculated analytically assuming that the noise in the output is small (an assumption we test later). The mutual information is then given by (cf. [22]) (8)i.e. the mutual information depends only on the distribution of inputs, the mean input-output relationship and the variances of input and output noise. If we assume that the sensory system maximizes the mutual information between concentration inputs and cellular outputs, the relation between inputs and outputs, i.e. , fulfils the following relationship (for derivation see *Materials and Methods*): (9)where *Z* is a constant given by the normalization of the input distribution (10)

Note assuming maximal information transmission is consistent with the assumption of constant perception in the Weber-Fechner law, as only perceived gradients contain information for the cell.

In the limiting cases that the input noise is much smaller or larger than the output noise, we can simplify this result. For small input noise, Eq. 9 reduces to , i.e. the input-output relationship is the steeper the higher the output noise [23], [45]. This can be understood intuitively, as different output levels become better separated (see Text S1). In the opposite case of large input noise, we obtain . Hence, the larger the input noise the shallower the input-output relationship, as different input levels become better separated. In the well-characterized chemotaxis system, where we have experimental dose-response curves determining the input-output relationship, we can thus predict the typical distributions of input concentrations using Eq. 9.

### Predicting input and output distributions

The distributions of input concentrations and cellular outputs can be predicted from experimental data based on the arguments presented above. Fig. 3A shows multiple dose-response measurements using FRET for fields of cells expressing only the Tar receptor. As can be seen from the figure, there is large variability between different measurements of the curves. A large amount of this variability is caused by noisy receptor expression, most likely due to plasmid copy-number variation [32]. Hence, in Fig. 3B (first column) we removed this expression noise from the variance using principal component analysis [32] (see Text S1, although we later relax this assumption). The resulting standard deviation (SD) has a characteristic shape when plotted as a function of ligand concentration: cells adapted to zero background concentration (WT 2) and the QEEE mutant show a monotonically decreasing SD with increasing MeAsp concentration as receptors become saturated by attractant. Cells adapted to a higher ambient concentration (WT 2), as well as mutants in higher receptor-modification states, show a peak in the SD in the linear, steep regime of the dose-response curve.

To extract input () and output () noises for *single* cell we fitted the following intuitive equation for the variance of the total activity from *n*≈400 cells (11)to the FRET variance SD^{2} shown in the first column of Fig. 3B, with *α*_{1}, *α*_{2} and *α*_{3} fitting parameters (listed in Table S1 with confidence intervals and quality-of-fit test), and the average activity of an individual cell from Eq. 1 (a constant scaling factor between the receptor-complex and FRET activities is neglected here for simplicity). In Eq. 11, the first, second, and third terms represent transmitted input noise, noise from switching of receptor complexes, and noise from the intracellular pathway, respectively. We assume all of these noise sources are independent. Specifically, input noise depends proportionally on concentration [46], and is transmitted according to the mean input-output relationship given by the MWC model. Receptor switching depends on the probabilities of complexes to be *on* and *off*, and hence has a binomial activity dependence. Pathway fluctuations, e.g. due to dephosphorylation, are assumed to be Poissonian, and the number of phosphorylated signaling proteins is taken to be proportional to the signaling activity . In the first term the factor *n*^{2} arises due to coherent addition of input fluctuations from all cells in the same flow chamber (e.g. due to pipetting errors). In the remaining noise terms, the factor *n* arises due to the incoherent addition of cell-internal fluctuations from all cells.

Equipped with single-cell input-output relationships and noises we can predict the input and output distributions given optimal information transmission. Based on matching relation Eq. 9, the predicted distributions of concentration inputs are shown in Fig. 3B (second column). For high receptor-modification states, the distributions can be fit by log-normal distributions as shown in Fig. 3C (fitting parameters are listed in Supporting Table S2 with confidence intervals). Log-normal distributions have the property that their ratio of variance and squared mean only depend on a single parameter. Hence, scaling log-normal distributions with equal relative variances such that their means coincide, collapses the entire functions on top of each other (inset of Fig. 3C). This constitutes further evidence for Weber's law and contrast coding. The quality of the scaling collapse is not further improved when removing all noise (equivalent to constant output noise), showing that noise is indeed small (or sufficiently uniform, see Fig. S4). Furthermore, scaling collapse and distributions of inputs do not change markedly when using total FRET variance for fit or using uniform output noise in Eq. 11 (see Fig. S4), demonstrating robustness of our predictions.

The predicted output distributions (cf. Eq. 9) are shown in Fig. 3B (third column). Using the variance excluding the receptor-expression noise (first principal component), we obtain bimodal distributions for receptors in high modification states. This deviation from the flat maximum-entropy distribution (cf. Fig. S1B) is due to noise, and was observed in other biological systems [23]. Predicted mutual information values are ∼10 bits, corresponding to a graded response with about 2^{10}∼1000 distinguishable output levels. Such analogue computation is particularly useful when small variations in stimuli need to be sensed and processed [47].

### Distributions of chemical gradients from simulations of swimming bacteria

Equipped with the distributions of sampled input concentrations, we aimed to characterize the chemical environment of swimming bacteria through the distributions of chemical gradients. For this purpose, we set up simulations of swimming bacteria using the RapidCell software [20] as described in *Materials and Methods*. Briefly, cells are able to sense and adapt via Eqs. 1–3, as well as to run and tumble based on cell-internal signaling. Cells are also subject to rotational diffusion. To relate the distribution of gradients to the functional output (swimming behaviors) of chemotactic cells, we use the chemotactic index (CI), which measures the alignment of cell trajectories with the gradient often used to quantify eukaryotic chemotaxis [48], and the drift velocity () up the gradient [49]. In fact, CI and drift velocity are closely related to each other (see Text S1). To achieve the above we follow a multistep protocol.

First, we validated our simulations by comparing trajectories of swimming bacteria with experimental tracking data in two dimensions in linear gradients [50]. Specifically, we successfully compared the CI (Fig. S5A–D), and interval-length distributions of motor rotation (see Fig. S5E,F and [44]). In addition to the tests conducted in [20], this provides confidence that our simulations reproduce realistic swimming behavior.

Second, we set up simulations of adapting Tar-only bacteria swimming in different linear gradients along the *x* direction. That way we obtained distributions of sampled concentrations at a particular receptor-modification level, denoted by *m*^{*}. The idea is that in a very shallow gradient cells sample a symmetric range of concentrations around *c*^{*} = *c*(*m*^{*}, *A*^{*}), with *A*^{*} the adapted activity. However, when the gradient becomes steeper cells start moving up the gradient. As a result, cells sample a wider range of concentrations up the gradient than down the gradient, producing an asymmetric distribution of sampled concentrations (Fig. 4A). Since a dose-response curve has evolved to sense gradients best that cells most likely encounter, we compared the predicted distributions from information theory (cf. Fig. 3) to the sampled concentrations from simulations in order to select typical gradients.

(A) Strategy to extract sampled distribution of inputs from simulations. Adapted activity *A*^{*} and modification level *m*^{*} determine concentration *c*^{*} (and position *x*^{*}). Cells swimming in typical gradients should sample the same concentrations as predicted by information theory (light blue curve). (B) Simulation in a rectangular box with gradient in *x* as described in *Materials and Methods*. Trajectories of Tar-only cells for relative gradient 0.1 mm^{−1}, using *m*^{*} = 6 (QEQQ) as an example. Green dots, blue lines and red lines correspond to initial positions, full trajectories, and partial trajectories with modification level of bacteria equal to *m*^{*}, respectively. (C) Chemotactic index (CI) extracted from all simulated trajectories in the box for different relative gradients as function of concentration in the box. Gradients relative to *c*^{*} = 223.9 *µ*M: 0.1 mm^{−1} (blue), 0.25 mm^{−1} (red) and 1.0 mm^{−1} (green). Non-monotonic trend of CI as function of *c* suggests an optimal range of gradients which maximizes CI. For example, at *c*^{*} the maximum CI corresponds to linear relative gradient 0.25 mm^{−1}. Symbols and error bars indicate averages and standard errors of the mean from several trajectories at this concentration and gradient. Lines are interpolations by smooth functions.

As shown in Fig. 4B for one exemplar linear gradient, we extracted 100 s-long trajectories from simulations of about 1000 cells. From these trajectories we then calculated the CI as a function of concentration, and repeated this for different linear gradients. The resulting CI is a complicated, non-monotonic function of concentration and gradient, shaped by receptor sensitivity, adaptation, and rotational diffusion (see Fig. 4C, Text S1 and Fig. S6A,B for details). In particular, for a given *c*^{*} there are relative gradients, defined as gradient over *c*^{*}, which lead to large CI values (red curve in Fig. 4C) while for both smaller (blue curve) and higher (green curve) relative gradients the CI values are reduced. In contrast, for smaller concentrations (*c*<*c*^{*}) a smaller gradient maximizes CI (blue curve), while for larger concentrations (*c*>*c*^{*}) a larger gradient maximizes CI (green curve). This indicates that chemotaxis is optimized with respect to the gradient for a given *m*^{*} (and hence *c*^{*}).

Third, after obtaining the sampled concentrations from trajectories with *m* = *m*^{*} (indicated by red lines in Fig. 4B), we used the overlap between these and the predicted input distributions to select the gradients sensed best. As shown in Fig. 5A for *m*^{*} = 4 (see Figs. S7–S9 for more details and plots), only intermediate relative gradients give a sampled distribution that matches the prediction with significant overlap. In extremely shallow relative gradients the histograms of concentrations sampled at *m* = *m*^{*} are symmetric due to adaptation, leading to low overlap and reduced CI values (Fig. 5A, left panel). On the other hand, extremely steep gradients lead to very asymmetric distributions. Although these cells locally move up the gradient more than predicted, their receptor signals are saturated and their long runs lead to low CI (Fig. 5A, right panel). In other words, to efficiently move up the gradient (maximum of CI) a cell has to balance between long runs up the gradient and sufficient tumbles to correct for misalignment.

(A) Using *m*^{*} = 4 (QEQE) as an example, predicted distribution of inputs from information theory (black lines) and distributions of sampled concentrations (blue lines) obtained for cells swimming in increasing relative linear gradients, 0.1 mm^{−1} (left), 0.5 mm^{−1} (central), and 1.5 mm^{−1} (right) (gradients relative to *c*^{*} = 0.065 mM). To imitate cell-external noise, the base concentration of the gradients was fluctuating every 0.1*s* with standard deviation 0.001 mM. To imitate cell-internal noise, modification level was selected from normal distribution with relative standard deviation in line with previous results [70]. (B) Overlap between distribution of sampled concentrations and predicted distribution (blue shades), chemotactic index (CI, red shades) and drift velocity (green shades) with modification level *m* = *m*^{*}. Symbols indicate modification level: squares, circles and triangles stand for *m*^{*} = 4 (QEQE, mM), *m*^{*} = 4.6 (WT 2, mM), and *m*^{*} = 6 (QEQQ, mM), respectively. *m*^{*} = 8 (QQQQ, *c*^{*} = 0.63 mM) is not included as Tar-only cells do not adapt at high values of *c*^{*}. Horizontal arrow illustrates range of relative gradients over which the overlap is within 20% of maximal value on average between the three modification levels. (C) Sampled distributions from different relative gradients (0.1–1.75 mm^{−1}) indeed fit prediction (overlap 90%). (D) Range of exponential gradients predicted to be sensed best (blue area), according to the range indicated by horizontal arrow in (B).

In line with our expectation, Fig. 5B shows that maximal overlap between the simulated and predicted distributions of concentrations corresponds to maximal CI, and hence maximal drift up the gradient. Unlike CI, which encodes information on trajectories only, drift is about the speed in a gradient and thus can be considered the final output of the chemotactic cells. Drift is most likely the quantity under evolutionary pressure [51]. Also note in Fig. 5B that CI and drift fall off to zero at very shallow relative gradients as expected due to precise adaptation, but that they fall off more slowly for steep relative gradients. This is consistent with our prediction of a limiting CI value for steep gradients (see Text S1) and the strongly asymmetric distributions of sampled inputs in Fig. 5A (right). CI and drift become ill defined once the relative gradient reaches the inverse run length (∼50 mm^{−1}).

To finally extract the distributions of gradients, we realize that for exponential gradients, , predicted from the Weber-Fechner law the relative gradient is given by const, i.e. independent of *x* and therefore *c*. As a consequence, if cells prefer exponential gradients with a particular rate value , then this preference should apply to all receptor-modification levels (as long as cells are responsive for ). Thus, when plotted as a function of relative gradient, we expect that all overlap, CI and drift curves collapse for different receptor-modification levels, which they approximately do (see Fig. 5B). The resulting distribution of exponential gradients is remarkably broad (wide range of rate values in Fig. 5D), demonstrating the wide dynamic range of the sensory system. Consistently, the broadness index defined in *Materials and Methods* is markedly larger than one, i.e. ranges from about 3.7 for QEQQ to 5.5 for WT 2 (0.1 mM). Slightly broader distributions are obtained when fitting to the total variance from FRET (Fig. S10). This case may imitate strong gene-expression noise which sometimes even arises when expressing from the chromosome [52], [53].

## Discussion

In the large intestine, hundreds of different bacterial species are present at high cell densities [2], forming a dynamic microenvironment with complex spatio-temporal chemical gradients from partially digested food and host secretions [54]. Previous models accounted for Weber's law and fold-change detection (FCD) [17], [19], [20], but were unable to make predictions beyond average gradients. Here, we first critically reevaluated FCD and Weber's law, also addressing the Weber-Fechner law. To predict distributions of concentration we then applied information theory to *in vivo* FRET data in *E. coli*. By comparing with simulations of swimming bacteria in different linear gradients, we found that the predicted distributions of input concentrations from information theory are consistent with bacteria experiencing a broad range of exponential gradients. In particular, fluctuating gradients (cell-external noise) and methylation levels (cell-internal noise) were needed to explain the long tails of the distributions in line with expectation [55], [56]. Importantly, our results show that maximizing information transmission leads to maximizing the chemotactic index (CI), and hence the drift velocity up the gradient (Fig. 5) [49]. Although expected, the existence of such a link between information transmission and drift has recently been questioned in bacterial chemotaxis [51]. Our model is thus able to connect a large number of phenomenological laws with information theory at the molecular level.

In contrast to the report by Lazova et al. [19], we found that at large concentration changes the resulting large-amplitude responses and their subsequent adaptation curves do not show FCD (cf. Fig. 2C, D). A possible reason for this discrepancy is that Lazova *et al.* used small temporal variations of stimuli which varied on a time scale close to adaptation [19]. Hence, their experiments might have probed FCD with respect to small response amplitudes with temporal responses mainly determined by the external oscillatory stimulus rather than by internal signaling [30].

The Weber-Fechner law requires a quantity called “perception”, which has not been identified previously in bacterial chemotaxis. The free-energy difference between the *on* and *off* states of the receptor complex fulfills this purpose; it is a logarithmic function of the concentration in the validity range of Weber's law, thus leading to a compressed internal representation of cell-external stimuli. This functional form arises from the molecular interaction between ligand and receptor, in particular from the competition between the gain of binding-free energy and loss of ligand-volume entropy upon ligand-receptor binding [35]. As logarithmic response functions are implicated for ligand-receptor interactions [20], [57], as well as simple membrane potentials (Nernst equation), our findings may apply to a wide range of signal transduction processes in cells [10], [58], [59].

Information theory can predict the distributions of input concentrations, and using simulations the distributions of gradients. Interestingly, our predicted distribution of inputs are log-normal, similar to the identified scale invariance of light intensities in the visual system [11]. This observation may contain deeper insights into the workings of sensory systems. Specifically, log-normal distributions arise from multiplicative interactions in molecular components [60]. Indeed, our dose-response curves closely resemble Hill equations due to receptor cooperativity [35] (note Hill equations are the cumulative distributions of log-normal distributions). Our deduced exponential gradients of aspartate may arise from local nutrient sources and degradation by bacteria in the surroundings.

Although our information-theoretic/simulation results are consistent with exponential gradients predicted by phenomenological laws, our model is based on a number of assumptions. These include small Gaussian noise and a certain functional form of the noise (Eq. 11, both assumptions were successfully tested in Fig. S4). Most importantly, we assume maximal information transmission. However, Tar receptors are also used for pH and temperature sensing [61], and global optimization may result in suboptimal sensing of individual stimuli types [62]. Additionally, expression of chemotactic genes is linked to nutrient supply, growth conditions, and life cycle [63], further restricting the predictive power of our information-theoretic approach. Furthermore, this approach only applies to (nearly) instantaneous receptor signaling, and hence excludes slower downstream dynamics, in particular of the motor [64]. However, we expect that if information transmission is optimized by the whole chemotaxis pathway, this should also be true for every intermediate stage, as information can only be lost, not gained. Note that our data of non-adapting cells was restricted to Tar-only cells. While this restricted the dynamic range, Tar is the cognate receptor for our stimuli.

To fully characterize the microenvironment of *E. coli* future work may need to factor in additional types of stimuli, such as other chemicals, temperature [65] and pH [66]. Models can first be tested in well-defined gradients of stimuli produced in microfabricated devices [42], [50], [66]–[68], thus establishing the stimuli cells sense best. By measuring FRET in single cells [69], the fidelity of information transmission can be tested more directly without any masking effects at the population level. This may also help answering whether information is conserved between graded receptor signaling and the binary-like motor response. Ultimately, imaging and tracking bacteria in complex microenvironments will enhance our understanding of chemotaxis under natural conditions.

## Materials and Methods

### FRET measurements

FRET measurements were performed as described previously [39], [65], using phosphorylation-dependent interaction between the response regulator CheY, fused to yellow fluorescent protein (CheY-YFP), and its phosphatase CheZ, fused to cyan fluorescent protein (CheZ-CFP), as a readout of the pathway activity.

### Parameters of MWC model

For the MWC model for receptor complexes we use the following parameters as derived from fits to FRET data [35], [37]: , , and . The size of receptor complexes is assumed to increase as a function of ambient concentration *c*_{0} according to , with *a*_{0} = 17.5 and *a*_{1} = 3.35/mM [37]. Furthermore, we used a direct interpolation of data from [32] to evaluate instead of using the equation , see Supporting Fig. S3 for the comparison. For the adaptation rate constants we used = 0.0069 s^{−1} and = 0.11 s^{−1} [37]. For the concentration-step profiles we assumed exponential rising and falling functions with rate constants = 0.6 s^{−1} and = 0.5 s^{−1} [37], [39].

### Maximizing information transmission with input and output noise

We assume a Gaussian channel, i.e. the input-output relationship is given by a dose-response curve for the mean and normally distributed output noise with total variance , consisting of transmitted cell-external (input) and cell-internal (output) noise, respectively. The conditional probability for the output given the input is then (12)

The mutual information is given by Eq. 8 [22], which is maximized with respect to using the Lagrange formalism. Introducing gain and interpreting the integrand of Eq. 8 as the Lagrangian (13)the following Euler-Lagrange equation is obtained (14)

The derivatives of with respect to and *G*, respectively, evaluate to (15)(16)

The derivative of the last term with respect to the input variable *c* is (17)

The resulting Euler-Lagrange can be rearranged into (18)with . Integration over the input *c* yields Eq. 9 for the dose-response curve .

### Experimental tracking and simulations of swimming cells in spatial gradients

Experimental data for bacteria in linear gradients were obtained from Jean-Baptiste Masson [50]. To generate the dynamics of the receptor activity and modification level, we used the information about sampled concentrations at each position as input for the MWC model. We initialized cells with the adapted modification level corresponding to the initial concentration and integrated Eqs. 1–3.

To simulate swimming Tar-only cells, we used the software package RapidCell [20]. The modification dynamics within RapidCell were replaced by our pathway model with parameters as described in the text. This led to an adapted activity *A*^{*}≈1/3. The simulation box was set to a rectangle of 5 mm in *y*- and variable dimension in *x*-direction, allowing bacteria with 5 flagella each to sample concentrations from 0–0.8 mM (note that beyond 0.6 mM cells stop responding and only run [36]). Periodic boundary conditions were applied. Cells reaching the boundary were taken out and injected at the opposing side. The receptor-modification level was then set to the adapted level corresponding to the concentration at the injection site with tumbling to reinitialize the swimming direction. For analysis we excluded a 0.2 mm border both for comparison with the data by Masson et al. [50] and for the prediction of gradient distributions. For the prediction of gradients, linear gradients in *x*-direction with different slopes and base concentration were used for identification of the range of well-sensed gradients and calculation of the chemotactic index (CI). Randomly shifting the base concentration by normal distribution with standard deviation of 0.001% allowed simulation of input noise. To calculate histograms of sampled concentrations, all cells with modification level equal to *m*^{*} of the corresponding strain were selected using a normal distribution with relative standard deviation 0.04% (thus mimicking output noise in line with [70]). These noise sources broadened the distributions of sampled inputs to better match the predicted distribution of inputs.

For the prediction of gradients, the overlap between the obtained histograms *p*(*c*, *m*^{*}) and the predicted input distributions (*p*_{input}) were calculated using using software R (version 3.0.1). The calculation of CI and drift is detailed in the Text S1. The broadness of the overlap (broadness index) was estimated by the ratio of fold change in overlap to fold change in relative gradient between their respective minimal and maximal values. The latter are defined by achieving an overlap within 20% of maximal overlap.

## Supporting Information

### Figure S1.

**Schematic of fold-change detection and Weber's law (A) and maximization of mutual information with uniform noise (B).** (A, top) In fold-change detection, different step changes of equal size relative to the background (left) produce equal responses (right). (A, bottom) Weber's law predicts that the smallest noticeable change in stimulus *S* increases proportionally to the background stimulus *S*_{0} (left), leading to a logarithmic coding of the perception *R*. (B) The input-output relationship (middle) for a typical distribution of input stimuli *p*(*I*) (top) maximizing information transmission in the presence of constant output noise [21] is given by the cumulative distribution of *p*(*I*). The corresponding output distribution is uniform (right).

https://doi.org/10.1371/journal.pcbi.1003870.s001

(EPS)

### Figure S2.

**The offset energy **** as a function of modification level ***m***.** Comparison between linear fit [32] (blue) and interpolation of experimental data (red).

https://doi.org/10.1371/journal.pcbi.1003870.s002

(PDF)

### Figure S3.

**Perception in different chemical gradients.** (A) Perception *R* of the Weber-Fechner law depending on ligand concentration *c* and modification level *m*. Adapted perception is given by the steady-state free-energy difference *F*^{*} (dashed line). Three example curves corresponding to three different modification levels are plotted. On each curve, the adapted perception *R* = *F*^{*} is indicated (solid circle) relating adapted modification level to the respective ambient concentration (dotted lines). (B) Perception along a straight swimming path in the respective concentration profile for swimming velocity *v _{s}* = 20

*µ*m s

^{−1}and free-energy difference (in units of

*k*

_{B}

*T*). (C–D) Receptor complex activity for exponential concentration ramps,

*c*(

*t*) =

*c*

_{0}

*e*

^{±rt}with ramp rate ±

*r*. Results for up (+

*r*, black) and down (−

*r*, red) ramps for initial concentration

*c*

_{0}= 0.1 mM are shown. (C) Time courses of receptor complex activity for ramps starting at

*t*= 10 s with increasing rates

*r*(low rates correspond to small changes in the receptor complex activity from the adapted state). Dots indicate the times when

*dA*/

*dt*= 0 (plateau) is reached for the first time. (D) Plateau activity as function of rate

*r*. (B

*Inset*) Same as B, but only for small rates. The dashed lines represent our analytical result.

https://doi.org/10.1371/journal.pcbi.1003870.s003

(PDF)

### Figure S4.

**Comparison of predicted distributions of inputs from our model in the main text including all principal components except for the first (without gene-expression noise), from model using all principal components (with gene-expression noise), and from model with uniform output noise (cf. Laughlin [21]).** Lines and symbols are explained in the legends. Colors indicate WT cells adapted to 0.1 mM MeAsp background concentration (black), and mutants QEQE (green), QEQQ (blue) and QQQQ (orange). (A) Predicted input distributions. Each panel refers to a particular receptor-modification level identified either with a mutant or a background concentration. (B) Predicted input distributions (symbols) and log-normal fits (lines) for those distributions which show a peak. (C) Log-normals from panel B scaled to the peak position of the WT input distribution. Line styles are the same as in panel B. See Tables S1 and S2 for fitting parameters with assessment of confidence.

https://doi.org/10.1371/journal.pcbi.1003870.s004

(EPS)

### Figure S5.

**Calculation of the chemotactic index (CI) and comparison between simulations and data.** (A–B) Schematics of trajectories of a swimming cell and calculation of CI with gradient in vertical direction. (A) Without rotational diffusion run length *l _{k}* and angle

*θ*between run direction and gradient are well defined between two tumbling events. (B) Rotational diffusion curves runs. To allow calculation of CI we use a linear-piecewise approximation of the trajectory using time step Δ

_{k}*t*= 0.1 s, allowing us to define

*l*and

_{k}*θ*. (C–D) Average CI (C) and drift velocity (D) as a function of the concentration in which wild-type

_{k}*E. coli*bacteria swim. Simulations (in blue and green, respectively) match tracking experiments from [50] (in red and orange, respectively) using identical shallow linear gradients. (E–F) Simulated clockwise (CW) rotation (E) and counter-clockwise (CCW) rotation (B) of single-motor interval distribution (black dots) of adapted cells match the exponential fits of experimental data [44] (blue lines). Decay time is close to (A), is close to (B).

https://doi.org/10.1371/journal.pcbi.1003870.s005

(PDF)

### Figure S6.

**Additional results for chemotactic index (CI).** (A–B) CI as a function of concentration in different linear gradients (in units of *mm*^{−1}). (A) Simulations without rotational diffusion significantly increase CI compared to simulations with rotational diffusion (B). Although there is no clear maximum for each linear gradient with rotational diffusion, there is a linear gradient that maximizes CI for each concentration in both cases. Linear gradients relative to *c*^{*} = 0.2239 mM with value 0.1 in black, 0.25 in yellow, 0.5 in blue, 1.0 in red and 2.0 in green in unit of *mm*^{−1}. (C) Comparison of CI (red scale solid lines) and drift velocity (green scale dotted lines; relative to run velocity assumed to be constant with ). This graph shows the close similarity of the two quantities in line with Eq. 27 in Text S1. Symbols indicate different receptor-modification levels with *m*^{*} = 4 corresponding to QEQE (squares), *m*^{*} = 4.6 corresponding to WT 2 (0.1 mM) (circles), and *m*^{*} = 6 corresponding to QEQQ (triangles).

https://doi.org/10.1371/journal.pcbi.1003870.s006

(PDF)

### Figure S7.

**Comparison between simulated and predicted distribution of inputs for ***m*** ^{*} = 4 (QEQE).** (A) Distributions of input concentration from simulations (red) and information theory predictions (blue) for different relative linear gradients. Corresponding chemotactic index (CI) is shown for each panel. Receptor-modification level is selected with Gaussian distribution with standard deviation 0.04% to mimic cell-internal (output) noise. The gradient shift up and down with Gaussian distribution with standard deviation 0.001% to mimic cell-external (input) noise. (B) Overlap between simulated and predicted distributions of inputs (dark blue), CI (red), and drift velocity (green) as a function of the relative gradient. (Inset) Fit to predicted distribution using simulated distribution of inputs in panel A as bases set. Overlap 89.4% between fit and prediction.

https://doi.org/10.1371/journal.pcbi.1003870.s007

(PDF)

### Figure S8.

**Comparison between simulated and predicted distribution of inputs for ***m*** ^{*} = 4.6 (WT 2 0.1 mM).** (A) Distributions of input concentration from simulations (red) and information theory predictions (blue) for different relative linear gradients. Corresponding chemotactic index (CI) is shown for each panel. Receptor-modification level is selected with Gaussian distribution with standard deviation 0.04% to mimic cell-internal (output) noise. The gradient shift up and down with Gaussian distribution with standard deviation 0.001% to mimic cell-external (input) noise. (B) Overlap between simulated and predicted distributions of inputs (dark blue), CI (red), and drift velocity (green) as a function of the relative gradient. (Inset) Fit to predicted distribution using simulated distribution of inputs in panel A as bases set. Overlap 79.4% between fit and prediction.

https://doi.org/10.1371/journal.pcbi.1003870.s008

(PDF)

### Figure S9.

**Comparison between simulated and predicted distribution of inputs for ***m*** ^{*} = 6 (QEQQ).** (A) Distributions of input concentration from simulations (red) and information theory predictions (blue) for different relative linear gradients. Corresponding chemotactic index (CI) is shown for each panel. Receptor-modification level is selected with Gaussian distribution with standard deviation 0.04% to mimic cell-internal (output) noise. The gradient shift up and down with Gaussian distribution with standard deviation 0.001% to mimic cell-external (input) noise. (B) Overlap between simulated and predicted distributions of inputs (dark blue), CI (red), and drift velocity (green) as a function of the relative gradient. (Inset) Fit to predicted distribution using simulated distribution of inputs in panel A as bases set. Overlap 91.5% between fit and prediction.

https://doi.org/10.1371/journal.pcbi.1003870.s009

(PDF)

### Figure S10.

**Distribution of relative gradients from overlap between distributions of sampled concentrations and predicted distributions.** (A) Predicted distributions excluding gene-expression noise (all principal components except the first; solid lines) and distributions predicted with total noise including gene-expression noise (all principal components; dashed lines). Results look very similar showing robustness of our predictions from information theory and simulations. (B) Predicted distributions excluding gene-expression noise (all principal components except the first; solid lines) and distributions predicted with uniform (constant) output noise (dotted lines). Maximum overlap in the latter case shifts to shallower gradients since predicted input distributions are narrower and more symmetric (cf. Fig. S4). Horizontal arrow illustrates range of relative gradients over which the overlap is within 20% of maximal value on average for total noise (A) and uniform noise (B), cf. Fig. 5B in the main text.

https://doi.org/10.1371/journal.pcbi.1003870.s010

(PDF)

### Table S1.

**Fit parameters of the variance in FRET activity.** Parameter values for the noise components of FRET activity (cf. Eq. 11 in the main text) excluding (top) and including (bottom) gene-expression noise, respectively. Corresponding 95% confidence intervals calculated using the profile-likelihood approach are given in brackets below the fitted value. We set *α*_{1} and *α*_{2} to zero when below 10^{−20}. The goodness-of-fit is indicated by the value of each fit in comparison to the critical value corresponding to a significance level of 0.05 (given in brackets below the value). If , the model is consistent with the data and classified as a good fit (last column).

https://doi.org/10.1371/journal.pcbi.1003870.s011

(PDF)

### Table S2.

**Log-normal fits to predicted input distributions.** Estimated parameter values for the fit of log-normal distributions (cf. Eq. 24 in Text S1) to the predicted input distributions shown in Fig. 3 in the main text and Fig. S4. Corresponding 95% confidence intervals are given in brackets below the fitted value.

https://doi.org/10.1371/journal.pcbi.1003870.s012

(PDF)

### Text S1.

**Model and simulation details and additional results.**

https://doi.org/10.1371/journal.pcbi.1003870.s013

(PDF)

## Acknowledgments

We thank Nikita Vladimirov for providing the RapidCell software [20], Jean-Baptiste Masson and Massimo Vergassola for sharing the trajectories from microfluidics, Frank Jülicher for helpful discussions, as well as Nick S. Jones and Karen Ottemann for constructive comments on the manuscript.

## Author Contributions

Conceived and designed the experiments: RGE VS. Performed the experiments: SN. Analyzed the data: GM DC RGE. Contributed reagents/materials/analysis tools: GM DC SN. Wrote the paper: GM DC SN VS RGE. Authors contributed equally: GM DC.

## References

- 1.
Nataro J, Cohen P, Mobley H, Weiser J (2005) Colonization of mucosal surfaces, ASM Press, Washington, D.C., chapter 13. pp. 179–186.
- 2. Poulsen LK, Lan F, Kristensen CS, Hobolth P, Molin S, et al. (1994) Spatial distribution of Escherichia coli in the mouse large intestine inferred from rrna in situ hybridization. Infect Immun 62: 5191–5194.
- 3.
Gauger EJ, Leatham MP, Mercado-Lubo R, Laux DC, Conway T, et al. (2007) Role of motility and the flhDC operon in
*Escherichia coli*MG1655 colonization of the mouse intestine. Infect Immun 75: 3315–3324. - 4. Berg HC (2000) Motile behavior of bacteria. Phys Today 53: 24–29.
- 5. Falke JJ, Hazelbauer GL (2001) Transmembrane signaling in bacterial chemoreceptors. Trends Biochem Sci 26: 257–265.
- 6.
Sourjik V (2004) Receptor clustering and signal processing in
*E. coli*chemotaxis. Trends Microbiol 12: 569–576. - 7. Wadhams GH, Armitage JP (2004) Making sense of it all: bacterial chemotaxis. Nat Rev Mol Cell Biol 5: 1024–1037.
- 8. Baker MD, Wolanin PM, Stock JB (2006) Systems biology of bacterial chemotaxis. Curr Opin Microbiol 9: 187–192.
- 9. Laughlin SB (1987) Form and function in retinal processing. Trends Neurosci 10: 478–483.
- 10. Laughlin SB (1989) The role of sensory adaptation in the retina. J Exp Biol 146: 39–62.
- 11. Olshausen BA, Field DJ (2000) Vision and the coding of natural images. Am Sci 88: 238–245.
- 12. Johnson JK, Hsiao SS, Yoshioka T (2002) Neural coding and the basic law of psychophysics. Neuroscientist 8: 111–121.
- 13. Dehaene S (2003) The neural basis of the Weber-Fechner law: a logarithmic mental number line. Trends Cogn Sci 7: 145–147.
- 14. Dunn FA, Rieke F (2006) The impact of photoreceptor noise on retinal gain controls. Curr Opin Neurobiol 16: 363–370.
- 15. Kojadinovic M, Armitage JP, Tindall MJ, Wadhams GH (2013) Response kinetics in the complex chemotaxis signalling pathway of Rhodobacter sphaeroides. J R Soc Interface 10: 20121001–20121001.
- 16. Mesibov R, Ordal GW, Adler J (1973) The range of attractant concentrations for bacterial chemotaxis and the threshold and size of response over this range. Weber law and related phenomena. J Gen Physiol 62: 203–223.
- 17.
Kalinin YV, Jiang L, Tu Y, Wu M (2009) Logarithmic sensing in
*Escherichia coli*bacterial chemotaxis. Biophys J 96: 2439–2448. - 18. Shoval O, Goentoro L, Hart Y, Mayo A, Sontag E, et al. (2010) Fold-change detection and scalar symmetry of sensory input fields. Proc Natl Acad Sci U S A 107: 15995–6000.
- 19. Lazova MD, Ahmed T, Bellomo D, Stocker R, Shimizu TS (2011) Response rescaling in bacterial chemotaxis. Proc Natl Acad Sci U S A 108: 13870–13875.
- 20. Vladimirov N, Løvdok L, Lebiedz D, Sourjik V (2008) Dependence of bacterial chemotaxis on gradient shape and adaptation rate. PLoS Comput Biol 4: e1000242.
- 21. Laughlin S (1981) A simple coding procedure enhances a neuron's information capacity. Z Naturforsch C 36: 910–912.
- 22. Detwiler PB, Ramanathan S, Sengupta A, Shraiman BI (2000) Engineering aspects of enzymatic signal transduction: photoreceptors in the retina. Biophys J 79: 2801–2817.
- 23. Tkacik G, Callan Jr CG, Bialek W (2008) Information flow and optimization in transcriptional regulation. Proc Natl Acad Sci U S A 105: 12265–12270.
- 24. Mehta P, Goyal S, Long T, Bassler BL, Wingreen NS (2009) Information processing and signal integration in bacterial quorum sensing. Mol Syst Biol 5: 325–325.
- 25.
Bialek W (2012) Biophysics: Searching for Principles. Princeton University Press, Oxford.
- 26. Toyabe S, Sagawa T, Ueda M, Muneyuki E, Sano M (2010) Experimental demonstration of information-to-energy conversion and validation of the generalized Jarzynski equality. Nat Phys 6: 988–992.
- 27. Sommer F, Bäckhed F (2013) The gut microbiota-masters of host development and physiology. Nat Rev Microbiol 11: 227–238.
- 28. Kamada N, Seo SU, Chen GY, Núñez G (2013) Role of the gut microbiota in immunity and inflammatory disease. Nat Rev Immunol 13: 321–335.
- 29. Duke TAJ, Bray D (1999) Heightened sensitivity of a lattice of membrane receptors. Proc Natl Acad Sci U S A 96: 10104–10108.
- 30. Barkai N, Leibler S (1997) Robustness in simple biochemical networks. Nature 387: 913–917.
- 31. Berg HC (2000) Motile behavior of bacteria. Physics Today 53: 24–29.
- 32.
Endres RG, Oleksiuk O, Hansen CH, Meir Y, Sourjik V, et al. (2008) Variable sizes of
*Escherichia coli*chemoreceptor signaling teams. Mol Syst Biol 4: 211. - 33. Sourjik V, Berg HC (2004) Functional interactions between receptors in bacterial chemotaxis. Nature 428: 437–441.
- 34. Mello BA, Tu Y (2005) An allosteric model for heterogeneous receptor complexes: understanding bacterial chemotaxis responses to multiple stimuli. Proc Natl Acad Sci U S A 102: 17354–17359.
- 35. Keymer JE, Endres RG, Skoge M, Meir Y, Wingreen NS (2006) Chemosensing in escherichia coli: two regimes of two-state receptors. Proc Natl Acad Sci U S A 103: 1786–1791.
- 36. Endres RG, Wingreen NS (2006) Precise adaptation in bacterial chemotaxis through “assistance neighborhoods”. Proc Natl Acad Sci U S A 103: 13040–13044.
- 37. Clausznitzer D, Oleksiuk O, Lovdok L, Sourjik V, Endres RG (2010) Chemotactic response and adaptation dynamics in Escherichia coli. PLoS Comput Biol 6: e1000784.
- 38. Shimizu TS, Tu Y, Berg HC (2010) A modular gradient-sensing network for chemotaxis in escherichia coli revealed by responses to time-varying stimuli. Mol Syst Biol 6: 382–382.
- 39. Sourjik V, Berg HC (2002) Receptor sensitivity in bacterial chemotaxis. Proc Natl Acad Sci U S A 99: 123–127.
- 40. Alon U, Surette MG, Barkai B, Leibler S (1999) Robustness in bacterial chemotaxis. Nature 397: 168–171.
- 41.
Berg HC (1993) Random Walks in Biology. Princeton University Press, Princeton.
- 42. van Haastert PJM, Postma M (2007) Biased random walk by stochastic fluctuations of chemoattractant-receptor interactions at the lower limit of detection. Biophys J 93: 1787–1796.
- 43. Ibanes M, Belmonte JCI (2008) Theoretical and experimental approaches to understand morphogen gradients. Mol Syst Biol 4: 176.
- 44. Block SM, Segall JE, Berg HC (1983) Adaptation kinetics in bacterial chemotaxis. J Bacteriol 154: 312–323.
- 45. Tkacik G, Callan Jr CG, Bialek W (2008) Information capacity of genetic regulatory elements. Phys Rev E 78: 011910.
- 46. Berg HC, Purcell EM (1977) Physics of chemoreception. Biophys J 20: 193–219.
- 47. Sarpeshkar R (1998) Analog versus digital: extrapolating from electronics to neurobiology. Neural Comput 10: 1601–1638.
- 48. Tweedy L, Meier B, Stephan J, Heinrich D, Endres RG (2013) Distinct cell shapes determine accurate chemotaxis. Sci Rep 3: 2606–2606.
- 49. Reneaux M, Gopalakrishnan M (2010) Theoretical results for chemotactic response and drift of E. coli in a weak attractant gradient. J Theor Biol 266: 99–106.
- 50. Masson JB, Voisinne G, Wong-Ng J, Celani A, Vergassola M (2012) Noninvasive inference of the molecular chemotactic response using bacterial trajectories. Proc Natl Acad Sci U S A 109: 1802–1807.
- 51. Skoge M, Meir Y, Wingreen NS (2011) Dynamics of cooperativity in chemical sensing among cell-surface receptors. Phys Rev Lett 107: 178101–178101.
- 52. Kollmann M, Løvdok L, Bartholomé K, Timmer J, Sourjik V (2005) Design principles of a bacterial signalling network. Nature 438: 504–507.
- 53. Spudich JL, Koshland DE (1976) Non-genetic individuality: chance in the single cell. Nature 262: 467–471.
- 54. Mitchell JG, Kogure K (2006) Bacterial motility: links to the environment and a driving force for microbial physics. FEMS Microbiol Ecol 55: 3–16.
- 55. Clark DA, Grant LC (2005) The bacterial chemotactic response reflects a compromise between transient and steady-state behavior. Proc Natl Acad Sci U S A 102: 9150–9155.
- 56. Celani A, Vergassola M (2010) Bacterial strategies for chemotaxis response. Proc Natl Acad Sci U S A 107: 1391–1396.
- 57. Jiang L, Ouyang Q, Tu Y (2010) Quantitative modeling of Escherichia coli chemotactic motion in environments varying in space and time. PLoS Comput Biol 6: e1000735.
- 58. Koshland Jr DE, Goldbeter A, Stock JB (1982) Amplification and adaptation in regulatory and sensory systems. Science 217: 220–225.
- 59.
Kandel E, Schwartz J, Jessel T (2000) Principles of Neural Science, McGraw-Hill, New York. pp. 81–94.
- 60. Frank SA (2013) Input-output relations in biological systems: measurement, information and the Hill equation. Biol Direct 8: 31–31.
- 61. Hu B, Tu Y (2014) Behaviors and strategies of bacterial navigation in chemical and nonchemical gradients. PLoS Comput Biol 10: e1003672.
- 62. Lander AD (2013) How cells know where they are. Science 339: 923–927.
- 63. McCarter LL (2006) Regulation of flagella. Curr Opin Microbiol 9: 180–186.
- 64. Tostevin F, ten Wolde PR (2009) Mutual information between input and output trajectories of biochemical networks. Phys Rev Lett 102: 218101.
- 65. Oleksiuk O, Jakovljevic V, Vladimirov N, Carvalho R, Paster E, et al. (2011) Thermal robustness of signaling in bacterial chemotaxis. Cell 145: 312–321.
- 66. Hu B, Tu Y (2013) Precision sensing by two opposing gradient sensors: how does Escherichia coli find its preferred pH level? Biophys J 105: 276–285.
- 67. Wolfaardt GM, Birkham MJHT, Bressel A, Gardner MN, Sousa AJ, et al. (2008) Microbial response to environmental gradients in a ceramic-based diffusion system. Biotechnol Bioeng 100: 141–149.
- 68. Kang T, Han J, Lee KS (2008) Concentration gradient generator using a convective-diffusive balance. Lab Chip 8: 1220–1222.
- 69. Vaknin A, Berg HC (2004) Single-cell FRET imaging of phosphatase activity in the Escherichia coli chemotaxis system. Proc Natl Acad Sci U S A 101: 17072–17077.
- 70. Clausznitzer D, Endres RG (2011) Noise characteristics of the Escherichia coli rotary motor. BMC Syst Biol 5: 151–151.