# Abstract

Single-particle tracking is a powerful tool for understanding protein dynamics and characterizing microenvironments. As the motion of unconstrained nanoscale particles is governed by Brownian diffusion, deviations from this behavior are biophysically insightful. However, the stochastic nature of particle movement and the presence of localization error pose a challenge for the robust classification of non-Brownian motion. Here, we present *aTrack*, a versatile tool for classifying track behaviors and extracting key parameters for particles undergoing Brownian, confined, or directed motion. Our tool quickly and accurately estimates motion parameters from individual tracks and determines their likely motion state. Further, our tool can analyze populations of tracks and determine the most likely number of motion states. We determine the working range of our approach on simulated tracks and demonstrate its application for characterizing particle motion in cells and for biosensing applications. Our tool is implemented as a stand-alone software package, making it simple to analyze tracking data.

**eLife assessment**

In this **valuable** contribution, the authors present a novel and versatile probabilistic tool for classifying tracking behaviors and understanding parameters for different types of single-particle motion. The tool will be broadly applicable to single-particle tracking studies. While some reviewers feel that the methodology has been **convincingly** tested by computational comparisons and experimental data, others feel that the mathematical foundation needs to be strengthened and clearly defined.

# Main

Single-particle tracking (SPT) is a powerful tool for characterizing protein activity (1–3). While Brownian diffusion is commonly observed inside cells, deviations from this behavior are of major interest and can provide key biophysical insight (4–6). Classically, non-Brownian behaviors have been identified by fitting a power law to the mean-squared displacement (MSD) curve, (MSD = Γ · *t*^{α}) (6), where subdiffusive motion has an *α* exponent less than 1 and superdiffusion has an exponent > 1. While fitting the MSD can be used for classifying motion, the finite number of measurements from stochastically moving particles creates uncertainty in the estimated parameters (7–9). This motivates the application of statistical tests to estimate the certainty of fitted parameters, such as the exponent *α* (7, 10, 11). Even so, fitting the MSD curve to a power law does not specify a particular underlying motion model. To extract further biophysical insight, various mathematical models have been proposed to describe the anomalous diffusion behaviors observed in measurements (4, 12–15). These models, in turn, have been used to train machine learning methods designed to select the most appropriate model and parameters (16–18).

Probabilistic models can also be used to describe the distribution of observed behaviors. In brief, these probabilistic models work by mathematically defining the probability of an observed track as a function of hidden variables. Next, the probability of observing a given track given the model is calculated by integrating over the possible values for the hidden variables. Finally, Maximum Likelihood Estimation (MLE) is used to determine the underlying parameter values. The integration step can be computationally expensive; however, when an analytical integration formula is used, this step becomes trivial (19–21). This framework can be used to model a variety of behaviors with informative hidden parameters, including diffusion measurements with finite localization precision (21), directed motion with a hidden velocity vector (22), and subdiffusion with a hidden potential well (23–28).

Here, we present aTrack, a probabilistic tool for efficient and robust identification of non-Brownian behavior in SPT data. Our approach uses a versatile motion model that accounts for localization error while representing a variety of behaviors including confinement, diffusion, and directed motion. Inputted SPT data is used to determine (1) the most likely states of motion, (2) whether tracks can be statistically categorized as confined or directed, and (3) the parameters that describe their behavior, for example, diffusion coefficient, radius of confinement, and speed. Further, the motion models we employ can be analytically integrated, making the analysis both rapid and accurate. We validate the approach on simulated data and demonstrate its versatility for analyzing a variety of experimental SPT data, including particle diffusion in an optical trap, detection of motile bacteria with nanoparticles, and motion characterization of spindle pole bodies in budding yeast.

# Results

## Accounting for hidden variables that characterize confined and persistent motion

### Modeling non-Brownian motion

We model noisy tracks undergoing confined, Brownian, and directed motion by considering four relations at each time step. (1) there is a Brownian diffusion step followed by (2) an anomalous step (Fig. 1a). (3) localization error is incorporated as a Gaussian-distributed noise term added to the underlying real position to produce the observed positions. (4) the hidden anomalous variable, *h*, can evolve according to a Gaussian distribution. This model encompasses a variety of motion types depending on the model parameters, as illustrated in (Fig. 1c). For example, particles can be immobile, where the observed displacements are due to localization error; tracks can undergo Brownian motion, as well as anomalous super- and subdiffusion; or multiple motion mechanisms can also occur simultaneously, (e.g. diffusion and drift, or changes in directed motion direction and speed). The model can also account for confinement in an area of variable radius (26, 27, 29) as well as a diffusing potential well.

### Determining the type of motion

To categorize the type of motion from a measured trajectory, we must first calculate the likelihood that a track belongs to each considered motion class (e.g. diffusion or confinement) and then perform a statistical comparison between the likelihoods. To do the former, we must integrate the joint probability density function of a track for all the modeled hidden variables, e.g. all the real positions. Since our motion models and localization error are expressed as the multiplication and convolution of Gaussian functions that can be rewritten as a single Gaussian, and the integral of a Gaussian process is a Gaussian distribution, we can employ a fast analytical recurrence formula (see Supplementary information) (20, 21). With the calculated probabilities, we perform a likelihood ratio test (30, 31) between the maximum likelihood assuming Brownian diffusion (null hypothesis) and the maximum likelihood assuming confinement or directed motion as the alternative hypothesis. This likelihood ratio, *ρ* = *l*_{Brownian}/*l*_{confined} or *ρ* = *l*_{Brownian}/*l*_{directed}, is analogous to a p-value 2, for example *ρ <* 0.05 can be considered statistically significant. If particle motion is Brownian, *ρ* is skewed toward 1. Conversely, *ρ* is skewed toward zero when applying the directed-diffusion test to directed tracks or the confined-diffusion test to confined tracks. Due to the separation of these distributions, this likelihood ratio test is less likely to produce false positives than the equivalent p-value test. In practice, to test both directed motion and confinement simultaneously, we calculate the difference between the log likelihoods of the directed motion and the confinement models, since both models intrinsically include the null hypothesis of pure Brownian motion with localization error.

To estimate the impact of the track length on the classification, we simulated confined or directed tracks of varying lengths (5-400 steps for confined, 4-100 steps for directed) and computed the likelihood ratios. As expected, the classification certainty increases with track length; where the inverse of log *ρ* increases with the number of steps (Fig 2a). Of course, the statistical certainty depends on the track parameters (Fig 2b). To determine the useful range, we varied the track length and either the confinement factor for confined motion or the velocity for directed motion, respectively (Fig 2c), where values <0.05 are considered successfully categorized.

### Characterizing confinement

To characterize confined trajectories, aTrack estimates several parameters, namely the diffusion coefficient *D* and the diffusion length where Δ*t* is the single-frame time step; the confinement factor *l*, which is proportional to the spring constant of the potential well; the diffusion coefficient of the confinement area *D*_{c}; and the localization error *σ*. The confinement radius, which is proportional to , can also be calculated.

To measure the precision of parameter estimation, we simulated tracks with different confinement factors, *l*, (Fig. 3a). We then used aTrack to estimate the parameters for each track of 200 time steps (Fig. 3b). The average diffusion coefficient, confinement factor, and confinement radius were accurate over the range of confinement factors, 0 to 1. Panel Fig. 3c shows the working range for calculating the confinement factor as a function of track length and confinement factor.Longer tracks result in better parameter estimation. Similarly, our method correctly estimates the confinement radius (Fig. S3d). In a second set of simulations, we tested the reliability of our predictions when the confinement area is moving (Fig. 3d, Fig. S3e).

### Characterizing directed motion

Superdiffusive behavior, in particular directed motion, occurs in a variety of circumstances, such as molecular motor-mediated active transport (22, 32) and polymerase processivity (33). Localization error complicates velocity estimation, especially when the localization error is relatively large. We simulated noisy tracks undergoing linear motion at various speeds (Fig. 4a) with a localization error of 20 nm·Δ*t*^{−1} and estimated the velocity per tracks. Fig. 4b shows the velocity estimates for tracks with 30 time points. By varying both the track length and the velocity, we found our method to be reliable for a wide range of velocities as long as tracks were long enough (Fig. 4c).

In real experiments, persistent motion is rarely perfectly linear, that is changes in direction and speed are relatively common (22, 32–34). Naturally, characterizing directed motion with direction (orientation) changes is more difficult when localization error is non-negligible (35, 36). To verify our method’s capacity to accurately quantify tracks with such behaviors, we simulated tracks varying the changes in orientation and velocities and estimated the track characteristics (Fig. 4d).

When orientation changes are fast, directed tracks appear diffusive, particularly in the presence of localization error. This manifests in our likelihood ratio heatmap (Fig. S5a), where tracks with high rotational diffusion angles are not significantly differentiable from Brownian motion. As the velocity increases relative to localization error, we can distinguish directed motion from Brownian motion for an increasing range of rotational diffusion angles (Fig. 4e). However, in this regime, it becomes practically impossible to distinguish directed motion with orientation changes from a combination of directed motion and diffusive motion. This effect is visible when representing the impact of the true rotational diffusion angle on the histogram of the estimated rotational diffusion angle: Rotational diffusion is well estimated for low values, but the estimate worsens as the rotational diffusion coefficient increases (Fig. 4e-f).

Sometimes, particles undergo diffusion and directed motion simultaneously, for example, particles diffusing in a flowing medium (37). Sample drift can also introduce a combination of diffusion and directed motion in single-molecule tracking. Indeed, the thermal expansion of instrument components like microscope stages can induce steady motion that masks the biologically relevant diffusive motion (38). We first tested that our method could correctly differentiate directed motion from diffusion (Fig. 4g) for a range of diffusion coefficients and track lengths at a fixed velocity of 0.1 nm.Δ*t*^{−1}. For mixed motion, our method accurately estimates the diffusion length and velocities for short tracks so long as the diffusion length was low compared to the velocity. When the diffusion length is large compared to the velocity, parameters can still be estimated, but longer tracks are needed for a reliable measurement.

### Characterizing populations of tracks

The amount of information contained in an individual track is limited by its length; however, it is also of interest to consider a population of tracks moving with the same underlying parameters. We first simulated populations of tracks that are either in a confined state or in a diffusive state to demonstrate that using the data from more tracks results in higher certainty regarding the type of motion and produces better estimates of the motion parameters (Fig. S6). Next, we simulated populations of tracks with multiple states to determine if our method could correctly distinguish and characterize these states (Fig. 5a). Even under complex conditions, our method could reliably retrieve the parameters of each state even for relatively few tracks (Fig. 5b).

In many circumstances, the number of states is not known. It is thus important to have a method that determines the number of unique states in a population of tracks. The challenge is that adding more states inevitably better fits a dataset, albeit with a diminishing margin of return (39). In the case shown in (Fig. 5c), the likelihood significantly increases when the number of states from 4 to 5; however, for higher numbers of states, the likelihood is significantly less affected, see from 5 to 10 states. Using this effect, it is therefore possible to estimate the number of states. We verified this trend for populations composed of 50 tracks to 12,800 tracks. We found the Akaike Information Criterion (AIC) (40) and the Bayesian Information Criterion were not always suited for determining the number of states in this task (Fig. S7), most likely due to small discrepancies between our model and simulated tracks. Correcting the AIC or the BIC with an additional term proportional to the number of tracks and the number of parameters provides a robust criterion (Fig. S7).

### Robustness to model mismatches

One of the most important features of a method is its robustness to deviations from the assumptions. Experimentally obtained tracks will inevitably not match the model assumptions to some degree, and models need to be resilient to these deviations. To test the generalizability of our approach to other types of motion, we simulated tracks following a subdiffusion motion model that does not fit our motion model, namely fractional Brownian motion (12). This was performed with three anomalous diffusion coefficients, 0.5, 1.0, and 1.5, corresponding to subdiffusion, Brownian, and super-diffusion, respectively Fig. 6a. The performance of aTrack was then measured by computing the difference between the likelihood of the directed motion model and the confined motion model. We then plotted a histogram of the log-likelihood differences for each type of motion and estimated the classification accuracy in detecting anomalous diffusion from Brownian diffusion. aTrack was 88% accurate when differentiating subdiffusive fractional Brownian motion (anomalous diffusion coefficient of *α* = 0.5) from Brownian motion (*α* = 1), and 95% accurate for differentiating superdiffusive fractional Brownian motion (*α* = 1.5) from Brownian motion. To see how our approach compared to one of the leading methods for characterizing fractional Brownian motion, we performed the same test with Randi (41), a machine learning method found to be the most powerful in a head-to-head comparison of available techniques (16). We applied Randi to the same dataset and found that both methods achieved similar accuracies for the fractional Brownian motion data, which Randi was designed to quantify.

We then used the same approach to compare the two methods on tracks that are based on our motion model (Fig. 6b). Here, we simulated tracks with parameters that result in a qualitatively similar motion to that observed with fractional Brownian motion. For those tracks, our model performs with high accuracy, at least 99%, while Randi shows a decreased classification accuracy. In particular, differentiating diffusive tracks from tracks with both diffusion and directed motion had an accuracy of 61% (only 11% better than random labeling). Identifying superdiffusive tracks with Randi had an accuracy of 83%, underscoring how model mismatches complicate track classification when the motion model is insufficiently flexible.

To test the robustness of our method in the context of spatial confinement with rigid boundaries, we simulated tracks of diffusive particles trapped on a disk with a specific radius and measured the effect of the confinement radius (the disk radius) on our predictions (Fig. 6c). While aTrack uses a potential well and not a hard boundary, the model nonetheless identifies particle confinement for a wide range of confinement radii. The lower radius bound of the operating range relates to the diffusion length per step while the upper bound is limited by the extent of the particle’s exploration of the confinement area. Note that the exploration distance is determined by the track length and by the diffusion length). Within the working range, the confinement radius can be accurately estimated using the estimated standard deviation of the potential well, where the disk radius is three times the standard deviation of the well. This calculation was relatively independent of track length (Fig. 6d).

### Implementation on experimental data

To test the usefulness of aTrack on experimental data, we performed classification, population characterization, and parameter-estimation experiments. First, we analyzed tracks from the spindle pole body (SPB) in Saccharomyces cerevisiae. The SPB is the microtubule organizing center in yeast and is embedded in the nuclear envelope. Long-range directed motion of the SPB is expected during mitosis when the nucleus orients towards the bud and the spindle elongates to separate the chromosome masses of mother and daughter cell (Fig. 7a), but some directed motion of the SPB may also occur in other phases of the cell cycle due to the forces exerted on it by microtubules (42, 43). When fitting individual tracks, we observe a significant fraction of persistently moving SPB (13% with a confidence interval of 95%, Fig. 7b). Tracks with a significant likelihood ratio show visible directed motion (Fig. 7c). We did not observe a significant fraction of confined motion with a single-track approach or population-level approach.

Next, we analyzed tracks of 100nm gold nanoparticle (AuNP) biomarkers that can attach to mobile *E. coli*, freely diffuse in the environment, or attach nonspecifically to the substrate. Our method identified the directed tracks, i.e., biomarkers adhered to live bacteria with very high certainty (likelihood ratio < 0.001, Fig. 7d)). 5.9% of the AuNPs were significantly directed according to aTrack, in agreement with a manual inspection of the data. Interestingly, AuNPs attached to bacteria exhibited nearly linear motion coupled to lateral oscillations, consistent with cell rotation (44). Next, we analyzed the tracks at the population level and computed the number of states as a function of likelihood (Fig. 7e). The likelihood function shows a noticeable difference between 4 and 5 states. A 5-state model, indicating the presence of multiple fractions within the populations of cell-bound AuNPs and free AuNPs. Using aTrack, we find two states with directed motion and a high velocity, representing 6.2% of the tracks. Assuming a different number of states, for instance, 3 states or 7 states, results in the same fraction of clearly directed tracks with similar parameters.

Finally, we tested our method’s capability to detect confinement on particles stuck in an optical trap, an experimental system similar to that of our motion model. To do so, we measured 1-micron beads trapped using optical tweezers (Fig. 7f). Using tracks with 100 frames, we detected significant confinement, as expected (Fig. 7g).

# Discussion

aTrack is a new tool for classifying and characterizing noisy tracks, which performs well in a diverse range of conditions. Specifically, the framework’s flexibility is relevant for a wide variety of diffusive, confined, and directed motion types. our tool classifies the motion type as Brownian or not and quantifies the biologically relevant parameters of the motion, such as the diffusion coefficient, confinement area, and velocities. Importantly, this approach calculates how statistically robust a classification is regarding the likelihood difference from a Brownian diffusion model. The flexibility of our approach in capturing a variety of motion-type behaviors contains the usefulness of the catch-all approach of using an anomalous exponent; however, unlike the anomalous exponent that fits multiple motion models (6), our framework has the advantage of outputting interpretable parameters that describe the motion, e.g., velocity or confinement radii.

Using aTrack, we found that directed motion can be readily identified from short tracks due to the deterministic nature of this type of motion. As biological systems rarely contain exactly linear motion, we incorporated a parameter to account for changes in velocity, allowing curved trajectories to be robustly classified. Our method can also account for motion that contains a combination of directed and diffusive motions, namely, that found when particles diffuse in a flowing environment.

Compared to directed motion, longer tracks are needed to classify confined motion with the same statistical certainty. Indeed, confined particles need to reach several boundaries of the confinement area to be distinguished from freely diffusive particles. In some cases, a confined particle may leave its local environment or hop between environments (45–47). To allow for this in our model, the center of the confinement well is modeled as a diffuser. We also require the diffusion coefficient of the well to be slower than the particle to avoid irrelevant behaviors. As with all classification tools, a key source of ambiguity arises when motion types resemble one another. For example, immobile particles and very tightly confined particles can sometimes be indistinguishable while having different underlying models. Nevertheless, determining whether a particle is strongly confined or immobile is not necessarily insightful. Indeed, immobile fluorophores can be modeled as confined to an area around a substrate to which they are bound. In an experimental context, adapting the framerate can be important to best observe the features of interest (48).

Relative to available deep-learning tools, our technique contains many fewer parameters. These values map onto the stochastic physical behaviors of particle motion. In comparison to the deep-learning-based tool we tested, we found that aTrack to be more robust to model mismatches. This finding is consistent with the well-documented issues of machinelearning models generalizing poorly to new data. Of course, in the context of tracking, the generalizability of a model to new data is a key factor, as experimentally obtained data never perfectly match the model assumptions or the training data set. One solution to make a machine learning model that generalizes better is to use a physics-informed neural network (49). Such a network would use probabilistic relationships to efficiently learn the physical properties of unlabeled tracks and would contain far fewer parameters than classical networks.

It is often useful to assume a finite number of states with fixed parameters to model the various molecular states in a sample (50). Selecting the right number of states is difficult but can be automated by different methods. The criterion, e.g., AIC and BIC, used to determine the number of states is reliable when the model and the data are in perfect agreement. However, experimental data never matches the model assumptions perfectly, and even discrepancies between models and simulated data can affect reliability, such as continuous-time simulations and discrete models. This usually results in overestimating the number of states for large data sets (39). To avoid this flaw of classical criteria, we showed that a penalization term proportional to the number of states and to the log likelihood of the data can prevent the spurious increase of the number of states when increasing the number of tracks. The drawback of this approach is the addition of a tunable parameter that influences the number of estimated parameters of the model, and it may still be necessary to limit the number of states to the biologically relevant system.

An important limitation of our approach is that it presumes that a given track follows a unique underlying model with fixed parameters. In biological systems, particles often transition from one motion type to another; for example, a diffusive particle can bind to a static substrate or motor (51). In such cases, our model is not suitable. However, this limitation can be alleviated by implicitly allowing state transitions with a hidden Markov Model (21) or alternatives such as change-point approaches (41, 52, 53), and spatial approaches (24).

In conclusion, we have shown that aTrack can identify anomalous diffusion and parameterize the motion over a broad range of motion types using a robust probabilistic framework. As the motion-model parameters estimated by the method represent physical phenomena, these variables are readily interpretable, for example the diffusion coefficient, confinement radius, and velocities. Finally, the employed motion models were selected to permit analytical integration, which makes calculating the model parameters fast and accurate; of course, this integration strategy can be implemented for a variety of motion models with hidden states, further expanding the applicability of this approach to other motion types.

# Methods

## Modeling particle motion with observed and hidden variables

### Probabilistic model for confined motion

At each time step *i*, our confined-motion model consists of (1) a Brownian motion step, (2) a confinement step, (3) an update to parameters, and (4) a localization error step. The Brownian motion step updates the particle’s position *r*_{i} to an intermediate position *z*_{i}. The variable *z*_{i} − *r*_{i} follows a Gaussian distribution centered at 0 with standard deviation *d*, where *d* is the diffusion length, is the diffusion coefficient, and Δ*t* is the time step. Next, the confinement step is modeled by an attractive force between the particle with a potential well centered at *h*_{i}. More precisely, the particle moves toward the center of the potential well proportionally to a confinement factor *l* and to the distance *r*_{i} − *h*_{i}. The next real position *r*_{i+1} is thus determined by the following relationship *r*_{i+1} = (1 − *l*) · *z*_{i} + *l* · *h*_{i}. To allow the potential well to move, *h* is updated at each step such that *h*_{i+1} − *h*_{i} follows a Gaussian distribution of mean 0 and standard deviation *q*. Finally, to model localization error, the observed positions *c*_{i} and the real positions *r*_{i} are related by the localization precision, *σ*, where *c*_{i} − *r*_{i} follows a Gaussian distribution of mean 0 and standard deviation *σ*.

The distribution of positions for a diffusive particle in a fixed potential well is a Gaussian distribution with standard deviation . As we have no prior information about the initial center of the potential well, we assume it is positioned according to a Gaussian probability density function centered on the initial observed position. While it would be even better to consider a Gaussian centered around *r*_{0}, we simplify it by approximating it to be centered around *c*_{0} and of standard deviation . The joint probability density function corresponding to this model is the product of Gaussian functions shown in equation 1, which is integrated over all hidden parameters to calculate the likelihood, *l*_{conf ined} .

Where the real positions of the particle *r*_{i}, potential well *h*_{i}, and intermediate position *z*_{i} are hidden variables, and *l* is the confinement factor. By integrating this joint probability over the hidden variables, we can retrieve the probability of the track (the observed positions) given the model and its parameters.

While this integration step can be computed with a Monte Carlo approach (27), this is computationally expensive. Instead, we integrate using an analytical recurrence formula. This formula is allowed by the fact that the joint probability density function is a product of Gaussians and by the property that for two Gaussians, *f* and *g*, with means *µ*_{f}, *µ*_{g} and standard deviations *σ*_{f}, *σ*_{g}, the product is also Gaussian, *f* (*x*) · *g*(*x*) = *ϕ* · *η*(*x*) where *ϕ* and *η* are Gaussian distributions described by Equation 2.

See Supplementary information for more details.

### Probabilistic model for directed motion

To consider directed motion, we use the same general framework as confinement. At each time step *i*, the real particle position *r*_{i} is first updated to an intermediate position *z*_{i}, where the variable *z*_{i} −*r*_{i} follows a Gaussian distribution centered at 0 with standard deviation *d*. Next, we add the directed-motion component with a vector *w*_{i}, such that the next real position is the sum of the two steps, *r*_{i+1} = *z*_{i} + *w*_{i}. Combining these two substeps, we get *z*_{i} − *r*_{i} = *r*_{i+1} − *r*_{i} − *w*_{i}, simplifying the integration process of the probability density function expressed in equation 3. Analogous to our confinement model, the velocity vector, *w*_{i}, is allowed to change over time, where the *w*_{i+1} − *w*_{i} follows a Gaussian distribution with mean 0 and standard deviation *q*. Finally, we include the effect of localization error, where the observed position *c*_{i} is related to the real position *r*_{i} following a Gaussian distribution, where *c*_{i} − *r*_{i} is Gaussian distributed with mean 0 and standard deviation *σ*.

During the first time step, the orientation and length of the directed motion vector (speed) need to be initialized. To do so, we assume *w*_{0} follows a Gaussian distribution function with mean 0 and standard deviation *v*. The resulting joint probability density function is shown in Equation 3.

As with confinement, the probability of a directed track given the model parameters can be calculated using an analytical recurrence formula to integrate over the hidden positions, *r*_{0→n}, and velocities *w*_{0→n−1}. The parameter *v* can, in principle, be used to estimate the velocity of a particle with a constant speed but changing orientation in the imaging plane; however, to estimate the average speed of a particle, we use another metric, *k*, that appears in our integration process (see Supplementary information).

### Modeling time-varying velocities and changes in direction

In our model, each axis, x and y, is treated separately, and the velocities can evolve according to a Gaussian distribution. This allows a particle’s direction to change over time. To quantify how direction changes affect the analysis for particles with a constant speed, we simulated tracks with a fixed speed and time-dependent direction for a range of angular diffusion coefficients, *D*_{θ}. The model parameter, *q*, represents the standard deviation of the change in speed, which can be converted to an angular diffusion length using the following trigonometric relation and the estimated speed of the motion.

In the case of pure directed motion with direction changes, let us consider a single time step, *i*. We have A, the previous particle position *r*_{i−1}; B, the particle position assuming no changes of orientation or diffusion, *r*_{i−1} + *v*_{i−1}; and C, the actual particle position after a change of orientation, *r*_{i}. ABC forms an isosceles triangle, which can be split into 2 right triangles. We find the following relationship between the scalar distances BC, AB, and *θ*, , where *θ* is the orientation angle change.

### Track simulations

We subdivided each time step into 20 substeps to simulate approximately continuous tracks. We applied the Brownian diffusion and anomalous movements to each of these substeps. For confined motion, the latter step moves the particle toward the center of the potential well center proportionally to the distance multiplied by a scaled confinement factor, *l*/20. In simulations with a moving potential well, the center moves according to the well’s diffusion coefficient, *q*. For directed motion, we applied a shift of constant velocity. The orientation of the directed motion could vary according to a rotational diffusion coefficient. The particle’s position after the 20 substeps was set to the particle’s real position, *r*_{i}, and the localization error was added to create the observed position *c*_{i}. This process is equivalent for undivided frames for directed motion, as the diffusion and the directed motion steps are independent. However, for the confined model, where the diffusion of the particle influences the anomalous step, thus there is a dependence between the diffusion and confinement steps.

Fractional Brownian motion was simulated using the Python package ‘fbm’ (https://pypi.org/project/fbm/) with the Davies and Harte method (54).

# Experimental methods

## Spindle-pole body

Yeast cells expressing Spc42-mCherry (KWY10328, (55)) were grown to exponential growth phase in synthetic complete medium with glucose (SCD) and imaged in Matrical 384-well glass bottom plates coated with Concanavalin A on a temperature-controlled inverted Nipkow spinning disk microscope equipped with the Yokogawa Confocal Scanner Unit CSU-W1-T2 controlled by the VisiVIEW Software (Visitron). It was used in spinning disk mode with a pinhole diameter of 50 µm combined with a 1.45 NA, 100x objective. Images were acquired on an EMCCD Andor iXon Ultra camera (1024x1024 pixel, 13x13um pixel size); for one of three biological replicates, the data was acquired with dual camera settings. Imaging was performed at 30 °C with 80% laser intensity of a Diode 561 nm, 200 mW laser. Timelapse data were acquired with 100 ms exposure time in stream mode for 300 frames. For all movies, tracks were obtained using the ImageJ (56) plugin TrackMate (57). Peak detection: LoG with radius = 0.3 µm and threshold = 60, linkage: simple lap tracker with a linking maxiumum distance of 0.4 µm and allowing gaps of one frame.

## Bacteria detection and tracking

Bacteria detection with nanoparticles was performed following the protocol described in Zapata-Farfan et al. (2023). In brief, *E. coli* (strain 25922, ATCC) were cultured for 24 h in Trypticase soy broth (TSB) at 37°C and then incubated for 30 min with 100 nm spherical gold nanoparticles at 50 µg/mL (A11-100-CIT, Nanopartz) in 1x PBS. Samples were placed in a small chamber consisting of double-sided tape (5 µm thickness, Nitto) between a coverslip and glass slide. Image data was recorded in darkfield mode at 20 frames per second using an LED side-illumination system and microscope outfitted with a 40x objective (40x air, NA 0.7, Nikon) and monochrome CCD camera (QICAM Firewire camera, Teledyne Photometrics). Tracking was performed using Trackmate 7.0 (57) with the LoG detection method with a diameter of 0.70 µm (6 pixels) and quality threshold of 24.

## Optical tweezers

The tracking of microspheres captured in an optical trap was achieved using a custom instrument constructed on a modular inverted microscope (MIM/RAMM, ASI Imaging), incorporating optical trapping and imaging paths. The trapping diode laser (SNP-06E-100, Teem) emitting at 1064nm (TEM_{00}) had an average output power of 60 milliwatts. The laser beam is expanded using a 1:3 telescope (Achromatic doublets, Thorlabs) to overfill the objective’s back focal plane. This expanded beam was focused through a 100X, 1.45 NA objective (UPlanXApo 100X, Olympus) to trap dielectric particles. The same objective was used to collect bright-field illumination, which was imaged using a CMOS camera (ORCA - Flash4.0 LT3, Hamamatsu). A 3-axis piezo-driven stage (MicroScan SCXYZ100, Thorlabs) with a precision of 25 nm facilitated sample movement to capture particles in the trap. One µm polystyrene microbeads (Monodisperse fluorescent microspheres, Cromtech Research Center) were suspended in water. The solution was squeezed between two coverslips (No. 1.5, Thermo), and a single bead was brought into the laser trap by translating the sample. Data acquisition was performed at 315 frames per second for 2 minutes, these movies were then analyzed in shorter, 100-frame segments. Beads positions were tracked using TrackMate (57).

# Data and code availability

Tracking data and the aTrack software is available online. aTrack is available as a stand-alone software for Windows and as a python package. Installation instructions are provided on the Github page https://github.com/FrancoisSimon/aTrack.

# Acknowledgements

The authors thank Sven van Teeffelen for helpful discussions. This work was supported by the Natural Sciences and Engineering Research Council of Canada [NSERC Discovery grant to MM, (RGPIN-06404-2016) to CB, (RGPIN-2022-05142) to LEW], the Canada First Research Excellence Fund (TransMedTech Institute), and ETH research grant ETH-33 19-1 to ED.

# Competing interest statement

The authors declare no competing interest.

# Supplementary information Derivations

## Likelihood calculation for confined motion

To simplify the integration of the product of Gaussians described in the Method section, Eq. (1), *f*_{σ}((1 − *l*)*z*_{i} + *lh*_{i} − *c*_{i+1}) *f*_{d}((1 − *l*)*z*_{I} + *lh*_{i} − *z*_{i+1}) can be refactored to of variances *k*^{2} = *σ*^{2} + *d*^{2} and . This can be further simplified into with , *K* and *G* represent Gaussian distributions of mean 0 with variances *k*^{2} = *σ*^{2} + *d*^{2} and respectively. Then, we use the annotation *N* (*x, V*) to refer to other Gaussian probability density functions of mean 0 and of variance *V* .

Eq. (1) is equivalent to:

During the integration process, we obtain the following set of recurrence formulas: ‐ Initialization:

‐ Recurrence:

‐ Final step:

## Likelihood calculation for directed motion

Similarly to the confined motion formula, the track probability can be expressed using a recurrence formula that depends on the parameters of the directed motion model, the localization error *σ*, the diffusion length *d*, the initial velocity *v* and the speed of the velocity change *q*.

‐ Initialization:

Recurrence:

Final steps (steps *i* = *n* − 2 and *i* = *n* − 1):

# References

- 1.Single particle tracking: from theory to biophysical applications
*Chemical reviews***117**:7331–7376 - 2.Understanding protein mobility in bacteria by tracking single molecules
*Journal of molecular biology***430**:4443–4455 - 3.Principles and applications of single particle tracking in cell research
*Small***17** - 4.A biological interpretation of transient anomalous subdiffusion. i. qualitative model
*Biophysical journal***92**:1178–1191 - 5.Anomalous transport in the crowded world of biological cells
*Reports on Progress in Physics***76** - 6.Anomalous diffusion models and their properties: non-stationarity, non-ergodicity, and ageing at the centenary of single particle tracking
*Physical Chemistry Chemical Physics***16**:24128–24164 - 7.Statistical analysis of particle trajectories in living cells
*Physical Review E***97** - 8.Optimal diffusion coefficient estimation in single-particle tracking
*Phys Rev E Stat Nonlin Soft Matter Phys***85** - 9.The random walker’s toolbox for analyzing single-particle tracking data
*Soft Matter***19**:5206–5222 - 10.Universal algorithm for identification of fractional brownian motion. a case of telomere subdiffusion
*Biophysical journal***103**:1839–1847 - 11.Anomalous subdiffusion in living cells: bridging the gap between experiments and realistic models through collaborative challenges
*Frontiers in Physics***8** - 12.Fractional brownian motions, fractional noises and applications
*SIAM review***10**:422–437 - 13.Anomalous transit-time dispersion in amorphous solids
*Physical Review B***12** - 14.Random walk model with correlated jumps: Self-correlation function and frequency-dependent diffusion coefficient
*Journal of Physics and Chemistry of Solids***40**:1019–1025 - 15.Nonergodic subdiffusion from brownian motion in an inhomogeneous medium
*Physical review letters***112** - 16.Objective comparison of methods to decode anomalous diffusion
*Nature communications***12** - 17.Single-particle diffusion characterization by deep learning
*Biophysical journal***117**:185–192 - 18.Nobias: Analyzing anomalous diffusion in single-molecule tracks with nonparametric bayesian inference
*Frontiers in bioinformatics, page***40** - 19.Statistics of camera-based single-particle tracking
*Physical Review E***82** - 20.Estimation of the diffusion constant from intermittent trajectories with variable position uncertainties
*Physical Review E***93** - 21.Extrack characterizes transition kinetics and diffusion in noisy single-particle tracks
*Journal of Cell Biology***222** - 22.Inferring transient particle transport dynamics in live cells
*Nature Methods***12** - 23.A bayesian inference scheme to extract diffusivity and potential fields from confined single-molecule trajectories
*Biophysical journal***102**:2288–2298 - 24.Bayesian decision tree for the classification of the mode of motion in single-molecule trajectories
*PloS one***8** - 25.Data-driven techniques for detecting dynamical state changes in noisily measured 3d single-molecule trajectories
*Molecules***19**:18381–18398 - 26.Analysis of single particle diffusion with transient binding using particle filtering
*Journal of theoretical biology***401**:109–121 - 27.A hidden markov model for detecting confinement in single-particle tracking trajectories
*Biophysical journal***115**:1741–1754 - 28.Hidden markov modeling of single-particle diffusion with stochastic tethering
*Phys. Rev. E***109** - 29.Mreb-dependent organization of the e. coli cytoplasmic membrane controls membrane protein diffusion
*Biophysical journal***110**:1139–1149 - 30.The large-sample distribution of the likelihood ratio for testing composite hypotheses
*The annals of mathematical statistics***9**:60–62 - 31.Asymptotic statistics
- 32.Velocity, processivity, and individual steps of single myosin v molecules in live cells
*Biophysical journal***96**:4268–4275 - 33.The bacterial actin mreb rotates, and rotation depends on cell-wall assembly
*Proceedings of the National Academy of Sciences***108**:15822–15827 - 34.Kinesin-1 and dynein are the primary motors for fast transport of mitochondria in drosophila motor axons
*Molecular biology of the cell***17**:2057–2068 - 35.Robust hypothesis tests for detecting statistical evidence of two-dimensional and three-dimensional interactions in single-molecule measurements
*Physical Review E***89** - 36.Transient directed motions of gabaa receptors in growth cones detected by a speed correlation index
*Biophysical journal***92**:654–660 - 37.Single particle tracking. analysis of diffusion and flow in two-dimensional systems
*Biophysical journal***60**:910–921 - 38.A mean shift algorithm for drift correction in localization microscopy
*Biophysical Reports***1** - 39.Variational algorithms for analyzing noisy multistate diffusion trajectories
*Biophysical journal***115**:276–282 - 40.A new look at the statistical model identification
*IEEE transactions on automatic control***19**:716–723 - 41.Classification, inference and segmentation of anomalous diffusion with recurrent neural networks
*Journal of Physics A: Mathematical and Theoretical***54** - 42.Kinetics of spindle pole body separation in budding yeast
*Proceedings of the National Academy of Sciences***92**:9707–9711 - 43.Collective dynein transport of the nucleus by pulling on astral microtubules during saccharomyces cerevisiae mitosis
*Yeast***38**:352–366 - 44.Role of body rotation in bacterial flagellar bundling
*Phys. Rev. E***65** - 45.Physical nature of bacterial cytoplasm
*Physical review letters***96** - 46.Ergodic and nonergodic processes coexist in the plasma membrane as observed by single-molecule tracking
*Proceedings of the National Academy of Sciences***108**:6438–6443 - 47.Near-critical fluctuations and cytoskeleton-assisted phase separation lead to subdiffusion in cell membranes
*Biophysical journal***100**:80–89 - 48.Kinesin processivity is determined by a kinetic race from a vulnerable one-head-bound state
*Biophysical journal***112**:2615–2623 - 49.Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations
*Journal of Computational physics***378**:686–707 - 50.Which way to go: a guide to single-particle tracking analysis methods
*Under review* - 51.Single-molecule imaging in the primary cilium
*In Methods in Cell Biology*:59–83 - 52.A sequential algorithm to detect diffusion switching along intracellular particle trajectories
*Bioinformatics***36**:317–329 - 53.Extreme learning machine for the characterization of anomalous diffusion from single trajectories (andi-elm)
*Journal of Physics A: Mathematical and Theoretical***54** - 54.Tests for hurst effect
*Biometrika***74**:95–101 - 55.The nuclear basket regulates the distribution and mobility of nuclear pore complexes in budding yeast
*bioRxiv* - 56.Nih image to imagej: 25 years of image analysis
*Nature methods***9**:671–675 - 57.Trackmate: An open and extensible platform for single-particle tracking
*Methods***115**:80–90 - 58.Dynamic multispectral detection of bacteria with nanoplasmonic markers
*Nanoscale***15**:3309–3317

# Article and author information

## Version history

- Preprint posted:
- Sent for peer review:
- Reviewed Preprint version 1:

## Copyright

© 2024, Simon 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

- views
- 133
- downloads
- 0
- citations
- 0

Views, downloads and citations are aggregated across all versions of this paper published by eLife.