{'fraction_non_alphanumeric': 0.029140509958924282, 'fraction_numerical': 0.031233046578315122, 'mean_word_length': 4.642326191517271, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
pyTFM: A tool for traction force and monolayer stress microscopy

Cellular force generation and force transmission are of fundamental importance for numerous biological processes and can be studied with the methods of Traction Force Microscopy (TFM) and Monolayer Stress Microscopy. Traction Force Microscopy and Monolayer Stress Microscopy solve the inverse problem of reconstructing cell-matrix tractions and inter- and intra-cellular stresses from the measured cell force-induced deformations of an adhesive substrate with known elasticity. Although several laboratories have developed software for Traction Force Microscopy and Monolayer Stress Microscopy computations, there is currently no software package available that allows non-expert users to perform a full evaluation of such experiments. Here we present pyTFM, a tool to perform Traction Force Microscopy and Monolayer Stress Microscopy on cell patches and cell layers grown in a 2-dimensional environment. pyTFM was optimized for ease-of-use; it is open-source and well documented (hosted at https://pytfm.readthedocs.io/) including usage examples and explanations of the theoretical background. pyTFM can be used as a standalone Python package or as an add-on to the image annotation tool ClickPoints. In combination with the ClickPoints environment, pyTFM allows the user to set all necessary analysis parameters, select regions of interest, examine the input data and intermediary results, and calculate a wide range of parameters describing forces, stresses, and their distribution. In this work, we also thoroughly analyze the accuracy and performance of the Traction Force Microscopy and Monolayer Stress Microscopy algorithms of pyTFM using synthetic and experimental data from epithelial cell patches.

of the traction field from the deformation field is an inverse problem for which a number 25 of algorithms have been developed, including numerical methods [11,12], Fourier-based 26 deconvolution [13], and Finite Element (FE) computations [14], all of which have 27 specific advantages and disadvantages (see Sabass et al. 2007 [15] for a detailed 28 discussion). pyTFM uses the Fourier Transform Traction Cytometry (FTTC) algorithm 29 [13], as it is computationally fast and does not require the location of the cell boundary 30 as an additional input. 31 Tractions must be balanced by forces transmitted within or between cells. These 32 forces are usually described by stress tensors. The stress tensor field for cells grown in a 33 2-dimensional environment can be calculated using the Monolayer Stress Microscopy 34 method [16,17], whereby the cell or cell patch is modeled as an elastically stretched  Tambe et al. 44 2013 [17]. In this implementation, the calculated network strain has no physical originate from outside the cell area, and when only tractions beneath the cell area are 57 considered, the stress field is underestimated. This problem cannot be remedied by 58 constraining the tractions to be zero outside the cell area (constrained TFM) as this 59 tends to produce large spurious tractions at the cell perimeter [13] and hence 60 unphysically high stresses in the cell monolayer. Ng et al. 2014 [20] addressed this issue 61 by expanding the FEM-grid to cover all tractions generated by the cell patch and by 62 exponentially decreasing the stiffness of the FEM-grid with increasing distance to the 63 cell patch edge. In our implementation, the FEM-grid is also expanded to cover all 64 cell-generated tractions, however, we found it unnecessary to introduce a stiffness 65 gradient in the FEM-grid. Moreover, zero-translation and zero-rotation constraints are 66 explicitly added to the FEM-algorithm in pyTFM.

67
Finally, pyTFM adds a number user-friendly features to easily set parameters, select 68 regions of interest and quickly evaluate results. For this, pyTFM can be optionally used 69 as an add-on to the image annotation tool ClickPoints [21]. This makes the analysis of 70 large data sets particularly easy by sorting input and output data in a database and 71 allowing the user to browse through it. parameters. The documentation is hosted at https://pytfm.readthedocs.io. 75 2 Design and implementation 76 pyTFM is a Python package implemented in Python 3.6. It is mainly intended to be 77 used as an add-on for the image display and annotation tool ClickPoints, but can also 78 be used as a stand-alone Python library.   The mask that  defines the cell boundaries and the area over which strain energy, contractility and  monolayer stresses are computed is colored light blue. Cellular force generation is quantified by the total force generation and centripetal 87 contractility. Total force generation in turn is described by the strain energy that is 88 elastically stored in the substrate, and centripetal contractility is described by the sum 89 of all cell-generated forces projected towards a single force epicenter. Stresses are 90 quantified by average normal and shear stresses and their coefficient of variation, which 91 is a measure for stress fluctuations. Cell-cell force transduction is quantified by the line 92 tension, which is the force per unit length acting on a segment of a cell-cell boundary. calculates the area and number of cells of each cell patch, which can be used to 96 normalize the quantities above. We provide more details on how these quantities are 97 defined and how to interpret them in the Supplementary S1 File.

98
The user is required to select an area of the traction field over which the strain 99 energy, contractility and monolayer stresses are computed. This area should cover all 100 cell-generated tractions and is thus typically larger than the cell area. However, a 101 significant further extension of the user-selected area beyond the cell edge will lead to 102 an underestimation of monolayer stresses, as will be further discussed in Section 2.

103
Optionally, the outline of the cell or cell patch can be selected, defining the area over 104 which average stresses and stress fluctuations are computed. Also optionally, the outline 105 of cell-cell boundaries can be selected to calculate force transduction between cells.  also be plotted (see Fig. 5 for an example). The user has full control over which plots 110 are produced. All calculated scalar results are saved in a tab-separated text file. standard text editors or data analysis tools such as Excel. When using the pyTFM add-on in ClickPoints, input and output images are organized 116 in a database (Fig. 1B), which allows users to efficiently navigate large data sets. The 117 database is organized in frames and layers: Each frame represents one field of view.  [13]. Deformations ( u) and tractions ( t) are related by the convolution of the 152 traction vector field and a Greens tensor K: In the case of a linearly elastic semi-infinite substrate, K is given by the Boussinesq 154 equations [22]. Inverting Eq. 1 and solving for the tractions is difficult in real space.

155
However, by exploiting the convolution theorem, the equation simplifies to a 156 multiplication in Fourier space: where u( k), T ( k) and K( k) are the Fourier transforms of the deformation field, the 158 traction field and the Greens tensor. The latter can be found in [13].

159
Eq. 2 can be analytically solved and thus allows for the direct calculation of tractions 160 in Fourier space. Tractions in real space are then obtained by applying the inverse 161 Fourier transform and an additional Gaussian filter with a sigma of typically 1-3 µm.

162
The original TFM algorithm assumes that the underlying substrate is infinitely 163 thick, which is justified in the case of single cells with dimensions that are smaller than 164 the thickness of the elastic substrate. In the case of cell patches, however, this 165 assumption is inadequate. We have therefore included a correction term for finite 166 substrate thickness [23]. Microscopy as described in [16,17]. For computing stresses in small cell patches or 170 single cells, we implemented a method that corrects for the limited spatial resolution of 171 unconstrained TFM, which otherwise would lead to a substantial underestimation of 172 stresses [20]. Details of this correction are described below.

173
In the absence of inertial forces, tractions and stresses are balanced according to the 174 relation: where σ xx , σ yy are the normal stresses in x-and y-direction, σ yx is the shear stress, 176 and t x and t y are the x-and y-components of the traction vector. This differential where f are the vector of nodal forces, and K −1 is the inverse stiffness matrix. The 183 nodal displacements are converted to strains by taking the derivative in x-and 184 y-direction. Then, the strain is used to calculate the stress from the stress-strain 185 relationship of a linearly elastic 2-dimensional material: where E and v are Young's modulus and Poisson's ratio of the material, and 11 , 22 187 and 12 are the components of the strain tensor. Most of the FEM calculation is 188 performed using the solidspy Python package [24].

189
The stiffness matrix K in Eq. 4 depends on the Young's modulus in such a way that 190 the Young's modulus in Eq. 5 cancels out. The traction-stress relation is therefore 191 independent of the Young's modulus of the cell patch [17]. Furthermore, the Poisson's 192 ratio has only a negligible influence on the stress prediction [17]. In the pyTFM 193 algorithm, the Young's modulus is set to 1 Pa, and the Poisson's ratio is set to 0.5.  From the traction field, we obtain the deformation field by first calculating the 247 Fourier transform of the traction field. Then we use Eq. 2 to obtain the deformation 248 field in Fourier space and, after applying the inverse Fourier transform, in real space. 249 We use a modified Greens Tensor K to account for a finite substrate thickness [23]. The 250 substrate thickness is set to 100 µm.

251
The deformation field is then used as the input for the TFM and Monolayer Stress 252 Microscopy algorithms. We use an FEM-grid area that is 5 µm larger than the original 253 stress field area since this resulted in the best stress recovery (Fig. 4A).
the normal stresses are finally compared with the known input stress (uniform normal 256 stress in x-and y-direction of 1 N/µm magnitude, and zero shear stress). To compare 257 the reconstructed traction field with the analytical solution, we also compute the total 258 contractility (sum of all cell-generated forces projected towards a single force epicenter) 259 over the FEM-grid area. 260 We find that the pyTFM algorithm accurately reconstructs the stress field (Fig. 3B). 261 By contrast, the reconstructed traction field is blurred in comparison to the input 262 traction field (Fig. 3C). This is the effect of a Gaussian smoothing filter with a sigma of 263 3 µm that is applied to the tractions computed by the FTTC algorithm. This filter 264 helps to prevent unphysiological isolated and locally diverging tractions in the case of a 265 noisy input deformation field. In our test case, we do not model the influence of noise 266 and could therefore omit the filter; in practical applications, we find a sigma of 3 µm to 267 give the best compromise between resolution and noise.

268
The computed average normal stress is slightly (7%) smaller than the input stress, 269 but the error increases rapidly when the margin for extending the FEM-grid is 270 decreased below 5 µm (Fig. 4A). Total contractility and the coefficient of variation for 271 the normal stress are recovered accurately (Fig. 3D).   In the following, we illustrate the workflow of pyTFM (Fig. 1) using a MDCK cell 307 colony as a representative example. Experimental details for this example are provided 308 in Supplementary S2 File. Two images of fluorescent beads serve as the essential input, 309 one image taken before and one image after cell removal by trypsinization of the cells 310 (Fig. 5A). pyTFM calculates the deformation field (Fig. 5B) and the traction field (Fig. 311 5C). The user then selects the area (red outline in Fig. 5 ) over which pyTFM draws and the monolayer stress field (represented as a map of normal stresses (Fig. 5E)). If the user optionally selects the outline of the cell patch and the boundaries of the 315 individual cells within the patch (green outlines in Fig. 5E), pyTFM also computes the 316 line tension between the cells (Fig. 5F). The program also computes a number of scalar 317 values for quantifying cellular force generation and stress distribution (Table 1).  to implement alternative algorithms that address these issues with minimal changes to 333 other parts of the software. An example is the Boundary Elements Method [11] that for the analysis of cells grown on non-linear elastic substrates such as collagen [29]. instructions and links to further example data sets.