### Calibration of fluorescence constants,

The

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–

6]. If the fluorophore concentrations can be determined [

30,

31], then the values for the three

and three

constants can be obtained from samples containing only donors or only acceptors. This calibration makes it possible to measure the absolute

*K*
_{
d
}. Three-cube data from donor-only and acceptor-only samples correspond to the following equations (from Eq (

2)):

To infer the values of the constants
and
and their uncertainty (due to measurement error), we can sample from posterior distributions for
and
given the calibration data. We will illustrate this procedure for a more complicated example below.

Determining the
, which relate a complex undergoing FRET to its fluorescence in channel *i*, is more complicated because the
depend on properties of both the donor and the acceptor. However, from Eq (3),
, but
. Therefore,
, and so
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
and
can be obtained from samples containing only donors and only acceptors, along with samples containing linked donor-acceptor constructs. 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,
, 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

by

. To infer the values of the

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
,
, and
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 *σ* quantifies the error of the measurements. The predicted intensities in channel *k*,
, are given by Eqs (8), (9) and (10) and are a function of the constants
, the concentrations of the species (donors, acceptors, or donor-acceptor complexes), and also
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 three-cube experiment (donor-only, acceptor-only, or donor-acceptor complex).

We are interested in the values of the

but indifferent to the concentrations of fluorophores and complexes in the samples. For this reason and because the concentrations of fluorophores and complexes will vary for different samples, it is useful to marginalize the calibration likelihood over [

*A*
_{0}], [

*D*
_{0}], and [

*DA*]. We can also eliminate

*σ* by marginalization [

28], assuming the measurement error is the same for all three spectral channels. If this assumption does not hold, one can define

*σ*
_{
k
} for the measurement error in each channel and either approximate each

*σ*
_{
k
} as equal to the standard deviation of the measurements in the

*k*
^{
th
} channel or include the

*σ*
_{
k
}as parameters to be inferred in the procedure we describe below. Assuming a prior probability that only specifies positive values for the

and

, marginalizing Eq (

11) over the concentrations and

*σ* yields the posterior probability of

and relative values of

:

which is valid for the three cube experiments for each sample (donor, acceptor, or construct). For the donor-only sample,
; for the acceptor-only sample,
; and for the sample with the donor-acceptor construct, the *a*
_{
i
} are replaced with
. The posterior probability, including all the calibration data together, is obtained by multiplying the forms of Eq (12) for each of the three 3-cube experiments.

For a given data set, we can infer
and five of the six
constants relative to the remaining one, for instance
, which is set to unity. The numerator of Eq (12) remains unaltered by such a rescaling of the
, and the alteration in the denominator is cancelled by the Jacobian required for the change in variables. One can use a Markov chain Monte Carlo method to sample the
and
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
.

### 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*,
, and *r* where **A**
_{
0
}, **D**
_{
0
} are vectors of length *m* (representing *m* cells or regions within cells), *n* is the number of measurements made on each cell or vesicle, and *r* is the strength of measurement noise. The function outputs a set of simulated three-cube FRET data from *m* samples with *n* measurements per sample.

For each pair of concentrations, [*A*
_{0}] and [*D*
_{0}], we calculate [*D*], [*A*], and [*DA*] using Eq (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

values, which were chosen to represent a donor-acceptor pair with considerable spectral cross-talk and bleed-through:

The constants corresponding to the donor, acceptor, and complex fluorescing in their respective channels
are assigned the largest values. As donors and acceptors are often not equally bright, we set
. In the FRET channel, the constants corresponding to bleed-through from donors
and cross-talk from acceptors
have been set to approximately 20% of the constants for donor and acceptor in their respective channels
because spectral overlap contributes significantly in the FRET channel. In the acceptor channel, smaller values are assigned to
and
to describe the donor undergoing cross-talk and, subsequently, either bleed-through (
) or FRET (
) in the acceptor channel. It is unlikely that acceptors would emit photons detectable in the donor channel, so the constants corresponding to that process,
and
, are very small, but they are non-zero to show that any measurable spectral contamination can be included.

### 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
.

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 probability
, 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, *σ*
_{
D
}, *σ*
_{
A
} and *σ*
_{
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
,
and
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).

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

, where

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}.

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
and
are sufficiently large and it consistently yields appropriate results in practice.

where |*H*| is the determinant of the Hessian,
. Although *K*
_{
d
} and *E*
_{
fr
} do not appear explicitly in the final form of Eq (18), both
and *H* depend on *K*
_{
d
} and *E*
_{
fr
}.