Model-based image analysis of a tethered Brownian fibre for shear stress sensing

The measurement of fluid dynamic shear stress acting on a biologically relevant surface is a challenging problem, particularly in the complex environment of, for example, the vasculature. While an experimental method for the direct detection of wall shear stress via the imaging of a synthetic biology nanorod has recently been developed, the data interpretation so far has been limited to phenomenological random walk modelling, small-angle approximation, and image analysis techniques which do not take into account the production of an image from a three-dimensional subject. In this report, we develop a mathematical and statistical framework to estimate shear stress from rapid imaging sequences based firstly on stochastic modelling of the dynamics of a tethered Brownian fibre in shear flow, and secondly on a novel model-based image analysis, which reconstructs fibre positions by solving the inverse problem of image formation. This framework is tested on experimental data, providing the first mechanistically rational analysis of the novel assay. What follows further develops the established theory for an untethered particle in a semi-dilute suspension, which is of relevance to, for example, the study of Brownian nanowires without flow, and presents new ideas in the field of multi-disciplinary image analysis.


Introduction
The force per unit area exerted on a surface by a moving fluid, otherwise known as wall shear stress (WSS), plays an important role in many physical and biological systems, for example the function and structure of endothelial cells [1,2] and the design of microfluidic systems [3,4]. While there exist several ways of measuring WSS directly [5][6][7], these methods are not suitable for measuring WSS in, for example, the vasculature, as they either require insertion of deformable micropillars (approx. 100 mm tall) or neglect to take into account biologically relevant aspects of the flow, for example the pulsatile nature of the flow in the vasculature which also contains fluid particulates and has complex geometries. There are also other biological factors limiting such flow methods; the viscosity of many fluids of interest is often not known, and can change with time, introducing additional error into calculations. We also know that cell surface macromolecules (for example the glycocalyx) can extend a distance . 0.5 mm into the fluid, meaning that surface effects become important and difficult to calculate. The current method for measuring WSS in the vasculature relies on measurement of the velocity gradient on the wall through bulk flow techniques such as micro-particle image velocimetry (mPIV) [8][9][10]. However, due to the size of the particles needed to measure flow through blood vessels, Brownian effects become important which can introduce error in the measurement of velocities and uncertainty in the location of the particles. In this research, we turn the Brownian motion of particles to our advantage; instead of needing to correct for such effects, the Brownian motion of a tethered rod is the measurement mechanism which underpins this work.
To measure shear stress in the vasculature at the same place that an endothelial cell can detect requires a sensor that can respond to shear stress in the same location. We continue the development of a sensor that can detect shear stress in microvessels as close as a few hundred nanometres from the cell membrane in real time in live animals. A biological microrod approximately 1 mm in length, based on M13 bacteriophage (hereafter referred to as M13), has recently been demonstrated to act as such a surface shear stress sensor [11] through flow-induced changes to its tethered Brownian motion. The M13 is 7 nm wide and % 900 nm long, with a persistence length of 1265.7 + 220.4 nm [12]. It forms a semi-rigid 'nanorod' which can be genetically engineered, or chemically modified to bind to fluorescent moieties or antibodies. These monodisperse nano-particles have been used to produce several nanoscale devices including nanowires [13,14] and scaffolds for polymerase chain reaction [15]. Other methods using orientations of freely suspended nanorods have been employed by Kim et al. [16], where the real-time measurement of the collective orientation of nanorods has been used to measure local shear rate in microfluidic systems. The collective orientation of suspensions of nanorods has also been used to detect pathogenic bacteria through the shear alignment of virus particles and linear dichroism by Pacheco-Gómez et al. [17]. These characteristics have been used to generate an M13 construct that includes a collagen antibody covalently attached to one end, and decorated with more than 500 fluorophores along its length. This construct allows the M13 to bind at one end to a collagen-coated slide, and be imaged using epifluorescent microscopy. It is this construct that we will focus on in this report.
The framework for the modelling and measurement of WSS constructed in this report consists of two key steps: modelling the dynamics of a tethered Brownian fibre, and the extraction of experimental data through the use of modelbased image analysis. The modular nature of this framework will mean that it can be easily extended to investigate related problems in both microscale biology and areas where reliable, rational analysis of experimental image data is desired. In what follows, we simplify the problem by approximating the M13 to be a stiff thin rod. This is a rational first approximation as the M13 in the associated experiments of Lobo et al. [11] has lengths below their associated persistence length, as experimentally measured by Khalil et al. [12].
Under no flow, the attached M13 oscillates randomly due to Brownian motion. As a flow is applied, however, the M13 movement is biased towards the direction of flow. This biasing behaviour is characterized through calculation of the Péclet number, the ratio between Brownian and advective effects due to shear. Brownian rotation is inversely proportional to viscosity, and advective rotation is proportional to shear rate. Therefore, the Péclet number is proportional to the product of the shear rate and viscosity, i.e. the shear stress. Knowledge of the Péclet number, combined with temperature and phage geometry, thereby yields the shear stress (knowledge of the viscosity also then yields the shear rate, and vice versa). Data interpretation has so far been limited to phenomenological random walk modelling, and small-angle approximation to the resulting partial differential equations; however, to apply the M13 quantitatively and to assess effects such as surface topography and variations in fibre length, it is valuable to model the underlying fluid dynamics of the tethered rod. We develop a mathematical framework for the rotational Brownian dynamics of a tethered M13, using rational mechanistic modelling to gain deep understanding about the behaviour of the M13 and its relationship to WSS. What follows is relevant to the established theory for an untethered particle in a semidilute suspension [16,18], and also to, for example, the recent study of Brownian nanowires without flow by Ota et al. [19].
Owing to the width of the M13 (7 nm) being much smaller than the wavelength of light used to excite the attached fluorophores (561 nm) the produced image is heavily diffracted and as such it requires work to calculate the exact location of the M13. Traditionally, deconvolution algorithms would be applied to such an image, either with a priori knowledge of how the light has been diffracted or without (blind deconvolution); several such schemes are available as packages in both ImageJ [20] and Matlab [21] as well as others. Current methods to do this often involve the use of 'black box' processing algorithms. While these tools can be useful, and often provide good information, a lack of transparency can hinder interpretation, particularly in a context where statistical properties of the error are crucial, and as such can never give complete confidence in the results. Even when the details of such algorithms are known, they often rely on changing the image without any knowledge of what the image contains or how it was formed. To combat this, we develop here the concept of model-based image analysis. Using knowledge of the physics of image formation, including understanding of how optical effects such as diffraction of light occur, we construct a mathematical framework for the inverse problem of image formation: how, given an experimental image, we can calculate what originally formed the image by undoing the image formation process. Besides providing a rational framework for analysing images, model-based image analysis produces consistent results and can be applied to any experimental set-up where the knowledge of the image formation is sufficiently well understood.
In this report, we combine work from the areas of synthetic biology and mathematical modelling, together with fluid dynamics and the concept of model-based image analysis to create a framework for the measurement of WSS in biological systems. In the first part of this work, we present the dynamics of a tethered Brownian fibre, and relate the angle distribution of the M13 in flow to the Péclet number, the ratio between Brownian and convective effects in the flow. We continue by introducing the concept of model-based image analysis and the inverse problem of image formation, and include algorithms for the automated processing of the experimental image data. The automated nature of the image processing, and its high throughput of data, enables the accuracy of the methods to be analysed through large-scale simulations of data. Finally, we combine all these ideas to calculate the WSS for the flow. The principle will then be demonstrated on the experimental data of Lobo et al. [11], providing the first mechanistically rational analysis of this novel assay.

Dynamics of a tethered Brownian fibre
We model the rotational Brownian dynamics of a rigid axisymmetric fibre of length L projecting into the half-space x 3 . 0, attached at (0, 0, 0) to the solid plane boundary x 3 ¼ 0 under homogeneous unidirectional shear flow u ¼ g_x 3 e 1 . A definition sketch is included in figure 1. This choice of flow and geometry will provide a strong basis upon which these methods can be extended to reflect other interesting biological problems. Working in spherical polar coordinates (r, u, f ) and following Kim & Karrila [22], we define d(u, f) to be the direction vector of the M13, with the triple [d, û, f] being the basis vectors. We denote by r d and r d . the angular parts of the spherical polar gradient and divergence operators, The problem will be to determine the steady state of the probability density function c(u, f, t) for the fibre orientation, on the unit hemispherical domain 08 u 908 and 08 f , 3608. 1 The probability density will satisfy the normalization condition ð 360 0 ð 90 0 c(u,f,t) sin u du df ¼ 1: ð2:3Þ Note the change relative to [18,22] in the absence of the 4p factor in equation (2.3), so that the unscaled c is a probability density function (the factor of 4p is less appropriate when working on a hemispherical domain). Two-dimensional imaging will directly yield a projection onto the (x 1 , x 2 )-plane, so we will observe samples from the marginal density function, The flux vector of c in (u, f ) space is given by J ¼ c d _ , where d _ (u, f) is the rate of change of d due to the combination of hydrodynamic and Brownian rotations. After some work, we obtain the advection -diffusion equation where D(u) is the rotational diffusion matrix and a(u, f ), the rate of change of d under rigid body rotation, is the rotational advection vector. Details of the derivation of (2.5) are given in appendix A. Introducing dimensionless variables t 0 , D 0 , a 0 , we have with characteristic time scale t ¼mL 3 /kT, where k is the Boltzmann constant and T is the absolute temperature. The dimensionless advection -diffusion equation is then where the rotational Péclet number Pe ¼ g_t. It is important to note the inclusion of the shear rate g_ in this definition of the rotational Péclet number; in what follows, we will use the measurement of Pe as a proxy for measurement of shear. In the current work, we make the assumption that c is independent of time for a given flow (for a fixed Péclet number), which gives the steady-state dimensionless advection -diffusion equation The coefficients D 0 and a 0 will be calculated by solving the dimensionless rotational resistance and mobility Stokes flow problems, respectively, after which the probability density function c can be calculated by solving (2.8) subject to the normalization condition (2.3). We solve (2.8) directly using a centred finite difference scheme in Matlab [21]. The full expression for (2.8) is given in appendix B.

Solution of the rotational resistance and mobility Stokes flow problems
There exist several approaches to solving the resistance and mobility Stokes flow problems, including finite element, boundary integral and regularized stokeslet methods, in addition to approximations based on slender body theory. In this paper, we apply a novel variation on the method of regularized stokeslets, namely the nearest-neighbour discretization of Smith [23]. This method retains the 'meshlessness' of the original formulation, with the added benefit of having a major reduction in computational cost. The small Reynolds number associated with microscale flow justifies the use of the (dimensionless) Stokes flow equations, where p is the pressure and u is the velocity. The relevant boundary conditions are no-slip/no-penetration on the plane u(x 1 , x 2 , 0, t) ¼ 0, no-slip/no-penetration on the rigid body u(X, t) ¼ X _ , and convergence to a prescribed steady far-field flow u(x, t) ! u 1 (x) as jxj ! 1.
A solution to equation (2.9) with the given boundary conditions may be expressed as a regularized stokeslet boundary integral, where S(t) denotes the body surface, f k the hydrodynamic force per unit area exerted by the body on the fluid and B 1 jk the regularized 'blakelet' found by Ainley et al. [24], where 1 is a small regularization parameter, taken to be 1% of the M13 length. Imposing the boundary conditions on the

ð2:12Þ
with v being the rotational velocity of the M13, and B 1 (x, X) being a kernel which is large but finite when x ¼ X. In the inertialess regime, the system is closed by specifying the torque on the body due to hydrodynamic stress, The mobility problem for this set-up then corresponds to the system of equations (2.12) and (2.13) with T and u 1 prescribed and v unknown. The resistance problem corresponds to the same system with v and u 1 prescribed and T unknown.
The dimensionless rotational advection vector a 0 is then given by solving the mobility problem forṽ, prescribing T ¼ 0 (corresponding to zero applied torque) and u 1 ¼ x 3 e 1 (corresponding to unit shear flow). Then we have that a 0 ¼ṽ Â d. Recall that a 0 ¼ a 0 (u, f ); therefore, it is necessary to find an approximate solution over the domain (u, f ) [ [08, 908] Â [08, 3608).
The dimensionless diffusion coefficient D 0 is given by solving the resistance problems for T u 0 and T f 0 , prescribing, respectively, v ¼ e u and v ¼ e f (corresponding to the two rotational modes), along with zero incident flow u 1 ¼ 0. Once these torques are found, the dimensionless resistance matrix in (u, f) coordinates can be assembled as ; an approximate solution must, therefore, be found for all u [ [08, 908], where, without loss of generality, we can set f ¼ 08.

Numerical results
The dimensionless rotational advection vector a 0 is solved over a grid with 08 u 908 and 08 f 3608, and is then interpolated using a cubic spline with periodic end conditions at the f limits. The resulting components a u , and a f are shown in figure 2. Similarly, the dimensionless rotational diffusion matrix D 0 (u), solved over 08 u 908, is again interpolated using a cublic spline, and is shown in figure 3. In solving for D 0 numerically, we have introduced a small regularization, at u ¼ 908, through enforcing D 0 (90 ) ¼ d (in our calculations, we use d ¼ 0.01). This ensures that the solutions for D 0 remain regular as u ! 90 . Finally, the advection-diffusion equation (2.8) is solved for 1 Pe 200. Here, the bounds on Pe have been chosen to include the experimentally relevant range for this project, but could be changed depending on the problem at hand. The marginal probability density function F (2.4) is obtained by integrating c over 08 u 908; the result is shown in figure 4. As expected, we see that the larger the Péclet number, the more likely the M13 is to be aligned in the direction of the flow. Also as expected, when Pe ! 0, we see the biasing effect decreases rapidly with the M13 approaching a uniform distribution. This behaviour is consistent with the physical interpretation of the Péclet number, with the case Pe ¼ 0 describing purely Brownian dynamics, with large Péclet numbers corresponding to shear dominated flows. Having calculated F for a range of Pe, we should now be Figure 2. Components of the dimensionless rotational advection vector a 0 plotted for 08 f , 3608 and 08 u 908.  rsif.royalsocietypublishing.org J. R. Soc. Interface 14: 20170564 able to estimate Pe for a given set of angles f. The methods by which we do this will be discussed in §3.2.
In order to measure the Péclet number in a biological system given the theory presented above, we require methods for the extraction of orientation data from experimental images. To this end, we now turn our attention to developing the concepts of model-based image analysis.

Detection of a tethered Brownian fibre
Having established a mathematical model for the dynamics of a tethered Brownian fibre, we now turn our attention to the application of the model to the experimental data of Lobo et al. [11], with a view to calculating the Péclet number for an applied shear flow. The experimental procedure for obtaining images of the tethered M13 is contained within [11] and as such is not repeated here, except for noting that the experimental set-up was that of a fluorescently labelled M13 tethered to a collagen-coated slide which was then imaged with a 1.4NA oil objective with a spinning disc confocal microscope (Ultraview; PerkinElmer). In what follows, we attack the problem through novel mathematical model-based image analysis methods which, along with the theory presented in §2, will provide a more rigorous and extensible basis for future work.

The inverse problem of image formation
We model the experimental M13 as a rigid, inextensible, axisymmetric rod of length L projecting into the half-space x 3 ! 0. The M13 is tethered at the point (x 0 , y 0 , z 0 ) of the Cartesian coordinate system (x 1 , x 2 , x 3 ) to the solid plane boundary x 3 ¼ 0, and is subjected to homogeneous unidirectional shear flow u ¼ g_x 3 e 1 . The position of the M13 (x 1 , x 2 , x 3 ) ¼ (x, y, z) is then given, in spherical polar coordinates, as for given azimuthal and polar angles 08 u 908 and 08 f , 3608, with 0 s L being the arclength along the M13. See figure 1 for a sketch of the set-up noting that, in what follows, we now model the M13 as being tethered to some, as yet, unknown point (x 0 , y 0 , z 0 ).
Following Zhang et al. [25], we model the optical diffraction of a light source located at the point (X 0 , Y 0 , Z 0 ), diffusing over the focal plane (X, Y, Z), by a Gaussian point spread function (PSF), namely where I 0 , s x and s z are parameters relating to the experimental set-up. Note that we have assumed that the optical diffraction will be equal in both the e 1 and e 2 directions when imaged from above, resulting in a circular PSF for a given focal plane z ¼ z 0 . The resulting image, I, given by convolution of the PSF (3.2) with the M13 location (3.1), in the focal plane (x 1 , x 2 , 0), is then where B is some background image intensity, which may be constant or may vary with pixel location. Given a set of experimental images, and a model for the forward problem of image formation (3.3), it remains to solve the inverse problem of image formation: estimation of the position of the M13 given an experimental image. In order to ensure a good fit between the experimental and simulated images, we choose the intensity parameter I 0 to be over all i pixels in the image. We define the M13 location to be the set of spatial parameters (x 0 , y 0 , f, u), and optical parameters (I 0 , s x , s z and B) which minimize the sum-squared error between the experimental and simulated images, namely where E i and I i are the ith pixels in the experimental and simulated images, respectively. Note that the intensity of the ith pixel in the image I i , with index i ! 1, should not be confused with the PSF intensity I 0 . The minimization is performed globally using the multi-level coordinate search algorithm, routine e05jb, from the NAG Toolbox for Matlab [26], with a set of bounds on each of the parameters. Owing to the complexity of the problem, and the lack of detailed information regarding the optical parameter s z , in what follows we model each image as though it contains an M13 of variable projected length L, inclined at an angle u ¼ 908 to the vertical. Here, we constrain the M13 parameters through requiring (x 0 , y 0 ) to lie within the image, 0 , L , 2 mm and 2908 f 908. We then require that the optical parameters have the following constraints: jBj ! 0 and s =10 s x 10s , where s is given by following Zhang et al. [25].

Fitting procedure
In refining our fitting algorithms we found that a small amount of preprocessing of the experimental images led to a significant increase in the accuracy of the fits. The preprocessing step involves applying a 5 Â 5-pixel median filter [27] to the experimental image, followed by subtracting the median image intensity from all pixels in the image, and finally setting the values of all pixels with negative intensity to zero. The effect of this preprocessing step is analysed in §4. We then perform a multi-stage fit in order to find the M13 and optical parameters which can best replicate the given experimental image as follows.
-We first fit the spatial parameters for initial optical parameters s x and B. Owing to the preprocessing of the experimental images, we choose B ¼ 0. The PSF spread s x is approximated by following Zhang et al. [25] for the experimental set-up. -Having calculated a first guess for the spatial parameters, the value for s x is then fitted, keeping all other parameters fixed. While, theoretically, the value of s x should be constant for all images from a given experiment, due to the preprocessing step, we allow some variation in s x to take place. -The spatial parameters are now refitted using the updated value for s x . Once the M13 and optical parameters have been obtained for all the experimental images, we can use the theory discussed in §2 to estimate the Péclet number for a particular flow. Using the marginal probability density function for the flow F (shown in figure 4), we can integrate to find the related cumulative density function (CDF) F 1 , which can then be compared with the sample CDF F 2 through calculation of the Kolmogorov-Smirnov statistic D [28], The Péclet number Pe that minimizes D is then chosen as the fit. This optimization procedure is again done with the multilevel coordinate search algorithm (e05jb) from the NAG Toolbox for Matlab [26]. The accuracy of the fitting procedures is now investigated.

Accuracy of fluid dynamics modelling with model-based image analysis
In order for this model-based image analysis framework to be useful, it must be able to accurately fit the location of a series of M13, and the Péclet number corresponding to the flow over such M13. We investigate the accuracy of the fit by dividing the problem into two areas where error can be introduced, namely the image processing stage, and the calculation of the Péclet number from a sample of orientation data. For each of these steps, we will generate 180 sample images for a spread of Péclet numbers 1 Pe 200, which is comparable to both the number of images and the flow rates of the associated experiments.

Step 1: error associated with image processing
In investigating the error associated in the image processing step, both with and without preprocessing, we would like to have a set of sample orientation data which, when fitted, return the Péclet number corresponding to the distribution they were sampled from. To ensure this, we use rejection sampling from the marginal probability density function F at a selection of linearly spaced Péclet numbers 1 Pe 200, stopping when we have a set of angles f which, when fitted, give a Péclet number Pe such that jPe À Pej < 0:5. For each of these sets of angles, an M13 is then simulated with a given length L, and is placed at a point (x 0 , y 0 ), randomly chosen with 20.5 mm x 0 , y 0 0.5 mm. An image of the M13 is then generated via (3.3), with s x given by following [25]. The intensity parameter I 0 is chosen so that the image has a maximum intensity of 255, which corresponds to the maximum value an 8-bit unsigned integer can take, and hence the maximum intensity in the experimental images. The additive noise B in (3.3) is simulated by sampling from a normal distribution with a mean of 76.5 (30% of I 0 ), and s.d. 5. These images are then put through both the image and Péclet fitting procedures, after which we are able to compare both the fitted angles f and fitted Péclet numbers Pe. In order to evaluate the effectiveness of the preprocessing step, we analyse the same set of images twice, with and without the preprocessing step, and compare the results.
The number of images successfully analysed and the number of fit orientation angles f within 18 and 58 of simulated angles f is shown in table 1, and the corresponding relative frequency histograms of the error between the simulated angles f and fit angles f are shown in figure 5. It is clear when looking at these data that the inclusion of the preprocessing step improves the accuracy of the fit significantly. The Péclet numbers Pe obtained through analysis of the fit orientation angles f are then shown in figure 6. We see here that not including the preprocessing step results in a significant underestimation of the Péclet number for the flow, while the inclusion of the preprocessing step leads to results which accurately represent the simulated flows. We see from the least squares line of best fit that the image processing method provides good results, with a small increase in error for stronger flows (higher Péclet number). This is in agreement with the Bland-Altman plot, figure 6b. Here, we see a mean difference between Pe and Pe of 6.4 with the preprocessing step, and 72.7 without. Similarly, the standard deviation for the difference is 25 with preprocessing, compared with 47 without. Having shown that the error in the image processing step is well contained with greater than 90% of fitted angles deviating from the simulated angles by less than 58, we move on to look at the error associated with the full analysis of Péclet number from a sample of orientation data. We do this in the same way as in §4.1; however, instead of using rejection sampling to obtain a sample with the required Péclet number, we take a single sample of 180 angles f from the marginal probability distribution F at each Pe. This should give insight into the  The Bland -Altman plot testing the fitted data Pe against Pe with preprocessing (blue) and without (red). The solid lines show the mean of the difference between Pe and Pe for each case, with the dotted lines being the 95% CI for the difference. accuracy of the full analysis on experimental images, with additional error being introduced through the generation of the orientation sample. The images successfully analysed, along with the number of fitted orientation angles f within 18 and 58 of the simulated angles f, are again shown in table 1, with the corresponding relative frequency histograms of the error between f and f shown in figure 7. We see very similar results to that of step 1, which is to be expected as we have not changed the image analysis portion of the methods, which is independent of angle distribution.
In figure 8, we plot the Péclet numbers obtained from fitting the angles f. Included in this figure are the Péclet numbers given by fitting to the sampled angles (assuming a perfect image analysis method), where we can see the deviation about what would be perfect correspondence to the flow, which is a result of the restricted sample size in the simulations, and analogous to the error from having a restricted sample size in the related experiments. Here, the Bland-Altman plot, figure 8b, shows a mean difference between Pe and Pe of 2.52, with the standard deviation of the difference being 35. We see here that, despite this additional error, and the error from the image processing procedure in step 1, we can reliably calculate the Péclet number relating to a given flow.

Calculation of Péclet number from experimental image data
The angles f obtained from fitting the full series of raw image data from Lobo et al. [11] are shown in figure 9. Each point represents a single frame, with the corresponding experimentally applied nominal WSS, and direction, shown above the plot. Additionally, red circles show the location of four characteristic images, which are displayed at the bottom of the figure. It is clear by eye, before doing any in-depth analysis, that, when flow is applied, there is a strong biasing of the distribution of the M13 angle f towards the direction of flow, and that this biasing effect is more pronounced the greater the nominal WSS. This is in agreement with the more detailed analysis    figure 10a, we have fitted a normalized Gaussian model to the data for individual flow rates, combining data from flows of the same magnitude in different directions. It is clear from these figures that, as the nominal WSS increases, the probability that the M13 is aligned with the flow (towards f ¼ 08) increases, with the standard deviation of the angles about f ¼ 08 decreasing. As expected, the flow direction does not have an impact on the distribution of the M13, as can be seen in figure 10b. Finally, we plot the estimated Péclet number for the flow in figure 10c, where it is clear that, with increased nominal WSS, we have fitted a larger Péclet number. We note that the Péclet number calculated for the 0.5 dyn cm 22 flow appears to be larger than expected. We believe that this is due to the fact that the flow lies outside the sensitivity range of the M13 in the experiments; a longer M13 would have more sensitivity to lower levels of WSS. This assertion is discussed in more detail in §6. We also see here that there is a slight discrepancy between the fit for the flows in the positive direction (blue) and that for the negative direction (red). This is to be expected from the statistical nature of the fit owing to the Fokker-Planck model, and we also expect some difference due to the fact that the collagen IV surface is not completely flat, leading to slight changes in flow behaviour in different directions. We believe that the fits in each direction are close enough to give credence to the viability of the fitting procedure.

Conclusion
It has recently been shown that a biological microrod (M13) can act as a WSS sensor [11] through flow-induced changes to its tethered Brownian motion. We have now developed and presented the first mechanistically rational analysis of this novel assay. This modelling and measurement framework consists of two steps, as follows. analysis of a set of experimental images. We have tackled the inverse problem of image formation, the solution to which allows the accurate and reliable calculation of the M13 location in a heavily diffracted image. This framework allows the swift, accurate and automated calculation of orientation data from experimental image data.

Comparison with previous work
We have applied this model to the problem of calculating WSS, validating against the work of Lobo et al. [11]. The present study differs from the previous analysis in that we have developed a principled and extensible framework based on modelling and statistics as opposed to small-angle approximations with pixel intensity thresholding and geometric operations to estimate M13 length and position calibrated with the experimental results. In analysing the same data, we have introduced the concepts of model-based image analysis and have tackled the inverse problem of image formation in order to locate the M13 in a series of experimental images. We believe that this approach to image analysis allows us to have more faith in the results over more traditional image analysis techniques. This is not only because of the inclusion of the physics of image formation in the underpinning model, but also because of the statistical framework for modelling the Brownian motion of the M13 which enables multiple sources of error to be considered in the analysis. The techniques introduced here also offer the advantage of being completely automated once set up; there is no manual component unlike many other methods, which allows the analysis of much larger quantities of data than would have been previously possible.

Applications and future extensions
We have shown that the combination of the fluid dynamic modelling of a tethered M13, together with the model-based image analysis of the experimental images, can produce an estimated Péclet number for the flow, which quantifies the relative importance of shear-driven and Brownian effects in the flow. Through simulations, we have produced an estimation of the accuracy of the model, and have shown that this method can reliably produce biologically relevant results. The methods can also be tailored to detect particular types of flow. The material time constant of Bird et al. [29] is calculated for the flow in this paper as l ¼ 1=6D r % 6 Â 10 À3 s, which is below the 0.1 s frame interval of the experiments of Lobo et al. [11].
In the analysis of other flows, the sampling rate must remain greater than the associated time constant to ensure the independent sampling of M13 positions in time. It is also of interest to note that rotational diffusion scales with length as D L À3 , so small changes in M13 length have a large impact on the rotational diffusion coefficient, and hence Péclet number. The impact of this is that M13 engineered to be slightly longer will have a smaller diffusion coefficient and hence enables the detection window to be extended to lower shear rates; slightly shorter M13 will have a larger diffusion coefficient, hence enabling the detection window to be extended to higher shear rates-with the caveat that, for orientation to be detected, diffraction associated with the emission wavelength places a lower limit on M13 length. The theory in this paper provides methods for calculating the Péclet number (as a proxy for WSS) on a flat surface through imaging of a tethered M13. The extensibility of the presented framework means that it will be possible to modify the fluid dynamic modelling ( §2), together with added information from multi-plane imaging, to estimate the shear stress over more biologically relevant surfaces in vivo, e.g. over the endothelial cell lining of a blood vessel. The rotational Péclet number is proportional to the product of the shear rate g_ and local viscosity m, i.e. the WSS (knowledge of the viscosity would then provide the value of the shear rate). Under the assumption of Newtonian rheology, uncertainty regarding the viscosity of a biological fluid is not problematic for the estimation of WSS because the Péclet number is determined precisely by WSS, temperature and the geometric properties of the phage. Given that the last two quantities are known accurately, this allows for highly reliable calculation of WSS in Newtonian fluids.
One particular application of this method would be in calculating WSS in the vasculature. While blood is known to behave as a non-Newtonian fluid macroscopically, on the microscopic length scale of M13 the relevant surrounding fluid is that of blood plasma, which behaves as a Newtonian fluid in shear flow [30]. It may, however, be of interest in future to characterize how the advective and diffusive terms in the model are modified by the inclusion of non-Newtonian rheology. Non-Newtonian properties may include, for example, shear-thinning or viscoelasticity. In the case of shear-thinning, we suggest that the shear rate in the vessel is likely to change on a length scale of an order of magnitude longer than the phage. Therefore, the advection and diffusion of the phage can be well approximated by a Newtonian model. As discussed above, the Péclet number provides information about the WSS, so it is not necessary to know about the viscosity directly. For the case of fluids which have a significant viscoelastic rheology on the microscopic scale of M13, for example mucus, the fluid dynamic framework would need to be extended to incorporate such effects.
While our model of M13 as a rigid rod-like structure is a rational first approximation, it could be improved through coupling the fluid mechanics calculations with an elastohydrodynamic model for M13 bending, for example by using the model of Montenegro-Johnson et al. [31].
Additionally, regarding the model-based image analysis, if we were able to accurately measure the optical diffusion in a given experimental set-up, and relate this to the PSF model (3.2), we should be able to obtain the full three-dimensional reconstruction of the M13 location, which would then allow the use of the full probability density function c, rather than the marginal probability density function, F, as obtained in §2. We would expect good results in the full three-dimensional case, even if the surface is not perpendicular to the imaging plane provided there was some knowledge about the surface topography. Topographic information could be quantified, for example via the multiple imaging plane set-up of Dalgarno et al. [32]. Such experimental techniques would provide knowledge of the instantaneous geometry and potential wall movements due to elasticity, pulsatile flow or other fluctuations. These effects could then be coupled with the fluid mechanics calculations via the boundary conditions to increase the applicability of the model in vivo.
Throughout this work, we have considered the analysis of a single M13, and the calculation of the Péclet number for the system. While this is a good method for understanding the dynamics of a locally spatially homogeneous topography, problems arise when there is a significant change of topology in space. In addition to improving the optical approaches to the problem, the analysis in this method could be extended to consider data from a set of spatially distributed M13 in order to better understand the behaviour of flow across complex geometries.
While in this work we have considered only the calculation of surface shear stress, we believe the 'ethos', as well as the techniques, developed here could have wider applications in the fields of microscale biology and image analysis. Of great interest is the application of the modelbased image analysis techniques to experimental data of motile cells such as sperm. We believe that these techniques will be able to provide great insight into a variety of topics, from subcellular structures to flagellated swimming cells such as sperm, and will have the potential for wide-ranging impact in fields such as fertility and animal husbandry.
Data accessibility. All the code for this project, and data for the generation of figures, can be accessed at https://github.com/meuriggallagher/phage.