## Abstract

Analysis of coupled variables is a core concept of cell biological inference, with co-localization of two molecules as a proxy for protein interaction being a ubiquitous example. However, external effectors may influence the observed co-localization independently from the local interaction of two proteins. Such global bias, although biologically meaningful, is often neglected when interpreting co-localization. Here, we describe DeBias, a computational method to quantify and decouple global bias from local interactions between variables by modeling the observed co-localization as the cumulative contribution of a global and a local component. We showcase four applications of DeBias in different areas of cell biology, and demonstrate that the global bias encapsulates fundamental mechanistic insight into cellular behavior. The DeBias software package is freely accessible online via a web-server at https://debias.biohpc.swmed.edu.

**Impact statement**: DeBias, a generic method to decompose and quantify the confounding, global factors and direct interactions of pairwise interacting variables.

## Plain language summary

Multiple variables are often measured in the same cell or cellular compartment. One example concerns orientational variables such motion direction and force generation of migrating cells. Another example concerns localization variables, such the abundance of two particular molecules in a molecular structure. Understanding the modes of interactions between coupled variables is a basic step in cell biological investigation.

External global effects often mask our ability to accurately quantify the direct interactions between variables. For example, sub-cellular structures can be co-aligned, yet without direct interaction, because the cell shape globally biases the organization of internal components toward a specific directional cue. Multiple statistical approaches aim to achieve more accurate estimation of the direct interactions by eliminating global bias, but they ignore the possibility that global bias can encapsulate important information.

In this study we embrace global bias as a second measurement for the analysis of complex relations between cellular variables. We introduce an algorithm called DeBias to **De**couple the global **Bias** from direct interactions.

To demonstrate broad applicability, DeBias was used in the study of four very different areas of cell biology ranging from co-alignment of cytoskeletal filamentous networks, co-alignment of direction of cell motion and migration force, and co-localization of molecules at the cell surface with the endocytosis machinery that transports them across the plasma membrane endocytosed. For each application, we uncovered the physical interpretation of the global bias and how it can be used to gain additional mechanistic information of the analyzed process.

DeBias can be used to comprehensively explore molecular processes that modulate the direct interactions or global bias of coupled variables. Another potential application would be dynamic assessment of coupled variables in relation to their spatial location in a cell and how they associate with other sub-cellular processes.

## Introduction

Interpretation of the relations among coupled variables is a classic problem in many areas of cell biology. One example is the spatiotemporal co-localization of molecules – a critical clue to interactions between molecular components; another example is alignment of molecular structures, such as filamentous networks. However, co-localization or alignment may also occur because the observed components are associated with external effectors. For example, the internal components of a polarized cell are organized along the polarization axis, making it difficult to quantify how much of the observed alignment between two filamentous networks is related to common organizational constraints, and how much of it is indeed caused by direct interaction between filaments. Another example is introduced with protein co-localization, where their intensity distributions may be heavily biased to specific levels regulated by the cell state. The combined effects of *global bias* with *local interactions* are manifest in the joint distribution of the spatially coupled variables. The contribution of global bias to this joint distribution can be recognized from the deviation of the marginal distributions of each of the two variables from an (un-biased) uniform distribution.

Although global bias can significantly mislead the interpretation of co-localization and co-orientation measurements, most studies do not account for this effect (Adler and Parmryd, 2010; Bolte and Cordelieres, 2006; Costes et al., 2004; Das et al., 2015; Dunn et al., 2011; Kalaidzidis et al., 2015; Rizk et al., 2014; Serra-Picamal et al., 2012; Tambe et al., 2011). Previous approaches indirectly assessed spatial correlations (e.g., (Drew et al., 2015; Karlon et al., 1999)), variants of mutual information (e.g., (Krishnaswamy et al., 2014; Reshef et al., 2011)) or spatial biases (Helmuth et al., 2010) but did not explicitly quantify the contribution of the global bias to the observed joint distribution. These methods approach the global bias as a confounding factor (VanderWeele and Shpitser, 2013) that must be eliminated for more accurate assessment of the true local interaction, but ignore the possibility that the global bias contains by-itself valuable mechanistic information to cell behavior.

Here, we present *DeBias* as an algorithm to decouple the global bias (represented by a *global index*) from the bona fide local interaction (represented by a *local index*) in co-localization and co-orientation of two independently-measured spatial variables. The decoupling enables simultaneous investigation of processes that drive global bias and local interactions between spatially-matched variables. Our method is dubbed DeBias because it **De**couples the global **Bias** from local interactions between two variables.

To highlight its capabilities, *DeBias* was applied to data from four different areas in cell biology, ranging in scale from macromolecular to multicellular: (1) alignment of vimentin fibers and microtubules in the context of polarized cells; (2) alignment of cell velocity and traction stress during collective migration; (3) fluorescence resonance energy transfer of Protein Kinase C; and (4) recruitment of transmembrane receptors to clathrin-coated pits during endocytosis. These examples demonstrate the generalization of the method and underline the potential of extracting global bias as an independent functional measurement in the analysis of multiplex biological variables.

## Results

### Similarity of observed co-orientation originating from different mechanisms

The issue of separating contributions from global bias and local interactions is best illustrated with the alignment of two sets of variables that carry orientational information. Examples of co-orientation include the alignment of two filament networks (Drew et al., 2015; Gan et al., 2016; Nieuwenhuizen et al., 2015), or the alignment of cell velocity and traction stress, a phenomenon referred to as *plithotaxis* (Das et al., 2015; Tambe et al., 2011; Trepat and Fredberg, 2011). In these systems, global bias imposes a preferred axis of orientation on the two variables, which is independent of the local interactions between the two variables (Fig. 1A).

Similar observed alignments may arise from different levels of global bias and local interactions. This is demonstrated by simulation of two independent random variables X and Y, representing orientations (Fig. 1B, left), from which pairs of samples x_{i} and y_{i} are drawn to form an alignment angle θ_{i} (Fig. 1B, middle). Then, a local interaction between the two variables is modeled by co-aligning θ_{i} by ζ_{i} degrees, resulting in two variables x’_{i} and y’_{i} with an observed alignment θ_{i} - ζ_{i} (Fig. 1B, right).

We show the joint distribution of X, Y for 4 simulations (Fig. 1C) where X and Y are normally distributed with identical means but different standard deviations (*σ*), truncated to [−90°, 90°)], and different magnitudes of local interactions (ζ). The latter is defined as ζ = αθ (Fig. 1B, α=1 for perfect alignment). Throughout the simulations both *σ* and α are gradually increased (Fig. 1C, left-to-right), implying that the global bias in the orientational variables is reduced while their local interactions increase. As a result, all simulations display similar observed alignments (mean values, 18.9°-19.5°). Fig. 1D visualizes 100 samples from each of the two most distinct scenarios: low *σ* and no local interaction (*σ* = 17°, α = 0) leads to tendency of X and Y to align independently to one direction (left); higher variance together with increased interaction (*σ* = 40°, α = 0.5) leads to more diverse orientations of X and Y (right), while maintaining similar mean alignment. This simple example highlights the possibility of observing similar alignments arising from different mechanisms. While the described properties are well known and many others have used statistical post-processing to eliminate such confounding factors for accurate assessment of local interactions (Drew et al., 2015; Helmuth et al., 2010; Karlon et al., 1999; Krishnaswamy et al., 2014; Reshef et al., 2011), we aim to directly quantify the global bias, with the goal of extracting encapsulated information that is fundamental to the biological question.

### DeBias: a method to assess the global and local contribution to observed co-alignment

*DeBias* models the observed marginal distributions X’ and Y’ as the sum of the contributions by a common effector, i.e., the global bias, and by local interactions that effect the co-alignment of the two variables in every data point (Fig. 2A).

In a scenario without any global bias or local interaction between X’ and Y’, the observed alignment would be uniformly distributed (denoted *uniform*). Hence any deviation from the uniform distribution would reflect contributions from both the global bias and the local interactions. To extract the contribution of the global bias we constructed a resampled alignment distribution (denoted *resampled*) from independent samples of the marginal distributions X’ and Y’, which decouples matched pairs (x’_{i}, y’_{i}), and thus excludes their local interactions. The global bias is defined as the dissimilarity between the uniform and resampled distributions and accordingly describes to what extent elements of X’ and Y’ are aligned without local interaction (Fig. 2B). If a local interaction exists then the distribution of the observed alignment angles will differ from independently resampled alignment distribution. Hence, the uniform distribution will be less similar to the experimentally observed alignment distribution (denoted *observed*) than to the resampled distribution. Accordingly, the local interaction is defined by the difference of dissimilarity between the observed and uniform distributions and dissimilarity between the resampled and uniform distributions (Fig. 2B).

The Earth Mover’s Distance (EMD) (Peleg et al., 1989; Rubner et al., 2000) was used to calculate dissimilarities between distributions. The EMD of 1-dimensional distributions is defined as the minimal ‘cost’ to transform one distribution into the other (Kantorovich and Rubinstein, 1958). This cost is proportional to the minimal accumulated number of moving observations to adjacent histogram bins needed to complete the transformation. Formally, we calculate with a straightforward implementation for 1-dimensional distributions. Introducing the EMD defines scalar values for the dissimilarities and allows us to define the EMD between resampled and uniform alignment distributions as the *global index* (GI) and the *local index* (LI) as the difference of EMD between observed and uniform and the GI (Fig. 2B). Fig. 2C, demonstrates how the GI and LI recognize the global bias and local interactions between the matched variable pairs (x’_{i}, y’_{i}) established in Fig. 1C. For a scenario with no local interaction (α = 0) DeBias correctly reports LI~0 and GI~3. For a scenario with gradually wider distributions X,Y, i.e., less global bias, and gradually stronger local interactions (α > 0), the LI increases while the GI decreases. Additional simulations showed that similar properties apply for negative local interactions ζ = αθ (Fig. 1B) were α < 0 (Figure 2 - figure supplement 1).

In the previous illustrations, changes in spread of the distributions X and Y were compensated by changes in the local interactions. When leaving the interaction parameter α constant while changing the spread of X and Y a weak, but intrinsically negative correlation between LI and GI becomes apparent (Fig. 2D-E). Thus, while DeBias can correctly distinguish scenarios with substantial shifts from global bias to local interactions, the precise numerical values estimating the contribution of LI varies between scenarios with a low versus high global bias. To address this issue we propose to exploit the variation between experiments for modeling the relation between LI and GI. This is demonstrated by comparing two distinct values of the interaction parameter, α, emulating different experimental settings (Fig. 2F). Within experiments variation was obtained by drawing multiple values of *σ* from a normal distribution. Due to the negative correlation between LI and GI the experimental patterns can only be discriminated by combining LI and GI into a two-dimensional descriptor (Fig. 2F). This point will be further demonstrated in one of the following case studies and in the Discussion.

### Theory and limiting cases of DeBias

To characterize the properties of DeBias we used theoretical statistical reasoning. The first limiting case is set by the scenario in which observations from X and Y are independent. The expected values of the observed and resampled alignments are identical; accordingly, LI converges to 0 for large N (Appendix 1, Theorem 1). The second limiting case is set by the scenario in which X and Y are both uniform. The corresponding resampled alignment is also uniform; accordingly, GI converges to 0 for a large N (Appendix 1, Theorem 2). The third limiting case occurs with perfect alignment, i.e., x_{i} = y_{i} for all i. In this case the observed alignment distribution is concentrated in the bin containing θ = 0. We examine two scenarios of perfect alignment: (1) When all the locally matched measurements are identical (x_{i} = y_{j} for all i, j), the resampled distribution is also concentrated in the bin θ = 0 implying that LI = 0 and GI assumes the maximal possible value: , where K is the number of quantization bins (Appendix 1, Theorem 3.I). (2) When X, Y are uniform (and x_{i} = y_{i} for all i), the resampled distribution is uniform, thus GI = 0 and LI reaches its maximum value: *LI* = , Appendix 1, Theorem 3.II). Generalizing this case, we prove that LI is a lower bound for the actual contribution of the local interaction to the observed alignment (Appendix 1, Theorem 4). Complementarily, GI is an upper bound for the contribution of the global bias to the observed alignment.

Last, we show that when X and Y are truncated normal distributions, or when the alignment distribution is truncated normal, GI reduces to a limit of 0 as *σ* → ∞, when *σ* is the standard deviation of the normal distribution before truncation (Appendix 1, Theorem 5). Simulations complement this result demonstrating that *σ* and GI are negatively associated, i.e., GI decreases with increasing *σ* (Fig. 2E). This final property is intuitive, because resampling from more biased distributions (smaller *σ*) tends to generate high agreement between (x_{i}, y_{i}) leading to reduced alignment angles and increased GI.

The modeling of the observed alignment as the sum of GI and LI allowed us to assess the performance of DeBias from synthetic data. By using a constant local interaction parameter ζ (ζ = c), we were able to retrieve the portion of the observed alignment that is attributed to the local interaction and to compare it with the true predefined ζ (Appendix 2, Appendix 2 - figure 1). These simulations demonstrated again the need for a GI-dependent interpretation of LI (first shown in Fig. 2E-F). Simulations were also performed to assess how the choice of the quantization parameter K (i.e., number of histogram bins) and number of observations N affect GI and LI (Appendix 2, Appendix 2 - figures 2-3), and this was also verified in our experimental data (Figure 3 - figure supplement 1). In summary, by combining theoretical considerations and simulations we demonstrated the properties and limiting cases of DeBias in decoupling paired matching variables from orientation data.

### Local alignment of Vimentin and Microtubule filaments

We applied DeBias to investigate the degree of alignment between vimentin intermediate filaments and microtubules in polarized cells. Recent work using genome-edited Retinal Pigment Epithelial (RPE) cells with endogenous levels of fluorescently tagged vimentin and α-tubulin showed that vimentin provides a structural template for microtubule growth, and through this maintains cell polarity (Gan et al., 2016). The effect was strongest in cells at the wound front where both vimentin and microtubule networks collaboratively align with the direction of migration (Fig. 3A-C). An open question remains as to how much of this alignment is caused by the extrinsic directional bias associated with the collective migration of cells into the wound as opposed to a local interaction between the two cytoskeleton systems.

Analysis of the GI and LI revealed that most of the discrepancy in vimentin-microtubule alignment originated from a shift in the global bias (Fig. 3D), suggesting that the local interaction between the two cytoskeletons is unaffected by the cell position or knock-down of vimentin. Instead, the reduced alignment between the two cytoskeletons is caused by a loss of cell polarity in cells away from the wound edge, probably associated with the reduced geometric constraints imposed by the wound edge. In a similar fashion, reduction of vimentin expression relaxes global cell polarity cues that tend to impose alignment.

To corroborate our conclusion that the global state of cell polarity is encoded by the GI, we performed a live cell imaging experiment, in which single cells at the edge of a freshly inflicted wound in a RPE monolayer were monitored for 80 minutes after scratching. DeBias was applied to calculate a time sequence of LI and GI. Cells at the wound edge tended to gradually increase their polarity and started migrating during the imaging time frame (Fig. 3E, Video 1). Accordingly, the GI increased over time (Fig. 3F). We also used this data set to verify that the reported shifts in GI are independent of the number of data points in and the binning of the distribution (Figure 3 - figure supplement 1). This demonstrates the capacity of DeBias to distinguish fundamentally different effectors of cytoskeleton alignment.

### Identifying molecular factors in alignment of cell velocity and mechanical forces during collective cell migration

Collective cell migration requires intercellular coordination, achieved by mechanical and chemical information transfer between cells. One mechanism for cell-cell communication is plithotaxis, the tendency of individual cells to align their velocity with the maximum principal stress orientation (He et al., 2015; Tambe et al., 2011; Zaritsky et al., 2015). As in the previous example of vimentin and microtubule interaction, much of this alignment is associated with a general directionality of velocity and stress field parallel to the axis of collective migration (Zaritsky et al., 2015).

Using a wound healing assay, Das et al. (Das et al., 2015) screened 11 tight-junction proteins to identify pathways that promote motion-stress alignment (Fig. 4A). Knockdown of Merlin, Claudin1, Patj and Angiomotin (Amot) reduced the alignment of velocity direction and stress orientation (Das et al., 2015). Further inspection of these hits showed that the stress orientation remained stable upon depletion of these proteins, but the velocity direction distribution was much less biased towards the wound edge (Zaritsky et al., 2015). Here, we further analyze this data to demonstrate the capacity of DeBias to pinpoint tight-junction proteins that alter specifically the global or local components that induce velocity-stress alignment.

By distinguishing GI and LI we generated a refined annotation of the functional alteration that depletion of these tight-junction components caused in mechanical coordination of collectively migrating cells (Fig. 4B-C). First, we confirmed that the four hits reported by (Das et al., 2015) massively reduced the GI, consistent with the notion that absence of these proteins diminished the general alignment of velocity to the direction induced by the migrating sheet (Fig. 4B, red dashed rectangle). Merlin, Patj and Angiomotin reduced the LI to values close to 0, suggesting that the local dependency between stress orientation and velocity direction was lost. Depletion of Claudin1, or of its paralog Claudin2, which was not reported as a hit in the Das et al. screen, reduced the LI to a lesser extent, similarly for both proteins, but had very different effects on the GI (Fig. 4B, purple dashed rectangle). This suggested that the analysis by (Das et al., 2015) missed effects that do not alter the general alignment of stress or motion, and implied the existence of a local velocity-stress alignment mechanism that does not immediately change the collective aspect of cell migration.

When assessing the marginal distributions of stress orientation and velocity direction we observed that depletion of Claudin1 reduced the organization of stress orientations and of velocity direction, while Claudin2 reduced only the latter. The LI values of depletion conditions were similar and lower than control (Fig. 4D). Merlin depletion is characterized by an even lower LI and marginal distributions with aligned stress orientation and almost uniform alignment distribution (Fig. 4D). Since we think that aligned stress is transformed to aligned motion (He et al., 2015; Zaritsky et al., 2015), we propose that in this data the LI quantifies the effect of local mechanical communication on parallelizing the velocity among neighboring cells. Accordingly, stress-motion transmission mechanism is impaired to a similar extent by reduction of Claudin1 and Claudin2, albeit less than by reduction of Merlin.

Using LI as a discriminative measure also allowed us to identify a group of new hits (Fig. 4C). ZO1, ZO2, ZO3, Occludin and ZONAB are all characterized by small reductions in GI but a substantial increase in LI relative to control (Fig. 4B, orange dashed rectangle). A quantitative comparison of control and ZO1 depleted cells provides a good example for the type of information DeBias can extract: both conditions yield similar observed alignment distributions with nearly identical means, yet ZO1 depletion has an 83% increase in LI and 8% reduction in GI, i.e., the mild loss in the marginal alignment of velocity or stress is compensated by enhanced local alignment in ZO1 depleted cells (Fig. 4D). This might point to a mechanism, in which stress orientation is reduced by tight-junction depletion, but enhanced by transmission of stress orientation into motion orientation, leading to comparable alignment. Notably, all paralogs, ZO1, ZO2 and ZO3 fall into the same cluster of elevated LI and slightly reduced GI relative to control experiments. This phenotype is in agreement with the outcomes of a screen that found ZO1 depletion to increase both motility and cell-junctional forces (Bazellières et al., 2015).

### Using DeBias to assess protein-protein co-localization

Protein-protein co-localization is another ubiquitous example of correlating spatially matched variables in cell biology. To quantify GI and LI for protein-protein co-localization, we normalized each channel to intensity values between 0 and 1. The ‘alignment’ θ_{i} of matched observations (x_{i},y_{i}) was replaced by the difference in normalized fluorescent intensities x_{i} - y_{i} (Methods). Simulations demonstrated that stronger interactions in co-localization are translated to larger LI values and validated that the choice of K (number of histogram bins) and N (number of observations) marginally affect GI and LI (Appendix 3, Appendix 3 - figure 1). While LI could serve as a measure to assess co-localization, the interpretation of GI is less intuitive. In the following, we present two examples of applying DeBias for protein-protein co-localization, and demonstrate the type of information that can be extracted from the combined GI and LI analysis.

### PKC FRET: a simple example of pixel-based protein-protein co-localization

To test the potential of DeBias in quantification of pixel-based co-localization, we analyzed the effect of fluorescence resonance energy transfer (FRET) in the C kinase activity reporter (CKAR), which reversibly responds to PKC activation and deactivation (Violin et al., 2003). Reduced PKC activity leads to energy transfer from CFP to YFP_{CFP}, resulting in reduced FRET ratio () (Fig. 5A). Assuming that the CFP signal is dominant (CFP > YFP_{CFP}), this alteration should reduce the difference between the CFP and YFP_{CFP} channels, which would in DeBias yield an increased LI (Fig. 5A, Methods).

To test this we labeled hTERT-RPE-1 cells with CKAR and imaged CFP and YFP_{CFP} channels before and after specific inhibition of PKC with HA-100 dihydrochloride (Fig. 5B, Methods), leading to reduced pixel differences in their normalized fluorescent intensities (Fig. 5C). As expected, the ratio decreased (Fig. 5D), LI values increased (Fig. 5E) and seemed more sensitive to the FRET. Surprisingly, DeBias indicated a shift in the GI values (Fig. 5F), reflected in a more homogeneous marginal distribution of both channels before inhibition (Fig. 5G). Control experiments with cytoplasmic GFP and mCherry expression did not show the shifts observed in LI or GI (Fig. 5H). Thus, we conclude that PKC inhibition changes the localization of PKC towards a more random spatial distribution. One possible mechanism for this behavior is that deactivation releases the kinase from the substrate. This example illustrates DeBias’ capabilities to simultaneously quantify changes in local interaction and global bias in pixel-based co-localization.

### Inferring co-localization of molecular cargo and clathrin-coated pitsduring endocytosis

Clathrin-mediated endocytosis (CME) is the major pathway for entry of cargo receptors into eukaryotic cells. Cargo receptor composition plays an important role in regulating clathrin-coated pit (CCP) initiation and maturation (Liu et al., 2010; Loerke et al., 2009). The clustering of transferrin receptors (TfnR), the classic cargo receptor used to study CME, promotes CCP initiation, in concert with clathrin and adaptor proteins (Liu et al., 2010). Recent evidence suggests a diversity of mechanisms regulating endocytic trafficking, including cross-talks between signaling receptors and components of the endocytic machinery (Di Fiore and von Zastrow, 2014). For example, the oncogenic protein kinase, Akt has been shown to play an important role in mediating CME in cancer cells (Liberali et al., 2014; Reis et al., 2015), but not in normal epithelial cells (Reis et al., 2015). Here we tested how the decoupling by DeBias of global and local contributions to the overall intensity alignment of clathrin and TfnR, can be used to simultaneously investigate co-localization and predict CCP dynamics, using fixed cell fluorescence imaging.

We used fluorescence images of fixed non-small lung cancer cells (H1299) or untransformed human retinal pigment epithelial cells (ARPE-19) expressing clathrin light chain A fused to eGFP (eGFP-CLCa) as a CCP marker (Fig. 6A-B). Cells were either treated with DMSO or with an AKT inhibitor (Akt inhibitor X, ‘ten’), and imaged by Total Internal Reflection Fluorescence Microscopy (TIRFM). CCPs were reported in the eGFP-CLCa channel and TfnR was visualized by immunofluorescence in a second channel (Methods). For single cells, the location of fluorescent signals of CLCa and TfnR were recorded and the data were pooled and processed by DeBias (Methods).

LI values, indicative of the co-localization between TfnR and CLCa, were significantly lower in Akt-inhibited H1299 compared to control cells (Fig. 6C). In contrast, Akt inhibition increased the LI values in ARPE-19 cells but this effect was less prominent (Fig. 6D). Akt inhibition resulted in increased GI values for both cell lines, to a much greater degree in H1299 cells (Fig. 6C-D). To test whether GI enhances the ability to distinguish between control and Akt-inhibited cells, we applied Linear Discriminative Analysis (LDA) classification to calculate the true positive rate versus the false positive rate for LI alone (black lines, Fig. 6E-F) or the pair (GI, LI), (orange lines, Fig 6E-F). The area under these curves (AUC) provided a direct measure of the ability of each method to accurately classify the experimental condition of single cells. AUC for the (GI, LI) representation was superior to using LI alone for both cell lines (H1299: 0.96 versus 0.88, Fig. 6E; ARPE-19: 0.83 versus 0.72, Fig. 6F). Similar benefit in discrimination was achieved when using the GI to complement Pearson’s correlation as an alternative to LI for measuring local interaction (Figure 6 - figure supplement 1A-F). Such improved discrimination is indicative of distinct molecular processes that were altered upon Akt inhibition. We also used this data set to experimentally validate the independence of GI and LI of the number of observations (N, Figure 6 - figure supplement 1G,H) and the choice of the number of histogram bins (K, Figure 6 - figure supplement 1I,J).

To interpret the increased GI values for Akt-inhibited cells, we examined the joint and marginal distributions of CLCa and TfnR. Upon Akt-inhibition, the joint distributions were more biased toward regions of low TfnR intensities (Fig. 6G-H). This was clearly observed in the marginal distributions (Fig. 6I-J). Hence, although the CLCa distribution appeared not to change upon AKT inhibition, the frequency of CCPs with fewer TfnRs increased. Given the positive relation between TfnR cargo quantities and CCPs maturation (Loerke et al., 2009), we wondered whether the increased frequencies of CCPs containing less TfnR might alter CCPs dynamics. Indeed, live-imaging of H1299 cells showed a higher frequency of CCPs with shorter lifetimes upon Akt-inhibition, which was not seen in normal ARPE-19 cells (Fig. 6K-L, Methods). It has previously been shown that Akt inhibition reduces the rate of TfnR CME uptake in H1299 cells, but not in ARPE-19 cells ((Reis et al., 2015), see also Fig. 6M-N); therefore, these findings indicate that the reduced levels of TfnR in CCPs upon Akt inhibition results in an increase in short-lived, most likely abortive events, and hence a decrease in CME efficiency.

Altogether, DeBias could distinguish alterations in the regulation of CME between two cell types. The decoupling to GI and LI indicated that upon Akt inhibition, both untransformed and cancer cells showed a global bias towards CCPs with lowered TfnR intensities. This conclusion could not have been reached by considering only the LI, which increased for normal and decreased for transformed cell lines.

## Discussion

We introduce DeBias as a new method to assess global bias and local interactions between coupled cellular variables. Although the method is generic, we show here specific examples of DeBias analysis in co-orientation and co-localization studies. The source code is available, https://github.com/DanuserLab/DeBias, as well as via a web-based platform, https://debias.biohpc.swmed.edu. The website also provides detailed instructions for the operation of the user interface.

DeBias defines a generalizable framework for eliminating confounding factors in the analysis of interacting variables. Our examples demonstrate that the distinction of global and local contributions to the level of variable coupling eliminates much of the global confounder bias in the analysis of more direct interactions and can unearth in the form of global bias mechanisms that are missed by a single parameter analysis (Figs. 1-2). In the example of vimentin-microtubule alignment (Fig. 3), the significant decrease in GI as opposed to the LI upon partial vimentin knock-down indicated that the reduction in alignment between the two cytoskeleton systems is associated with a reduction of cell polarity as the global cue. In the example of stress-velocity alignment (Fig. 4), depletion of some tight junction proteins increased LI, suggestive of enhanced local stress-motion transmission; knock-down of others decreased GI indicating an overall impaired alignment of velocity in the direction of wound closure. In the example of FRET experiments (Fig. 5), PKC inhibition lead to increased LI, validating the FRET response, while a reduced GI was indicative of weaker interactions of the inactivated kinase with its substrates. In the example of Tfn receptor (TfnR) co-localization with CCPs during CME (Fig. 6), the increased GI in response to Akt inhibition related to a higher fraction of CCPs containing less TfnR. Moreover, Akt inhibition induced opposite shifts in LI for normal and cancer cells, reflecting differential alterations in co-localization between cell types. Thus, DeBias provided insight into the regulation of cargo-pit association by kinase activity that depended on a proper deconvolution of local and global effects on the interaction of the clathrin and receptor signal. We then validated our conclusions by further analyses of the marginal distributions, live-imaging and uptake assays (Fig. 6). Overall, the four applications shown in this work first emphasize the general need for a confounder analysis when dealing with coupled biological variables and second indicate that the global bias may be linked to mechanistically meaningful properties of the studied system. These properties were either ignored or eliminated by previous methods, and now can be assessed directly by DeBias.

Other approaches have been used to address global confounders for assessment of local interactions between biological variables. For the specific example of object-based co-localization, Helmuth et al. simulated the spatial distribution of objects in the absence of local interactions to calibrate co-localization measurement (Helmuth et al., 2010). Other methods mostly used second-order spatial statistics on distances between neighbor points to exclude confounders for better co-localization sensitivity (reviewed in (Lagache et al., 2015)). Importantly, we show applications of DeBias on co-localization that do not require initial object detection (Fig. 5). While the phenomenon of confounder bias is independent of object-versus pixel-based co-localization, we distinguish the peculiarities of the two scenarios in Appendix 4).

An important and more general approach to revealing local interactions masked by global biases was recently proposed by (Krishnaswamy et al., 2014), using applications to single cell mass cytometry data as examples. The authors developed a measure referred to as conditional-Density Resampled Estimate of Mutual Information (DREMI) to quantify the influence of a protein X on protein Y based on the conditional probability P(Y|X). DREMI takes advantage of the abundant mass cytometry data to equally weigh data at different intervals along the range of X values using >10,000 cells per experimental condition. This approach is less reliable when limited data is available, because of the low confidence in the conditional probability of observations with low data abundance. Thus, DREMI is not well suited for image data, which typically has fewer observations.

DeBias estimates GI and LI assuming a constant global bias and local interaction for all observations. Moreover, its quantification power is relative. For example, a two-fold increase in the direct interaction of two variables would not necessarily result in a two-fold increase in LI. Another limitation is the absence of complete orthogonality of GI and LI values (Fig. 2E-F, Appendix 3 - figure 1), which complicates the interpretation of GI and LI in certain scenarios These three limitations apply to all current approaches for quantifying interactions between coupled variables. The main conceptual advance DeBias seeks to make relates to the explicit integration of confounding factors in the analysis of coupled variables, which implies an expansion of the coupling metric from a scalar to a two-dimensional score. A forth limitation in the current implementation of DeBias is the linear normalization of multiple intensity variables in co-localization applications. Future versions may include non-linear normalization methods, although such normalization is usually highly specific to a particular data set. Last, the mechanism encoded by the GI is not always obvious. Sometimes it requires additional experiments to unveil the information contained by the GI. For example, we combined fixed cell dual-color imaging with live-imaging and uptake assays to show that shifts in the GI encode a shift in the relative populations of short-and long-lived CCPs between conditions (Fig. 6). Despite some of the discussed complexities, DeBias offers a simple means to quantify and interpret mechanisms that alter confounders in the coupling of two variables and to largely exclude such global biases from the quantification of direct interactions.

## Methods

### DeBias procedure

The DeBias procedure is depicted in Fig. 2A. The marginal distributions X and Y are estimated from the experimental data, ∀*i*,*x _{i}*,

*y*∈ [0,90°]. The experimentally observed alignment distribution (denoted

_{i}*observed*) is calculated from the alignment angles

*θ*of matched (

_{i}*x*,

_{i}*y*) paired variables, for all i.

_{i}

The resampled alignment distribution (denoted *resampled*) is constructed by independent sampling from X and Y. N random observations (where N = |X| is the original sample size) from X and Y are independently sampled with replacement, arbitrarily matched and their alignment angles calculated to define the resampled alignment. This type of resampling precludes the local dependencies between the originally matched (*x _{i}*,

*y*) paired variables.

_{i}The uniform alignment distribution (denoted *uniform*) is used as a baseline for comparison between distributions. This is the expected alignment distribution when neither global bias (reflected by uniform X, Y distributions) nor local interactions exist. The Earth Mover’s Distance (EMD) (Peleg et al., 1989; Rubner et al., 2000) was used as a distance metric between alignment distributions. The EMD for two distributions, A and B, is defined as follows:

, where *a _{j}* and

*b*are the frequencies of observations in bins

_{j}*j*of the histograms of distributions A and B, respectively, each containing K bins.

The global index (GI) is defined as the EMD between the uniform distribution and the resampled alignment:

GI = EMD(*uniform,resampled*)

The local index is determined by subtraction of the global index from the EMD between the uniform distribution and the experimentally observed alignment distribution:

LI = EMD(*uniform,observed*) - global index

#### DeBias for protein-protein co-localization

The following adjustments to this procedure are implemented to allow DeBias to quantify protein-protein co-localization:

Levels of fluorescence are not comparable between different channels due to different expression levels and imaging parameters. Thus, each channel is normalized to [0,1] by the 5

^{th}and 95^{th}percentiles of the corresponding fluorescence intensities to achieve a stable and robust distribution.The alignment angle

*θ*of the matched observation (_{i}*x*) is calculated as the difference in normalized fluorescence intensities_{i},y_{i}*x*and the alignment distribution is thus defined on the interval [-1,1]._{i}- y_{i}

The number of histogram bins for the alignment distributions (observed, resampled and uniform) was K = 15 for orientational data, 19 for PKC and 40 for CME co-localization data.

#### Automated selection of number of histogram bins, K

The Freedman-Diaconis rule (Freedman and Diaconis, 1981) was used to automate the selection of histogram bin width: *bin size* = , where Q_{i} is the i^{th} quartile of the empirical distribution x and n is the number of data points contained. A function to calculate K is included in our publically available source code and this functionality was also integrated to the web-server implementation. Importantly, GI and LI across experiments can be compared only when evaluated with the same K value and this is enforced by the web-server. It is the responsibility of the source-code user to validate using the same K values when comparing different experimental conditions.

### Simulating synthetic data

#### Simulating co-alignment data

Let us define *X* and *Y* as the angular probability distribution functions, with angle instances denoted *x _{i}* and

*y*, respectively. When simulating local relations, for each pair of angles, one of the angles will be shifted towards the other by ζ degrees (Fig. 1B), unless |

_{i}*x*−

_{i}*y*|< ζ, in which case it will be shifted by |

_{i}*x*−

_{i}*y*| degrees. The angle to be shifted (either

_{i}*x*or

_{i}*y*) is chosen by a Bernoulli random variable,

_{i}*p*, with probability 0.5. The observed angles for pixel

*i*will therefore be

and

The alignment of angles at pixel *i* will be:

For example, for our simulations we choose *X,Y* to be truncated normal distributions on (−90,90) with µ=0 and varying values of *σ*.

ζ is modeled in two ways: either as a constant value, e.g. ζ = 5° (Appendix 2 - figures 1-3), or as a varying value dependent on |*x _{i}*−

*y*| (Figs. 1-2). For the latter, ζ is defined as a fraction 0 <

_{i}*α*< 1 from |

*x*−

_{i}*y*| for each pair of observations; namely, ζ

_{i}_{i}=

*α*|

*x*−

_{i}*y*| (see Fig. 1B). Note, that the observed marginal distributions X’, Y’ may be slightly different from X, Y.

_{i}#### Simulating co-localization data

Let us define *X* as a probability distribution function, with instances denoted *x _{i}*. Local interactions were simulated as

*y*=

_{i}*x*ζ

_{i}_{i}, where ζ

_{i}is an instance of a probability distribution

*Z*. For our simulations we chose X to be a truncated normal distribution on [0,1] with µ

*x*= 0.5 and

*Z*to be a normal distribution with µ

_{ζ}= 1. This model of interaction assumes on average a one-to-one interaction between

*X*and

*Y*, deviation of ζ

_{i}from 1 implies reduced interaction.

*y*samples were also truncated to [0,1]. This ensures that ∀

_{i}*i*,0 ≤

*y*,

_{i}*x*≤ 1 and accordingly, ∀

_{i}*i*,−1 ≤

*x*−

_{i}*y*, ≤ 1, making unnecessary the normalization step in DeBias co-localization calculation.

_{i}When simulating scenarios where only sub-groups of the observations undergo interactions, we sampled the none-interacting observations *y _{i}* from

*Y*the truncated normal distribution on (0,1), with µ

_{y}= 0.5 and

*σ*

_{y}=

*σ*

_{x}(same as

*X*).

### Vimentin and Microtubule filaments experiments and analysis

#### Cell model

hTERT-RPE-1 cells were TALEN-genome edited to endogenously label vimentin with mEmerald and α-tubulin with mTagRFPt, and validated for protein expression levels (Gan et al., 2016). Cells were stably transfected with shRNA against vimentin to knock down vimentin and the knockdown efficiency was validated as ~75% (Gan et al., 2016).

#### Fixed cell imaging

hTERT-RPE-1 mEmerald-vimentin/mTagRFPt-α-tubulin cells expressing shRNA-VIM or scrambled control shRNA Scr were plated into MatTek (Ashland, MA) 35 mm glass-bottom dishes (P35G-0-20-C) coated with 5 µg/mL fibronectin. Cells were incubated overnight to allow them to adhere and form monolayers. Monolayers were scratched with a pipette tip to form a wound. Cells were incubated for 90 minutes, washed briefly and fixed with methanol at −20°C for 15 minutes. Cells were imaged at the wound edge (denoted “front” cells), and at 2-3 cell rows from the wound edge (denoted “back” cells, only for control condition). Images were acquired using a Nikon Eclipse Ti microscope, equipped with a Nikon Plan Apo Lambda 100x/1.45 N.A. objective. Images were recorded with a Hamamatsu ORCA Flash 4.0 with 6.45 μm pixel size (physical pixel size: 0.0645 × 0.0645 μm). All microscope components were controlled by Micro-manager software.

#### Live cell imaging

hTERT-RPE-1 mEmerald-vimentin/mTagRFPt-α-tubulin cells expressing scrambled control shRNA Scr were plated into MatTek (Ashland, MA) 35 mm glass-bottom dishes (P35G-0-20-C) coated with 5 µg/mL fibronectin. Cells were incubated overnight to allow them to adhere and form monolayers. Monolayers were scratched with a pipette tip to form a wound. Imaging started 30 minutes after scratching with an Andor Revolution XD spinning disk microscope mounted on a Nikon Eclipse Ti stand equipped with Perfect Focus, a Nikon Apo 60x 1.49 N.A. oil objective and a 1.5x optovar for further magnification. Images were recorded with an Andor IXON Ultra EMCCD camera with 16 μm pixel size (physical pixel size: 0.16 × 0.16 μm). Lasers with 488 nm and 561 nm light emission were used for exciting mEmerald and mTagRFPt, respectively. The output powers of the 488 nm and 561 nm lasers were set to 10% and 20% of the maximal output (37 mW and 23 mW, respectively). The exposure time was 300 ms per frame for both channels and images were collected at a frame rate of 1 frame per minute. During acquisition, cells were kept in an onboard environmental control chamber. All microscope components were controlled by Metamorph software.

#### Filaments extraction and spatial matching

We applied the filament reconstruction algorithm reported in (Gan et al., 2016). Briefly, multi-scale steerable filtering is used to enhance curvilinear image structures, centerlines of candidate filament fragments are detected, clustered to high and low confidence sets and iterative graph matching is applied to connect fragments into complete filaments. Each filament is represented by an ordered chain of pixels and the local filament orientation derived from the steerable filter response. Spatial matching was performed as follows: each pixel belonging to a filament detected in the MT channel is recorded to the closest pixel that belongs to a filament in the VIM channel. If the distance between the two pixels is less than 20 pixels, then the pair of VIM and MT orientations at this pixel is recorded for analysis. The same process is repeated to record matched pixels from VIM to MT filaments.

### Collective cell migration experiments and analysis

Coupled measurements of velocity direction and stress orientation were taken from the data originally published by Tamal Das et al. (Das et al., 2015). Particle image velocimetry (PIV) was applied to calculate velocity vectors, and monolayer stress microscopy (Tambe et al., 2011) was used to extract stress orientations. Velocity and stress measurements were recorded 3 hours after collective migration was induced by lifting off the culture-insert in which the cells have grown to confluence. Validated siRNAs were used for gene screening. Detailed experimental settings can be found in (Das et al., 2015).

#### Statistical test

We devised a permutation test to determine statistical significance of differences in LI values between experiments (conditions) (Fig. 4C). For every pair of conditions (i,j), the following procedure was repeated for 100 iterations. 50% of the velocity-stress observations were randomly selected for each condition and the LI (and GI) were calculated from this subsampling. Without loss of generality, for LI_{i} < LI_{j} (based on Fig. 4B) the p-value was recorded as the fraction of iterations in which the subsampled LI value for condition i was greater than the LI value for condition j. A fraction of 0 thus implies p-value < 0.01.

### PKC FRET experiments

hTERT-RPE-1 cells (ATCC) expressing GFP and mCherry (for the control experiment) or C kinase activity reporter (CKAR, for the PKC activation experiment) (Violin et al., 2003) were plated with DMEM/F12 medium containing 10% fetal bovine serum and 1% penicillin-streptomycin in fibronectin-coated 35 mm MatTek plates (P35G-0-10-c). Cells were incubated overnight and imaged with a custom-built DeltaVision OMX widefield microscope (GE healthcare life sciences) equipped with an Olympus PLAN 60x 1.42 N.A. oil objective and CoolSNAP HQ2 interline CCD cameras. FRET experiments were performed with a 445 nm laser, and control experiments were performed with 488 and 561 nm lasers. 478/35, 541/22, 528/48 and 609/37 emission bandpass filters were used for the CFP, YFP, GFP and mCherry channels, respectively. The output powers of the lasers were set to 10% the maximal output (100 mW). The exposure time was 200 ms per frame for both channels. 10 µM of the PKC inhibitor HA-100 dihydrochloride (Santa Cruz Biotechnology) was added to the media after the first image was recorded and a second image was recorded 20 minutes later.

Single cells were manually selected for analysis. In particular, cells with higher intensities in the CFP channel were found to provide reproducible changes in their FRET intensity. Each cell was manually annotated and analyzed with the Biosensor Processing Software 2.1 to produce the ratio images (Hodgson et al., 2010). Briefly, the field of view was corrected for uneven illumination, background was subtracted, the image was masked with the single cell annotation, and the ratio image was calculated as CFP/YFP_{CFP}. Statistics was determined using the non-parametric Wilcoxon signed-rank test.

### Clathrin mediated endocytosis experiments

#### Cells, cell culture and chemicals

ARPE-19 (retinal pigment epithelial cells) stably expressing eGFP-CLCa were grown under 5% CO2 at 37°C in DMEM high glucose medium (Life Technologies), supplemented with 20 mM HEPES, 10 mg/ml streptomycin, 66 ug/ml penicillin and 10% (v/v) fetal calf serum (FCS, HyClone). H1299 (non-small cell lung carcinoma) stably expressing eGFP-CLCa were grown under 5% CO_{2} at 37°C in RPMI, supplemented with 20 mM HEPES, 10 mg/ml streptomycin, 66 ug/ml penicillin and 5% (v/v) fetal calf serum (FCS, HyClone). The AKT inhibitor (Akt inhibitor X, ‘ten’) was purchased from Calbiochem.

#### Transferrin receptor internalization

TfnR uptake was measured by an ‘in-cell’ ELISA assay using the anti-TfnR monoclonal antibody, HTR-D65, as ligand, exactly as previously described (Reis et al., 2015). Internalized D65 was expressed as the percentage of the total surface-bound D65 at 4°C (i.e., without acid wash step), measured in parallel.

#### Fixed cell imaging

Transferrin receptor (TfnR) surface levels were measured using the anti-TfnR mAb (HTR-D65). ARPE-19 and H1299 cells (1.5 × 10^{5} cells per well in a 6-well plate) were grown overnight on glass cover slips and further pre-incubated with 4 ug/ml of D65 in TfnR assay buffer (PBS4+: PBS supplemented with 1 mM MgCl_{2}, 1 mM CaCl_{2}, 5 mM glucose and 0.2% bovine serum albumin) at 4°C for 30 min. After being washed with PBS^{4+}, cells were fixed in 4% PFA for 30 min at 37°C, permeabilized with 0.1% Triton X-100 for 5 min and further blocked with Q-PBS (2% BSA, 0.1% lysine, pH 7.4) for 30 min. After 3 washes with PBS, cells were incubated with a 1:500 dilution of goat anti-mouse Alexa-568 labelled secondary antibody (Life Technologies) for 30 min, washed an additional three times with PBS before TIRFM imaging using a 100 × 1.49 NA Apo TIRF objective (Nikon) mounted on a Ti-Eclipse inverted microscope equipped with the Perfect Focus System (Nikon). Images were acquired with an exposure time of 150 ms for both channels using a pco-edge 5.5 sCMOS camera with 6.5 um pixel size. For inhibition studies, cells were initially pre-incubated in the presence of Akt inhibitor X (10 uM) for 30 min at 37°C, followed by pre-incubation with 4 ug/ml of D65 at 4°C for 30 min, in continued presence of the inhibitor.

#### Live-cell imaging and analysis

During TIRFM imaging, cells were maintained in DMEM lacking phenol red and supplemented with 2.5% fetal calf serum. Time-lapse image sequences were acquired at a frame rate of 1 frame/s with exposure time of 150 ms using a pco-edge 5.5 sCMOS camera with 6.5 um pixel size. CCP detection, tracking and construction of life-time distributions were performed with the custom CME analysis software described in (Aguet et al., 2013). Lifetime distribution was defined at the resolution of 1 second and limited to 160 seconds. Longer CCP trajectories were excluded from the analysis. To compare lifetime distributions for single field of views (FOVs) between WT and AKT-inhibited cells we measured the heterogeneity as the EMD distance to the uniform distribution. FOV’s score were compared between the different experimental conditions using the non-parametric Wilcoxon rank-sum test.

#### Image analysis for fixed cell experiments

Single cell masks were manually annotated in each FOV. We applied the approach described in (Aguet et al., 2013) to automatically detect CCPs from the CLC channel. Briefly, CLC fluorescence was modeled as a two-dimensional Gaussian approximation of the microscope PSF above a spatially varying local background. CCP candidates were first detected via filtering, followed by a model-fitting for sub-pixel localization. The fluorescent intensity of the CLC and any other acquired channel were recorded in the detection coordinates to define the matched observations for DeBias. GI and LI were calculated independently for each single cell. Linear Discriminant Analysis (LDA) classification (Fisher, 1936) was applied to assess single cell classification accuracy. Every cell constituted an observation, a label was assigned based on the experimental condition and the representation was either the LI or the pair (GI,LI). The LDA classifier was trained on a labeled dataset consisting of WT and AKT-inhibition for H1299 or ARPE19 cells. The area under the Receiver Operating Characteristic (ROC) curve was recorded to assess and compare the discriminative accuracy of different measures. The true-positive rate (TPR) is the percentage of control cells classified correctly. The false-positive rate (FPR) is the percent of AKT inhibited cells classified as control. When comparing the potential accuracy of several classification algorithms, a measure that has higher true-positive rate for any fixed false-positive rate values is proved to be the better one. Thus, higher curves (larger areas under the ROC curve, or AUC) correspond to more discriminative measures. Statistical significance for comparing classification performance of LDA classifiers that were trained for scalar measures with or without the GI was calculated by bootstrapping (Fig. 6E-F). The following process was repeated 1000 times and the frequency for which the scalar-based classifier outperformed the classifier trained on pairs of measures was reported as the p-value. Random resampling with replacement was performed to obtain a sample size identical to that of the observed dataset. The area under the curve (AUC) of the competing pre-trained LDA classifiers was assessed for this resampled dataset and recorded when the model that was trained without the GI predicted better.

### Webserver

The DeBias code was implemented in Matlab, compiled with Matlab complier SDK and transferred to a web-based platform to allow public access for all users at https://debias.biohpc.swmed.edu. The graphical user interface (GUI) was designed to be simple and easy to use. The user uploads one or more datasets to the DeBias webserver and selects the mode of operation (co-localization/orientation). GI and LI values are calculated and the results are displayed and emailed to the user. ‘DeBias Analyst’ enables to group experiments into two experimental conditions (usually control versus treatment), visualizes and outputs statistics on the alterations of GI and LI. The software’s flow chart and a detailed user manual are available in the online user manual. Source code is publically available, https://github.com/DanuserLab/DeBias.

## Author Contribution

AZ conceived the study, designed experiments, performed simulations, analyzed the data, assisted in theoretical results and the web-server design and development and wrote the initial draft of the manuscript. UO devised the theoretical part and assisted in simulations. ZG designed and performed the experiments on vimentin-microtubule alignment and the PKC co-localization experiments. CR conceived designed and implemented the endocytosis co-localization experiments. YD implemented the web-server and wrote the user manual. SLS and GD supervised the research. AZ and GD wrote the paper with contributions from all authors.

## Competing Financial Interests

The authors declare that they have no competing interests.

## Acknowledgements

We thank the BioHPC team at UTSW and especially Liqiang Wang for the help in implementing the DeBias web-server and making it freely available for public use. We are grateful to Tamal Das and Joachim Spatz for providing us with the motion and stress data from their tight-junction screen. We thank Sangyoon Han, Claudia Schaefer, Meghan Driscoll, Erik Welf, Phillippe Roudot and Marcel Mettlen for critically reading the manuscript and Marcel Mettlen for fruitful discussions and advice. This work was supported by the Cancer Prevention and Research Institute of Texas (CPRIT R1225 to GD), by NIH P01 GM103723 (to GD) and by GM713165 (to SLS and GD). UO was supported by an EMBO postdoctoral fellowship. The funders had no role in study design, data collection and analysis, decision to publish or preparation of the manuscript.

## Appendix 1: Theoretical results for co-orientation data

**Terms and definitions**: Let X, Y be the distribution functions of two random variables representing angles on [−90°,90°]. Spatially matched random variables from these distributions are denoted *x _{i}* and

*y*,

_{i}*i*=1,2…

*N*, where

*N*is the number of observations.

*x*

_{i}^{*}and

*y*

_{i}^{*}are random variables sampled from X and Y independently (without considering the spatial matching). The observed and resampled alignment distributions are denoted

*A*and

*A*

^{*}, respectively. The alignment distributions represent angles on [0°,90°], and are functions of X,Y, the interaction between X and Y, and

*N*. Random variables from

*A*are denoted

*θ*,

_{i}*i*=1,2…

*N*. Random variables from

*A*

^{*}are denoted

*θ*

_{i}^{*}. Let

*K*be the number of bins in the alignment histogram. Histogram bins are denoted

*bin*,

_{i}*i*=0,…,

*K*−1 where

*bin*

_{0}contains the lowest values (including 0°) and

*bin*

_{k−1}the highest values (including 90°).

*U*denotes the uniform distribution on [0°,90°]with the same K bins as

*A*,

*A*

^{*}.

**Theorem 1: Local index of independent variables**

If X,Y are independent, then *E*(*LI*(X,Y))=0

**Proof:**

* Resampling does not change the expectation of the difference of two independent variables.

**Theorem 2: Global index of uniform distributions**

Let X,Y be uniform distributions, then lim* _{N}_{→∞}GI*=0.

**Proof:**

Since X and Y are uniform distributions, the density of the resampled distributions are . We can compute the distribution of the difference by

We conclude that the distribution of the difference is

Therefore, when taking the absolute value of the angle difference we get:

Finally, since the alignment is limited to [0°, 90°] we apply the function

Therefore is a uniform distribution.

For *N* sufficiently large, the histogram has approximately of the observations in each of the *K* equally spaced intervals between 0 and 90 and thus lim* _{N→∞}GI*=lim

*(*

_{N→∞}EMD*A*

^{*},

*U*)=0.

**Theorem 3: Perfect alignment**

**(I)** If ∀*i*, *j*,*x _{i}*=

*y*then

_{j}**(II)** If X and Y are uniform distributions, and ∀*i*,*x _{i}*=

*y*then

_{i}**Proof:**

**(I)**

*A*=*A*^{*} because ∀*i*,*j a _{i}*=

*a*

_{j}^{*}=0. For large

*N*the random variable drawn from the alignment distribution

*A*will be approximately:

The EMD of the alignment from the uniform distribution is therefore simply ‘moving’ observations from *bin*_{0} to every other bin, which sums up to

Therefore, for large *N*, .

**(II)**

Since ∀*i*,*x _{i}*=

*y*we get that, similarly to part (I), .

_{i}On the other hand, since *X* and *Y* are uniform distributions, we get from theorem 2 that lim* _{N→∞}EMD*(

*A*

^{*},

*U*)=0.

Therefore, for infinite observations, .

**Theorem 4: LI is a lower bound for the local contribution to the observed alignment**

Assuming that the observed alignment distribution *A* is cumulatively explained by a global bias and a local interaction, we construct a new alignment distribution *A*_{−ζ} encoding the true cumulative local contribution to the observed alignment and demonstrate that *LI* ≤ *EMD*(*U*,*A*_{− ζ}) −*GI* to conclude that LI is a lower bound for the local contribution to the observed alignment.

**Proof:**

We first define *A* ^{−}, the alignment distribution corresponding to *A* that does not include any local interaction. Thus, *A* ^{−}, can be interpreted as an alignment distribution constructed from *X* ^{−} and *Y* ^{−}, denoting *X* and *Y* after elimination of the (unknown) alignment correction due to local interactions between the observations (*x _{i}*,

*y*). The construction of

_{i}*A*

_{−ζ}is based on the corresponding matching pairs () with alignment correction by the local interaction ζ

_{i}(see Fig. 1B for as a schematic depiction). Such local interaction exists in our model (although it might not be explicitly known) and can be represented as a vector ζ∈ℝ

*,ζ*

^{N}_{i}≥0 ∀

*i*. Note, that this construction supports different ζ

_{i}values for every observation

*i*and thus can provide a more detailed platform than the single measure LI that DeBias outputs (which assumes ζ

_{i}=ζ

*∀*

_{j}*i*,

*j*). Also note, that when ζ

*i*>

*θ*

_{i}^{−}(

*θ*

_{i}^{−}is the alignment angle between (

*x*

_{i}^{−},

*y*

_{i}^{−})), then the observed alignment

*θ*

_{i}^{−}−ζ

_{i}<0.

Accordingly, *A*_{−ζ} is defined as the alignment distribution of *θ _{i}*

^{−}−ζ

_{i}. As described above,

*A*

_{−ζ}can contain negative values for ζ

_{i}>

*θ*

_{i}^{−}.

*A*, the experimentally observed alignment, thus can be generated from

*A*

_{−ζ}as well, by truncating the “saturated” observations (where ζ

_{i}>

*θ*

_{i}^{−}) to the value 0. More formally, the elements in

*A*are defined by

We can get an upper bound for *EMD*(*A*,*A*^{−}) in the form of:

Where |*bin*| defines the size of the angular interval of a bin in the alignment histogram. This equation is intuitively interpreted as every observation *i* is locally aligned by ζ_{i}, and therefore is translocated bins, at most.

Note that a decreased bin size reduces this bound as close as needed to the value of *EMD*(*A*_{−ζ},*A*^{−}).

Finally,

Thus the LI is a lower bound on the contribution of the direct interaction between *X* and *Y* on the alignment distribution.

Additionally, we get that

Implying that the GI is an upper bound of the contribution of the global bias.

* by corollary 2

**Corollary 2:** For any alignment distribution A, *LI* ≤ *EMD*(*A*,*A*^{*})

**Proof:**

Let *A _{i}*,

*A*

_{i}^{*},

*U*denote the relative frequency of observations in

_{i}*bin*, 0 ≤

_{i}*i*≤

*k*−1 for

*A*,

*A*

^{*},

*U*, respectively.

* triangle inequality

**Theorem 5: GI limits for highly variant truncated normal distributions**

for the following scenarios:

(I) The resampled alignment is a truncated normal distribution with variance parameter *σ*^{2}.

(II) *X* and *Y* are truncated normal distributions, each with variance parameter *σ*^{2}.

**Proof:**

**(I)**

Let be the truncated normal resampled alignment distribution, defined by the parameters µ=0, *σ*, with the support interval (*a*, *b*), such that *a* ≤ µ ≤ *b*. Let *ϕ ^{σ}*(

*x*) be the probability density function (PDF) of the truncated normal distribution and u(

*x*),

*U*respectively, the PDF and CDF (cumulative distribution function)of the uniform distribution function on (

*a*,

*b*). The PDF and CDF of the normal distribution function is denoted in the standard notation of ϕ and Φ respectively.

First we prove that lim* _{σ→∞}ϕ^{σ}*(

*x*) =

*u*(

*x*) and use this to conclude that

Therefore, Since the support of is (a,b), the only constant satisfying that is a probability distribution is Therefore,

(II)

Let X, Y be truncated normal distributions. In part (I) we prove that lim* _{σ→∞}* X = lim

*Y = u(x). Theorem 2 implies that when X and Y are uniform distributions .*

_{σ→∞}## Appendix 2: Simulations with constant ζ

To assess the performance of DeBias we tested its ability to retrieve a pre-determined local interaction parameter ζ (see Fig. 1B) from simulated synthetic data. X and Y were modeled as truncated normal distributions on (-90, 90), with µ=0 and changing *σ*_{x}, *σ*_{y.} Pairs of (x_{i},y_{i}) were sampled from X, Y and shifted towards each other by ζ degrees (similar to Fig. 1B, but with a constant cumulative ζ) to construct the observed alignment angles. To avoid confusion we denote X, Y, *σ*_{x}, *σ*_{y} as the observed values post-simulation. For a given constant ζ, we exhaustively explored the *σ*_{x}, *σ*_{y} space. For each *σ*_{x}, *σ*_{y}, we performed 20 independent simulations with N = 1600 observations (x_{i},y_{i}). For each simulation we constructed the resampled distribution 10 times based on 400 observations drawn from the marginal X, Y distributions, and used the mean GI, LI. The final recorded GI, LI were averaged over the independent simulations.

The expected mean alignment when neither global bias nor local interactions exist is 45°. We begin by examining the deviation of the mean observed alignment from this value (45° - θ_{mean}). Better alignment is reflected by higher 45° - θ_{mean} values implying a larger deviation from the unbiased and no-interactions scenario. Low standard deviations *σ*, correspond to better alignment, improving with growing ζ, as expected (Appendix 2 - figure 1A). The GI follows a similar pattern and remains relatively stable for small changes in ζ (Appendix 2 - figure 1B). The similar patterns between Appendix 2 - figure 1A and B indicate that the global bias has a prominent role in determining the observed alignment.

The LI grows with ζ (Appendix 2 - figure 1C) and its relative contribution to the observed alignment grow with increasing ζ (Appendix 2 - figure 1D, quantified by LI/(LI+GI)), as expected. This relative contribution can be harnessed to restore an estimated ζ as the corresponding fraction from (45° - θ_{mean}) (Appendix 2 - figure 1E). The estimated ζ is a lower bound for the actual value (Appendix 1, Theorem 4). Estimation is more accurate for larger ζ and for large *σ* (Appendix 2 - figure 1F). These results again highlight the importance of exploiting the GI for better interpretation of the LI (first introduced in Fig. 2D-E).

We also investigated the effect of the choice of the number of bins K, used for sampling and computation of the EMD between distributions. Increased K induces linear growth in LI and GI values, as expected (Data S1 Theorem 5, Appendix 2 - figure 2A-B) and stabilized its accuracy in predicting ζ for K ≥ 11 (Appendix 2 - figure 2 C-E). Large K will require more observations to estimate the true distribution. Using a constant K for a specific application assures fair comparison between different cases. Varying N, the number of observations, did not have a major effect on these measurements (Appendix 2 - figure 3A-D), but increasing N reduced the noise which increased the accuracy in predicting ζ (Appendix 2 - figure 3E).

## Appendix 3: simulating protein-protein co-localization

Co-localization of molecules is commonly used to predict potential local interactions under the assumption that the stoichiometry of interacting molecules remains constant across all observations. We demonstrated this by simulating a random variable X, representing molecular counts, and a random variable Z, representing the local interaction. Pairs of samples x_{i} from X and ζ_{i} from Z were drawn, and y_{i} = x_{i}ζ_{i} represented the molecular counts of the co-localized molecule (Appendix 3 - figure 1A). The joint distributions of X, Y for 4 simulations are shown in Appendix 3 - figure 1B. X is normally distributed with mean µ= 0.5 and standard deviations *σ* = 0.2, truncated to [0,1]. Z is normally distributed with mean µ= 1 and different standard deviations, simulating gradually increasing local interactions (Appendix 3 - figure 1B, left-to-right). Applying DeBias on these data demonstrated that increased local interactions (reduced *σ*_{ζ}) are translated to increased LI (Appendix 3 - figure 1C).

We next simulated a scenario, in which a partial subset of observations y_{i} interacted with x_{i}; the remaining y_{i} were drawn independently from the distribution Y = X. We found that LI values increased with the fraction of interacting observations (Appendix 3 - figure 1D).

Finally, we assessed how variation in the quantization parameter (K) and number of observations (N) alter GI and LI (Appendix 3 - figure 1E-F) and this was also demonstrated in our experimental data (Figure 6 - figure supplement 1G-J).

## Appendix 4: pixel-versus object-based co-localization

Many methods have been developed to quantify protein-protein co-localization. Pixel-based methods measure pixel-wise correlation coefficients (Adler and Parmryd, 2010; Bolte and Cordelieres, 2006; Costes et al., 2004; Manders et al., 1993; Pearson, 1901), exploiting the notion that fluorescence levels of co-localized proteins are correlated. They suffer from background signal where no co-localization exists. Object-based methods first detect objects of interest and then assess co-localization based on second-order statistics of the spatial distributions of the detections (Helmuth et al., 2010; Kalaidzidis et al., 2015; Lagache et al., 2015; Rizk et al., 2014; Semrau et al., 2011). Object-based methods remove the background pixels but lose the information contained by the fluorescence levels at the detected objects. Thus, object-based methods are best applicable for the co-localization of binary signals (Lagache et al., 2015), but less suited for applications in which co-localization accounts for coupling of molecular counts on a continuous spectrum. Moreover, object-based methods require detection of objects in both channels, which often limits their applicability. Pros and cons for using either of these methods are presented in Appendix 4 – Table 1. In the examples of receptor-CCP co-localization we implemented a hybrid of the two approaches: co-localization analysis by DeBias focused on the intensity of fluorescent readouts within detected CCPs to decompose the coupling of the two intensity variables into LI and GI (Fig. 6). The same decomposition was demonstrated for a diffuse signal without objects in the PKC-FRET example (Fig. 5).