A Bayesian method for inferring quantitative information from FRET data

Background Understanding biological networks requires identifying their elementary protein interactions and establishing the timing and strength of those interactions. Fluorescence microscopy and Förster resonance energy transfer (FRET) have the potential to reveal such information because they allow molecular interactions to be monitored in living cells, but it is unclear how best to analyze FRET data. Existing techniques differ in assumptions, manipulations of data and the quantities they derive. To address this variation, we have developed a versatile Bayesian analysis based on clear assumptions and systematic statistics. Results Our algorithm infers values of the FRET efficiency and dissociation constant, Kd, between a pair of fluorescently tagged proteins. It gives a posterior probability distribution for these parameters, conveying more extensive information than single-value estimates can. The width and shape of the distribution reflects the reliability of the estimate and we used simulated data to determine how measurement noise, data quantity and fluorophore concentrations affect the inference. We are able to show why varying concentrations of donors and acceptors is necessary for estimating Kd. We further demonstrate that the inference improves if additional knowledge is available, for example of the FRET efficiency, which could be obtained from separate fluorescence lifetime measurements. Conclusions We present a general, systematic approach for extracting quantitative information on molecular interactions from FRET data. Our method yields both an estimate of the dissociation constant and the uncertainty associated with that estimate. The information produced by our algorithm can help design optimal experiments and is fundamental for developing mathematical models of biochemical networks.


Background
Proteins work together continuously in the cells of all living things, generating cascades of reactions that are vital for life. To fully understand each individual protein's task requires discovering the timing, location, and strength of its interactions. To acquire this detailed information, fluorescence microscopy methods are ideal because they can provide dynamic, single-cell data at high spatial resolution [1,2]. One fluorescence tool that enables researchers to observe protein interactions in living cells is Förster resonance energy transfer (FRET). FRET data has the potential to yield biochemical constants, which are critical for modeling biological systems, but measuring protein interactions from FRET data requires careful quantitative analysis.
FRET is a physical process where a molecule in an excited energetic state (the donor) transfers energy to a nearby ground-state molecule (the acceptor). The chance that an excited donor will transfer its energy to an acceptor (known as the FRET efficiency, E fr ) depends on the distance between the donor and acceptor (which must be between 1 and 10 nm for FRET to occur), their relative orientation, and the extent to which the donor's fluorescence emission peak overlaps the excitation peak of the acceptor [3]. Optimal conditions for energy transfer occur when the distance between donor and acceptor is minimal, the molecules' electric dipoles are aligned, and the spectral overlap is significant.
When FRET is used to study protein interactions in living cells, the proteins under investigation are fused to fluorescent tags (often variants of the green fluorescent protein) that act as the donors and acceptors. When the proteins interact, they bring the fluorescent tags together so that FRET may occur. FRET increases the number of photons emitted by acceptors and reduces both the number of photons emitted by donors and the donor's fluorescence lifetime. To observe these effects, the most common techniques for collecting FRET data include fluorescence lifetime imaging (FLIM) and using a fluorescence microscope or spectrofluorometer to record fluorescence intensity after exposing samples to light that mainly excites either donors or acceptors [4][5][6].
For FRET data to reveal information about the underlying protein interactions, complicating factors must be dealt with. One confounding issue is spectral contamination, which arises from the requirement that the donor and acceptor must have overlapping spectra for FRET to occur. Due to the overlap, excitation light intended to excite one fluorophore may also excite the other (spectral crosstalk), and, conversely, one fluorophore may emit photons in the emission range of the other (spectral bleed-through). Several FRET analysis methods address this issue by calculating a FRET index, which is the FRET signal corrected for contamination from spectral overlap and normalised by donor or acceptor concentrations [7][8][9][10][11][12]. Although they are straightforward to calculate, FRET indices often bear an indirect and nonlinear relationship to the underlying concentrations and strength of protein interactions [13,14]. Alternatively, the ratio of donors to acceptors and the apparent FRET efficiency, which is the product of the intrinsic FRET efficiency and the fraction of donors (or acceptors) in complex, can be calculated [15][16][17][18][19]14]. Such quantities can be measured, provided calibrations are carried out using constructs consisting of a donor linked to an acceptor [17,19], but again do not relate directly to the dissocation constant (K d ) of an interaction.
Another significant challenge is that both the K d and the FRET efficiency, E fr , affect the observed signals, and so neither can be determined independently of the other based on data from a single sample. E fr has been estimated from separate acceptor photobleaching [14] and FLIM experiments [15], but these approaches have drawbacks. Acceptor photo-bleaching is slow, irreversible, often fails to bleach all acceptors, and yields the intrinsic FRET efficiency only when all donors are in complex with acceptors [4][5][6]. FLIM requires specialized equipment, is often slower than standard fluorescence imaging, and analysis of FLIM data is complicated by the multiexponential fluorescence decays of fluorescent proteins [20]. There is however an alternative to directly measuring E fr : Many values of K d and E fr will be consistent with data from a single cell or sample, but, by taking a set of data from samples that contain varying concentrations of donors and acceptors and analyzing it altogether, it is possible to find the unique values of K d and E fr that are consistent with the ensemble [16,21].
Given these different approaches, it is not always obvious which one should be applied in different situations and there is no consensus on the statistical analysis, with each method processing the data differently and most giving no procedure to test the reliability of any estimates. A general method for inferring the K d along with the uncertainty of that inference is necessary for the standardization of quantitative FRET measurements, the design of informative experiments, and for providing in vivo parameters for developing models of protein networks [22][23][24].
Here we propose a systematic analysis method that explicitly includes models of the photophysics and underlying chemical interactions and of measurement noise. Building on a spectral model for FRET [25], we develop a Bayesian algorithm to infer both the interaction strength (in terms of the in vivo K d ) and the FRET efficiency. Applying our algorithm to simulated data, we gain insight into how both experimental design factors such as measurement noise, number of measurements, fluorophore concentrations and ratios, and prior information impact our estimate and its uncertainty.

Algorithm
Overview of the mathematical model FRET enables the study of molecular interactions in diverse settings. To design a widely applicable analysis technique, we consider a general system containing proteins (or other molecules) that form complexes and are labelled with fluorophores that act as FRET donors and acceptors ( Figure 1A). We assume that all the molecules of interest are fluorescently tagged, so instead of referring to 'donor-tagged proteins' or 'acceptor-tagged proteins', we simply refer to 'donors' and 'acceptors'.
Our model relies on a few other assumptions. First, we assume that donors and acceptors may be free or form bimolecular, donor-acceptor complexes (i.e. [DA] . Whether free or in complex, the fluorophores undergo fluorescence excitation and emission ( Figure 1B). In complexes, the donor and acceptor are together and FRET may also occur. We assume that FRET due to random collisions between donors and acceptors occurs seldom enough to be neglected. Finally, we assume that donor-acceptor complexes all have the same FRET efficiency, which is denoted E fr and refers to the fraction of instances where exciting a donor in complex leads to excitation of the acceptor.
For our general mathematical description of the FRET system, we use a previously described spectral mixing model [25] with slightly modified matrices. This model relates concentrations of fluorescent molecules to the fluorescence observed at various excitation wavelengths and ranges of emission wavelengths (spectral channels). It can be written as a matrix equation in the following form [6]: where C is a vector of the concentrations of fluorophores (C = ([D], [A], [DA]) T ), I obs is a vector of the fluorescence intensities observed for each spectral channel, and M is a matrix of the photophysical parameters that relate the concentrations of fluorophore to the observed intensities ( Figure 1B).
The observed fluorescence intensities could represent data obtained from fluorescence microscopy, spectrophotometry or a flow cytometer. Microscopy images would require standard image processing steps for quantification, such as subtracting background fluorescence and defining regions of interest such as areas within the cytosol or nucleus for localized fluorescence [26].

Photophysics in the mathematical model
The matrix M contains all the relevant information about the photophysical processes we model. In addition to the expected direct excitation and emission, we include resonance energy transfer, cross-talk (unintended excitation) and bleed-through (acceptors emitting in the donors' typical emission range).
The spectral mixing framework can represent any number of spectral channels by increasing the dimensions of the matrix, but we focus on the particular case of three, which describes the most common 'three-cube' FRET experiments [12,[7][8][9]14,18,17,21,16]. The first spectral channel, known as the donor channel, consists of an excitation wavelength that primarily excites donors and an emission filter that collects photons from the donor's emission range. The second channel, the acceptor channel, consists of an excitation wavelength that primarily excites acceptors and an emission filter that collects photons from the acceptor's emission range. The third channel, the FRET channel, combines the donor channel's excitation wavelength with the acceptor channel's emission filter, so that donors are excited preferentially and the emissions are filtered to primarily collect photons from acceptors. For three-cube FRET, the detailed form of Eq (1) is where i each represent a combination of excitation and emission information [25]: Here the subscript i refers to the spectral channel (for the three-cube case, it is 1 for the donor channel, 2 for the acceptor channel, and 3 for the FRET channel) and the superscript (S) refers to the fluorescent species (D, the donor; A, the acceptor; and DA, the complex). The variable I i is the illumination intensity for the excitation wavelength of channel i; ε (S) i is the molar extinction coefficient of species (S) with excitation wavelength from channel i; Q (S) is the quantum yield of species (S); and S (S) i is the product of the emission of species (S) at the wavelengths of channel i and the sensitivity of the detector to the emitted photons. We describe a calibration procedure for obtaining these values in the Methods.
To illustrate Eq (2), consider the expression it yields for I pred D , the intensity in the donor channel. The intensity will be the sum of contributions from free donors, free acceptors, and donor-acceptor complexes. The contribution from free donors is a   · E fr · [DA]) . Adding these contributions together, we obtain the following expression for the predicted intensity in the donor channel, I pred D ,

Bayesian inference
Our aim is to infer the values of K d and E fr from the data. To this end, Bayesian inference is an ideal tool. Given a model, it quantifies the knowledge gained from a set of experimental observations about the parameters of interest, including the uncertainty of that knowledge [27]. That is, it allows us to update the prior probability distribution, P (K d , E fr ), which represents what is known about the parameters before data has been acquired, to the posterior probability distribution, P (K d , E fr |data), which reflects both the prior information and what is learned from the data. According to Bayes' theorem, The likelihood function, P (data|K d , E fr ), can be explicitly expressed through our photophysical model and a model of measurement noise. It quantifies the likelihood of different values for K d and E fr given the current data. We assume that the data follows a Gaussian distribution centred around the predicted intensity given by Eq (2). For three measurements, one from each of the three spectral channels, the likelihood is: The observed intensities for each channel are I D , I A , and I F . I pred D , I pred A and I pred F denote the predicted intensities and s D , s A and s F measure the magnitude of the measurement noise in each channel and are approximated by the variances of the data in that channel (Methods). For fitting, we use a Gaussian approximation of Eq (7) based around the values of D 0 and A 0 that maximize the likelihood (see section on marginalization of D 0 and A 0 in the Methods). Combining the likelihood and prior probability distribution allows us to calculate the posterior probability distribution and determine the most probable values for our parameters of interest.

Illustration of method
To illustrate our method, we simulated data from three cells (Figure 2A We then simulated three-cube FRET measurements, generating data for the donor, acceptor, and FRET channels (Figure 2A, right). We made a series of ten measurements for each channel and each cell, to which we added Gaussian noise so that the standard deviation of the measurements was around 5% of the mean signal strength. We define r as the ratio of the standard deviation of the measurements to the mean signal strength; in this case, r ≈ 0.05.
To obtain the posterior probability distribution that corresponds to this data for two parameters of interest, K d and E fr , we used two methods, the results of which should agree. First, because we are restricting our analysis to two parameters, we can visualize the distribution by computing the energy, the negative logarithm of the posterior probability, over a grid of values of K d and E fr . The resulting energy surface, shown in Figure 2B, was minimal around the true values of the parameters. If we were to extend our analysis to more than two parameters, including uncertainty in the a (S) i constants for instance, we would use a Markov chain Monte Carlo (MCMC) algorithm to sample from the parameter space. To show that the MCMC algorithm gives results consistent with the energy surface, we used the algorithm to sample the posterior probability distribution for K d and E fr . We ran the algorithm three times, starting each time at different initial values. All three walks converged on the same small region of equally probable values: they are superimposed on the energy surface in Figure 2B. Both methods therefore recover the true values used to generate the data as optimal parameter values. The approximate posterior probability distributions for K d and E fr are shown in Figure 2C. The distributions are estimated as the histograms of the three walks, excluding the burn-in period before convergence [28]. They peak near the parameter values used to simulate the data, indicating that the highly probable values for K d and E fr predicted by the methods are accurate.

Inferring other quantities from FRET data
To further illustrate the versatility of our method, we show that we can also use our model and Bayesian framework to estimate other parameters. Two instrumentindependent parameters that have been a focus of inter-

Testing
Algorithm reflects data quality An algorithm for estimating parameter values should report not just an estimate of the most probable parameter values but also the reliability of that estimate. To evaluate this aspect of our algorithm, we measured Figure 2 Analysis of typical FRET data recovers true values of K d and E fr . A typical three-cube FRET experiment is simulated from three virtual cells, each containing the indicated concentrations of donor-and acceptor-tagged proteins (A, left). The data is summarized in bar graphs with mean ± SD (A, right). Ten measurements/channel are made for each cell with 5% added measurement noise. For other parameters, see Methods. The data was analyzed in two ways to find the values of K d and E fr consistent with the data. We first calculated the energy for an array of parameter values; as the energy contour plot shows (B), the energy was minimal near the true parameter values. We also used a Monte Carlo algorithm to explore K d -E fr space, running 3 biased random walks starting from different initial positions (white *) and running for 12,000 steps. The paths of the walks (for clarity only the first 2,000 steps are shown) are superimposed on the contour plot (B) and all three converged to a region around the true value which coincides with the energy minimum. Histograms of the locations visited by all three walks, including only post-convergence steps (11,000 steps are included from each walk) act as approximate posterior distributions for K d and E fr (C). The dashed red lines indicate the true values of K d and E fr used to generate the data.
both the error and the uncertainty of its output. We defined the error as the discrepancy between the mean of the posterior probability distribution and the true value. We calculated error as log 2 Mean value True value , meaning that a perfect estimate would have zero error.
Because under experimental conditions we would not know the true value, we also calculated the uncertainty of the estimate as an indicator of the reliability even when true values are unknown. The uncertainty corresponds to the width of the posterior probability distributions for K d and E fr . To prevent the magnitude of the parameter of interest from skewing the uncertainty, we use the relative uncertainty, calculated as the coefficient of variation (the standard deviation divided by the mean).
We first tested our algorithm in the presence of varying levels of measurement noise. As the examples in Figure 3A suggest, when measurement noise increased, the optimal regions in K d and E fr -space grew wider and longer and the peak of the posterior probability distribution for K d often deviated from the true value (see Figure 3A inset). In Figures 3C and 3E, the error (upper plot) and uncertainty (lower plot) for estimating K d are shown and confirm that both the error and uncertainty of the estimate increased with increasing noise. Similar results were obtained for the estimate of E fr (data not shown).
Next, we verified that gathering more data would improve the quality of the estimates of K d and E fr . Such data could be obtained by, for example, collecting several images of the same sample or dividing a region of  vs. measurement noise (C) and error vs. amount of data (D) illustrate that, in general, accuracy decreases with increasing noise and decreasing number of measurements although the mean of the error remains centered at zero. Even when the true value is unknown, the relative uncertainty of the parameter estimate (coefficient of variation of locations visited by a walk) is measurable; it also grows with increasing noise (E) and decreasing number of measurements/cell/channel (F). In (C-F), error bars are mean ± SD. 50 data sets were analyzed for each noise level or number of measurements, and each dataset was analyzed once with a random walk running for 20,000 steps, starting once the walk converged. Except when otherwise indicated, data had 10 measurements/cell/channel and 5% added Gaussian noise. For other parameters, see Methods.
interest into subregions. The examples in Figure 3B show that with more measurements, the optimal region became smaller and the peak of the posterior probability distribution for K d moved closer to the true value (see Figure 3B inset). Figures 3D and 3F show, as expected, that increasing the number of measurements decreases the error and uncertainty for the K d estimate. The effect of data quantity on the error and uncertainty of the E fr estimate was similar (data not shown).
Overall, our algorithm reliably reflects the quality of the data analyzed in the uncertainty it gives of its estimate and accurately infers the values of K d and E fr for 10 measurements per cell per channel with 10% measurement noise. We also note that in Figures 3C and 3D, the mean error in K d remained close to zero, indicating that neither measurement noise nor number of measurements systematically biased the location of the peak.
The total amount of donor, [D 0 ], and the total amount of acceptor, [A 0 ], affect inference of K d and E fr

Inferring unique values of K d and E fr requires variations in [D 0 ] and [A 0 ] A challenge in analyzing FRET
data is that both E fr and K d affect the extent of FRET that may occur, making it difficult to tease out the contribution of each parameter. In general, for data from a single pair of donor and acceptor concentrations, a weak E fr and strong K d can give rise to the same observations as a strong E fr and weak K d . However, because our algorithm can analyze data from multiple cells at once, it can overcome this challenge.
To demonstrate the problem, we analyzed a set of simulated data from a single sample with [A 0 ] = [D 0 ] = 1 μM. As Figure 4A shows, the resulting region of optimal values had an elongated shape, indicating that many equally probable solutions exist for {K d , E fr } for that dataset. To show that collecting more data from similar cells does not help, we repeated the experiment, simulating data from 3 cells with the same concentrations as the first. As Figure 4B shows, including this data made the region slightly narrower but did not change its elongated shape.
The difficulty in determining K d without knowing E fr or vice versa can be overcome by analyzing data from samples containing varying fluorophore concentrations [16,21]. To quantitatively justify how varying concentrations facilitates parameter fitting, we simulated data from three cells containing different concentrations of donors and acceptors. As Figure 4C shows, analyzing data from two different cells decreased the size of the region of equally probable values. Combining data from a cell containing [D 0 ] = [A 0 ] = 1 μM with data from a cell containing 0.5 μM eliminated high values of K d ( Figure 4C); combining data from a 1 μM cell and a 5 μM cell eliminated low values of K d (Figure 4C, inset). As Figure 4D indicates, analyzing data from all three cells (0.5 μM, 1 μM, and 5 μM) together eliminated higher and lower K d values, leaving a small region of equally probable values that included the true values. To show why varying fluorophore concentrations is effective, we analyzed data from each of the three cells in Figure 4D individually. The optimal regions for each cell are plotted in Figure 4E and clearly intersect at the true value. Varying the concentrations more broadly can further shrink the solution region ( Figure 4F). [DA] . When a range of K d values are consistent with the data, K d cannot be fit to a single value. By finding the posterior probability distribution of K d , our algorithm predicts when a range of K d values will be consistent with the data. First, we simulated data with equal concentrations of acceptors and donors that were very low or very high relative to K d . As shown in Figure  5A, the approximate posterior probability distributions of K d for data simulated with relatively low or high concentrations form plateaus instead of single peaks. The plateaus indicate that a range of K d values is equally probable and consistent with the data. The posterior distribution obtained for [D 0 ] = [A 0 ] ≪ K d reveals that K d could be any number greater than approximately 10 -6 M; the distribution for This analysis illustrates how posterior probability distributions for the parameters of interest can be more informative than single values. For example, information from posterior distributions can be useful for improving experimental design. If one were to obtain plateaued distributions like the two shown in Figure 5A, one could recognize that the fluorophore concentrations were too low or high relative to K d and devise a more informative experiment. The ratio [D 0 ]:[A 0 ] affects inference We also used our algorithm to explore the effects of varying the ratio, [D 0 ] : [A 0 ], on the algorithm's ability to infer K d ( Figure 5B) and how these effects arise. While other authors have reported that FRET data becomes increasingly unreliable as the ratio [D 0 ] : [A 0 ] deviates from unity [13], they measured how noise propagates in FRET formulas and did not directly address how the ratio impacts the measurement of interaction strength. As Figure 5B shows, the width of the approximate posterior distributions for K d broaden as the ratio increases, meaning that the uncertainty in the estimate increases. The peaks of the distributions however remain close to the true values. The same effect occurs when the ratio decreases (data not shown).
The insets in Figure 5 illustrate why the ratio affects the uncertainty, showing data from the donor and FRET channels in the presence and absence of FRET. Here, FRET contributes only a fraction of the observed signals. This small contribution is particularly evident in the FRET channel, where the change in the signal due to FRET is small compared to the measurement error: measurement error is 3% and the increase in the FRET channel from FRET is only 2.9% for [D 0 ] : [A 0 ] = 1 and drops to 0.7% for [D 0 ] : [A 0 ] = 10 (FRET is included by changing the FRET efficiency from 0 to 0.4). As the ratio increased, the relative shortage of acceptors meant that fewer complexes could form, making the contributions from FRET smaller and causing the uncertainty of the estimate to grow. In the absence of measurement noise, however, our algorithm can estimate K d even from very extreme ratios. These data also demonstrate that with our method, we can make inferences about K d even when FRET causes perceptible changes in only one channel (e.g. the donor channel here).
Knowing how spectral overlap and the ratio of donors to acceptors affect the inference of protein interaction strength helps make it possible to design informative experiments. For example, we find that in each channel, the difference generated by FRET depends on spectral overlap. In the donor channel, where FRET decreases the signal, the relative change is

Prior information improves estimate
A further advantage of our method is its flexibility. The Bayesian framework makes it possible to incorporate additional details we know about the system as prior information, allowing us to more accurately represent the system being analyzed and potentially improve our estimate of the parameters of interest. To exploit this feature, we tested whether including additional information about the FRET efficiency would improve our inference of E fr and K d . Information about E fr could be obtained, for example, from lifetime imaging experiments [29]. Figure 6 shows the approximate posterior probability distributions for E fr and K d that result from analyzing the same data in the presence and absence of prior information for E fr . We included slightly inaccurate prior information with large uncertainty, supposing that E fr was measured to be 0.45 (instead of the true value, E fr = 0.4) with an uncertainty of 0.15. Even with this limited information, the resulting histograms for both K d and E fr have taller, narrower peaks which are closer to the true values compared to the histograms produced by analyzing the same data in the absence of the prior information. As expected, this improvement was more substantial when we analyzed a set of data consisting of just 3 measurements per cell per channel (Figure 6, right column): prior information becomes more important the less relevant information there is in the data.
As another form of prior information, we could also include error in the calibration measurements for the constants that relate molecular concentration to fluorescence in Eq (2). Incorporating this information would make it possible to monitor the impact of that error on the uncertainty of the final estimate of K d .

Summary of testing
We have shown, using typical, simulated FRET data, that our algorithm accurately recovers the parameters of interest. It responded consistently and intuitively to changes in the amount of measurement noise present in the data and the quantity of data. We also used the posterior probability distributions we obtain for the parameters to gain insight into how the magnitude and variation of the donor and acceptor concentrations affect the ability of the algorithm to infer K d . The algorithm gave informative results even when given data simulated with very high or low concentrations of donors and acceptors relative to the K d although, as expected, with this data it could not converge on a unique pair of values for K d and E fr but gave upper or lower bounds. Gaining an understanding of how experimental parameters such as measurement noise, number of measurements, spectral overlap and fluorophore concentrations affect inference allows experimenters to design optimal experiments that yield information with less uncertainty [24].

Conclusions
Fluorescence microscopy and FRET open a window onto the cell, allowing us to observe protein interactions as the cell functions as a complete system. However, for protein interaction information from FRET data to be integrated into models and improve our understanding of biological systems, it must be reliably quantified, including the uncertainty in the estimates produced [27].
For this purpose, we have presented an algorithm for inferring the most probable values of the absolute or relative in vivo dissociation constant and the FRET efficiency from three-cube FRET data. Our algorithm produces estimates in terms of the posterior probability distribution for the parameters of interest. Posterior probability distributions yield more extensive information than a single value can provide, conveying the reliability of the estimates through the shape and width of the distribution and giving upper or lower bounds on parameters if the data is not more informative. Our method requires only basic three-cube FRET data but has the flexibility to use data from more spectral channels and incorporate other types of data, such as a separate measure of the FRET efficiency. We have focused on using our algorithm to fit E fr and K d , but it can also infer the apparent FRET efficiency and ratio of donors to acceptors, other quantities sometimes used as measures of FRET [15][16][17][18][19]14].
In the examples described here, we make a few assumptions, but these are not necessarily part of our methodology. First, we use molar extinction coefficients that must be measured separately or taken from the literature and assume that the literature measurements are valid in the cellular environment. Second, we assume Gaussian measurement noise, but our model could be straightforwardly adapted to include log-normal or other types of noise. Finally, we have not taken into consideration photo-bleaching, incomplete labelling or dark states, but our model could readily be extended to include these factors.
We have used simulated data to illustrate principles that apply to real data, showing how, in practice, it is best to infer the dissociation constant from FRET data. Three-cube FRET experiments are a well-established experimental technique [3][4][5][6]. For our method, the calibration procedure we describe in the Methods for quantifying the a is a standard part of FRET data collection, necessary for calibrating the extent of spectral bleed-through and cross-talk. We require calibration with a donor-acceptor construct to relate the brightness of the donor to that of the acceptor, which is necessary for obtaining the relative K d . This calibration is not always a part of standard FRET data collection, but it has been used in several studies [8,18,17,4,14,19,21]. Alternatively, measuring the absolute brightness per molecule, which is necessary for measuring the absolute K d , is more technically challenging but has been achieved [30,31].
We have demonstrated that to infer the values of K d and E fr , it is important that the FRET data analyzed come from samples containing varying concentrations of donor-and acceptor-tagged proteins. The precise amount of variation required is difficult to predict because it depends on the measurement noise present in the data, the number of measurements made, and the extent of spectral bleed-through and cross-talk. Naturally occurring variation in protein expression from cell to cell generated sufficient variability for estimating the FRET efficiency and relative dissociation constant [21], at least in transiently transfected mammalian cells.
While a number of ad hoc methods exist for quantifying protein interactions using FRET, our method contributes something new in that it makes plain the spectral information being used and the bio-chemical assumptions made about the system. Our model is general: it is not specific to three-cube data and could be used to analyze data with any number of spectral channels. It can be straight-forwardly adapted to other experimental situations, for instance to measure the dimerization affinity of a homodimeric protein. Our approach is a Bayesian analysis that reveals the uncertainty in estimated parameters and produces informative results for data from a wide-range of experimental set-ups. It focuses on determining what we can learn from experimental observations about the parameters of interest given clear assumptions and a systematic, statistical analysis based only on those assumptions.

Methods
Calibration of fluorescence constants, a The a (S) i constants, which relate concentrations of single fluorophores to observed fluorescence intensity, can be obtained by calibration. Calibration of spectral cross-talk and bleed-through is a standard part of FRET quantification [4][5][6]. If the fluorophore concentrations can be determined [30,31], then the values for the three a To infer the values of the constants a given the calibration data. We will illustrate this procedure for a more complicated example below.
Determining the a (DA) i , which relate a complex undergoing FRET to its fluorescence in channel i, is more complicated because the a (DA) i depend on properties of both the donor and the acceptor. However, from Eq (3), a can be obtained through knowledge of the ratio of molar extinction coefficients at the excitation wavelength for channel i. The values of the molar extinction coefficients, ε (D) and ε (A) , may not always be available at these wavelengths, but they can be estimated from literature values of the molar extinction coefficients (usually measured at the fluorophore's excitation peak) and the excitation spectra of the donor and acceptor [25].
Interpreting the excitation spectra as the probability of the fluorophore becoming excited and assuming that the extinction coefficient is proportional to the probability of excitation, we can use the excitation spectra to rescale the literature value of the extinction coefficient to the excitation wavelength of channel i. This estimate is valid provided that the molar extinction coefficients obtained from the literature are not significantly different from the molar extinction coefficients in the cellular environment of the experiment (or provided that the change in environment affects both donor and acceptor similarly). When the relationship between brightness and concentration cannot be determined absolutely, relative values for a The constructs consist of a donor and an acceptor fluorophore separated by a short linker of 5-10 amino acids and have been used for FRET calibration in several studies [8,18,17,4,14,19,21]. The construct's FRET efficiency, E c fr , need not be known and can be determined using the procedure we describe below.
The three-cube measurements on samples containing only donors or only acceptors would correspond to Eqs (8) and (9). Three-cube data obtained from samples containing donor-acceptor constructs would correspond to the following equations: where we have replaced a i constants given calibration data consisting of three-cube measurements made on samples with only donors, only acceptors, and donor-acceptor complexes, we first define the general likelihood function of these experiments for a single sample: where I (i) 2 , and I (i) 3 are the i th measurements in the donor, acceptor, and FRET channels, respectively. For a given sample, we assume that an equal number of measurements, n, will be made in each channel and s quantifies the error of the measurements. The predicted intensities in channel k, I pred k , are given by Eqs (8), (9) and (10) and are a function of the constants a (S) i , the concentrations of the species (donors, acceptors, or donor-acceptor complexes), and also E c fr in the case of the donor-acceptor construct. The full likelihood for all the calibration data together would be the product of three instances of Eq (11), one specified for each threecube experiment (donor-only, acceptor-only, or donoracceptor complex).
We are interested in the values of the a . We can also eliminate s by marginalization [28], assuming the measurement error is the same for all three spectral channels. If this assumption does not hold, one can define s k for the measurement error in each channel and either approximate each s k as equal to the standard deviation of the measurements in the k th channel or include the s k as parameters to be inferred in the procedure we describe below. Assuming a prior probability that only specifies positive values for the a which is valid for the three cube experiments for each sample (donor, acceptor, or construct). For the donoronly sample, a i = a and E c fr from P calib . Alternatively, one can use a numerical solver to find the most probable values by solving for the roots of the system of equations consisting of the derivatives of Eq (12) with respect to each of the six variables. Using this relative calibration procedure, the final K d values obtained would relate to the true K d by the scaling factor, for instance a (A) 2 .

Data simulation
We designed our simulated data to mimic the key features of experimental data, which could come from various sources, such as fluorescence reader measurements of solutions of purified proteins or images of cells from fluorescence microscopy that have been processed and quantified. To simulate data, we wrote a function in Matlab (The Mathworks, Natick, MA) that takes as input E fr , K d , A 0 , D 0 , n, a  (5). Next, we calculate the simulated experimental intensities I D , I A , and I F using Eq (1). Finally, we simulate measurement noise by adding Gaussian random numbers to the data. The variable r is a scalar between 0 and 1 that refers to the strength of the measurement noise relative to the mean of the observed signal. Noise with r = 10% would have Gaussian measurement noise with standard deviation that is 10% of the mean signal observed in each channel.
In our examples, we use E fr = 0.4 and K d = 1 μM. Unless otherwise indicated, we simulate ten measurements per cell per channel and use the following set of ) in the acceptor channel. It is unlikely that acceptors would emit photons detectable in the donor channel, so the constants corresponding to that process, a , are very small, but they are non-zero to show that any measurable spectral contamination can be included.

Incorporating prior information
The Bayesian framework makes it possible to incorporate prior information about any of the parameters, including uncertainty in a (S) i . As an example, we include prior knowledge about E fr (see the Results). Such data could be collected in separate experiments under slightly different experimental conditions and in the presence of measurement noise. We define the prior probability of E fr by a Gaussian distribution with mean at the measured valueÊ fr and variance s E , which reflects the confidence in the measurement:

Markov chain Monte Carlo (MCMC) estimation
To sample K d and E fr from the posterior probability distribution, we use a biased random walk. Although a simpler approach would be sufficient to explore two dimensions, we use this method because it will allow us to efficiently extend our search to sample other, additional parameters we may wish to infer, such as the values of a (S) i . We use the Metropolis-Hastings algorithm [32,33]. It begins at a random location in parameter space and takes random steps, moving in up to 3 dimensions at a time with proposed steps drawn from a distribution that is symmetric about the current location. Proposals that increase the posterior probability are always accepted; those that decrease it are accepted with , where P (x j ) is the posterior probability of the proposed step and P (x j-1 ) is the posterior probability of the current location. The walk is run for a sufficiently long time (about 10,000 steps) to generate independent samples from the posterior distribution and the step size chosen to maintain an acceptance rate of 40 -60% [28].
Once the walk has converged with the energy fluctuating around a minimum value, we record the steps taken and use the histogram of these sampled values as our estimate of the posterior probability distribution. From this estimated distribution, we obtain the mean and standard deviation of each parameter being inferred. The algorithm is summarized below.

Marginalization of D 0 and A 0
We have defined the likelihood in Eq 7 and assume that the measurement noise in each channel is independent. Because we have a Gaussian model, the values of the measurement noise parameters, s D , s A and s F , that maximise the posterior probability are approximately equivalent to the observed variances of the data from the donor, acceptor, and FRET channels, respectively [28]. However, it would also be possible to fit σ 2 D , σ 2 A and σ 2 F directly, along with K d and E fr . Although K d , E fr , D 0 and A 0 are important parameters, we cannot measure them directly. For our purposes, we are interested in the values of K d and perhaps E fr , but not the values of D 0 and A 0 . Rather than fit D 0 and A 0 , we marginalize or integrate them out: To indicate that we have no knowledge about the values of D 0 and A 0 , we set the prior, P (D 0 , A 0 ), to a constant for positive D 0 and A 0 (and 0 otherwise).
As a result, P(data |K d , E fr ) ∝ dD 0 dA 0 P(data |K d , E fr , D 0 , A 0 ). (15) Because this expression is difficult to integrate analytically, we consider the 'energy', E = -log(P(data|K d , E fr , D 0 , A 0 )), and approximate E with a two-dimensional Taylor expansion about {D * 0 , A * 0 }, where {D * 0 , A * 0 } minimizes E (and thus maximizes the likelihood). Ignoring terms above second order, where ∇∇E is the Hessian, or matrix of second-derivatives of E with respect to D 0 and A 0 . Therefore, This approximation of the likelihood results in a Gaussian integrand, which we can then integrate analytically [34]. Note that we do not use the limits of integration (0, ∞) which would be appropriate for non-negative concentration values. We instead use the limits (-∞, ∞) to make the integral simple. It is a valid approximation provided that D * 0 and A * 0 are sufficiently large and it consistently yields appropriate results in practice.
In summary, where |H| is the determinant of the Hessian, ∇∇E(D * 0 , A * 0 ). Although K d and E fr do not appear explicitly in the final form of Eq (18), both E(D * 0 , A * 0 ) and H depend on K d and E fr .

Algorithm summary
Our algorithm for sampling from the posterior probability distribution of (K d , E fr ) with a prior probability distribution for E fr consists of the following steps: 1. Perform calibration to obtain values (absolute or relative) for the a (S) i constants. 2. Define prior probability distributions for parameters to be inferred based on initial information that is known, if any. 3. Run Markov chain Monte Carlo algorithm: Choose initial step (K 1 d , E 1 fr ) and compute the posterior probability, P 1 = P(K 1 d , E 1 fr ), as outlined in (b) below. For j = 2 to n, (a) Choose proposal step (K • If P j >P j-1 , accept.
• Otherwise, accept with probability P j P j−1 .
Steps (a)-(c) are repeated until j = n. After an initial burn-in period where the energy reaches a minimum and the walk achieves a stationary distribution, record samples of K d and E fr . 4. Repeat step 3, varying initial (K d , E fr ). To ensure convergence, the stationary distributions of all walks should overlap [28].

Availability
We have made our data simulation and analysis software available at http://swainlab.bio.ed.ac.uk/software/FRET.