Recovering mixtures of fastdiffusing states from short singleparticle trajectories
Abstract
Singleparticle tracking (SPT) directly measures the dynamics of proteins in living cells and is a powerful tool to dissect molecular mechanisms of cellular regulation. Interpretation of SPT with fastdiffusing proteins in mammalian cells, however, is complicated by technical limitations imposed by fast image acquisition. These limitations include short trajectory length due to photobleaching and shallow depth of field, high localization error due to the low photon budget imposed by short integration times, and celltocell variability. To address these issues, we investigated methods inspired by Bayesian nonparametrics to infer distributions of state parameters from SPT data with short trajectories, variable localization precision, and absence of prior knowledge about the number of underlying states. We discuss the advantages and disadvantages of these approaches relative to other frameworks for SPT analysis.
Editor's evaluation
This paper will be of interest to the cellular biologists who perform singleparticle tracking experiments and develop new tracking methodologies. The authors investigate a new way of estimating an unknown number of diffusion states from short singlemolecule trajectories. Ideas developed in the paper are likely to be used for further algorithm development. The authors give the users access to a repository on GitHub that contains comprehensive code that supports the paper.
https://doi.org/10.7554/eLife.70169.sa0Introduction
Biological processes are driven by interactions between molecules. To understand the role of a molecular species in a process, a central challenge is to measure subpopulations of the molecule engaged in distinct interactions without perturbing the living system. Some interactions – such as complex formation – cause changes in a molecule’s mobility. As a result, livecell singleparticle tracking (SPT), by separately observing the motion of individual molecules, is a promising tool to meet this challenge (Shen et al., 2017).
While SPT originally targeted proteins on cellular membranes, advances in the past two decades led to intracellular applications (Barak and Webb, 1982, Ghosh and Webb, 1994, Kubitscheck et al., 2000, Goulian and Simon, 2000). These include the use of stochastic labeling to isolate a single emitter’s path (Manley et al., 2008), a principle that can be extended into intracellular settings with genetically encoded photoconvertible proteins (Ando et al., 2002, Wiedenmann et al., 2004) or cellpermeable dyes (Grimm et al., 2015, Grimm et al., 2016). Another advance is pulsed or ‘stroboscopic’ excitation, which reduces blur associated with fastdiffusing emitters (Elf et al., 2007). Together with modifications of TIRF microscopes (Tokunaga et al., 2008), these techniques have facilitated the application of SPT to intracellular settings with fastmoving subpopulations (English et al., 2011, Persson et al., 2013, Izeddin et al., 2014, Normanno et al., 2015, Hansen et al., 2017). Following Manley et al., 2008, we refer to this experiment as ‘sptPALM’ (Figure 1A, Video 1).
sptPALM experiments on fastmoving emitters in 3D settings pose several challenges for analysis (Hansen et al., 2018). First, apparent motion in sptPALM reflects both the true motion of the emitter and error associated with the estimate for its position (‘localization error’) (Martin et al., 2002, Matsuoka et al., 2009). Like fixed cell PALM and STORM microscopies (Betzig et al., 2006, Rust et al., 2006), the magnitude of localization error in sptPALM depends on the number of photons collected from each emitter (Thompson et al., 2002). But unlike fixed cell microscopies, sptPALM has another component of error due to motion blur, the convolution of the microscope’s point spread function with the path of the emitter. This component of error is not trivial: the mean 2D displacement of a Brownian particle with diffusion coefficient 10 μm^{2} s^{1} during a 1 ms integration is ~180 nm, substantially larger than typical localization error in fixed cell PALM/STORM (Figure 1—figure supplement 1B). Consequently, localization error in sptPALM depends on both the emitter’s mobility and its distance from the focus and is not simple to measure (Kubitscheck et al., 2000, Berglund, 2010, Michalet and Berglund, 2012). Pulsed excitation can be used to reduce motion blur (Elf et al., 2007), but because the laser pulse still has nonzero duration (usually ≥1 ms), motion blur remains an important part of the measurement (Deschout et al., 2012, Lindén et al., 2017).
Second, the high numerical aperture (NA) objectives required to resolve single emitters induce short depths of field, typically less than a micron. Whereas bacteria such as Escherichia coli are often small enough to fit into the resulting focal volume, mammalian cells – with depths ≥5–10 μm – cannot. As a result, intracellular SPT experiments only capture short transits of emitters through the focal volume, a behavior termed defocalization (Figure 1C, Video 2, Video 3; Kues and Kubitscheck, 2002, Mazza et al., 2012, Hansen et al., 2018). The duration of each transit depends on the emitter’s mobility. This creates a sampling problem: slow particles with long residences inside the focal volume contribute a few long trajectories, while fast particles with short residences contribute many short trajectories. Mean trajectory length is often as little as 3–4 frames, severely limiting the ability to infer dynamic parameters (such as diffusion coefficient) from any single trajectory. Fast multifocal imaging may mitigate this problem (Abrahamsson et al., 2013), but such methods currently require higher photon budgets and are not yet applicable to fastdiffusing targets with high motion blur. Meanwhile, the use of cylindrical optics to encode axial position in PSF astigmatism (Kao and Verkman, 1994), while popular in fixed cell PALM/STORM, is complicated in sptPALM by its resemblance to motion blur.
Third, the true number of dynamic subpopulations or ‘states’ for a protein of interest is usually unknown a priori. Proteins often participate in many complexes with distinct dynamics. Modeldependent analyses that assume a fixed number of states (Mazza et al., 2012, Hansen et al., 2017, Hansen et al., 2018), while powerful when combined with complementary measurements (Izeddin et al., 2014, Hansen et al., 2020), are limited to measuring coefficients of known models. To compound model complexity, a protein may behave differently in distinct subcellular environments. Indeed, although sptPALM directly observes the spatial context for each trajectory (Xiang et al., 2020), analyses such as jump distribution modeling often discard this information by aggregating jumps across all subcellular locations.
The central problem for sptPALM analysis is to recover the underlying dynamic states for a protein of interest given a set of observed trajectories in the presence of these three challenges.
A common approach to recover subpopulations from sptPALM is to construct histograms of the mean squared displacement (MSD), the maximum likelihood estimator for the diffusion coefficient in the absence of localization error. The MSD is highly variable for short trajectories and, when used to estimate diffusion coefficient, becomes especially errorprone when the variance of localization error is unknown (Michalet and Berglund, 2012). More problematically, MSD histograms assume that sampling from slow and fast states with equal occupation produces the same number of trajectories, which leads to severe state biases in the presence of defocalization (Mazza et al., 2012, Hansen et al., 2018). Common preprocessing steps to select for long trajectories compound the problem by introducing biases for slow emitters that remain in focus.
Methods based on leastsquares fitting of the jump length cumulative distribution function (CDF) have interpreted sptPALM data with two and threestate models while accounting for defocalization (Mazza et al., 2012, Hansen et al., 2018), but extend poorly to more complex models due to overfitting and do not provide a way to select between competing models.
A different approach to model selection is represented by vbSPT, a variational Bayesian framework for reactiondiffusion models (Persson et al., 2013). vbSPT relies on the evidence lower bound to identify the number of states, and it excels at recovering occupations and transition rates for a small number of diffusing states from short trajectories. However, it is not appropriate to apply in situations where the target’s dynamic profile is not discrete and does not consider defocalization or localization error, although it can be complemented with a separate estimate of localization error (Lindén et al., 2017). As such, there is a need for methods that combine the advantages of Bayesian methods like vbSPT with a model that can accommodate nondiscrete dynamic profiles, while accounting for biases induced by sptPALM imaging geometry.
Here, we examine two alternative methods for recovering an sptPALM target’s dynamic profile. The first is based on a Dirichlet process mixture model (DPMM) and the second on a finite state approximation to the DPMM that we refer to as a state array (SA). Exploring these techniques on simulated and real datasets, we find that although both DPMMs and SAs recover complex mixtures of states and can be applied to nondiscrete distributions of diffusion coefficients, SAs far outperform DPMMs due to their robustness to variable localization error variance. Both methods share the limitation that they do not deal with transitions between states. We investigate how this limitation affects apparent state occupations recovered with these methods.
The SA method is publicly available as the pipinstallable Python package saspt (source: https://github.com/alecheckert/saspt; Heckert, 2022c documentation: https://saspt.readthedocs.io/en/latest/).
Results
Two approaches to infer subpopulations in sptPALM datasets
We considered how to infer dynamic subpopulations from the short, fragmented trajectories produced by sptPALM in a manner robust to the effects of localization error and defocalization (Figure 1).
A simple and popular approach to this problem is to make a separate estimate for the parameters of each trajectory, then compile a histogram of the results. In the case of Brownian motion, we refer to this method as the ‘MSD histogram’ approach since the MSD is the maximum likelihood estimator for the diffusion coefficient of a Brownian motion with no localization error.
Real estimates of a particle’s position, however, are invariably associated with localization error. In sptPALM, this problem is more significant due to motion blur, which increases the magnitude of the error (Figure 1—figure supplement 1). To incorporate these effects, we refer to the combination of regular Brownian motion with normally distributed, meanzero localization error as ‘RBME’ (‘Materials and methods’). Each RBME is characterized by two parameters: the diffusion coefficient and the localization error variance. (For brevity, we refer to the latter simply as ‘localization error.’) Importantly, the increments of RBME are only Markovian when the localization error is zero (Martin et al., 2002; Figure 1—figure supplement 1).
Because individual trajectories produced by sptPALM are usually too short to estimate localization error, and because it does not take into account other effects like defocalization, the MSD histogram approach is prone to large systematic biases (Michalet and Berglund, 2012, Hansen et al., 2018). While techniques exist to mitigate some biases of MSD fitting (Kepten et al., 2015), most are difficult to apply at the single trajectory level due to the small number of points per trajectory.
A distinct approach is represented by Bayesian finite state mixture models (Marin et al., 2005, McLachlan et al., 2019; Figure 2A, Figure 2—figure supplement 1A). Such models are comprised of a collection of states labeled $k=1,\mathrm{\dots},K$. Each state is associated with an occupation ${\tau}_{k}$ (describing the probability to observe trajectories from that state) and a vector of state parameters ${\mathit{\theta}}_{k}$ (describing the kind of trajectories produced by that state). Importantly, ${\mathit{\theta}}_{k}$ can also incorporate measurement parameters like the localization error. The probability to observe a particular trajectory $x$ is then $\sum _{k=1}^{K}{\tau}_{k}{p}_{X}(x{\mathit{\theta}}_{k})$, where ${p}_{X}(x{\mathit{\theta}}_{k})$ is a distribution over trajectories produced by state $k$ and depends on the type of motion being considered. The goal is to infer ${\tau}_{k}$ and ${\mathit{\theta}}_{k}$ for each state given some observed set of trajectories $\mathit{F}$. A challenge with such methods is choosing the number of states $K$ as well as the high computational cost when ${p}_{X}(x\mathit{\theta})$ is nonconjugate to the prior over $\mathit{\theta}$.
Potential solutions can be found in the Bayesian nonparametric class of methods. These approaches begin with a single model comprising a very large or infinite collection of states. A Bayesian inference algorithm is then used to prune away superfluous complexity, leaving a sparse subset of states sufficient to explain the observed trajectories. The foundational example is the DPMM (Ferguson, 1973), which has the distinct advantage of being able to approximate essentially any mixture of states, discrete or continuous (Neal, 1992, Teh, 2010; Figure 2B). Its disadvantage is the high computational cost associated with inference, which becomes especially severe when considering types of motion with multiple parameters (such as RBME) (Neal, 2000, Andrieu et al., 2003).
We considered two responses to this challenge. First, we constructed a DPMM that uses a cheap approximation to RBME by treating the RBME as a Markov process (Matsuda et al., 2018; Figure 3C). This assumption is strictly true only when the localization error is zero and is the same assumption used to estimate diffusion coefficient via the MSD (Michalet and Berglund, 2012). Because localization error is never actually zero, we were curious to see when and how this method breaks down.
The second approach we explored is a model we refer to as a ‘state array’ (SA). This model is a special case of the finite state mixture, obtained by selecting a large number of states $K$ and fixing the state parameters to the vertices of an ‘array’ that spans some target parameter space (Figure 2C, Figure 2—figure supplement 1). For example, the array for RBME might span a range of biologically plausible diffusion coefficients and localization error variances. An array for an anomalous diffusion model may also incorporate one or more anomaly parameters. The occupation of each ‘state’ in this array is inferred through a variational Bayesian algorithm, driving the occupation of most states to zero to leave a minimal set sufficient to explain the observations (‘Materials and methods’). Importantly, SAs jointly infer a ‘global’ distribution over the state parameters along with ‘individual’ distributions for each trajectory. The nature of the variational inference algorithm means that the ‘global’ distribution is always a weighted mean of these ‘individual’ distributions. We focus our attention on the global distribution in this article, with some consideration of the individual distributions for each trajectory at the end.
Because the parameters for each state in an SA are fixed, the most expensive computations can be cached and reused throughout inference. As a result, SAs can handle more complex models than DPMMs. In this article, we use a 2D SA for RBME spanning a range of diffusion coefficients and localization error variances. After inference, we marginalize out the localization error part to yield 1D functions of the diffusion coefficient (Figure 3B). This procedure naturally incorporates uncertainty about localization error variance, rendering SAs more robust to variations in localization error than DPMMs (Figure 3—figure supplement 1).
DPMMs and SAs work best with thousands to tens of thousands of trajectories. This often requires aggregating trajectories across multiple cells, which can mask celltocell variability. To assess celltocell variability, we also found it useful to have a ‘cheap and dirty’ estimate of state occupation that works with a smaller number (100 s) of trajectories. This is derived from the SA calculation and is simply the sum of the normalized RBME likelihood function across all of the trajectories observed in a cell. We refer to this as the ‘naive occupation estimate.’ Functionally it behaves like a less precise version of the SA method (‘Materials and methods’).
Finally, to account for defocalization we developed a method applicable to the posterior distributions of both DPMMs and SAs (Figure 3—figure supplement 2, ‘Materials and methods’).
Evaluating DPMMs and SAs on simulated sptPALM data
As the target for inference, we considered a mixture of RBMEs enclosed in a spherical membrane with a thin focal volume bisecting the sphere, with dimensions similar to a mammalian cell nucleus. Emitters photoactivate and photobleach throughout the sphere and are only observed when their positions coincide with the focal volume. Because no gaps are allowed during tracking, the result is a highly fragmented set of trajectories with mean length 3–5 frames. We chose simulation settings to approximate real sptPALM experiments, with bleaching rates ≥10 Hz, diffusion coefficients in the range 0–100 μm^{2} s^{1}, and localization error variances between 0^{2} and 0.06^{2}μm^{2}.
We compared the ability of DPMMs, SAs, and MSD histograms to recover the underlying distribution of diffusion coefficients from this data. We divided these simulations into four classes with increasing difficulty. In class 1, localization error for all states was provided as a known constant to the algorithms (Figure 4A, Figure 4—figure supplement 1A). In class 2, localization error was held constant for all states but was unknown to the algorithms (Figure 4B, Figure 4—figure supplement 1B). In class 3, localization error was allowed to vary between diffusive states and was also unknown to the algorithms (Figure 4C, Figure 4—figure supplement 1C). Finally, for class 4 we simulated full sptPALMlike movies that incorporate heterogeneous localization error, motion blur, camera noise, tracking errors, and defocus (Figure 4—figure supplement 5, Figure 4—figure supplement 6). In these simulations, the localization error is unique for each emitter and depends on the emitter’s axial position, the stochastic number of photons it emits during each integration, and its pattern of motion blur (Video 4, Video 5).
DPMMs and SAs both recovered the dynamic profile for simulations in class 1 with a resolution that exceeded the MSD histogram approach. With large samples of trajectories, DPMMs and SAs inferred even nondiscrete distributions of states (Figure 4A, Figure 4—figure supplement 1A).
When knowledge of the localization error was removed (classes 2 and 3), the SA approach outperformed both the MSD and DPMM approaches. The DPMM’s performance was especially poor when the contributions of diffusion and error to jump variance were similar ($D\mathrm{\Delta}t\approx {\sigma}_{\text{loc}}^{2}$), likely due to its simplistic treatment of localization error. Meanwhile, the dynamic profile estimated by SAs was unperturbed by variations in the localization error (Figure 4B and C, Figure 4—figure supplement 1B and C). Comparing the results from simulations in class 3 numerically, we found that the root mean squared deviation of the estimated CDF from the true CDF was ≤ 5% for SAs, while it was 5–20% for both the MSD histogram and DPMM approaches (Figure 4—figure supplement 2).
The dynamic profiles produced by the MSD, DPMM, and SA approaches can be integrated to yield occupation estimates over particular diffusion coefficient ranges. We compared the accuracy and precision of these estimates with discrete two, three, or fourstate models (Figure 4D, Figure 4—figure supplement 3, Figure 4—figure supplement 4). As the number of trajectories increased, occupations estimated by DPMMs and SAs converted to within 3% of the true values. In contrast, the MSD approach was associated with large systematic errors, an effect previously reported (Mazza et al., 2012, Hansen et al., 2018).
On full optical and dynamic simulations in class 4, SAs also outperformed the DPMM approach (Figure 4—figure supplement 5, Figure 4—figure supplement 6). Again, the difference was particularly pronounced for small diffusion coefficients, for which the DPMM state occupation estimates were severely inaccurate. Both methods had difficulty recovering the fastest diffusion coefficient tested (Figure 4—figure supplement 5B), possibly due to the restrictive conditions on the maximum jump distance used during tracking.
A central limitation of DPMMs and SAs is that they do not account for transitions between diffusive states. To determine the effect of state transitions on the output of these algorithms, we simulated mixtures of two diffusive states with increasing transition rates (Figure 4G, Figure 4—figure supplement 7). While slow transition rates had a negligible effect on the estimated state profile, transition rates approaching the frame interval appeared as single state with intermediate diffusion coefficient (Figure 4—figure supplement 7C), consistent with a result from reactiondiffusion systems (Crank, 1975). The shift from the twostate to singlestate regime occurred in a narrow window of mean state dwell times between 0.05 and 0.5 frame intervals.
In this article, we restricted DPMM/SA inference to a range of diffusion coefficients from 10^{2} to 10^{2} μm^{2} s^{1}. We also explored what happens when the true diffusion coefficient lies outside this range. DPMMs and SAs still recovered the correct state occupations by using the closest diffusion coefficient in their respective supports (Figure 4—figure supplement 8).
In the presence of multiple diffusing states with similar diffusion coefficients, both DPMMs and SAs tended to identify a single population with occupation equal to the sum of the occupations for each true state (Figure 4F, Figure 4—figure supplement 9).
We compared the performance of SAs and vbSPT (Persson et al., 2013) using simulated SPT movies with different dynamic models (Figure 4—figure supplement 10). Both methods had comparable accuracy on simple twostate models (Figure 4—figure supplement 10B). On more complex models (Figure 4—figure supplement 10C), both methods encountered distinct difficulties, with vbSPT tending to overestimate and SAs tending to underestimate the number of states. For clusters of states with similar parameters (Figure 4—figure supplement 10C, bottom), SAs tend to produce a ‘smear’ of state occupations over a range of diffusion coefficients, while vbSPT tended to produce a different cluster of states in the same region of parameter space. vbSPT was noticeably less accurate at recovering slowmoving states with small diffusion coefficients (<0.1 μm^{2} s^{1}). We concluded that both approaches are useful and may provide complementary information.
While our investigation focused primarily on Brownian motion, SAs can be applied to any motion model parameterized by a likelihood function. To explore applications of SAs outside of Brownian motion, we applied it to fractional Brownian motion (FBM), a generalization of Brownian motion capable of producing anomalous diffusion (Mandelbrot and Van Ness, 1968). Whereas Brownian motion’s sole parameter is the diffusion coefficient, FBM parameterizes both the magnitude (via a scaling coefficient) and the temporal correlations (via the Hurst parameter) of a particle’s increments. As with Brownian motion, we simulated sptPALM movies with fraction Brownian particles with variable diffusion coefficient and Hurst parameter (Video 6). To construct a state array for FBM, we used a 3D array over scaling coefficient, Hurst parameter, and localization error variance (Figure 4—figure supplement 11C). As with the RBME array, we marginalized out localization error after inference. While the SA accurately recovered the diffusion coefficient and Hurst parameter for multistate FBM models (Figure 4—figure supplement 11D), we noted a systematic error in the estimation of low (subdiffusive) Hurst parameters due to motion blur (Figure 4—figure supplement 12).
Performance of state arrays on experimental sptPALM
After observing that SAs outperformed DPMMs on simulations, we proceeded to evaluate SAs on real data. We acquired an sptPALM dataset in U2OS osteosarcoma nuclei with endogenously tagged retinoic acid receptorαHaloTag (RARAHT) (Pontén and Saksela, 1967, Los et al., 2008; (Figure 5—figure supplement 1). RARAHT is a type II nuclear receptor that heterodimerizes via its ligandbinding domain (LBD) with the retinoid X receptor (RXR) to form a complex competent to bind chromatin and regulate target genes Giguere et al., 1987, Petkovich et al., 1987, Brand et al., 1988, Yu et al., 1991, Bugge et al., 1992, Marks et al., 1992, Leid et al., 1992; reviewed in Evans and Mangelsdorf, 2014). In addition, association of coregulator complexes with the RAR/RXR heterodimer has been shown to influence the dimer’s dynamics in FCS studies (Brazda et al., 2011, Brazda et al., 2014). As such, RARAHT is expected to inhabit a variety of dynamic states in sptPALM.
For comparison, we also performed identical sptPALM experiments with histone H2BHaloTag (H2BHT), a protein with a highoccupation immobile state (Hansen et al., 2017, McSwiggen et al., 2019), as well as HaloTag and HaloTagNLS (HT and HTNLS), which are fastdiffusing proteins with low immobile fractions.
The four proteins presented distinct dynamic profiles (Figure 5A). For both HT and HTNLS, the SA identified a single highly mobile state. In agreement with previous reports (Xiang et al., 2020), we observed that addition of the NLS reduces HaloTag’s diffusion coefficient by two to threefold. In contrast, both RARAHT and H2BHT had substantial immobile fractions, accounting for roughly 40 and 70% of their total populations, respectively (Figure 5C). SAs identified stark differences in the mobile subpopulations for RARAHT and H2BHT. Whereas H2BHT presented a fast population at 8–10 μm^{2} s^{1}, RARAHT inhabited a broad spectrum of diffusing states ranging from 0.3 to 10.0 μm^{2} s^{1}. Biological replicates gave similar results (Figure 5—figure supplement 2A).
To determine the origins of the dynamic states observed for RARAHT, we performed domain deletions (Figure 5B). Removal of either the DNAbinding domain (DBD) or LBD resulted in loss of the immobile population. Because both the DBD and LBD are required for chromatin binding by the RAR/RXR heterodimer, this suggests that the immobile fraction represents chromatinbound molecules. To confirm this, we introduced a point mutation (C88G) in the zinc fingers for the RARAHT DBD that abolishes DNAbinding in vitro (Zhu et al., 1999). This led to loss of the immobile fraction (Figure 5B). Deletion of the unstructured Nterminal domain (NTD) or Cterminal domain (CTD) had a milder effect, suggesting that these domains are not the primary determinants of the dynamic behavior of RARAHT.
To understand the origins of heterogeneity in the diffusive profile, we performed three variants of bootstrap aggregation (Figure 5—figure supplement 2B). The primary origins of variability for both DPMMs and SAs were celltocell rather than clonetoclone variability or intrinsic variability due to finite sample sizes.
Spatiotemporal context of cellular protein dynamics
In the process of inferring the global distribution over state parameters for an sptPALM dataset, SAs jointly infer individual distributions for each trajectory. Up to this point, we have analyzed the global distribution. However, it is also possible to aggregate the individual distribution for each trajectory as a function of space or time, yielding, for instance, separate dynamic profiles for every spatial location in an experiment. This approach offers a potential route to understand spatiotemporal variation in the dynamics of a protein target.
We explored this aspect of SAs with a U2OS nucleophosminHaloTag (NPM1HT) sptPALM dataset. NPM1HT exhibits partial nucleolar localization (Figure 6—figure supplement 1B) and distinct dynamic behavior inside and outside nucleoli (Mitrea et al., 2018). The SA identified a broad range of diffusion coefficients for NPM1HT, with three modes including an effectively immobile population (Figure 6A). Selecting four ranges of diffusion coefficients for analysis (Figure 6A), we visualized the posterior distribution as a function of space, calculating local fractional occupations for each range (Figure 6B, Figure 6—figure supplement 1C). This analysis revealed that some populations (including a slowmoving mobile population at 0.23 μm^{2} s^{1}) are enriched in nucleoli, while others (for instance, a fastmoving population at 4 μm^{2} s^{1}) are depleted and still others show no preference (Figure 6C). Notably, these preferences are apparent even in the naive occupations for trajectories in each compartment (Figure 6—figure supplement 1D).
The NPM1HT tracking experiments were performed with an acquisition sequence comprising several phases with distinct levels of photoactivation. As a result, the localization density varied temporally in each movie. To understand the effect of localization density on the diffusion coefficient likelihoods, we aggregated the naive state occupations over 100frame temporal blocks (Figure 6D). These experiments demonstrated that high localization densities led to a deflation in the occupation of slowermoving states, probably due to tracking errors. As a result, only phases with low localization density were used for posterior estimation. This demonstrates how the temporal perspective on the posterior may be useful as a guide for subsequent analysis, including quality control in SPT experiments.
Discussion
Intracellular sptPALM with fastdiffusing proteins presents unique challenges for analysis. In particular, the issues of state bias arising from imaging geometry, limited information available from any single trajectory, and variable localization error must be addressed prior to biological interpretation of sptPALM data.
The two methods investigated here, DPMMs and SAs, represent distinct approaches to this problem inspired by Bayesian nonparametrics. These methods identify sparse explanatory models from more complex alternatives, similar to other popular SPT approaches like vbSPT, but can use a broader range of dynamic models and are applicable when the dynamic profile is not comprised of discrete states. Between the two methods, SAs far outperformed DPMMs. By approximating continuous distributions over the diffusion coefficient with a grid of discrete states, SAs have qualitative similarities to recent methods to infer grids of dissociation rates from SMT trajectory length (Reisser et al., 2020).
When evaluated on real sptPALM data, SAs revealed previously unappreciated features of the dynamic profile for RARAHaloTag and H2BHaloTag. In particular, RARAHaloTag exhibited a broad spectrum of diffusive states that stands in contrast to the more discretized profile of H2BHaloTag or HaloTagNLS. The ability to identify the presence or absence of discrete diffusing states is a major advantage of SAs over existing methods, which are generally premised on the existence of discrete states. We found that SAs were especially useful when complemented with the naive occupation estimate to visualize celltocell and movietomovie variability. A Python tool that implements SAs can be found at https://github.com/alecheckert/saspt with documentation at https://saspt.readthedocs.io.
DPMMs and SAs have several limitations. DPMMs require prior measurement of the localization error, while SAs require selection of a parameter grid with spacing fine enough to avoid discretization artifacts. The saSPT package uses default parameter grids that satisfy this requirement for regular and FBM. However, the grid needs to be reevaluated for any new types of motion to which SAs are applied. Additionally, neither DPMMs nor SAs consider transitions between states, a major shortcoming of these methods.
Our experiments used a fixed range of diffusion coefficients from 10^{2} to 10^{2} μm^{2} s^{1}. Even when the true diffusion coefficient was outside this range, SAs accurately estimated state occupations by using the nearest available diffusion coefficient (Figure 4—figure supplement 8). Our experimental SPT results, with large spikes at the lowest diffusion coefficient, suggest this is common in real data for SPT targets with very slow or immobile populations. A potential area for future improvement is to extend the support iteratively until the slowest and fastest states are captured. Such an approach would need to contend with the increased difficulty in estimating the diffusion coefficient when it is much smaller than the localization error variance (Figure 3—figure supplement 1C).
While we have only investigated the application of SAs to regular Brownian motion (and, briefly, FBM) in this article, the model could be extended to any type of motion parameterized by a likelihood function. We highlight two potential challenges for any such work. First, the SA’s size scales with the number of parameters of the motion, meaning that more complex models are more computationally expensive. This could be addressed at the implementation level; for instance, by porting SA inference to graphical processing units. The second and more fundamental challenge is the similarity of the various flavors of anomalous diffusion to localization and tracking errors. For instance, both the Hurst parameter in FBM and the localization error primarily manifest as negative offdiagonal components of the trajectory increment covariance matrix (Figure 4—figure supplement 11B). Likewise, the erratic jumps of Levy flights have similarities to tracking errors. These issues are likely to become more significant when the sptPALM is lower in quality or highly heterogeneous (due to motion blur, defocus, and nonstationary camera noise).
In a recent objective evaluation of methods to measure anomalous diffusion (MuñozGil et al., 2021), even topperforming methods (including recent machine learning approaches) were associated with mean absolute error gt_{0.3} when estimating anomaly parameters for short trajectories (<10 frames). Because SAs create mixture models out of any underlying set of motion models, they could potentially be combined with such approaches (rather than the raw RBME likelihood function we use here) to boost their performance when run on large collections of short sptPALM trajectories.
Neither DPMMs nor SAs have any builtin mechanism to distinguish true jumps from tracking errors. Both rely on trajectories produced by another algorithm. It may be possible to combine both tracking and state occupation estimation into a single inference step using a model defining a joint distribution over states and possible links between detected particles.
Materials and methods
Plasmids
Unless otherwise noted, all PCRs were performed with New England Biosciences Phusion HighFidelity DNA polymerase (M0530S), and Gibson assemblies (Gibson et al., 2009) were performed with New England Biosciences Gibson Assembly Master Mix (E2611S) following the manufacturer’s instructions. Cloning and expression of plasmids was performed in E. coli DH5α using the Inoue protocol (Im et al., 2011). Plasmids used for nucleofections were purified with Zymo midiprep kit (Zymo D4200) and concentrations were quantified by absorption at 260 nm. Cloning primers were synthesized by Integrated DNA Technologies as 25 nmol DNA oligos with standard desalting, and sequences were verified by Sanger sequencing at the UC Berkeley DNA Sequencing Facility. A complete list of the primers used in this article is provided in Supplementary file 1, and a complete list of the plasmids used in this article is provided in Supplementary file 2.
We produced the vector PB PGKpPuroR L30p MCSGDGAGLINHaloTag3xFLAG by amplifying the human L30 promoter with prAH675 and prAH676 and assembling into AsiSI (NEB R0630) and XbaI (NEB R0145) digested PB PGKpPuroR EF1a MCSGDGAGLINHaloTag3xFLAG. For the expression plasmid PB PGKpPuroR EF1a 3xFLAGHaloTagGDGAGLIN, we cloned three tandem copies of the SV40 nuclear localization sequence into XbaI and BamHIHF (NEB R3136)digested PB PGKpPuroR EF1a 3xFLAGHaloTagMCS using Gibson assembly.
For constructs expressing RARAHaloTag domain deletions and point mutations, we first cloned the RARA coding sequence out of U2OS cDNA by extracting RNA from cycling U2OS cells with a QIAGEN RNeasy kit (QIAGEN 74104), preparing cDNA with the iScript Reverse Transcription Supermix (BioRad 1708840), amplifying the CDS with prAH495 and prAH496, then assembling into an XbaI and NotIHF (NEB R3189) digested PB PGKpPuroR EF1a MCSGDGAGLINHaloTag3xFLAG using Gibson assembly. Next, to produce the mutants, we amplified parts of the RARA coding sequence in PCR fragments while introducing point mutations or domain deletions at the intersections of the fragments. PCR fragments were assembled into XbaI and BamHIHFdigested PB PGKpPuroR L30pMCSGDGAGLINHaloTag3xFLAG using Gibson assembly. The primers used for each construct were as follows: for PB PGKpPuroR EF1a RARA[ΔNTD]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH1111 and prAH1112; for PB PGKpPuroR EF1a RARA[ΔCTD]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH1113 and prAH1114; for PB PGKpPuroR EF1a RARA[ΔNTD,ΔCTD]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH1111 and prAH1114; for PB PGKpPuroR EF1a RARA[C88G]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH1113 and prAH1069 and PCR fragment 2 was produced with prAH1112 and prAH1070; for PB PGKpPuroR EF1a RARA[ΔDBD]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH596 and prAH704 and PCR fragment 2 was produced with prAH597 and prAH705; for PB PGKpPuroR EF1a RARA[ΔLBD]HaloTagGDGAGLIN3xFLAG, PCR fragment 1 was produced with prAH596 and prAH706 and PCR fragment 2 was produced with prAH597 and prAH707.
To generate the plasmidbased homology repair donor for gene editing at the human RARA exon 9 locus, we assembled the following fragments by Gibson assembly. For fragment 1, we digested the pUC57 vector with EcoRI and HindIII. For fragment 2, we amplified the left homology arm out of U2OS genomic DNA with prAH599 and prAH600. For fragment 3, we amplified the GDGAGLINHaloTag3xFLAG insert out of the plasmid PB PGKpPuroR L30p MCSGDGAGLINHaloTag3xFLAG with prAH601 and prAH602. For fragment 4, we amplified the right homology arm out of U2OS genomic DNA with prAH603 and prAH604.
To generate guide RNA/Cas9 expression plasmids for gene editing at the human RARA exon 9 locus, we cloned the two guide RNA sequences under a U6 promoter in a vector that coexpresses the sgRNA, mVenus, and S. pyogenes Cas9, which has been previously described (Hansen et al., 2017).
In luciferase assays, we used the retinoic acidresponsive firefly luciferase expression vector pGL3RAREluciferase (Addgene plasmid #13458; http://n2t.net/addgene:13458; RRID:Addgene_13458), a gift from T. Michael Underhill (Hoffman et al., 2006). Renilla luciferase was expressed from pRL CMV Renilla (Promega E2261).
Cell lines
Request a detailed protocolHuman U2OS cells (female, 15 years old, osteosarcoma) obtained from the UC Berkeley Cell Culture Facility were cultured under 5% CO_{2} at 37°C in DMEM containing 4.5 g/L glucose supplemented with 10% fetal bovine serum and 10 U/mL penicillinstreptomycin. Cells were subpassaged at a ratio of 1:6 every 3–4 days. The stable cell line expressing H2BHaloTagSNAPf was described previously (Hansen et al., 2017, McSwiggen et al., 2019). We induced exogenous expression of HaloTag, HaloTagNLS, and point mutants and domain deletions of RARAHaloTag by nucleofection of PiggyBac vectors containing the proteins under EF1a promoters. Expression of wildtype RARAHaloTag and NPM1HaloTag was induced by endogenous gene editing, as described in the ‘CRISPR/Cas9mediated gene editing’ section. The U2OS cell line used here was validated by wholegenome sequencing as described in Hansen et al., 2017, and mycoplasma testing was performed by DAPI staining.
For sptPALM experiments, cells were grown on 25 mm circular No. 1.5 H coverglasses (Marienfeld, Germany, HighPrecision 0117650) that were first sonicated in ethanol for 10 min, plasmacleaned, then stored in isopropanol until use. U2OS cells were grown directly on the coverglasses in regular culture medium. The medium was changed after dye labeling and immediately before imaging into phenol redfree medium.
Nucleofection
Request a detailed protocolFor all imaging experiments involving exogenous expression, we used the Lonza Amaxa II Nucleofector System with Cell Line Nucleofector Kit V reagent (Lonza VCA1003). Briefly, U2OS cells were grown in 10 cm plates (Thermo Fisher) for 2 days prior to nucleofection, trypsinized, spun down at 1200 rpm for 5 min, combined with vector and Kit V reagent according to the manufacturer’s instructions, and nucleofected with program X001 on an Lonza Amaxa II Nucleofector. After nucleofection, cells were immediately resuspended in regular culture medium at 37°C and plated onto coverslips. In all imaging experiments involving nucleofection, imaging was performed within 24 hr of plating.
CRISPR/Cas9mediated gene editing
Request a detailed protocolEndogenous tagging of RARA in U2OS cells was performed with a protocol roughly following Hansen et al., 2017 with some modifications. A complete list of the plasmids used in gene editing is provided in Supplementary file 2, and a list of the guide sequences is provided in Supplementary file 3.
For U2OS cells, we nucleofected cells with plasmid expressing 3xFLAGSV40NLSpSpCas9 from a CBh promoter (Ran et al., 2013), mVenus from a PGK promoter, and guide RNA from a U6 promoter (pU6_sgRNA_CBh_Cas9_PGK_Venus_antiRARAC_terminus_1 and pU6_sgRNA_CBh_Cas9_PGK_Venus_antiRARAC_terminus_2), along with a second plasmid encoding the homology repair donor (pUC57_homRep_RARAHaloTag). The homology repair donor was built in a pUC57 backbone modified to contain HaloTag3xFLAG with ~500 base pairs of homologous genomic sequence on either side. Synonymous mutations were introduced at the cut site to prevent retargeting by Cas9. Each of the two guide RNA plasmids were nucleofected into separate populations of cells to be pooled for subsequent analysis. Then, 24 hr after the initial nucleofection, we screened for mVenusexpressing cells using FACS and pooled these mVenuspositive cells in 10 cm plates. Then, 5 days after plating, we labeled cells with HTLTMR (Promega G8251) and screened for TMRpositive, mVenusnegative cells. Cells were diluted to single clones and plated in 96well plates for a 2–3week outgrowth step, during which the medium was replaced every 3 days. The 96well plates were then screened for wells containing single colonies of U2OS cells, which were split by manual passage into two replicate wells in separate 96well plates. One of these replicates was used to subpassage, while the other was used to harvest genomic DNA for PCR and sequencingbased screening for the correct homology repair product. In PCRbased genotyping, we used three primer sets: (A) primers external to the homology repair arms, expected to amplify both the wildtype allele and the edited allele (‘PCR1’), (B) a primer internal to HaloTag and another external to it on the 5′ side, expected to amplify only the edited allele (‘PCR2’), and (C) a primer internal to HaloTag and another external to it on the 3′ side, expected to amplify only the edited allele (‘PCR3’). The primer sets for each target were the following. For RARAGDGAGLINHaloTag3xFLAG, we used prAH586 and prAH761 for PCR1, prAH761 and prAH762 for PCR2, and prAH763 and prAH764 for PCR3. For NPM1GDGAGLINHaloTag3xFLAG, we used prAH1092 and prAH1093 for PCR1, prAH1093 and prAH377 for PCR2, and prAH1092 and prAH373 for PCR3. U2OS cDNA from selected clones was isolated with DirectPCR Lysis Reagent (Viagen 101T), treated with 0.5 mg/mL proteinase K for 15 min, incubated at 95°C for 1 hr, then subjected to PCRs 1–3 using Phusion polymerase in the presence of 5% DMSO. Amplicons from candidate clones were gelpurified (QIAGEN 28704) and Sanger sequenced; only clones with the correct target sequence were kept for continued screening. A subset of these clones were chosen for characterization by Western blot, imaging, and luciferase assays.
For NPM1GDGAGLINHaloTag3xFLAG knockin cell lines, we used a different strategy relying on nucleofected Streptococcus pyogenes Cas9 sgRNPs and linear dsDNA homology repair donors. The target insert (GDGAGLINHaloTag3xFLAG from the vector PB PGKpPuroR L30p MCSGDGAGLINHaloTag3xFLAG) was first amplified with ultramers encoding 120 bp homology arms (prAH867 and prAH868; IDT) using KAPA2G Robust HotStart polymerase (Kapa Biosystems KR0379) for 12 cycles. A small volume of this reaction was then used to seed a PCR reaction using primers prAH869 and prAH870 in Q5 HighFidelity 2X Master Mix (QIAGEN M0492). Products were purified by RNAClean XP magnetic beads (BeckmanCoulter A63987) and further cleaned by ethanol precipitation, followed by resuspension in a small volume of RNasefree water. For guides, we performed a threeprimer PCR using prAH2000 and prAH2001 along with a unique oligo encoding the spacer (either prAH979 or prAH980) to produce a linear dsDNA product encoding the sgRNA preceded by a T7 promoter. We then used T7 RNA polymerase (NEB E2040S) to transcribe sgRNA from this template and purified the sgRNA with RNAClean XP magnetic beads according to the manufacturer’s instructions. To assemble the sgRNP, we incubated 80 pmol sgRNA with 40 pmol purified SpyCas9NLS (UC Berkeley Macrolab) for 15 min at 37°C in 20 mM HEPES pH 7.5, 150 mM KCl, 10 mM MgCl_{2}, and 5% glycerol. sgRNPs were subsequent kept on ice and combined with donor immediately before nucleofection. For each nucleofection, we used 40 pmol sgRNP and 5 pmol dsDNA donor template suspended in <10 μL with Lonza Amaxa Nucleofector II protocol X001 in Lonza Kit V reagent. Roughly 1 million cells were used for nucleofection. Sorting for labeled cells, subcloning, and genotyping proceeded as previously described for RARAGDGAGLINHaloTag3xFLAG.
Western blots
Request a detailed protocolAntibodies were as follows (the ratio indicates the dilution factors used for Western blot): human TBP, Abcam Ab51841, 1:2500 (mouse); FLAG, SigmaAldrich F3165, 1:2000 (mouse).
For Western blots, cells were scraped from plates in icecold PBS then pelleted. Pellets were resuspended in lysis buffer (0.15 M NaCl, 1% NP40, 50 mM Tris–HCl [pH 8.0], and a cocktail of protease inhibitors [SigmaAldrich 11697498001 dissolved in PBS with supplemented PMSF, aprotinin, and benzamidine]), agitated for 30 min at 4°C, then centrifuged for 20 min at 12,000 rpm, 4°C. The supernatant was then mixed with 2× Laemmli (to final 1×), boiled for 5 min, then run on 12.5% SDSPAGE. After transfer to nitrocellulose, the membrane was blocked with 10% condensed milk in TBST (500 mM NaCl, 10 mM Tris–HCl [pH 7.4], 0.1% Tween20) for 1 hr at room temperature. Antibodies were suspended in 5% condensed milk in TBST at the dilutions indicated above and incubated rocking at 4°C overnight. After primary hybridization, the membrane was washed three times for 10 min with TBST at room temperature, hybridized with an antimouse HRP secondary antibody in 5% condensed milk in TBST for 60 min at room temperature, washed three more times with TBST for 10 min, then visualized with Western Lightning PlusECL reagent (PerkinElmer NEL103001) according to the manufacturer’s instructions and imaged on a BioRad ChemiDoc imaging system. Different exposure times were used for each antibody. The raw Western blots images for RARAHaloTag and NPM1HaloTag are provided as Figure 5—source data 1 and Figure 6—figure supplement 1—source data 1 , respectively.
Luciferase assays
Request a detailed protocolAll luciferase assays used pGL3RAREluciferase, a reporter containing firefly luciferase driven by an SV40 promoter with three retinoic acid response elements (RAREs). pGL3RAREluciferase was a gift from T. Michael Underhill (Addgene plasmid 13458; http://n2t.net/addgene:13458; RRID:Addgene_13458; Hoffman et al., 2006). Luciferase assays were performed on cells cultivated in 6well plates. Cells were transfected with 100 ng pGL3RAREluciferase and 10 ng pRL Renilla (Promega E2261) using Mirus TransIT2020 Transfection Reagent (Mirus MIR 5404). Transfection was performed 1 day before assaying luciferase expression with the DualLuciferase Reporter Assay System (Promega E1910) according to http://n2t.net/addgene:13458 the manufacturer’s instructions. Readout was performed on a GloMax luminometer (Promega).
Cell dye labeling
Request a detailed protocolFor sptPALM experiments, cells were labeled with one of two methods, depending on the dye. For nonphotoactivatable fluorescent dyes including TMRHTL (tetramethylrhodamineHaloTag ligand; Promega G8251), we stained cells with 100 nM dye in regular culture medium for 10 min, then performed three 10 min incubations in dyefree culture medium separated by PBS washes. All PBS and culture medium was incubated at 37°C between medium changes and washes.
For experiments with photoactivatable dyes, which have lower cell permeability and slower washin/washout kinetics, we labeled cells with 100 nM dye in regular culture medium for 10–20 min, followed by four 30 min incubations in dyefree culture medium at 37°C. Between each incubation, we washed twice with PBS at 37°C. After the final incubation, cells were changed into phenol redfree medium for imaging.
sptPALM
Request a detailed protocolsptPALM experiments were performed with a custombuilt Nikon TI microscope equipped with a ×100/NA 1.49 oilimmersion TIRF objective (Nikon apochromat CFI Apo TIRF 100X Oil), an EMCCD camera (Andor iXon Ultra 897), a perfect focus system to account for axial drift, an incubation chamber maintaining a humidified 37°C atmosphere with 5% CO_{2}, and a laser launch with 405 nm (140 mW, OBIS, Coherent), 488 nm, 561 nm, and 633 nm (all 1 W, Genesis Coherent) laser lines. Laser intensities were controlled by an acoustooptic Tunable Filter (AA OptoElectronic, AOTFnCVISTN) and triggered with the camera TTL exposure output signal. Lasers were directed to the microscope by an optical fiber, reflected using a multiband dichroic (405 nm/488 nm/561 nm/633 nm quadband, Semrock) and focused in the back focal plane of the objective. The angle of incident laser was adjusted for highly inclined laminated optical sheet (HiLo) conditions (Tokunaga et al., 2008). Emission light was filtered using single bandpass filters (Semrock 593/40 nm for PAJFX549 and Semrock 676/37 nm for PAJF646). Hardware was controlled with the Nikon NISElements software.
For stroboscopic illumination, the excitation laser (561 nm or 633 nm) was pulsed for 1–2 ms (most commonly 1 ms) at maximum (1 W) power at the beginning of the frame interval, while the photoactivation laser (405 nm) was pulsed during the ~447 μs camera transition time, so that the background contribution from the photoactivation laser is not integrated. For all sptPALM, we used an EMCCD vertical shift speed of 0.9 μs and conversion gain setting 2. On our setup, the pixel size after magnification is 160 nm and the photontograyscale gain is 109. A total of 15,000–30,000 frames with this sequence were collected per nucleus, during which the 405 nm intensity was manually tuned to maintain low density of fluorescent particles per frame.
Localization and tracking
Request a detailed protocolTo produce trajectories from raw sptPALM movies, we used a custom sptPALM tracking pipeline publicly available on GitHub (https://github.com/alecheckert/quot, swh:1:rev:1adf7a0574c62f38140f1dec2d14555bfc03b9a7, Heckert, 2022b). All localization and tracking for this article was performed with the following settings:
Detection: Generalized log likelihood ratio test (Sergé et al., 2008) with a 2D Gaussian kernel with $\sigma =190$ nm (detection method ”llr” with k = 1.2, a 15 pixel window size [w = 15], and a log ratio threshold of 16.0 [t = 16.0]).
Subpixel localization: Levenberg–Marquardt fitting of a 2D integrated Gaussian point spread function model (localization method “ls_int_gaussian”) with fixed $\sigma =190$ nm, window size 9 pixels, maximum 20 iterations per PSF, with a damping term of 0.3 for parameter updates. The 2D integrated Gaussian PSF model is described in Smith et al., 2010 and the Levenberg–Marquardt routine in Laurence and Chromy, 2010. We used the radial symmetry method (Parthasarathy, 2012) to make the initial guess used to start the Levenberg–Marquardt algorithm.
Tracking: We used the tracking algorithm “conservative” in quot with a 1.2 µm search radius. This simple algorithm searches for particle–particle reconnections that are ‘unambiguous’ in the sense that no other reconnections are possible within the specified search radius. These reconnections are then used to synthesize trajectories, while ‘ambiguous’ connections are discarded.
After localization and tracking, all trajectories in the first 1000 frames of each movie were discarded. Localization density tends to be high in these frames, so they can contribute tracking errors that compromise accuracy. The mean localization density for most movies in the remaining set of frames was less than one emitter per frame.
For experiments involving HaloTag or HaloTagNLS, which have high mobility, we used a broader search radius at 2.5 μm. All other settings were kept the same.
All trajectories from real sptPALM experiments used in this article are publicly accessible as a Dryad dataset (https://doi.org/10.6078/D13H6N).
Spinning disk confocal imaging
Request a detailed protocolExperiments using spinning disk confocal imaging were performed at the UC Berkeley HighThroughput Screening Facility on a Perkin Elmer Opera Phenix equipped with a controller for 37°C and 5% CO_{2}, using a builtin 40x water immersion objective.
Simulations
All simulations in this article belong to one of two categories:
Trajectory simulations: Individual trajectories are simulated in a HiLolike geometry, then localization error and defocalization are injected as detailed below. The output of each simulation is a set of trajectories. This type of simulation does not incorporate tracking errors. These include the simulations in Figure 3, Figure 4, Figure 4—figure supplement 1, Figure 4—figure supplement 2, Figure 4—figure supplement 3, Figure 4—figure supplement 4, Figure 4—figure supplement 7, Figure 4—figure supplement 8, and Figure 4—figure supplement 9.
Optical–dynamical simulations: Starting from a dynamical model and an approximation to sptPALM imaging system, we simulate full SPT movies. The output is a stack of images similar to that acquired on a real sptPALM system. Analysis follows the same steps as for real SPT data: we recover trajectories using a localization and tracking algorithm, which are subjected to the relevant downstream analyses. These include the simulations in Figure 1—figure supplement 1, Figure 4—figure supplement 5, Figure 4—figure supplement 6, Figure 4—figure supplement 10, Figure 4—figure supplement 11, and Figure 4—figure supplement 12.
Both types of simulation are important. Trajectory simulations allow us to separate the accuracy of the tracking algorithm from the accuracy of the SA/DPMM algorithm in a tightly controlled setting, while optical–dynamical simulations are ‘endtoend’ tests that also incorporate realistic features such as motion blur, camera noise, and tracking errors.
Trajectory simulations
Request a detailed protocolAll trajectory simulations were performed with a simple publicly available sptPALM simulation tool (strobesim; https://github.com/alecheckert/strobesim, Heckert, 2022e). This tool generates trajectories for different types of motion and simulates the act of observation in a thin focal plane.
Unless otherwise noted, simulated trajectories were confined to a sphere with radius 5 μm and a focal plane with 700 nm depth bisecting the sphere. Simulated particles were subject to photoactivation and photobleaching throughout the sphere and were only observed when their positions coincided with the focal volume. We simulated sparse tracking without gaps, so that if an emitter passed twice through the focal volume, it counted as two separate trajectories. At the sparsity used for these simulations, tracking is unambiguous and so tracking errors do not contribute to the outcome.
For discretestate trajectory simulations, the number of particles in each state was modeled as a multinomial random variable drawn from the underlying state occupancies. As a result, there is an inherent variability associated with the ‘true’ fractional occupations for each simulation replicate, exactly as would be expected in sptPALM experiments.
For trajectory simulations with state transitions, we modeled the particles as twostate Markov chains with identical transition rates between the states. Each state was associated with a constant diffusion coefficient. These Markov chains were simulated on subframes grained at 100 iterations per frame interval. For instance, for simulations with 7.48 ms frame intervals, the underlying Markov chain was simulated on subframes of 74.8 μs. During each subframe, the state of the MC was assumed to be constant and we simulated diffusion according to the Euler–Maruyama scheme with the current diffusion coefficient. The positions of the particle at the frame interval were recorded.
Optical–dynamical simulations
Request a detailed protocolThe simulations in Figure 1—figure supplement 1, Figure 4—figure supplement 5, Figure 4—figure supplement 6, Figure 4—figure supplement 10, Figure 4—figure supplement 11, and Figure 4—figure supplement 12 were produced with a software package (sptPALMsim, https://github.com/alecheckert/sptpalmsim, Heckert, 2022d) that performs both dynamical and optical simulations to incorporate effects such as defocus, camera noise, motion blur, and tracking errors. The dynamic simulations are identical to those described in the previous section. Here, we outline the optical simulations. A more detailed discussion can be found, for instance, in Hanser et al., 2004.
We assume that the observed intensity ${I}_{ij}$ on pixel $i,j$ is produced by a linear gain model with read noise and shot noise:
The offset $b$, gain $g$, and read noise variance ${\sigma}_{\text{read noise}}^{2}$ are assumed to be the same for all pixels in the camera with values similar to an Andor iXon 897 EMCCD ($b=470$, $g=109$, and ${\sigma}_{\text{read noise}}^{2}={3}^{2}$). The function ${A}_{ij}$ defines the rate of photon arrivals at pixel $i,j$ and depends on the distribution of fluorescent emitters in the sample.
We assume that the photon arrival rate ${A}_{ij}$ is related to the distribution of emitters in the source plane $f(x,y,z)$ via
* denotes convolution. The $z$integral runs over the depth of the simulation (in this article, this is always from $z=2$ μm to $z=+2$ μm). $\text{PSF}(x,y,z)$ is assumed to be given by the squared magnitude of a complexvalued function ${\text{PSF}}_{A}(x,y,z)$ such that (Hanser et al., 2004):
where $P({k}_{x},{k}_{y})$ is the complexvalued microscope pupil function and ${e}^{i{k}_{z}({k}_{x},{k}_{y})z}$ is a ‘defocus kernel,’ accounting for the phase profile of light exiting the pupil plane. The limits of the integral run over the circular microscope aperture ${k}_{y}^{2}+{k}_{x}^{2}\le {\left(\frac{\text{NA}}{\lambda}\right)}^{2}$, where λ is the emission wavelength. In all simulations, we use an ‘ideal’ pupil function with phase 0 and amplitude 1 over the microscope aperture.
For our purposes, the integral in 3 is replaced with a sum over a grid with finer spatial grain than the camera pixel size.
Altogether, the optical simulations proceeded in the following way:
First, the paths of fluorescent emitters are simulated with fine temporal grain (such as 10^{4} Hz) according to a particular dynamic model.
For each laser pulse:
The parts of the emitter paths that temporally coincide with the laser pulse are aggregated into a single distribution $f(x,y,z)$.
The photon arrival rates at the camera is simulated according to Equation 2.
Shot noise and read noise are introduced according to Equation 1.
Images for all laser pulses are concatenated to yield the simulated SPT movie.
The product of these simulations are SPT movies that are subsequently tracked (see ‘Localization and tracking’). Except where otherwise indicated, the settings for these simulations were as follows: numerical aperture 1.49, immersion media refractive index 1.515, emission wavelength 670 nm, frame interval 7.48 ms, image pixel size 0.16 μm, excitation pulse width 2 ms, bleach rate 0.2 Hz, read noise variance 3^{2} grayvalues^{2}, offset 470.0 grayvalues, and gain 109.0 grayvalues per photon. The mean number of photons detected per emitter per frame was 150, although the actual number is random due to the randomness of photon emission and detection (Equation 1). The scripts used to generate the simulations are publicly available at the sptPALMsim repo (https://github.com/alecheckert/sptpalmsim). Video 4 shows an example of a movie simulated with these settings.
State arrays and Dirichlet process mixture models
Request a detailed protocolThis section describes the SA and DPMM used in this article. We begin with a classic Bayesian finite state mixture model, then introduce modifications that lead to SAs and DPMMs. The finite state mixture has been reviewed in detail elsewhere (Marin et al., 2005, McLachlan et al., 2019), so here we keep details to a minimum.
Finite state mixtures
Request a detailed protocolA finite state mixture is a collection of ‘states’ $k=1,\mathrm{\dots},K$, each of which is associated with an occupation ${\tau}_{k}$ and a vector of state parameters ${\mathit{\theta}}_{k}$. (Where convenient, we let $\mathbf{\theta}=({\mathit{\theta}}_{1},\mathrm{\dots},{\mathit{\theta}}_{K})$ be the collection of parameters for all states.) Each state generates trajectories $X$ according to some distribution ${p}_{X}(x{\mathit{\theta}}_{k})$. The overall generative process for each trajectory is:
Randomly select a state $k$ with probability ${\tau}_{k}$.
Randomly generate a trajectory $X$ from that state according to ${p}_{X}(x{\mathit{\theta}}_{k})$.
The probability to generate a particular trajectory $X$ is then
To represent the origin state for each trajectory, we use a 1of$K$ encoding ${\mathit{Z}}_{i}\in {\{0,1\}}^{K}$ so that ${Z}_{ik}=1$ if trajectory $i$ originates from state $k$ and ${Z}_{ik}=0$ otherwise. For a dataset with $N$ trajectories, we let $\mathit{Z}\in {\{0,1\}}^{N\times K}$ be the matrix such that the ith row is ${\mathit{Z}}_{i}$.
Finally, we specify priors over $\mathit{\tau}$ and ${\mathit{\theta}}_{k}$. The full Bayesian finite state mixture can then be written as
where $H$ is the prior over the parameters $\mathit{\theta}}_{k$, usually chosen to be conjugate to ${p}_{X}(x{\mathit{\theta}}_{k})$.
This corresponds to the first graphical model in Figure 2—figure supplement 1. The objective is to infer the posterior distribution $p(\mathit{Z},\mathit{\tau},\mathbf{\theta}\mathit{F})$, where $\mathit{F}$ represents some observed set of trajectories.
State arrays
Request a detailed protocolThree common challenges with the finite state mixture 4 are:
Choosing $K$, the number of states. Because $K$ is a hyperparameter in 4, some kind of metaalgorithm is required to infer it, and this process can be fraught (Marin et al., 2005).
Choosing $H$, the prior over ${\mathit{\theta}}_{k}$. Ideally the prior is chosen to be conjugate to ${p}_{X}(x{\mathit{\theta}}_{k})$, but this is only possible for the simplest forms of ${p}_{X}(x{\mathit{\theta}}_{k})$.
Computing ${p}_{X}(x{\mathit{\theta}}_{k})$ is often expensive, especially if it needs to be evaluated repeatedly during inference.
SAs are a special case of finite mixture models designed in response to these issues. Rather than equating $K$ with the true number of states, SAs instead choose a large, fixed value of $K$ and constant values for each ${\mathit{\theta}}_{k}$. A Bayesian routine is then used to drive the occupation of most states to zero, leaving minimal models sufficient to explain the observations. (The ability of Bayesian inference to identify sparse explanatory models in the presence of more complex alternatives is the same property that drives automatic relevance determination [ARD] in machine learning with Bayesian models.)
Because the state parameters are constant, the only parameters left to infer are $\mathit{Z}$ and $\mathit{\tau}$. Together, this simplified model is
This corresponds to the third graphical model shown in Figure 2A. Notice that since each ${X}_{i}$ and ${\mathit{\theta}}_{k}$ are constant, ${p}_{X}({X}_{i}{\mathit{\theta}}_{k})$ is also constant and only needs to be evaluated once during inference.
To infer the posterior distribution $p(\mathit{Z},\mathit{\tau}\mathit{F})$, we take a variational approach, constructing an approximation $q(\mathit{Z},\mathit{\tau})\approx p(\mathit{Z},\mathit{\tau}\mathit{F})$ such that
where $L[q]$ is the variational lower bound:
Motivation for the variational lower bound is discussed in detail elsewhere (Bishop, 2006). Here, we only remark that maximization of $L[q]$ minimizes the Kullback–Leibler divergence between the approximation and the true posterior. The factorability criterion in 6 enables an expectationmaximization routine (Dempster et al., 1977) by iteratively evaluating.
The constants are chosen so that each factor, $q(\mathit{Z})$ or $q(\mathit{\tau})$, is normalized. Combining Equations 8 for model 5 yields the solution
where ${L}_{i}$ is the number of jumps in trajectory $i$ and $\psi (n)$ is the digamma function. For brevity here, the derivation of Equation 9 is placed in its own section below.
$q(\mathit{Z},\mathit{\tau})$ is parameterized by $\mathit{n}$ and $\mathit{r}$. These can be inferred with a simple EM algorithm:
Initialize a matrix $\mathit{A}\in {R}^{N\times K}$ by setting ${A}_{ik}=p({X}_{i}{\mathit{\theta}}_{k})$.
Initialize a matrix ${\mathit{r}}^{(0)}\in {R}^{N\times K}$ such that ${r}_{ik}^{(0)}=\frac{{A}_{ik}}{\sum _{j=1}^{K}{A}_{ij}}$.
For each iteration $t=1,2,\mathrm{\dots}$:
For each state $k$, evaluate ${n}_{k}^{(t)}=\frac{\alpha}{K}+\sum _{i=1}^{N}{L}_{i}{r}_{ik}^{(t1)}$.
Evaluate the matrix ${\mathit{r}}^{(t)}$ such that
${r}_{ik}^{(t)}=\frac{{A}_{ik}{e}^{\psi ({n}_{k}^{(t)})}}{\sum _{j=1}^{K}{A}_{ij}{e}^{\psi ({n}_{j}^{(t)})}}$
After convergence of $\mathit{n}$ and $\mathit{r}$, we can summarize the posterior distribution by taking its mean:
 (10) $\begin{array}{ll}E\left[{Z}_{ik}\right]& ={r}_{ik}\\ E\left[{\tau}_{k}\right]& =\frac{{n}_{k}}{\sum _{j=1}^{K}{n}_{j}}\end{array}$
Finally, we perform two postprocessing steps on the posterior mean:
If localization error is a parameter, we marginalize it out by projecting through that axis of the array.
We adjust the posterior mean to account for defocalization biases, as described in ‘Defocalization’.
Throughout this article, we always report occupations for the SA model as the mean of $q(\mathit{\tau})$ according to Equation 10, twith localization error marginalized out and the appropriate defocalization correction applied.
Naive state occupations
Request a detailed protocolInference of the SA posterior works optimally with thousands to tens of thousands of trajectories. We also found it useful to have a cheap, dirty estimate for state occupations that can be evaluated on a small number of trajectories to visualize nucleitonuclei variability (for instance, in Figure 5A).
For these purposes, we define the ‘naive occupation estimate’ ${\mathit{\tau}}_{\text{naive}}$ such that
Notice that this is just the posterior occupations based on the initial value for $\mathit{r}$ in the algorithm for SA inference. We use the same postprocessing steps for ${\mathit{\tau}}_{\text{naive}}$ as for SAs, including marginalizing out localization error and correcting for defocalization.
State arrays for regular Brownian motion
Request a detailed protocolIn the above section, we have left ${p}_{X}(x{\mathit{\theta}}_{k})$ unspecified as it depends on the type of motion being considered. This section states the form of ${p}_{X}(x{\mathit{\theta}}_{k})$ for RBME, the type of motion considered in this article.
Suppose that trajectory $i$ is constructed by measuring the position of a Brownian particle over sequential frame intervals of duration $\mathrm{\Delta}t$, and that each measured position has some error associated with it. We assume that this error is normally distributed with mean zero and variance ${\sigma}_{\text{loc}}^{2}$.
We refer to the change in the particle’s position over each frame interval as a ‘jump.’ If there are ${L}_{i}$ total jumps, let $\mathit{x},\mathit{y}\in {R}^{{L}_{i}}$ be the displacements of these jumps along the $x$ and $y$ axes, respectively. Then, the probability density over $\mathit{x}$ and $\mathit{y}$ is
where $\mathbf{\Gamma}\in {R}^{{L}_{i}\times {L}_{i}}$ is the covariance matrix defined by
where $D$ is the diffusion coefficient and ${\sigma}_{\text{loc}}^{2}$ is the localization error (Michalet and Berglund, 2012). Due to the contribution of the localization error to the offdiagonal terms of the covariance matrix, the jumps of an RBME are not a Markov process except when ${\sigma}_{\text{loc}}^{2}=0$.
The SA for RBME uses a 2D grid of diffusion coefficients and localization errors. In this grid, the diffusion coefficients $D$ are logspaced between 10^{2} and 10^{2} μm^{2} s^{1}, while the localization errors ${\sigma}_{\text{loc}}$ are linearly spaced between 0 and 0.06 μm.
State arrays for fractional Brownian motion
Request a detailed protocolIn Figure 4—figure supplement 11 and Figure 4—figure supplement 12, we consider a generalization of RBME that we refer to as fractional Brownian motion with localization error (FBME). This is a simple modification of Mandelbrot and Van Ness’s FBM (Mandelbrot and Van Ness, 1968) that incorporates localization error.
We define 1D FBME as a meanzero Gaussian process ${X}_{t}$ with the covariance function
where $S$ is the scaling coefficient, $H$ is the Hurst parameter ($0<H<1$), ${\sigma}_{\text{loc}}^{2}$ is the variance of the localization error, and ${I}_{t=s}$ is the indicator function (1 if $t=s$ and 0 otherwise). Because we always measure the position at regular frame intervals of duration $\mathrm{\Delta}t$, we let $t=i\mathrm{\Delta}t$ and $s=j\mathrm{\Delta}t$ so that this can be written as
The corresponding increment process ${\stackrel{~}{X}}_{i}={X}_{i\mathrm{\Delta}t}{X}_{(i1)\mathrm{\Delta}t}$ is a meanzero Gaussian process with the covariance function
2D and 3D FBMEs are constructed with independent 1D FBMEs along each spatial axis.
In Equation 13, the scaling coefficient has units of $\mu {\mathrm{m}}^{2}{\mathrm{s}}^{2\mathrm{H}}$. As a result, its magnitude is highly dependent on $H$. Because we often want to parameterize the magnitude of the particle’s jumps separately from the covariance between jumps, in this article we use a ‘modified’ scaling parameter $\overline{S}$ defined by
As a result, the jump variance is $\text{Var}({\stackrel{~}{X}}_{i})=2\overline{S}\mathrm{\Delta}t$, regardless of the Hurst parameter. While $\overline{S}$ is much easier to work with for one dataset, since it is dependent on $\mathrm{\Delta}t$ it must not be compared across datasets with different frame intervals and should first be converted to $S$ with Equation 14.
Derivation of Equation 9
Request a detailed protocolHere, we derive the SA posterior (Equation 9) by substituting model 5 into Equation 8 and imposing some additional physical constraints.
First, let ${A}_{ik}={p}_{X}({X}_{i}{\mathit{\theta}}_{k})$. Then factor $\mathrm{log}p(\mathit{F},\mathit{Z},\mathit{\tau})$ as
where the constant accounts for normalization factors. Plugging this into the second equation in Equation 8, we have
We have collected terms that do not depend on $\mathit{\tau}$ into the constant. In this article, we choose to weight the contribution of each trajectory to $\mathrm{log}q(\mathit{\tau})$ by the number of jumps in the trajectory. This is equivalent to treating jumps (rather than trajectories) as individual observations and is more robust to issues arising from the shallow observation depth of most sptPALM setups. It results in the modified equation
where ${L}_{i}$ is the number of jumps in trajectory $i$. We recognize this as a log Dirichlet distribution, so that
Next, we substitute Equation 15 into the first equation in Equation 8, giving
Since $q(\mathit{\tau})$ is the Dirichlet distribution given by Equation 16,
where $\psi (x)$ is the digamma function. Normalizing over the states for each trajectory $i$, we have
Together, Equations 16 and 17 constitute the result in Equation 9.
Dirichlet process mixture model
Request a detailed protocolAs mentioned above, a fundamental challenge with the finite state mixture (Equation 4) is determining the number of states. SAs deal with this issue by selecting a large, finite value for $K$ and relying on an inference routine that selects sparse subsets of states from a $K$dimensional initial model.
DPMMs are more extreme, taking the limit $K\to \mathrm{\infty}$ (Ferguson, 1973). In this limit, the discrete vector of state occupations is replaced by a continuous distribution over the entire space of state parameters. The generative process for each trajectory is,
Randomly draw some state parameters ${\mathit{\theta}}_{i}\sim H$, where $H$ is a continuous distribution over the space of state parameters.
Randomly generate a trajectory $X$ from that state according to ${p}_{X}(x{\mathit{\theta}}_{i})$.
This process is formalized by replacing the Dirichlet distribution in Equation 4 with the Dirichlet process $\text{DP}(\alpha ,H)$, its infinitedimensional analog. Here, α has the same function as in the finite mixture (defining the relative strength of the prior) and $H$ is the ‘base distribution’ over state parameters. The full DPMM is then
This corresponds to the second graphical model in Figure 2A. Each draw $G$ is a discrete probability distribution over part of the parameter space (Blackwell, 1973). This formalism is discussed in detail in Teh, 2010 or Neal, 1992. Here, we only remark that recovering the posterior $p(\mathit{\theta}\mathit{F})$ requires marginalizing over $G$, yielding a continuous distribution over the parameter space.
To estimate the posterior distribution $p(\mathit{\theta}\mathit{F})$, we take the Gibbs sampling approach introduced by Neal (Algorithm 8 in Neal, 2000). This involves sampling each ${\mathit{\theta}}_{i}$ while hold the other ${\mathit{\theta}}_{j\ne i}$ constant, yielding samples from the posterior distribution (Geman and Geman, 1984). To counter autocorrelation in the samples, Neal also endowed the sampler with additional Metropolis–Hastings nudges to the candidate state parameters between rounds of Gibbs sampling. For these nudges, we use a Gaussian proposal distribution.
In the case of RBME, the state parameters are $\mathit{\theta}=(D,{\sigma}_{\text{loc}}^{2})$. Even with Neal’s sampler, a large number of samples are required to estimate the posterior over this 2D space, potentially requiring hours of computational time per dataset.
To make the problem more tractable, we replace this 2D space with a 1D approximation by neglecting the offdiagonal terms in the covariance matrix for RBME (Equation 12). With this approximation, Equation 12 can be rewritten as the log gamma density as
where $\varphi =\mathrm{log}\left[4(D\mathrm{\Delta}t+{\sigma}_{\text{loc}}^{2})\right]$, ${S}_{i}$ is the sum of squared 2D jumps in trajectory $i$, and ${L}_{i}$ is the number of jumps. Notice that we cannot distinguish the contributions of $D$ and ${\sigma}_{\text{loc}}^{2}$ to $\varphi $ without measuring ${\sigma}_{\text{loc}}^{2}$ by some other method, such as averaging the negative sequential jump covariance across all trajectories in the dataset. This is the price we pay for a tractable DPMM and is the major disadvantage of this model (see, for instance, Figure 3A).
The complete Gibbs sampling routine for our DPMM is the following, which is essentially a modified version of Algorithm 8 from Neal, 2000:
Draw a random sample ${\mathit{\varphi}}^{(0)}=({\varphi}_{1},\mathrm{\dots},{\varphi}_{{m}_{0}})$ from a uniform distribution on the interval $[{\varphi}_{\text{min}},{\varphi}_{\text{max}}]$, where the interval is selected to span the parameter space of interest. Each element of the vector ${\mathit{\varphi}}^{(0)}$ represents a candidate ‘state.’ At each iteration, we will add or remove states from this vector as the sampler explores the posterior.
Assign each trajectory $i$ to a state $k\in \{1,\mathrm{\dots},{m}_{0}\}$ with log probability proportional to $\mathrm{log}{p}_{X}({X}_{i}{\varphi}_{k})$. Let this assignment be ${Z}_{i}^{(0)}$.
For each iteration $t=1,2,\mathrm{\dots}$
For each trajectory $i=1,2,\mathrm{\dots}$, either set ${Z}_{i}^{(t)}$ to a state in the current set ${\mathit{\varphi}}^{(t1)}$ with probability $(N1)/(\alpha +N1)$, or create a new state with probability $\alpha /(\alpha +N1)$.
If setting to an existing state, choose state $k$ with log probability proportional to $\mathrm{log}{n}_{k}+\mathrm{log}{p}_{X}({X}_{i}{\varphi}_{k})$, where n_{k} is the number of jumps already assigned to state $k$.
If creating a new state, pick m_{0} values of $\varphi $ from the interval $[{\varphi}_{\text{min}},{\varphi}_{\text{max}}]$. Among these, accept a particular value ${\varphi}^{\prime}$ with log probability proportional to $\mathrm{log}{p}_{X}({X}_{i}{\varphi}^{\prime})$. Add a new state with this parameter to the set of current states ${\mathit{\varphi}}^{(t1)}$.
For each state $k$, if there are no trajectories currently assigned to it, remove it from consideration. Otherwise add it to ${\mathit{\varphi}}^{(t)}$, the next set of states, and update its parameter according to a Metropolis–Hastings step as follows:
Propose a new ${\varphi}^{\mathrm{\prime}}\sim \mathcal{N}\left({\varphi}_{k}^{(t1)},{\nu}^{2}\right)$ (resampling if ${\varphi}^{\prime}$ is outside the range $[{\varphi}_{\text{min}},{\varphi}_{\text{max}}]$).
Evaluate the likelihood ratio
 $r=\frac{\prod _{i=1}^{N}{p}_{X}({X}_{i}{\varphi}^{\mathrm{\prime}}{)}^{{I}_{{Z}_{i}=k}}}{\prod _{i=1}^{N}{p}_{X}({X}_{i}{\varphi}_{k}^{(t1)}{)}^{{I}_{{Z}_{i}=k}}}\frac{\mathrm{\Phi}\left(\frac{{\varphi}_{\text{max}}{\varphi}_{k}^{(t1)}}{\nu}\right)\mathrm{\Phi}\left(\frac{{\varphi}_{\text{min}}{\varphi}_{k}^{(t1)}}{\nu}\right)}{\mathrm{\Phi}\left(\frac{{\varphi}_{\text{max}}{\varphi}^{\mathrm{\prime}}}{\nu}\right)\mathrm{\Phi}\left(\frac{{\varphi}_{\text{min}}{\varphi}^{\mathrm{\prime}}}{\nu}\right)}$
Draw $u\sim \text{Uniform}(0,1)$. If $r<u$, set ${\varphi}_{k}^{(t)}={\varphi}^{\prime}$. Otherwise set ${\varphi}_{k}^{(t)}={\varphi}_{k}^{(t1)}$.
The posterior mean can be estimated by making a histogram of the samples ${\mathit{\varphi}}^{(t)}$ weighted by their occupations ${\mathit{n}}^{(t)}$, where ${n}_{k}^{(t)}$ is the number of jumps assigned to the state with parameter ${\varphi}_{k}^{(t)}$ at iteration $t$.
Finally, we account for defocalization as discussed in ‘Defocalization.’
In this algorithm, $\mathrm{\Phi}(x)$ is the unit Gaussian CDF and its contribution to $r$ is required to make an unbiased proposal distribution for the Metropolis–Hastings updates given that $\varphi $ is confined to the range $[{\varphi}_{\text{min}},{\varphi}_{\text{max}}]$. $I}_{{Z}_{i}=k$ is the indicator function and is 1 if ${Z}_{i}=k$ and 0 otherwise.
While the gamma approximation 19 is what makes DPMMs computationally scalable, it also means that in order to disambiguate the contributions of diffusion and localization error to $\varphi $ we need to measure localization error by a different method. This is particularly relevant when accounting for defocalization, which relies on knowledge of $D$ independent of ${\sigma}_{\text{loc}}^{2}$. In this article, we always use the mean negative covariance between sequential jumps to estimate localization error prior to launching the Gibbs sampler above. However, this means that the DPMM is only as good as our estimate of ${\sigma}_{\text{loc}}^{2}$ – and as demonstrated in Figure 3 and Figure 3—figure supplement 1, our estimate of ${\sigma}_{\text{loc}}^{2}$ can be quite noisy with small numbers of trajectories and starts to fail completely when localization error varies a lot between states. SAs, although they require discretizing the parameter space, handle the problem of localization error in a more graceful manner than DPMMs.
Accounting for defocalization
Request a detailed protocolWe use ‘defocalization’ to refer to the axial movement of fluorescent emitters out of the microscope’s focus during an sptPALM acquisition. Because fluorescent emitters move quickly, defocalization is rapid and often limits trajectory length to a few frames. Due to defocalization, the probability to observe a jump from a fastmoving particle is less than that of a slowmoving particle because the jumps of a fastmoving particle are more likely to land outside the microscope’s focus.
Defocalization was considered as an experimental avenue to measure diffusion by Kues and Kubitscheck, 2002. In the jump histogram modeling frameworks of Mazza et al., 2012 and Hansen et al., 2018, who investigated the effect in detail, it appears as a correction term. The latter two sets of authors evaluated the defocalization probability by treating the microscope’s focal volume as a slab with absorbing boundaries and using the solution to the diffusion equation within these boundaries. Because the boundaries for the focal volume are not actually absorbing, both sets of authors then applied a correction term derived from Monte Carlo simulations of regular Brownian motion to ‘correct’ their correction.
Here, we provide a simpler alternative that is not based on Monte Carlo simulations, enables nonuniform probabilities of detection in the axial detection, and extends to a broader class of diffusion processes than regular Brownian motion. Although the framework can be extended to tracking with gaps, here we consider the case without gaps in tracking (all jumps are strictly between sequential frames).
Let $f(z,t=0)$ be the initial profile of particles in the axial direction of the microscope, and let $g(z,\mathrm{\Delta}t)$ be the Green’s function for the diffusion process at this frame interval. For regular Brownian motion, $g(z,\mathrm{\Delta}t)={e}^{{z}^{2}/4D\mathrm{\Delta}t}/\sqrt{4\pi D\mathrm{\Delta}t}$. Then the axial probability density for the particle after one frame interval can be obtained by convolving its initial profile with the Green’s function:
To account for defocalization, we multiply this density with an appropriate transmission function. For example, if our focal volume is a slab with depth $\mathrm{\Delta}z$, infinite XY extent, and perfect recall at any point inside the slab (i.e., all particles inside the slab are detected and no particles outside are detected), then our transmission function $T$ is
(This is the transmission function considered by Mazza et al., 2012 and Hansen et al., 2018.) The resulting axial profile is
To calculate the axial profile after $n$ frame intervals, we repeat this process iteratively:
where ${\text{Diffuse}}^{(n)}$ denotes $n$ sequential applications of the function
This scheme is illustrated in Figure 3—figure supplement 2A. The fraction of particles remaining in focus after $n$ frame intervals can be found by integrating this density:
In the SA and DPMM algorithms, we use this method to account for defocalization in the following way. Suppose that ${\tau}_{k}$ is the estimated occupation and ${D}_{k}$ is the estimated diffusion coefficient for state $k$. Then, we define the corrected state occupations ${\mathit{\tau}}^{\prime}$ such that
where ${\eta}_{k}$ is the probability for a Brownian motion to remain in focus after one frame interval and $\mathrm{\Delta}z$ is the focal depth. While defocalization can be incorporated explicitly into the models for SAs or DPMMs, in practice we find it makes little difference if it used as a final postprocessing step after inferring the posterior mean occupations.
To determine the focal depth $\mathrm{\Delta}z$, we used the method described in Hansen et al., 2017.
Method availability
Request a detailed protocolWe have implemented SAs as a simple tool (https://github.com/alecheckert/saspt, Heckert, 2022c), available on the Python Package Index (PyPI) as https://pypi.org/project/saspt/. Documentation is also available at https://saspt.readthedocs.io/en/latest/.
DPMMs for SPT analysis have a publicly accessible implementation at https://github.com/alecheckert/dpsp, (copy archived at swh:1:rev:2f5196e4cae5943a5822be7c4493df50cd564a0c, Heckert, 2022a). As a result of the investigation in this article, we recommend that researchers looking to try these methods start with SAs due to their superior performance.
Data availability
The state array (SA) method is publicly available as the pipinstallable package saspt (https://github.com/alecheckert/saspt, copy archived at swh:1:rev:773292fc245c01ceb8e1f7a7e50b475aa003f00c). The code to generate optical/dynamic simulations in this paper is publicly available as the GitHub repository sptPALMsim (https://github.com/alecheckert/sptpalmsim, copy archived at swh:1:rev:a72f7fff6329813620354d1209d52c654c31f3fc). The DPMM model has a publicly available implementation at https://github.com/alecheckert/dpsp, (copy archived at swh:1:rev:2f5196e4cae5943a5822be7c4493df50cd564a0c). All trajectories from SPT experiments used in this paper have been made available as a Dryad dataset (https://doi.org/10.6078/D13H6N). Code used to generate SPT simulations has been organized as a publicly available GitHub repository (https://github.com/alecheckert/strobesim, copy archived at swh:1:rev:ae3bdbf7ccd9740a249a30d9f20deab8ccceb448). Code used to create trajectories from spaSPT movies by detecting and tracking fluorescent emitters, along with a graphic user interface (GUI) for quality control, has been publicly available as a GitHub repository (https://github.com/alecheckert/quot, copy archived at swh:1:rev:1adf7a0574c62f38140f1dec2d14555bfc03b9a7). Raw gel images are provided as source data for this manuscript.

Dryad Digital RepositoryDataset from: Recovering mixtures of fast diffusing states from short single particle trajectories.https://doi.org/10.6078/D13H6N
References

An introduction to mcmc for machine learningMachine Learning 50:5–43.https://doi.org/10.1023/A:1020281327116

Diffusion of low density lipoproteinreceptor complex on human fibroblastsThe Journal of Cell Biology 95:846–852.https://doi.org/10.1083/jcb.95.3.846

Statistics of camerabased singleparticle trackingPhysical Review. E, Statistical, Nonlinear, and Soft Matter Physics 82:011917.https://doi.org/10.1103/PhysRevE.82.011917

Discreteness of ferguson selectionsThe Annals of Statistics 1:356–358.https://doi.org/10.1214/aos/1176342373

Maximum likelihood from incomplete data via the em algorithmJournal of the Royal Statistical Society 39:1–22.https://doi.org/10.1111/j.25176161.1977.tb01600.x

A bayesian analysis of some nonparametric problemsThe Annals of Statistics 1:209–230.https://doi.org/10.1214/aos/1176342360

Stochastic relaxation, gibbs distributions, and the bayesian restoration of imagesIEEE Transactions on Pattern Analysis and Machine Intelligence 6:721–741.https://doi.org/10.1109/tpami.1984.4767596

Tracking single proteins within cellsBiophysical Journal 79:2188–2198.https://doi.org/10.1016/S00063495(00)764678

Bright photoactivatable fluorophores for singlemolecule imagingNature Methods 13:985–988.https://doi.org/10.1038/nmeth.4034

Guided nuclear exploration increases ctcf target search efficiencyNature Chemical Biology 16:257–266.https://doi.org/10.1038/s4158901904223

Phaseretrieved pupil functions in widefield fluorescence microscopyJournal of Microscopy 216:32–48.https://doi.org/10.1111/j.00222720.2004.01393.x

BMP action in skeletogenesis involves attenuation of retinoid signalingThe Journal of Cell Biology 174:101–113.https://doi.org/10.1083/jcb.200604150

Imaging and tracking of single gfp molecules in solutionBiophysical Journal 78:2170–2179.https://doi.org/10.1016/S00063495(00)767646

Pointwise error estimates in localization microscopyNature Communications 8:15115.https://doi.org/10.1038/ncomms15115

HaloTag: a novel protein labeling technology for cell imaging and protein analysisACS Chemical Biology 3:373–382.https://doi.org/10.1021/cb800025k

BookBayesian modelling and inference on mixtures of distributionsIn: Marin JM, editors. Handbook of Statistics. eprints. pp. 459–507.https://doi.org/10.1016/S01697161(05)250162

Apparent subdiffusion inherent to single particle trackingBiophysical Journal 83:2109–2117.https://doi.org/10.1016/S00063495(02)739714

Estimation of diffusive states from singleparticle trajectory in heterogeneous medium using machinelearning methodsPhysical Chemistry Chemical Physics 20:24099–24108.https://doi.org/10.1039/C8CP02566E

A benchmark for chromatin binding measurements in live cellsNucleic Acids Research 40:e119.https://doi.org/10.1093/nar/gks701

Finite mixture modelsAnnual Review of Statistics and Its Application 6:355–378.https://doi.org/10.1146/annurevstatistics031017100325

Optimal diffusion coefficient estimation in singleparticle trackingPhysical Review. E, Statistical, Nonlinear, and Soft Matter Physics 85:061916.https://doi.org/10.1103/PhysRevE.85.061916

Objective comparison of methods to decode anomalous diffusionNature Communications 12:6253.https://doi.org/10.1038/s4146702126320w

BookBayesian mixture modelingIn: Smith CR, Erickson GJ, Neudorfer PO, editors. Maximum Entropy and Bayesian Methods. Fundamental Theories of Physics (An International Book Series on The Fundamental Theories of Physics: Their Clarification, Development, and Application). Dordrecht, Netherlands: Springer. pp. 197–211.

Markov chain sampling methods for dirichlet process mixture modelsJournal of Computational and Graphical Statistics 9:249–265.https://doi.org/10.1080/10618600.2000.10474879

Two established in vitro cell lines from human mesenchymal tumoursInternational Journal of Cancer 2:434–447.https://doi.org/10.1002/ijc.2910020505

Genome engineering using the crisprcas9 systemNature Protocols 8:2281–2308.https://doi.org/10.1038/nprot.2013.143

Single particle tracking: from theory to biophysical applicationsChemical Reviews 117:7331–7376.https://doi.org/10.1021/acs.chemrev.6b00815

BookDirichlet processIn: Sammut C, Webb GI, editors. Encyclopedia of Machine Learning. Boston, MA, USA: Springer. pp. 280–287.https://doi.org/10.1007/9780387301648

Precise nanometer localization analysis for individual fluorescent probesBiophysical Journal 82:2775–2783.https://doi.org/10.1016/S00063495(02)75618X
Decision letter

Ihor SmalReviewing Editor; Erasmus University Medical Center, Netherlands

Anna AkhmanovaSenior Editor; Utrecht University, Netherlands

Maarten W PaulReviewer; Oncode Institute, Erasmus MC Cancer Institute, Erasmus University Medical Center, Netherlands
Our editorial process produces two outputs: (i) public reviews designed to be posted alongside the preprint for the benefit of readers; (ii) feedback on the manuscript for the authors, including requests for revisions, shown below. We also include an acceptance summary that explains what the editors found interesting or important about the work.
Decision letter after peer review:
Thank you for submitting your article "Recovering mixtures of fast diffusing states from short single particle trajectories" for consideration by eLife. Your article has been reviewed by 3 peer reviewers, one of whom is a member of our Board of Reviewing Editors, and the evaluation has been overseen by a Reviewing Editor and Anna Akhmanova as the Senior Editor. The following individual involved in review of your submission has agreed to reveal their identity: Maarten Paul (Reviewer #3).
The reviewers have discussed their reviews with one another, and the Reviewing Editor has drafted this to help you prepare a revised submission.
Essential revisions:
The authors are supposed to provide a point by point revision addressing the reviewers comments stated in this letter. The main directions for improvements can be summarized briefly as follows:
1) Rewriting or adding more information and explanations about the methodology, so it becomes accessible to a broader range of eLife readers.
2) Adding comparison with existing (alternative/similar) techniques mentioned by the reviewer as well as the case with nonBrownian motion.
3) Justifying the importance of the biologically relevant insights (see the reviewer’s comments) to fit the profile of the journal better.
Reviewer #1 (Recommendations for the authors):
The paper is well written and all the parts concerning the "regular" Brownian motion, as the authors also mention themselves, are validated with lots of experiments, covering all possible (parameter) dependencies. With the staring assumptions like that (the type of diffusion and the type of switching), it is difficult to ask for more. My concern is still about the applicability of these techniques to the data that contains anomalous diffusion. The typical experiments with H2B or any other protein binding events, where there is a switching between several types of motion, most of the time show that the "slow" components are always related to anomalous diffusion. In the typical cases, there are 23 components where only one most likely would correspond to the regular diffusion. With that respect, it would be interesting to know how the methods work (or break) with such data, for example in the simulations with 23 state fractional Brownian motions. The weakness that one can imagine is that the proposed techniques can distill the diffusion coefficients, but the bigger problem is that they cannot "split" the trajectories into the parts that correspond to those states with different parameter values. Such split is most of the time of a higher importance, because it allows for computation of residency times and other typical and intuitive parameters. Having the diffusion rates for the anomalous diffusion (which are only the "apparent" diffusion coefficients that do not have physical interpretation as clear as in the case of the regular Brownian motion). Also splitting trajectories in parts, according to different diffusion rates gives a possibility to create a spatial maps inside a cell/nucleus and observe, for example, where more transient binding is occurring. The attempt to present such type of information can be observed in Figure 5 but is it possible to compare these results with "more classical" approach (staring from SpotOn or any other techniques), that splits the trajectories into different parts, and see if the results produced by the proposed methods are unique and cannot be obtained otherwise. Splitting of the tracks with diffusion constants which are well separated (as in the paper) is not a big problem nowadays (see for example M. Arts, "Particle Mobility Analysis Using Deep Learning and the Moment Scaling Spectrum", or A. Vega "Multistep track segmentation and motion classification for transient mobility analysis"). Those already work better than simple MSD analysis that does not keep track on the order of displacements within a track.
Reviewer #2 (Recommendations for the authors):
1. Accuracy and precision are two different things. I would recommend that the authors look up the definition of accuracy (i.e. bias) and precision.
2. Introduction paragraph 3, "despite these advances several problems remain". This is very vague and I don't know what the authors tried to address with these advances. Please rephrase.
3. Introduction paragraph 3, "stroboscopic illumination", do the authors mean stroboscopic activation of excitation?
4. " but because camera integration times are never instantaneous, it cannot be removed entirely". Figure 1C should be supported with images from point spread functions (PSF) of real acquired singlemolecules and histograms of intensity, background, and PSF width, which are related to the integration time of the camera to make this claim scientifically sound. Also for S1B, it would be easier to plot a 2D grid of pixels with a greyscale indicating the intensity (similar to Figure 1A, but zoomedin). The paper misses too many details for their argumentation of the varying localization precision that the paper tries to address. This needs to be expanded so that the localization precision simulations match the reality.
5. The authors introduce a new acronym for sptPALM originally introduce in Manley, Nat. Meth, 2008. I don't see a reason for deviating from this.
6. The authors set out to address challenges by citing work from back in 2006 e.g. ref 19, 20. As the authors know a lot has happened since 2006, which should be discussed to describe an appropriate stateoftheart. An example of this is the work from Linden Nat. Comm. 2017, which should be cited.
7. One of the major points of ref 30 is to be able to process short trajectories. Paragraph 4 suggests something else. Furthermore, a way to incorporate a changing localization precision over the field of view has been studied in the context of singlemolecule kinetics Smith Nat. Com. 2019 and should be cited.
8. The paper contains a missing reference in figure S11 please correct it.
9. The authors introduce ref 30, but benchmark against much older ref 32. A comparison to the tracking methodology that was developed in the Elf lab would be useful for the general readership. The code is available on GitHub.
10. The authors make an approximation that is "strictly true when the localization precision is zero". When does this approximation break down, since this is not a valid assumption (e.g. Figure 1C)?
11. How does a user know from the output if they obtain discretization artifacts from SAs?
12. It would be useful if the authors could quantify the error in figure S2 i.e. add a graph with error vs the number of trajectories. Furthermore, it would be useful to see the impact of a broad distribution that realistically models a varying localization precision (see point 1).
13. Figure S6 shows two distinct diffusion states. My impression is that ref 30 would work on this perfectly fine. I recommend the authors to benchmark against this approach. It would be interesting two see a broad distribution of diffusion coefficients where ref 30 would fail. Here also it would be useful if the authors could quantify the error vs the number of trajectories.
14. Wouldn't it be easier to address defocalization using e.g. an astigmatic lens so that the z position can be estimated? Or would the varying localization precision still be a problem? It would be great if the authors could make this point in the discussion.
Reviewer #3 (Recommendations for the authors):
– The first paragraph of the results and first figure nicely describes singlemolecule data as a mixture of molecules of different diffusive states and how image acquisition biases the results. In the second paragraph the authors present their new model and Bayesian approaches in a technical way. I think it would be useful at this point to explain their Bayesian approach in such a way that is easier to understand for biologists.
– Introduction; Page 3; "The central problem in spaSPT analysis…" I think it would be useful to add here that it is not only problem to recover the underlying set of dynamic states, but also the transitions between those states. Although this is not really the focus of this study I think it is a relevant aspect of singleparticle tracking that should be considered.
– Figure 2A: It is difficult for me to understand these schemes. Possibly some additional description in the figure legend explaining the different terms would help.
– Figure 2C and D: It is unclear to me which of the two methods are used in these figures. A heading above the figures could possible clarify this.
– On page 6: paragraph "Performance of DPMMs and SAs on experimental spaSPT" here biological results are written clearly; however I do miss a description on the performance of (DPMMs and SAs) methods on the biological data and what new features are uncovered with their method.
– It seems to me that the SA method is most applicable for biological data as it considers variable localization error depending on the diffusion coefficient of the molecules, whereas the DPMM method work very well in simulations with known localization error, which is unfortunately is not very realistic in cellular experiments. Could the authors directly compare SA and DPMM for their biological dataset (Figure 4A) and discuss possible differences in the results.
– Could the authors indicate, other than possibly providing more accurate results, what new biological insights are revealed with their method, that are not possible to obtain with MSD analysis. Possibly the authors can compare their experimental results (Figure 4 and 5) to MSD and SpotOn analysis in terms of obtained diffusion rates and fraction of different states. It would be useful to know how big the differences would be, compared to these previous methods.
– The authors mention in the discussion that their methods do not work well with nonBrownian motion. In many cases however confined motion types are relevant to describe the motion of proteins in cells, possibly also for the proteins they analyzed. Could the authors discuss in more detail how serious this limitation is, taking into account the types of anomalous diffusion that has been observed for several proteins for example in the cell nucleus.
– Unfortunately the software code from the State Array method was not available at the presented website (https://gitlab.com/alecheckert/saspt/). It is to praise that the authors plan to publish all their code and source data on publication, but it would be nice to have access this software during review. I think it is important to assure that the software is userfriendly and also accessible for biologists.
– If I understand correctly the experiments described in Figure 4B are done with cells expressing the different variants of RARAHT from an exogenous promotor either transiently or by making use of stable cell lines. It would be useful if the authors indicate in the legend that this is different from the experiment in Figure 4A where they made use of a CRISPR/Cas9 knockin. Additionally could the authors indicate the number of technical (cells) and biological replicates from these experiments.
– Finally, the paper is written rather technically, requiring at least some knowledge of Bayesian statistics. I do think it would be useful if the paper would be carefully evaluated to be more accessible for a broad audience and avoid technical terms whenever possible.
[Editors’ note: further revisions were suggested prior to acceptance, as described below.]
Thank you for resubmitting your work entitled "Recovering mixtures of fast diffusing states from short single particle trajectories" for further consideration by eLife. Your revised article has been evaluated by Anna Akhmanova (Senior Editor) and a Reviewing Editor.
The manuscript has been improved but there are some remaining issues that need to be addressed, as outlined below:
Essential revisions:
All the reviewers agree that the paper is well written and presents a very valuable data analysis technique but also that the paper has a very strong focus on rather complex and methodological developments, which might be far from the expertise of a general eLife reader.
We ask the authors to take into account the comments of Reviewer #4 who has several suggestions on how to improve the readability of the paper and also mentions other recent works presenting similar methods for single trajectory characterisation.
Reviewer #1 (Recommendations for the authors):
The authors revised the manuscript very elaborately, taking into account all the comments and adding useful supporting explanations and experiments. The paper is now in very good shape, and even though the description of the methodology is improved, it can still be a difficult read for a general reader of eLife, but it is difficult to simplify that even more because the underlying theory is indeed quite complex.
Reviewer #3 (Recommendations for the authors):
I think the revised manuscript has improved significantly and become a useful paper addressing important aspects of singlemolecule tracking with useful novel analysis methods. The additional simulations will help potential users of these methods to assess the appropriate approach to analyze their SPT data.
I found one typo on line 106 varable> variable
Reviewer #4 (Recommendations for the authors):
I find the current manuscript clear and concise, correctly presenting the method developed as well as a variety of examples of use. The text is easily understandable and presents the different concepts and sections in a very ordered way. Also, the extensive number of figures helps to understand the extent of the method and its applicability to different experimental setups. Note that I have no background in Biology, hence my review is focused on the method and its application to simulated and experimental trajectories, and not on the details of the experimental setup (e.g. lines 257268 and related figures/supplementary material).
My main concern relates to the benchmark of the method, as I miss an objective evaluation of the accuracy of the method. For instance, while the plots presented in Figure 3A, Figure 4A,…etc give a nice visual understanding of the power of SA, they do not allow for a rigorous comparison and evaluation of the method. In that sense, the plots presented in Figure 4 – Supplement2 C and D give a much better understanding of the accuracy of the method. Being this a rather technical paper focusing on a new method, giving a concise numerical metric (e.g. the mean absolute error) may be of interest to the community. It may also help compare objectively with other methods.
Another point which I found hard to understand was if the method was working at the 'single trajectory' level or in an ensemble of trajectories. From what I understand from line 296, the authors can give a prediction for every trajectory separately. I think that is an important and valuable feature, and perhaps should be highlighted earlier in the text. In this sense, it may also be worth pointing out in the text other recent works presenting similar methods for single trajectory characterization. Indeed, while the approach is slightly different, Ref A also proposes the use of Bayesian inference for extracting diffusion properties from trajectories. The use of machine learning has also been prominent recently for this purpose (see Ref C and the references therein) and may be worth adding a comment in the text. Indeed, in the latter reference, there are some approaches to trajectory segmentation, which may complement one of the flaws of the method stated in the text: dealing with transitions between states within a trajectory.
https://doi.org/10.7554/eLife.70169.sa1Author response
Essential revisions:
The authors are supposed to provide a point by point revision addressing the reviewers comments stated in this letter. The main directions for improvements can be summarized briefly as follows:
1) Rewriting or adding more information and explanations about the methodology, so it becomes accessible to a broader range of eLife readers.
2) Adding comparison with existing (alternative/similar) techniques mentioned by the reviewer as well as the case with nonBrownian motion.
3) Justifying the importance of the biologically relevant insights (see the reviewer’s comments) to fit the profile of the journal better.
We thank the reviewers for their insightful feedback on the content of this manuscript. Through the reviews, we identified numerous revisions that we believe had a strongly positive impact on the quality and clarity of this work. This letter summarizes the experiments and revisions prompted by these reviews.
The Editors identified three Essential Revisions for the manuscript:
1. Rewriting/adding more information about the methodology, to increase its accessibility to a broader range of readers;
2. Adding comparison with existing (alternative/similar) techniques mentioned by the reviewers as well as the case with nonBrownian motion;
3. Justifying the importance of the biologically relevant insights to fit the profile of the journal better.
In addition to these Essential Revisions, Reviewer #2 highlighted limitations of the simulations for localization error and motion blur in this manuscript. We feel that this is a vital point and it led to the design of a new simulation library (sptPALMsim) that we used in several of the other revisions.
As a result, we begin this document by discussing the issue of realistic simulation raised by Reviewer #2. This is followed by a discussion of the Essential Revisions. Finally, we identified several additional areas for improvement based on the reviewer’s comments, which we discuss at the end. Where included, figure numbers refer to the latest version of the paper.
Revision 1: Evaluating state arrays on more realistic sptPALM simulations
One characteristic of the state array (SA) method is that it infers state occupations in the joint space of diffusion coefficient and localization error. Localization error is then marginalized out in postprocessing. The original manuscript claimed that this procedure was robust to heterogeneous localization error in the sample. However, Reviewer #2 highlighted an important limitation of the simulations used to support this assertion: while each simulation features a range of localization errors, the localization error for each state is assumed constant. In real experiments, localization error can be distinct for each individual particle due to effects like defocus, motion blur, and the intrinsically stochastic processes of photon emission and detection (“shot noise”).
To address this, we designed a series of more realistic dynamical and optical simulations of the sptPALM experiment. Whereas in the original manuscript we simulated the paths of particles with different types of motion (plus error), for these new simulations we generated images which are subsequently tracked. As a result, the simulations incorporate effects like defocus, shot noise, camera noise, tracking errors, and motion blur that were not present in the original simulations. We have included a new figure (Figure 4figure supplement 2) that evaluates state arrays on this data, as well as an examples of movies simulated by this method (Video 4, Video 5, and Video 6). The source code to generate the simulations is publicly available as the sptPALMsim package (https://github.com/alecheckert/sptpalmsim). This package includes a library for generalpurpose sptPALM simulation as well as scripts that specifically reproduce the data used in this manuscript.
Likewise, Reviewer #2 also highlighted that the claim about motion blur (“because camera integration times are never instantaneous, [motion blur] cannot be removed entirely”) is not substantiated with data from the manuscript proper. They recommended supporting this statement with images from experimentally observed point spread functions at different integration times.
We agree this point is important, and point to several places it has been made before in the literature (for example, Deschout et al. 2012 (doi:10.1002/jbio.201100078) and Linden et al. 2017 (doi:10.1038/ncomms15115) both provide detailed discussion along with experimental point spread functions). Because of this existing body of work, we did not feel that adding experimentally observed point spread functions would add anything to the paper that has not already been stated better.
Instead, to support the investigations here and address Reviewer #2’s comment, we investigated the magnitude of the effect of motion blur on localization by systematically evaluating our detection and localization pipeline on simulated point spread functions with variable pulse width (Figure 1figure supplement 1). These investigations allowed us to determine that localization error scales with pulse width and is nonnegligible for the pulse widths used in this study.
Essential Revision 1 (pt. 1): Methodology for nonspecialists
A central point highlighted by the reviewers was the accessibility of the method for nonspecialists. The original manuscript was not geared to the diverse range of backgrounds in eLife’s readership. As one example, Reviewer #3 highlighted the use of probabilistic graphical models in Figure 2. PGMs aren’t very useful for readers unfamiliar with them!
To address this issue, we made several major changes to the manuscript. First, we refactored/replaced Figure 2 with two new figures (now, Figure 2 and Figure 3). The first new figure compares the models in this manuscript with an intuitive, visual presentation geared toward nonspecialists. The second new figure dives deeper into state arrays and DPMMs as applied to regular Brownian motion, and contains most of the information formerly in Figure 2. The graphical models from Figure 2 have been moved to their own figure (Figure 2figure supplement 1). We believe this increases the intelligibility of the method for nonspecialists, while retaining the original information for those versed in probabilistic models.
Additionally, we improved the exposition of methodology. This included two parts. First, we rewrote the first Results section describing the methods with an eye to eLife’s readership. The new version introduces the concept of a mixture model at a basic level, and follows by modifying this model to yield state arrays and DPMMs. We also devote more space to discussing how the design of state arrays and DPMMs is intended to address the fundamental problem of estimating a discrete or continuous dynamic profile.
The second part of our revision was an overhaul of the Methods. The new version is essentially a more detailed version of the first Results section, beginning with classic Bayesian finite state mixtures and deriving DPMMs and state arrays as an extension and special case, respectively. We have taken several steps to increase the accessibility of this material to nonspecialists, including (1) removing unnecessary discussion of specialist topics, (2) breaking out long derivations to separate sections, and (3) algorithmic (stepbystep) perspectives of the different classes of mixture models discussed in the paper.
Essential Revision 1 (pt. 2): Method accessibility
The original manuscript linked to a GitLab repository implementing the methods described in the manuscript. That repo was fairly informal and suffered from sparse documentation, absence of a comprehensive testing suite, and some permissions issues identified by Reviewer #3.
To improve the accessibility of the method, we have reimplemented state arrays as the publicly available, pipinstallable Python package saspt. This software includes a full testing suite, a flexible object API, and a comprehensive set of documentation (accessible here: https://saspt.readthedocs.io/en/latest/) that includes a guide for getting started running state arrays. This documentation has led to useful feedback from the current users of the method. We have linked to this package in the new version of the manuscript.
Essential Revision 2: Comparison with existing techniques
The stateoftheart in finitestate sptPALM analysis is represented by the vbSPT tool (Persson et al. Nature Methods 2013). Reviewer #2 suggested a comparison between the state array method and vbSPT.
To compare vbSPT and state arrays, we performed two experiments using simulated sptPALM movies produced with the sptPALMsim package. First, we simulated a range of twostate Brownian models with variable diffusion coefficients and state occupations. In these comparisons, the simulated sptPALM movie was tracked with our usual pipeline (Localization and tracking, Methods), then the resulting trajectories were passed as input to both the state array and vbSPT methods. The results are summarized in a new figure (Figure 4figure supplement 6).
Comparing the two methods is not entirely trivial because (1) vbSPT and state arrays have different outputs (vbSPT returns a variable number of discrete states, while state arrays return a distribution over an array of parameters), and (2) vbSPT frequently returned more states than the true number of simulated states. Consequently, we chose the following method for this comparison:
– To compare accuracy of diffusion coefficient retrieval: For state arrays, we took the diffusion coefficient corresponding to the fastest mode in the posterior distribution. For vbSPT, we took the state with the diffusion coefficient closest to the true diffusion coefficient.
– To compare accuracy of state occupation retrieval, we integrated the occupations of all states above or below 1.0 µm2 s1 (for both methods).
The result was close agreement between the vbSPT and state array methods, both of which accurately recovered state occupation and diffusion coefficient for the twostate model (Figure 4figure supplement 6B). We concluded that vbSPT and state arrays had similar performance for this simple model. We did not assess the accuracy of the transition rate matrix estimated by vbSPT (no transitions were allowed in this experiment).
For our second comparison, we compared the output of vbSPT and state arrays on 20 dynamic models of increasing complexity (Figure 4figure supplement 6C). This included situations that we consider extremely challenging for any current method (including both state arrays and vbSPT), such as models with 10 diffusing states and “clusters” of diffusing states with similar state parameters. In this comparison, we compared the ability of vbSPT and state arrays to recover the number of diffusing states. We found that while both methods performed well on simple models, they were prone to distinct kinds of errors for more complex models (vbSPT tended to overestimate the number of states, while state arrays tended to underestimate). Additionally, vbSPT inaccurately retrieved the diffusion coefficients for slowmoving states, likely due to its treatment of localization error. We concluded that state arrays and vbSPT are likely complementary methods, with state arrays being more applicable to complex nondiscrete dynamic profiles and vbSPT more appropriate to recover the transition rates for simple models.
Essential Revision: NonBrownian motion.
Reviewers #1 and #3 inquired about the applicability of these methods to nonBrownian motion. Because the state array method is applicable to any kind of probabilistic motion model it extends naturally to nonBrownian motion, although the inference routine is more expensive because a higherdimensional parameter grid is necessary.
To address the reviewers’ comments we implemented a state array for fractional Brownian motion (FBM), a popular anomalous diffusion model that generalizes regular Brownian motion to allow for subdiffusion and superdiffusion. In our version of this model, there are three parameters:
– A scaling coefficient parametrizing the magnitude of the jumps, similar to the diffusion coefficient for regular Brownian motion;
– The Hurst parameter, parametrizing temporal correlations in the jumps;
– Localization error variance.
To distinguish this modified model from the original FBM as introduced by Mandelbrot & Van Ness SIAM Review 1968, we refer to it as “fractional Brownian motion with localization error” (FBME).
The state array for FBME is a 3dimensional array over scaling coefficient, Hurst parameter, and localization error variance. As with the RBME state array, we marginalize out the localization error in postprocessing. This yields a twodimensional function of scaling coefficient and Hurst parameter (rather than the onedimensional function over diffusion coefficient afforded by the RBME state array). We then proceeded to evaluate this state array’s ability to recover FBM model parameters from sptPALM movies simulated by the sptPALMsim package.
The results of these investigations are summarized in Figure 4figure supplement 7 and Figure 4figure supplement 8, with an accompanying movie (Video 6). With short pulse widths, this state array accurately recovered mixtures of FBM states (both subdiffusive and superdiffusive) (Figure 4figure supplement 7). However, as we increased pulse width, we found that the state array systematically underestimated the scaling coefficient at low Hurst parameters (Figure 4figure supplement 8A). This effect appears to be due to motion blur averaging out the highfrequency motion that characterizes FBM at low Hurst parameters (Figure 4figure supplement 8B). This interaction between FBM and motion blur is unexpected and, as far as we are aware, previously unreported.
The state array used for this investigation is publicly available in the saspt package by passing the option likelihood_type = ‘fbme’.
Essential Revision 3: Biological insights
Reviewer #1 and #3 asked about the novel biological insights offered by these methods. These comments made us realize that the previous version of the manuscript included essentially no discussion of insights gleaned from the application of state arrays to real sptPALM data. While the purpose of the manuscript is to compare methods rather than investigate novel biology, we agree that this addition would help eLife’s readership understand better where these methods could be applicable.
To address this, we introduced a section in the discussion that focuses on the insights from these methods. We highlight that the dynamic profile for RARAHaloTag unexpectedly displayed a nondiscrete spectrum of diffusing states between 0.1 and 10.0 µm2 s1, in contrast the more discrete profiles of HaloTag, HaloTagNLS, or H2BHaloTag. We feel that this serves as a demonstration of the ability of state arrays to approximate nondiscrete profiles, which sets it apart from existing methods.
Here, we discuss other points raised by the reviewers that led to improvements in the manuscript.
1. In the original manuscript, we used the acronym “spaSPT” (stroboscopic photoactivated single particle tracking) to refer to the tracking experiment, following Hansen and Woringer et al., eLife 2018. Reviewer #2 felt that the acronym “sptPALM” (single particle tracking photoactivated localization microscopy), introduced by Manley et al., Nature Methods 2008, is preferable. We have no intrinsic attachment to either so we have changed all instances of “spaSPT” to “sptPALM” in the manuscript.
2. Reviewer #2 suggested a more explicit discussion of where the DPMM method breaks down, particularly where localization error is concerned. We had intended Figure 4 and its associated supplements to show that the DPMM breaks down when localization error is highly heterogeneous in the sample; this is the method’s major failing point (and the main reason why it is outperformed by state arrays). We have attempted to make this clearer in the text referring to these figures.
3. Reviewer #2 proposed quantifying the error in state occupation estimates as a function of the number of trajectories used. This is the main purpose of Figure 4—figure supplement 3, so we have attempted to make the reference to this figure clearer in the main text.
4. The original manuscript did not recommend any way to determine when and where discretization artefacts occur when using state arrays. We agree with Reviewer #2 that this would be a helpful addition. We have added a note about it in the Discussion. In this note, we also indicate that the saspt package includes “outofthebox” state arrays that have been selected to avoid discretization artefacts based on our own experiments.
5. Reviewer #3 included numerous helpful comments on figure clarity, including that (i) the original Figure 2C and Figure 2D did not indicate which method (DPMMs or SAs) were used, (ii) Figure 5B did not make it clear that which constructs were expressed from an exogenous promoter, (iii) the crosshairs in the original Figure 2D were difficult to see, (iv) Figure 5AC does not state which method was used except in its caption, and (v) confusing labeling in Figure 6B. We have modified these figures in response to these comments by (i) adding a legend for Figure 2C/2D, (ii) marking the for constructs expressed from an exogenous promoter to Figure 5B, (iii) changing the color of the crosshairs in Figure 2D, (iv) stating that Figure 5AC uses state arrays in the figure itself, and (v) rearranging Figure 6B so that each subpopulation is clearly connected to the original state array posterior distribution by an arrow.
6. Introducing point spread function (PSF) astigmatism via a cylindrical lens is a common way to estimate the zposition of emitters in fixedcell PALM and STORM. Reviewer #2 suggested a discussion of the applicability of this method to tracking in the Introduction, and were especially interested in whether it could be used to address the defocalization problem. We have included two additional comments in the introduction, which are (1) astigmatism does not solve the issue of finite focal depth, since the focal depth with a cylindrical lens is still smaller than the depth of a typical eukaryotic cell, and (2) while astigmatism could potentially be a powerful tool for resolving threedimensional motion in tracking, currently there do not exist subpixel localization methods that can effectively distinguish astigmatism from motion blur. (sptPALM differs from fixedcell PALM and STORM methods in that the fixedcell methods work with much higher numbers of photons and do not contend with motion blur.)
7. Reviewers #1 and #3 were both interested in the calculation of transition rates between diffusive states. They highlighted that although the methods presented do not infer transition rates, a more detailed discussion of this limitation would be appreciated. In addition to the existing Figures S4E and S7 (which compare the performance of SAs/DPMMs on simulations with transitions between diffusive states), we have added a discussion in the Introduction on this limitation of the state array method. This change makes it clearer that the methods investigated in this manuscript do not infer transitions between states, in contrast to methods like vbSPT.
8. Reviewer #2 identified ambiguity in the text between the usage of the words “accuracy” and “precision”. We have revised several parts of the manuscript to better elucidate where we discuss the accuracy (systematic deviations from the true underlying value) and precision (variation about the true value) of the inference methods.
9. Reviewer #2 raised a point about a potentially confusing part of the text: while the manuscript states that DPMMs and SAs deal with the issue of an unknown number of diffusive states, it appeared to this reviewer that “it is not possible to classify trajectory segments into a state”. We apologize for any ambiguity and wish to highlight that SAs do provide a posterior probability distribution over states for each trajectory; assignment of a trajectory to a given state can be accomplished through either the max a posteriori or mean posterior estimates. We have attempted to make this point clearer in the discussion of the method, and thank Reviewer #2 for pointing out this ambiguity.
10. Reviewer #2 highlighted a vague sentence in the introductory paragraph (“Despite these advances, several problems remain…”). We recognize that some of the confusion comes from the phrase “Despite these advances”, which was intended to refer to the contents of the previous paragraph (“Advances in the past two decades…”). We have removed this phrase and rephrased this paragraph and the following two for clarity. The intent of these paragraphs is to discuss current challenges with the sptPALM experiment.
11. Reviewer #2 pointed out that “stroboscopic illumination” is unclear. We have added a clarifying comment that this refers to pulses of the excitation laser, as shown in Figure 1A. In addition, Figure 1—figure supplement 1 provides additional illustrations of the motivation for stroboscopic illumination by investigating the effect of motion blur on localization precision in simulated SPT videos.
12. Reviewer #2 suggested rephrasing the discussion of reference #30 (Persson et al., 2013), particularly its applicability to short trajectories. We have highlighted explicitly that this method works with short trajectories in the Introduction. Additionally, the new comparisons on simulated sptPALM in Figure 4—figure supplement 6 show clearly that vbSPT accurately recovers state occupations and diffusion coefficients for simple models, given short trajectories.
[Editors' note: further revisions were suggested prior to acceptance, as described below.]
Reviewer #4 (Recommendations for the authors):
I find the current manuscript clear and concise, correctly presenting the method developed as well as a variety of examples of use. The text is easily understandable and presents the different concepts and sections in a very ordered way. Also, the extensive number of figures helps to understand the extent of the method and its applicability to different experimental setups. Note that I have no background in Biology, hence my review is focused on the method and its application to simulated and experimental trajectories, and not on the details of the experimental setup (e.g. lines 257268 and related figures/supplementary material).
My main concern relates to the benchmark of the method, as I miss an objective evaluation of the accuracy of the method. For instance, while the plots presented in Figure 3A, Figure 4A,…etc give a nice visual understanding of the power of SA, they do not allow for a rigorous comparison and evaluation of the method. In that sense, the plots presented in Figure 4 – Supplement2 C and D give a much better understanding of the accuracy of the method. Being this a rather technical paper focusing on a new method, giving a concise numerical metric (e.g. the mean absolute error) may be of interest to the community. It may also help compare objectively with other methods.
Another point which I found hard to understand was if the method was working at the 'single trajectory' level or in an ensemble of trajectories. From what I understand from line 296, the authors can give a prediction for every trajectory separately. I think that is an important and valuable feature, and perhaps should be highlighted earlier in the text. In this sense, it may also be worth pointing out in the text other recent works presenting similar methods for single trajectory characterization. Indeed, while the approach is slightly different, Ref A also proposes the use of Bayesian inference for extracting diffusion properties from trajectories. The use of machine learning has also been prominent recently for this purpose (see Ref C and the references therein) and may be worth adding a comment in the text. Indeed, in the latter reference, there are some approaches to trajectory segmentation, which may complement one of the flaws of the method stated in the text: dealing with transitions between states within a trajectory.
A central part of the manuscript compares the ability of three methods – MSD histograms, Dirichlet process mixture models (DPMMs), and state arrays (SAs) – to recover state occupations on several kinds of simulated sptPALM datasets. While this comparison was intended to evaluate the performance of each method on data with known ground truth, the comparisons were mostly visual. Most of the original figures showed the dynamic profiles obtained from each of the three methods as line plots.
Reviewer #4's primary critique was a lack of clear objective, numerical benchmarks to ground these visual presentations. This issue was compounded by the lack of yaxis labels for many plots. Reviewer #4 suggested a concise numerical metric, such as mean absolute error (MAE), would be useful for readers. They also identified several related changes that could improve the clarity and improve the quantitative rigor of these comparisons.
After reviewing the manuscript, we agree with Reviewer #4 that this was a clear gap in the existing manuscript. We also feel that it would be helpful to have a single table of numerical accuracies for each method across a broad range of simulations (see note on the new Figure 4—figure supplement 2, below). As a result, we revised most of the figures that focus on method comparison.
First, in figures evaluating the accuracy of state occupation estimates, we have introduced tables of mean absolute errors for each of the methods being compared:
– Figure 4 has been expanded to include the MAE in occupation estimates for each of the three methods when evaluated on a 3state model (Figure 4E), as shown visually in Figure 4D.
– Figure 4—figure supplement 3 has been split into two figures (Figure 4—figure supplement 3 and Figure 4—figure supplement 4), each of which now includes a table of numerical accuracies (MAE) evaluated against 2 or 4state models, respectively. This also provides a quantitative comparison of how each methods' accuracy improves as a function of sample size, a point that was only made qualitatively in the previous version of the manuscript. We have also attempted to show the distribution of MAEs for each replicate of these simulations individually (Figure 4—figure supplement 3C and Figure 4—figure supplement 4C).
– Figure 4—figure supplement 5 has been split into two figures (Figure 4—figure supplement 8 and Figure 4—figure supplement 9) that each include tables of mean absolute error on their respective simulations. These is particularly important, given Reviewer #4's comments on Figure 4—figure supplement 5A.
Second, we have introduced a new figure (Figure 4—figure supplement 2) that focuses on numerical comparisons of accuracy between the three methods. This figure takes the simulations from Figure 4—figure supplement 1 (across six kinds of dynamic models) and evaluates a quantitative metric of error, summarizing the results as a table. Because these simulations include both discrete and continuous dynamic profiles, we opted to quantify accuracy as the root mean squared deviation of the estimated CDF from the ground truth CDF, as shown in Figure 4—figure supplement 2A. (This choice of error metric can be used, for instance, on the log uniform densities that cannot be separated into discrete states.) These experiments provide a quantitative demonstration of DPMM's inaccuracy when the localization error is variable. We also noted from these figures that even on ideal sptPALM data, an error rate of 0.01 to 0.05 CDF RMSD is to be expected for SAs.
Third, in Figure 4—figure supplement 10 (which compares state arrays against vbSPT), we have included a column for the error in the estimated number of states relative to the true number of states for each method.
As a result of these changes, the new version of the manuscript places more focus on quantitative comparisons of the three techniques and provides tables of accuracies that benchmark the performance improvements afforded by state arrays. We also feel they serve as a better illustration of the limits of state arrays – for instance, we rarely see the MAE in state occupation estimates drop below 1%, a point we make in the revised text.
https://doi.org/10.7554/eLife.70169.sa2Article and author information
Author details
Funding
National Institutes of Health (GM098218)
 Alec Heckert
Howard Hughes Medical Institute (CC34430)
 Robert Tjian
National Institutes of Health (1U54CA231641)
 Xavier Darzacq
The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Acknowledgements
We thank Luke Lavis for generously synthesizing the Janelia Fluor dyes used in these experiments, Thomas Graham for his creative suggestions about the defocalization problem, Ana Robles for the monumental task of keeping our SPT microscopes in working order, and Anders Hansen and Maxime Woringer for insights and advice at the outset of the project. Claudia Cattoglio provided indispensable advice on Western blots. Portions of this work were performed on shared instrumentation at the UC Berkeley Cancer Research Laboratory Molecular Imaging Center (MIC), supported by The Gordon and Betty Moore Foundation. We thank MIC gurus Holly Aaron and Feather Ives for their assistance with shared microscopes. Sanger sequencing was performed at the UC Berkeley DNA Sequencing Facility. This work was supported by NIH grant 1U54CA231641 (XD) and the Howard Hughes Medical Institute (CC34430, RT). AH was supported by the NIH Stem Cell Biological Engineering predoctoral fellowship T32 GM098218. We would like to thank David Schaffer for his support and feedback throughout the project as a program director for the T32 fellowship.
Senior Editor
 Anna Akhmanova, Utrecht University, Netherlands
Reviewing Editor
 Ihor Smal, Erasmus University Medical Center, Netherlands
Reviewer
 Maarten W Paul, Oncode Institute, Erasmus MC Cancer Institute, Erasmus University Medical Center, Netherlands
Version history
 Preprint posted: May 4, 2021 (view preprint)
 Received: May 7, 2021
 Accepted: August 4, 2022
 Version of Record published: September 6, 2022 (version 1)
 Version of Record updated: December 13, 2022 (version 2)
Copyright
© 2022, Heckert et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics

 1,750
 Page views

 226
 Downloads

 14
 Citations
Article citation count generated by polling the highest count across the following sources: PubMed Central, Crossref, Scopus.
Download links
Downloads (link to download the article as PDF)
Open citations (links to open the citations from this article in various online reference manager services)
Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)
Further reading

 Biochemistry and Chemical Biology
 Microbiology and Infectious Disease
An imbalance of the gut microbiota, termed dysbiosis, has a substantial impact on host physiology. However, the mechanism by which host deals with gut dysbiosis to maintain fitness remains largely unknown. In Caenorhabditis elegans, Escherichia coli, which is its bacterial diet, proliferates in its intestinal lumen during aging. Here, we demonstrate that progressive intestinal proliferation of E. coli activates the transcription factor DAF16, which is required for maintenance of longevity and organismal fitness in worms with age. DAF16 upregulates two lysozymes lys7 and lys8, thus limiting the bacterial accumulation in the gut of worms during aging. During dysbiosis, the levels of indole produced by E. coli are increased in worms. Indole is involved in the activation of DAF16 by TRPA1 in neurons of worms. Our finding demonstrates that indole functions as a microbial signal of gut dysbiosis to promote fitness of the host.

 Biochemistry and Chemical Biology
 Structural Biology and Molecular Biophysics
The Neuronal Calcium Sensor 1, an EFhand Ca^{2+} binding protein, and Ric8A coregulate synapse number and probability of neurotransmitter release. Recently, the structures of Ric8A bound to Ga have revealed how Ric8A phosphorylation promotes Ga recognition and activity as a chaperone and guanine nucleotide exchange factor. However, the molecular mechanism by which NCS1 regulates Ric8A activity and its interaction with Ga subunits is not well understood. Given the interest in the NCS1/Ric8A complex as a therapeutic target in nervous system disorders, it is necessary to shed light on this molecular mechanism of action at atomic level. We have reconstituted NCS1/Ric8A complexes to conduct a multimodal approach and determine the sequence of Ca^{2+} signals and phosphorylation events that promote the interaction of Ric8A with Ga. Our data show that the binding of NCS1 and Ga to Ric8A are mutually exclusive. Importantly, NCS1 induces a structural rearrangement in Ric8A that traps the protein in a conformational state that is inaccessible to Casein Kinase IImediated phosphorylation, demonstrating one aspect of its negative regulation of Ric8Amediated Gprotein signaling. Functional experiments indicate a loss of Ric8A GEF activity towards Ga when complexed with NCS1, and restoration of nucleotide exchange activity upon increasing Ca^{2+} concentration. Finally, the highresolution crystallographic data reported here define the NCS1/Ric8A interface and will allow the development of therapeutic synapse function regulators with improved activity and selectivity.