# MTrack: Automated Detection, Tracking, and Analysis of Dynamic Microtubules

## Abstract

Microtubules are polar, dynamic filaments fundamental to many cellular processes. In vitro reconstitution approaches with purified tubulin are essential to elucidate different aspects of microtubule behavior. To date, deriving data from fluorescence microscopy images by manually creating and analyzing kymographs is still commonplace. Here, we present MTrack, implemented as a plug-in for the open-source platform Fiji, which automatically identifies and tracks dynamic microtubules with sub-pixel resolution using advanced objection recognition. MTrack provides automatic data interpretation yielding relevant parameters of microtubule dynamic instability together with population statistics. The application of our software produces unbiased and comparable quantitative datasets in a fully automated fashion. This helps the experimentalist to achieve higher reproducibility at higher throughput on a user-friendly platform. We use simulated data and real data to benchmark our algorithm and show that it reliably detects, tracks, and analyzes dynamic microtubules and achieves sub-pixel precision even at low signal-to-noise ratios.

## Introduction

Microtubules are dynamic filaments essential for many cellular processes such as intracellular transport, cell motility and chromosome segregation. They assemble from dimeric αβ-tubulin subunits that polymerize in a head-to-tail fashion into polar filaments1 (Fig. 1). Microtubules show a behavior termed dynamic instability, which can be empirically described by four parameters: (1) the polymerization velocity at which microtubules grow (vg), (2) the depolymerization velocity at which microtubules shrink (vs), (3) the catastrophe frequency at which microtubules switch from growth to shrinkage (fc), and (4) the rescue frequency at which microtubules switch from shrinkage to growth (fs)2. This dynamic behavior is intrinsic to microtubules. In a cellular context, however, the dynamic properties of microtubules are modulated by motors and accessory proteins known as microtubule associated proteins (MAPs)3,4,5,6,7. In most cases, the cellular context is too complex to study a single protein’s contribution to microtubule dynamics. Therefore, biochemical activities of individual proteins have primarily been characterized in vitro using purified components and total-internal reflection fluorescence (TIRF) microscopy8,9,10,11,12,13,14,15,16,17. Furthermore, microtubule dynamics are strongly affected by a set of drugs routinely used to treat diseases such as cancer18 and malaria19. Owing to their clinical relevance, it is a viable need to understand the exact regulation of microtubule dynamics by a given drug and thereby elucidate the underlying molecular mechanisms. Given the growing interest in biochemical reconstitution systems3,4,20, automation of data analysis will unveil the full potential of the experimental approaches as described above.

Quantitatively deriving dynamic microtubule parameters from fluorescence microscopy images by manually creating and analyzing kymographs (spatial position over time) is still common practice21. This limits the collection of statistically significant amounts of data. Moreover, manual analysis can bias data collection and introduce variability. Thus, methods have been developed that allow microtubule detection and/or tracking22,23,24,25,26,27. However, to date, there is no fully automated workflow that provides detection and tracking of microtubules followed by automated data analysis and statistics collection. Here, we present the software MTrack, which detects, tracks, measures, and analyses the behavior of fluorescently labeled microtubules imaged by TIRF microscopy (Supplementary Fig. 1). MTrack is capable of automatically identifying and tracking dynamically growing microtubules that potentially bend and cross with subpixel resolution, even at high growth rates and low signal-to-noise ratios (SNR) using advanced objection recognition and robust outlier removal. The software is easily accessible for users and developers since it can be automated and is provided as an open-source Fiji28 plug-in.

## Results

The MTrack software is organized in two consecutive modules that can be run independently. The first module robustly detects microtubule seeds and tracks dynamic microtubules over time. The second module interprets the length over time plots to extract relevant parameters of dynamic instability and population statistics.

### Robust Detection of Microtubule Seeds using MSER and Sum of 2D Gaussians

A common way to reconstitute and analyze microtubule dynamics is by the use of TIRF microscopy and fluorescently labeled tubulin14,16. Stabilized (non-dynamic) fluorescent microtubule seeds are immobilized onto glass surfaces. These microtubule seeds serve as nucleation points from which dynamic fluorescent microtubules will grow (Fig. 1). Previous microtubule tracking software relies on manually clicking each individual microtubule to be analyzed23,27. Therefore, our aim was to develop an approach that robustly detects microtubule seeds in the image in a fully automated fashion. It is essential to precisely determine the exact end point of each seed, as these are the sites from which microtubules will subsequently grow and shrink. MTrack does so by using the Maximally Stable Extremal Regions (MSER) algorithm29,30 to identify image areas belonging to each seed, a sum of 2D Gaussians (SoG) model to accurately localize individual seeds, and finally a Gaussian Mask fit31 to determine the precise end point of each seed with subpixel resolution (Fig. 2a).

The principle underlying MSER is a component tree, which computes every possible threshold of the image thereby increasing the dimensionality of the input image by one (e.g. 2d > 3d, Supplementary Movie 1). Stable regions within the component tree are those that do not significantly change over multiple thresholds. Since microtubules can vary in size, are randomly oriented, potentially bent, and are the main bright objects in the fluorescent image, the MSER detector performs accurately without the need to make assumptions about shape, orientation, and size of regions. Successfully detected microtubule seeds show a one-to-one assignment to ellipsoidal regions (Fig. 2a). Even for low SNRs, the overall detection accuracy mostly depends on the density of microtubule seeds (Fig. 2b). MTrack detects seeds with a close to 100% accuracy when the distance between seeds is larger than 5 pixels, which is experimentally feasible. Using the region identified by MSER, we fit a SoG model (see Supplementary Material) using the major axis of the ellipsoid as a starting point to detect the accurate end position of the seeds (Fig. 2a). Final end points are computed using a modified Gaussian Mask fit31 to maximize location precision (see Supplementary Material). It uses combined Gaussian distributions to model the appearance of the end points in the image as defined by their location and the point-spread function of the system (Fig. 2a).

The signal-to-noise ratio (SNR) is directly related to the maximally achievable localization precision23,31. Therefore, we simulated microtubule seeds with different SNRs and show that at reasonable experimental SNRs (Material and Methods, Supplementary Fig. 2) endpoints can be accurately localized with subpixel resolution (Fig. 2c). Despite the fact that microtubule ends show no symmetric intensity distribution, the detection error is normally distributed showing no bias towards microtubules pointing in either direction (Supplementary Fig. 2). Therefore, detection precision is robust and does not depend on filament orientation.

### Tracking Microtubules by 2D Gaussian Polynomial Models

The goal of microtubule tracking is to identify the end points of growing and shrinking microtubules within each frame of a fluorescent time-lapse movie with the highest possible accuracy and reliability. Typically such data is displayed as a length versus time graph (kymograph). Microtubules stochastically switch between growth and shrinkage. Growth velocities observed in vitro range from 0.6 μm/min32 to 40 μm/min33. Moreover, depolymerization velocity is typically an order of magnitude greater than the corresponding growth velocity21. Thus, the frame-to-frame difference in microtubule length can be significant. In addition, brightness changes, growth heterogeneity, microtubules bending, crossing, and moving out of focus present further challenges to accurate tracking. We will show that fitting polynomial functions enables us to robustly track microtubules, even when bending or crossing.

In more detail, MSER first detects an image region for each dynamic microtubule within each frame of the fluorescent time-lapse movie (as described for seed detection). To initialize the iterative microtubule detection within each MSER region, we need a start point and the guess of an end point. The start point is fixed and defined by the detected seed end, while the end point is estimated by the intersection of the current MSER region boundary with the projected growth direction from the last successfully segmented frame, which can potentially be many frames away (Fig. 3a, see also discussion). These two points define a line used to initialize the fitting of a 2D SoG model to the image region that identifies the microtubule. However, the 2D SoG path is represented by a 3rd order polynomial function, which enables tracking of bending (Fig. 3b) and crossing microtubules (Fig. 3c, Supplementary Material). The iterative fitting of the 2D SoG model is robust and will recover even after many frames have been missed since it is able to identify the correct microtubule path as long as the initialization line intersects with the microtubule at any point. Additionally, we reject estimates of microtubule paths in the current frame that differ significantly from the previous time-point (see also discussion, Supplementary Material). The precise endpoint of the growing or shrinking microtubule is finally computed using our modified Gaussian Mask fit as described for seed detection.

When imaging dynamic microtubules, background fluorescence is inevitable as fluorescent tubulin in solution is required to allow microtubules to grow. With high tubulin concentrations, background fluorescence increases and therefore the effective SNR of the microtubule signal considering the fluorescent background can be considerably low (Supplementary Fig. 2). To characterize tracking performance, we simulated sequences of dynamic microtubules assuming different SNRs. Such an approach was previously demonstrated to be valuable for the study of the localization precision in single molecule localization microscopy34 and found to be a good single predictor of tracking precision23. Our analysis shows that irrespective of growth along a 3rd order polynomial (Fig. 3d) or a line (Fig. 3e), the error distribution remains similar and achieves pixel resolution.

### Automatic Derivation of Microtubule Dynamic Parameters using Iterative Robust Outlier Removals

The aim of this module is to extract relevant microtubule dynamic parameters from length versus time data produced by the tracking (Fig. 4a). Each microtubule track has an unknown number of growth and shrinkage events. To automatically derive these dynamic parameters, we developed an iterative, model-based robust outlier removal algorithm based on RANSAC (Random Sample Consensus)35. RANSAC is a non-deterministic algorithm that fits a function to data points by maximizing the number of data points that support the function fit (inliers), given an error ε (Fig. 4b).

First, all growth events are detected. Microtubule polymerization velocity (vg [nm/s]) was shown to be a linear function of tubulin concentration and is usually approximated by a single constant growth rate13. We therefore assume that periods of microtubule growth follow an increasing, near-linear polynomial function, which is implemented as a 2nd or 3rd order polynomial regularized with linear function. To do so, RANSAC first identifies the largest subset of consecutive time points that follow near-linear growth (Fig. 4b). To identify all growth events in one track, the software iteratively removes time points belonging to an identified growth event from the sampling set. It then repeats the RANSAC sampling until no further growth events can be found. In the example shown in Fig. 4, RANSAC identifies four growth events in order of their length. To achieve compatibility with the general accepted assumption of linear microtubule growth, the software finally fits only a linear function to all inlier points of each growth event (Fig. 4c). Next, RANSAC identifies events of microtubule shrinkage. Microtubule depolymerization velocity (vs [nm/s]) can be an order of magnitude higher than polymerization velocity and therefore, depolymerization events tend to be short. We therefore use a linear model limited to fast decline for our iterative RANSAC algorithm (Fig. 4d, blue lines). Subsequently, catastrophe frequency and rescue frequency are calculated. Catastrophe frequency (fc [s−1]) is determined by dividing the total number of identified shrinkage events by the total time the microtubules were growing (events/time), taking only full growth events into account. Analogously, rescue frequency (fr [s−1]) is determined by dividing the total number of identified growth events by the total time the microtubule spent shrinking (events/time). We distinguish between total catastrophes, when the microtubule shrinks all the way back to the seed, and rescues by comparing the start of the new growth event to the baseline, which is given by the end point of the seed (Material and Methods). As mentioned in the introduction, microtubules have an intrinsic polarity. The microtubule plus end typically grows significantly faster than the microtubule minus end1. When both microtubule ends are selected and tracked, MTrack automatically assigns the faster growing end as the plus end. Finally, given the four parameters of dynamic instability, the microtubule length distribution can be computed (based on36) at a user chosen time-point or averaged over all the time points to obtain a time-averaged length distribution.

## Discussion

In the last decade, advances in high-resolution techniques have shed new light on how the dynamic behavior of microtubules is modulated (as reviewed in37). Here, we present new software, MTrack, which automatically identifies and tracks dynamic microtubules with subpixel resolution and provides automatic data interpretation and statistics. MTrack will be valuable to any experimentalist (1) who studies different microtubule populations38,39, (2) who aims to characterize the effect of a MAP or motor protein on microtubule dynamics8,9,10,11,12,13,15,17 or (3) who is interested in characterizing the molecular mechanism of microtubule binding drugs. We believe that MTrack is a powerful tool, which together with high-resolution imaging will provide unbiased, high-accuracy data with sufficient statistics to help elucidate new mechanisms of microtubule dynamics control.

The demand for software, which automatically detects and tracks microtubules is mirrored by the recent development of several software packages that allow microtubule detection and/or tracking22,23,24,25,26,27. The most recent approach by Bohner and colleagues is a further development of the previously published tracking software FIESTA27 by optimizing it for low SNRs. In other words, the former software27 is ideal to track non-dynamic microtubule seeds, for example in single-motor stepping assays40, while the latter23 is well-suited for tracking microtubules in dynamic growth assays with free fluorescent tubulin. In addition, in order to validate the tracking performance across a broad range of conditions, Bohner and colleagues tracked simulated dynamic microtubules with varying experimental conditions. While they found the fluorophore labeling density, the pixel size of the image as well as the exposure time to be important parameters, they found the SNR a good single predictor of tracking precision23. Motivated by this observation, we systematically varied the SNR ratio and determined the detection and tracking accuracy of our software. In Module 1, endpoints of non-dynamic microtubule seeds can be accurately localized with subpixel resolution even at low SNRs. Moreover, the detection error is normally distributed showing no bias towards microtubule direction. From this we concluded that the detection precision was robust even at experimentally relevant SNRs and did not depend on the filament orientation. We then showed that allowing the final fit to follow a 3rd order polynomial function enabled us to track straight, bending, and crossing microtubules. The tracking accuracy achieved pixel resolution, providing a close to molecular precision.

While the above mentioned programs reliably track microtubules with nanoscale precision, both approaches require the manual selection of each individual microtubule to be tracked, neither of the program offers automated data analysis nor do the authors comment on how either software performs on bending or crossing microtubules. MTrack is a fully automated workflow that provides detection and tracking of microtubules and is - to our knowledge - the first software that offers automated data interpretation using iterative robust outlier removal. Directly tracking microtubules and analyzing their dynamics is different to tracking and analyzing end-binding proteins (EBs)41,42. Microtubule end-binding proteins such as EB1 accumulate exclusively at growing microtubule ends11,43 but get lost once microtubules shrink. In such datasets, microtubule behavior has to be interpolated during phases of microtubule shortening and pausing. In contrast, MTrack can make use of the full length over time information giving by the tracking module to extract information about MT dynamics.

In sum, MTrack is the first software that reliably detects, tracks, and analyzes the behavior of dynamic microtubules. Each module is automated yet highly adaptable and can be used (1) to robustly detect the end points of any linear, fluorescent, filamentous structure, (2) to reliably track fluorescent structures or (3) to analyze length over time plots in an automated fashion.

## Materials and Methods

The Point Spread Function (PSF) of a microscope is well approximated by the images of single subdiffraction-sized fluorescent beads. We quantified the PSF and the resolution by fitting 2D Gaussian functions to individual beads for each wavelength. The estimated resolution of the microscope based on the mean value of the full width half maximum (FWHM) is 199 nm and 205 nm for the 561 nm and the 647 nm laser, respectively.

### Signal-to-noise Ratio (SNR)

After background subtraction, we measure and calculate the SNR of seeds and dynamic microtubules by IMT/σMT where IMT is the mean and σMT is the standard deviation of the pixel intensities along a line scan of a seed or dynamic microtubule.

In the simulations, we use the ImageJ Poisson noise generator to measure detection and tracking accuracy at different SNRs. This plugin computes Poisson distributed values for each pixel of an image based on ground truth data and a target SNR. Poisson noise is the main source of fluctuations in fluorescence microscopy, it occurs when a finite number of particles that carry energy, such as photons in an optical device, is small enough to give rise to detectable statistical fluctuations in a measurement.

### Experimental Data, TIRF microscopy and Imaging

The in vitro reconstitution of microtubule dynamics was performed as described14,16. Briefly, GMPCPP-stabilized bovine tubulin seeds contained 10% Cy5-labeled and 20% biotin-labeled tubulin. Polymerization reactions were carried out at 37 °C in BRB80 buffer (80 mM PIPES, 1 mM MgCl2, 1 mM EGTA, pH 6.8) supplemented with 1% β-mercaptoethanol, 1 mg/mL casein, and 1 mM GTP at different concentrations of free tubulin. Free tubulin was either purified from Xenopus egg extracts44 or bovine brain tubulin (purchased from PurSolutions) containing 10% Cy3-labeled tubulin. Reaction chambers were constructed from glass coverslips and slides passivated with dichlorodimethylsilane45.

Images were taken on the motorized inverted Nikon Eclipse Ti-E microscope with a motorized TIRF angle controlled with ND acquisition software, equipped with a Nikon Plan Apochromat 100x/1.5NA oil immersion objective lens and an EMCCD, Andor iXon Ultra X3 987 Camera. Cy5-labeled seeds were imaged with a 647 nm laser at 1.5 mW (0.2%) and 50 ms exposure time. Cy3-labeled dynamic microtubule μs were imaged with a 561 nm laser at 0.54 mW (1.2%) and 50 ms exposure time. Image size is 512 × 512 with a pixel size of 156 nm. Movies analysed by MTrack have been taken from polymerization reactions with Xenopus laevis, Xenopus tropicalis and Bos taurus tubulin ranging from 6–20 μM total tubulin with growth speeds ranging from 0.4 μm/min to 3 μm/min (also see Supplementary Fig. 3).

## Mathematics

### Fitting Microtubule Intensity Models

MTrack fits a microtubule’s pixel intensities by using a model, which is a sum of Gaussians along a polynomial. In order to determine the model parameters, we perform minimization of χ squared function defined as

$$\chi {(\overrightarrow{\theta })}^{2}={{\sum }_{i}({I}_{i}-{F}_{i}(\overrightarrow{\theta }))}^{2}.$$
(1)

The sum is over the pixel co-ordinates (ix, iy) and Ii is the pixel intensity at that position. Fi represents the value given by the model at the same pixel co-ordinate, and model parameters are represented by the vector $$\overrightarrow{\theta }$$. The components of the vector are dependent on the model used (Line model or 3rd order polynomial to approximate a beam model46). These components will be described in the sections detailing the respective model.

### Line Model

For the seed image, MTrack uses a first order polynomial. A first order polynomial is a line in the image and in this model we place Gaussians along the line. The function F introduced before has the following form:

$${F}_{i}(\vec{\theta })=A{\sum }_{j}^{J}{G}_{j,i}\delta ({\mu }_{y,j}-m{\mu }_{x,j}-c)+Bg$$
(2)

Here, we placed Gaussians enumerated by index j. δ denotes the dirac-delta function that constrains the location of the Gaussians to be along a function, which is in this case a line. J defines the total number of Gaussians in the sum. The centroid of the Gaussian j is given by (μx,j, μy,j). By using a delta function we ensure that these centroids are always along the line, which is defined as the argument of the delta function. Bg is the background intensity term, A is the amplitude of all Gaussians J. Gj,i defines a two dimensional Gaussian located at pixel location (ix, iy). In our sum of Gaussian model, the intensity contribution of Gaussian j at pixel location i is given by

$${G}_{j,i}=\exp (-\frac{{({i}_{x}-{\mu }_{x,j})}^{2}}{{\sigma }_{x}^{2}}-\frac{{({i}_{y}-{\mu }_{y,j})}^{2}}{{\sigma }_{y}^{2}})$$
(3)

σx and σy are determined by the point spread function of the microscope. The spacing between the successive Gaussians placed along a curve is assumed to be a constant, defined by the parameter ds.

$$\begin{array}{rcl}ds & = & \sqrt{d{\mu }_{x,j}^{2}+d{\mu }_{y,j}^{2}}\\ {\mu }_{y,j} & = & m{\mu }_{x,j}+c\\ d{\mu }_{y,j} & = & md{\mu }_{x,j}\end{array}$$
(4)

Using these expressions we can write ds in the above expression as

$$ds=d{\mu }_{x,j}\sqrt{1+{m}^{2}}$$
(5)

Using the expression above and expanding the expression in 2 we obtain modelled intensities for each pixel i by

$${F}_{i}=A({G}_{{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}},i}+{G}_{j,i}+\cdots +{G}_{{\rm{e}}{\rm{n}}{\rm{d}},i})+Bg$$
(6)

Gstart,i and Gend,i define the two dimensional Gaussian at the start and the end location. The modelled intensity of each Gaussian Gj,i along a line is defined as

$${G}_{j,i}=\exp (\,-\,\frac{{({i}_{x}-{\mu }_{x,j})}^{2}}{{\sigma }_{x}^{2}}-\frac{{({i}_{y}-m{\mu }_{x,j}-c)}^{2}}{{\sigma }_{y}^{2}})$$
(7)

For the seed image the line parameters (m and c) are determined by using MSER29. σx and σy are user input for the PSF of the microscope and are not fit parameters. The fit parameters to be determined are the start and the end sub-pixel co-ordinate of the model (μx,start, μy,start) and (μx,end, μy,end) respectively, the spacing between the Gaussians ds, the background term Bg and the amplitude A.

In order to determine these parameters, the function defined in 1 is minimized using the Levenberg-Marquardt solver47,48. Such a minimization requires providing derivatives with respect to the fit parameters. MTrack uses analytical derivatives for that and their form is described in the next section.

### Analytical Derivatives for Line Models

#### Derivative with respect to μs

Using the expression in 6, we can write the derivative with respect to the first term as

$${D}_{i,({\mu }_{s,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}})}=\frac{{\rm{\partial }}}{{\rm{\partial }}{\mu }_{s,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}}F=\frac{2A}{{\sigma }^{2}}(({i}_{s}-{\mu }_{s,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}})\cdot \vec{I}){G}_{{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}$$
(8)

Here, we have used the vector notation to represent the co-ordinates (s = 0, 1) for (x, y) co-ordinates respectively and $$\overrightarrow{I}$$ represents the unity vector. The derivative with respect to the end point is also similar to above with μs,start being replaced by μs,end and Gstart being replaced by Gend.

#### Derivative with respect to ds

We define

$$\begin{array}{ccc}\vec{B} & = & [\begin{array}{c}\frac{1}{\sqrt{1+{m}^{2}}}\\ \frac{m}{\sqrt{1+{m}^{2}}}\end{array}]\end{array}$$
(9)

and

$${D}_{i,ds}=\frac{\partial }{\partial ds}F={\sum }_{j}\frac{2j}{{\sigma }^{2}}(({\overrightarrow{i}}_{s}-{\overrightarrow{\mu }}_{s,j})\cdot \overrightarrow{B}){G}_{j,i}$$
(10)

#### Derivative with respect to A and Bg

For A the derivative is 6 without the B term and for derivative with respect to Bg it is unity.

### Polynomial Model

For the time-lapse images, MTrack uses a polynomial model to do the fitting, which allows tracking of bending and crossing microtubules. We use a 3rd order polynomial and modify the model presented in 2 to the following:

$${F}_{{\rm{p}}{\rm{o}}{\rm{l}}{\rm{y}},i}={\sum }_{j}A\times {G}_{j,i}\delta ({\mu }_{y,j}-I{\mu }_{x,j}^{3}-b{\mu }_{x,j}^{2}-m{\mu }_{x,j}-c)+Bg$$
(11)

We now have two more parameters to determine I and b. I is the inflection of the polynomial and b describes the curvature of the polynomial. Now, the delta function represents putting the centroids of the Gaussians along a curve represented by the argument of the delta function. There are two more fit parameters to be determined: b and I. For doing so, we need analytical derivatives for the fit function in 1 with respect to these two new parameters. These will be derived in the following section. The spacing ds between the Gaussians now becomes

$$\begin{array}{rcl}ds & = & \sqrt{d{\mu }_{x,j}^{2}+d{\mu }_{y,j}^{2}}\\ {\mu }_{y,j} & = & I{\mu }_{x,j}^{3}+b{\mu }_{x,j}^{2}+m{\mu }_{x,j}+c\\ d{\mu }_{y,j} & = & (3I{\mu }_{x,j}^{2}+2b{\mu }_{x,j}+m)d{\mu }_{x,j}\\ ds & = & d{\mu }_{x,j}\sqrt{1+{(3I{\mu }_{x,j}^{2}+2b{\mu }_{x,j}+m)}^{2}}\end{array}$$
(12)

### Analytical Derivatives for Polynomial Model

#### Derivative with Respect to μs, A and Bg

These derivatives are the same as described for the line model.

#### Derivative with Respect to ds

The term m is now determined by the other fit parameters and can be written as

$$m=\frac{{\mu }_{y,{\rm{end}}}-{\mu }_{y,{\rm{start}}}}{{\mu }_{x,{\rm{end}}}-{\mu }_{x,{\rm{start}}}}-b({\mu }_{x,{\rm{end}}}+{\mu }_{x,{\rm{start}}})-I({\mu }_{x,{\rm{start}}}^{2}+{\mu }_{x,{\rm{end}}}^{2}+{\mu }_{x,{\rm{start}}}{\mu }_{x,{\rm{end}}})$$
(13)

We define a new term S as

$$S=m+2b{\mu }_{x,{\rm{start}}}+3I{\mu }_{x,{\rm{start}}}^{2}$$
(14)

The vector $$\overrightarrow{B}$$ can then be redefined as

$$\begin{array}{ccc}\vec{B} & = & [\begin{array}{c}\frac{1}{\sqrt{1+{S}^{2}}}\\ \frac{S}{\sqrt{1+{S}^{2}}}\end{array}]\end{array}$$
(15)

The derivative with respect to ds can then be written as before

$${D}_{i,ds}=\frac{\partial }{\partial ds}F={\sum }_{j}\frac{2j}{{\sigma }^{2}}(({\overrightarrow{i}}_{s}-{\overrightarrow{\mu }}_{s,j})\cdot \overrightarrow{B})\,{G}_{j,i}$$
(16)

#### Derivative with Respect to Curvature (b)

We define a term H as

$$H=-\,Sds(\frac{2{\mu }_{x}-({\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}})}{{(1+{S}^{2})}^{3/2}})$$
(17)

Defining a vector $$\overrightarrow{J}$$ as

$$\begin{array}{ccc}\vec{J} & = & [\begin{array}{c}H\\ SH+(2{\mu }_{x}-({\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}}))\times \frac{ds}{\sqrt{1+{m}^{2}}}\end{array}]\end{array}$$
(18)

The derivative with respect to b can then be written as before

$${D}_{i,b}=\frac{\partial }{\partial b}F={\sum }_{j}\frac{2j}{{\sigma }^{2}}(({\overrightarrow{i}}_{s}-{\overrightarrow{\mu }}_{s,j})\cdot \overrightarrow{J}){G}_{j,i}$$
(19)

#### Derivative with Respect to Inflection (IF)

We define a term K as

$$K=-\,Sds(\frac{3{\mu }_{x}^{2}-({\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}^{2}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}}^{2}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}}{\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}})}{{(1+{S}^{2})}^{3/2}})$$
(20)

Defining a vector $$\overrightarrow{L}$$ as

$$\begin{array}{ccc}\vec{L} & = & [\begin{array}{c}K\\ SK+(3{\mu }_{x}^{2}-({\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}^{2}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}}^{2}+{\mu }_{x,{\rm{e}}{\rm{n}}{\rm{d}}}{\mu }_{x,{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}}))\times \frac{ds}{\sqrt{1+{m}^{2}}}\end{array}]\end{array}$$
(21)

The derivative with respect to IF can then be written as before

$${D}_{i,IF}={\sum }_{j}\frac{2j}{{\sigma }^{2}}(({\overrightarrow{i}}_{s}-{\overrightarrow{\mu }}_{s,j})\cdot \overrightarrow{L}){G}_{j,i}$$
(22)

### Line Parameters from MSER Ellipses

For the seed image the line parameters need to be determined. The line parameters are the slope and the intercept of the line, for a two dimensional ellipse, the covariance matrix can be represented as

$$\begin{array}{ccc}M & = & [\begin{array}{cc}p & q\\ q & r\end{array}]\end{array}$$

Here $$p={\sigma }_{x}^{2}$$, $$r={\sigma }_{y}^{2}$$, q = ρxy. Defining a parameter dr as $$dr=\sqrt{{p}^{2}+4{q}^{2}-2pr+{r}^{2}}$$. The eigenvalues of the 2 × 2 matrix are given by

$$\lambda =\frac{p+r\pm dr}{2}$$
(23)

The eigenvector is given by

$$\vec{\upsilon }=[\begin{array}{c}2q\\ r-p\pm dr\end{array}]$$
(24)

Any point (x, y) along the vector can be represented as

$$(x,y)=({x}_{c},{y}_{c})+t(2q,r-p+dr)$$
(25)

Eliminating t from the above vector equation gives us the line parameters (slope = m, intercept = c) of the major axis of the ellipse as

$$m=\frac{r-p+dr}{2q},\,c={y}_{c}-{x}_{c}\frac{r-p+dr}{2q}$$
(26)

In order to obtain the optimized set of parameters, we use the Levenberg-Marquradt solver to minimize the sum of squared differences in Eq. 1. The χ squared function can be written as

$${\chi }^{2}={\sum }_{{\rm{p}}{\rm{i}}{\rm{x}}{\rm{e}}{\rm{l}}{\rm{s}}}{[{I}_{i}-{F}_{i}(\vec{\theta })]}^{2}={\sum }_{{\rm{p}}{\rm{i}}{\rm{x}}{\rm{e}}{\rm{l}}{\rm{s}}}{f}_{i}{(\vec{\theta })}^{2}$$
(27)

To do so, we perform Taylor expansion on the χ2 function as

$${\chi }^{2}(\overrightarrow{\theta }+\overrightarrow{\delta })={\chi }^{2}(\overrightarrow{\theta })+{\overrightarrow{\delta }}^{T}g+\frac{1}{2}{\overrightarrow{\delta }}^{T}H\overrightarrow{\delta }$$
(28)

δ is given by

$$\overrightarrow{\delta }=-\,{(H+{\lambda }^{-1}I)}^{-1}g,$$
(29)

and the matrix H is given by

$$H=\sum 2\nabla {f}_{i}(\overrightarrow{\theta }){\nabla }^{T}{f}_{i}(\overrightarrow{\theta })+2{f}_{i}(\theta )\nabla {\nabla }^{T}{f}_{i}(\overrightarrow{\theta })$$
(30)

As the matrix H is sparse, the second term containing the 2nd order derivative is ignored and only the first term is kept. We minimize the χ squared function with respect to delta and if the solution is going towards minima the λ parameter is decreased by a factor of 10, else increased by the same factor.

After obtaining the optimized set of parameters from the Levenberg-Marquradt solver, we refine the obtained result by doing a weighted sum of Gaussian mask fits31 to further improve the accuracy of the detection. For this step we construct the mask for the start and end positions as

$$\begin{array}{ccc}{W}_{{\rm{e}}{\rm{n}}{\rm{d}}} & = & \exp [-\frac{{(\vec{x}-{\vec{x}}_{c})}^{2}}{2{\vec{\sigma }}^{2}}]+\exp [-\frac{{(\vec{x}+\vec{d}s-{\vec{x}}_{c})}^{2}}{2{\vec{\sigma }}^{2}}]\\ {W}_{{\rm{s}}{\rm{t}}{\rm{a}}{\rm{r}}{\rm{t}}} & = & \exp [-\frac{{(\vec{x}-{\vec{x}}_{c})}^{2}}{2{\vec{\sigma }}^{2}}]+\exp [-\frac{{(\vec{x}-\vec{d}s-{\vec{x}}_{c})}^{2}}{2{\vec{\sigma }}^{2}}]\end{array}$$
(31)

This is an iterative process of finding the location of the mask constructed by sum of two Gaussians and at the end of the iteration we obtain a sub-pixel accurate localization of the end points of the microtubule. The process is repeated for each frame and for all the detected microtubules.

### One-to-one Mapping of Microtubules to MSER Regions

For seeds as well as (non-colliding) dynamic microtubules, there is a one-to-one mapping of the detected microtubules with the MSER-segmented regions. In order to make an initial guess for the start and the end position, we use the slope of the line determined for the seeds and determine the intersection point of the line with the MSER-segmented region as the initial guess for the start and the end position of the dynamic microtubule.

For the dynamic channel, we draw a line from the start and end position of the previous frame and determine the intersection point of the drawn line with the MSER segmented region. Along that line we look for the intensity points which are at least greater than 50% of the maximum intensity value in that region. The guess for the polynomial function, which the microtubule growth follows is taken from the polynomial function determined in the previous frame. For the first frame in the dynamic channel the line parameters are used from the seed image frame and the polynomial parameters are assumed to be 0 and then determined via the optimizer.

### Handling Colliding Microtubules

Each microtubule evolves according to a polynomial function, whose parameters are determined in each frame using the function parameters of its evolution in the previous frame. Including prior knowledge helps making good initial guesses for the localization to proceed in the current frame. As the dynamic function of evolution of each microtubule is smooth and unique, the optimizer is unlikely to make mistakes and if it does the program can recognize that by noting sharp changes in the polynomial function parameters of growth of a given microtubule. Two special cases are discussed with respect to colliding microtubules.

#### Single MSER Region for Multiple Colliding Microtubules

In a scenario where a single segmented region contains multiple microtubules, the optimizer relies on the polynomial parameters for the microtubule determined in the previous frame and is able to correctly determine the growing end points. MTrack keeps track of the angular change in the direction of the dynamic microtubules and determines a mistake if the angular change is greater than a user defined value, which by default is 20 degrees.

#### Multiple MSER Regions for a Single Microtubule

When microtubules are close or collide, it may happen that a single microtubule finds itself in multiple MSER segmented regions. In such a case, the optimizer will fit in all regions to determine the growing end point location and will choose the point closest to the last known location of the microtubule.

### Simulations

Microtubules are simulated using linear models and 3rd order polynomials, where the parameters of each function are determined by a random number generator. Images are created by convolution with the PSF, adding a background, and rendering the final pixel intensities using a Poisson process. The simulation code is available on Github https://github.com/PreibischLab/MTrack/tree/master/src/main/java/dummyMT.

### Documentation and Installation

Detailed documentation and installation instructions are available on the ImageJ wiki http://imagej.net/MicrotubuleTracker.

## Data Availability

The code is open-source, mostly implemented in ImgLib249 and is provided as Fiji28 plugin. The iterative RANSAC for functions is based on the mpicbg package written by Stephan Saalfeld50. The source code is available on GitHub https://github.com/PreibischLab/MTrack. It is released under GPLv3. An example dataset is available for download on the ImageJ wiki including the MTrack parameters to successfully run and analyze the demo movie: http://imagej.net/MicrotubuleTracker#Example The expected runtime is 10–20 min on standard hardware.

## References

1. 1.

Mitchison, T. Localization of an exchangeable gtp binding site at the plus end of microtubules. Science 261(5124), 1044–1047 (1993).

2. 2.

Mitchison, T. Dynamic instability of microtubule growth. Nature 312(5124), 237–242 (1984).

3. 3.

Brouhard, G. J. & Rice, L. M. Microtubule dynamics: an interplay of biochemistry and mechanics, Nature Reviews Molecular Cell Biology, 1 (2018).

4. 4.

Vleugel, M., Kok, M. & Dogterom, M. Understanding force-generating microtubule systems through in vitro reconstitution. Cell adhesion & migration 10(5), 475–494 (2016).

5. 5.

Bowne-Anderson, H., Hibbel, A. & Howard, J. Regulation of microtubule growth and catastrophe: unifying theory and experiment. Trends in cell biology 25(12), 769–779 (2015).

6. 6.

Reber, S. & Hyman, A. A. Emergent properties of the metaphase spindle. Cold Spring Harbor perspectives in biology 7(7), a015784 (2015).

7. 7.

Duellberg, C. et al. Reconstitution of a hierarchical+ tip interaction network controlling microtubule end tracking of dynein. Nature cell biology 16(8), 804 (2014).

8. 8.

Roostalu, J., Cade, N. I. & Surrey, T. Complementary activities of tpx2 and chtog constitute an efficient importin-regulated microtubule nucleation module. Nature cell biology 17(11), 1422 (2015).

9. 9.

Shimamoto, Y., Forth, S. & Kapoor, T. M. Measuring pushing and braking forces generated by ensembles of kinesin-5 crosslinking two microtubules. Developmental cell 34(6), 669–681 (2015).

10. 10.

Hendershott, M. C. & Vale, R. D. Regulation of microtubule minus-end dynamics by camsaps and patronin. Proceedings of the National Academy of Sciences 111(16), 5860–5865 (2014).

11. 11.

Maurer, S. P., Fourniol, F. J., Bohner, G., Moores, C. A. & Surrey, T. Ebs recognize a nucleotide-dependent structural cap at growing microtubule ends. Cell 149(2), 371–382 (2012).

12. 12.

Brouhard, G. J. et al. Xmap215 is a processive microtubule polymerase. Cell 132(1), 79–88 (2008).

13. 13.

Gardner, M. K., Zanic, M., Gell, C., Bormuth, V. & Howard, J. Depolymerizing kinesins kip3 and mcak shape cellular microtubule architecture by differential control of catastrophe. Cell 147(5), 1092–1103 (2011).

14. 14.

Telley, I. A., Bieling, P. & Surrey, T. Reconstitution and quantification of dynamic microtubule end tracking in vitro using tirf microscopy, In Microtubule Dynamics, 127–145, Springer (2011).

15. 15.

Bieling, P., Telley, I. A. & Surrey, T. A minimal midzone protein module controls formation and length of antiparallel microtubule overlaps. Cell 142(3), 420–432 (2010).

16. 16.

Gell, C. et al. Microtubule dynamics reconstituted in vitro and imaged by single-molecule fluorescence microscopy, In Methods in cell biology, 95, 221–245, Elsevier (2010).

17. 17.

Widlund, P. O. et al. Xmap215 polymerase activity is built by combining multiple tubulin-binding tog domains and a basic lattice-binding region. Proceedings of the National Academy of Sciences 108(7), 2741–2746 (2011).

18. 18.

Jordan, M. A. & Wilson, L. Microtubules as a target for anticancer drugs. Nature Reviews Cancer 4(4), 253 (2004).

19. 19.

Kappes, B. & Rohrbach, P. Microtubule inhibitors as a potential treatment for malaria. Future Microbiology 4, 409–23 (2007).

20. 20.

Dogterom, M. & Surrey, T. Microtubule organization in vitro. Current opinion in cell biology 25(1), 23–29 (2013).

21. 21.

Zanic, M. Measuring the effects of microtubule-associated proteins on microtubule dynamics in vitro, The Mitotic Spindle: Methods and Protocols, 47–61 (2016).

22. 22.

Xiao, X., Geyer, V. F., Bowne-Anderson, H., Howard, J. & Sbalzarini, I. F. Automatic optimal filament segmentation with sub-pixel accuracy using generalized linear models and b-spline level-sets. Medical image analysis 32, 157–172 (2016).

23. 23.

Bohner, G. et al. Important factors determining the nanoscale tracking precision of dynamic microtubule ends. Journal of microscopy 261(1), 67–78 (2016).

24. 24.

Maurer, S. P. et al. Eb1 accelerates two conformational transitions important for microtubule maturation and dynamics. Current Biology 24(4), 372–384 (2014).

25. 25.

Prahl, L. S., Castle, B. T., Gardner, M. K. & Odde, D. J. Quantitative analysis of microtubule self-assembly kinetics and tip structure, In [Methods in enzymology], 540, 35–52, Elsevier (2014).

26. 26.

Demchouk, A. O., Gardner, M. K. & Odde, D. J. Microtubule tip tracking and tip structures at the nanometer scale using digital fluorescence microscopy. Cellular and molecular bioengineering 4(2), 192–204 (2011).

27. 27.

Ruhnow, F., Zwicker, D. & Diez, S. Tracking single particles and elongated filaments with nanometer precision. Biophysical journal 100(11), 2820–2828 (2011).

28. 28.

Schindelin, J. et al. Fiji: an open-source platform for biological-image analysis. Nature methods 9(7), 676 (2012).

29. 29.

Matas, J., Chum, O., Urban, M. & Pajdla, T. Robust wide-baseline stereo from maximally stable extremal regions. Image and vision computing 22(10), 761–767 (2004).

30. 30.

Nistér, D. & Stewénius, H. Linear time maximally stable extremal regions, In European Conference on Computer Vision, 183–196, Springer (2008).

31. 31.

Thompson, R. E., Larson, D. R. & Webb, W. W. Precise nanometer localization analysis for individual fluorescent probes. Biophysical journal 82(5), 2775–2783 (2002).

32. 32.

Walker, R. et al. Dynamic instability of individual microtubules analyzed by video light microscopy: rate constants and transition frequencies. The Journal of cell biology 107(4), 1437–1448 (1988).

33. 33.

Wieczorek, M., Chaaban, S. & Brouhard, G. J. Macromolecular crowding pushes catalyzed microtubule growth to near the theoretical limit. Cellular and Molecular Bioengineering 6(4), 383–392 (2013).

34. 34.

Sinkó, J. et al. Teststorm: Simulator for optimizing sample labeling and image acquisition in localization based super-resolution microscopy. Biomedical optics express 5(3), 778–787 (2014).

35. 35.

Fischler, M. A. & Bolles, R. C. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography, In Readings in computer vision 726–740 (Elsevier, 1987).

36. 36.

Verde, F., Dogterom, M., Stelzer, E., Karsenti, E. & Leibler, S. Control of microtubule dynamics and length by cyclin a-and cyclin b-dependent kinases in xenopus egg extracts. The Journal of cell biology 118(5), 1097–1108 (1992).

37. 37.

Hemmat, M., Castle, B. T. & Odde, D. J. Microtubule dynamics: moving toward a multi-scale approach. Current opinion in cell biology 50, 8–13 (2018).

38. 38.

Vemu, A., Atherton, J., Spector, J. O., Moores, C. A. & Roll-Mecak, A. Tubulin isoform composition tunes microtubule dynamics. Molecular biology of the cell 28(25), 3564–3572 (2017).

39. 39.

Ti, S.-C. et al. Mutations in human tubulin proximal to the kinesin-binding site alter dynamic instability at microtubule plus-and minus-ends. Developmental cell 37(1), 72–84 (2016).

40. 40.

Ruhnow, F., Kloβ, L. & Diez, S. Challenges in estimating the motility parameters of single processive motor proteins. Biophysical journal 113(11), 2433–2443 (2017).

41. 41.

Applegate, K. T. et al. Plustiptracker: quantitative image analysis software for the measurement of microtubule dynamics. Journal of structural biology 176(2), 168–184 (2011).

42. 42.

Matov, A. et al. Analysis of microtubule dynamic instability using a plus-end growth marker. Nature methods 7(9), 761 (2010).

43. 43.

Bieling, P. et al. Reconstitution of a microtubule plus-end tracking system in vitro. Nature 450(7172), 1100 (2007).

44. 44.

Widlund, P. O. et al. One-step purification of assembly-competent tubulin from diverse eukaryotic sources. Molecular biology of the cell, 23(22), 4393–4401, https://doi.org/10.1091/mbc.e12-06-0444 (2012).

45. 45.

Nguyen, P. A., Field, C. M., Groen, A. C., Mitchison, T. J. & Loose, M. Using supported bilayers to study the spatiotemporal organization of membrane-bound proteins, In Methods in cell biology, 128, 223–241, Elsevier (2015).

46. 46.

Janson, M. E. & Dogterom, M. A bending mode analysis for growing microtubules: evidence for a velocity-dependent rigidity. Biophysical journal 87(4), 2723–2736 (2004).

47. 47.

Levenberg, K. A method for the solution of certain non-linear problems in least squares. Quarterly of applied mathematics 2(2), 164–168 (1944).

48. 48.

Marquardt, D. W. An algorithm for least-squares estimation of nonlinear parameters. Journal of the society for Industrial and Applied Mathematics 11(2), 431–441 (1963).

49. 49.

Pietzsch, T., Preibisch, S., Tomančák, P. & Saalfeld, S. Imglib2generic image processing in java. Bioinformatics 28(22), 3009–3011 (2012).

50. 50.

Saalfeld, S. & Tomancák, P. Automatic landmark correspondence detection for imagej, In Proceedings of the ImageJ User and Developer Conference, 128–133 (2008).

## Acknowledgements

We thank Tobias Pietzsch (Tomancak lab, MPI-CBG, Dresden) for implementing MSER in ImgLib2, Curtis Rueden (LOCI, UW Madison) for Fiji maintenance and support, Hadrien Mary (Brouhard lab, McGill University, Montreal) and Mohammed Mahamdeh (Howard lab, Yale University) for constructive criticism and comments on the manuscript. We thank the AMBIO imaging facility (Charité, Berlin), where the experimental data were acquired. We thank all former and current members of the Preibisch and Reber labs for discussion and helpful advice, and Helena Jambor for constructive comments on figure design. V.K. thanks David Hörl (LMU München/MDC Berlin) for stimulating discussions. V.K. was supported by the IRI Life Sciences postdoc fellowship in the labs of S.R. and S.P. C.H. and S.R. acknowledge funding by the IRI Life Sciences (Humboldt-Universität zu Berlin, Excellence Initiative/DFG). W.H. was supported by the Alliance Berlin Canberra “Crossing Boundaries: Molecular Interactions in Malaria”, which is co-funded by a grant from the Deutsche Forschungsgemeinschaft (DFG) for the International Research Training Group (IRTG) 2290 and the Australian National University. S.P. was supported by the MDC Berlin.

## Author information

Authors

### Contributions

S.P. and S.R. conceived the project. V.K. implemented the tracking, the GUI and developed the derivations. S.P. implemented the RANSAC function framework. W.H. and C.H. provided the experimental data and guided software optimizations. S.P. and S.R. supervised the project. S.P. and S.R. wrote the paper with input from V.K.

### Corresponding authors

Correspondence to Stephan Preibisch or Simone Reber.

## Ethics declarations

### Competing Interests

The authors declare no competing interests.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Kapoor, V., Hirst, W.G., Hentschel, C. et al. MTrack: Automated Detection, Tracking, and Analysis of Dynamic Microtubules. Sci Rep 9, 3794 (2019). https://doi.org/10.1038/s41598-018-37767-1

• Accepted:

• Published:

• ### Complementary Superresolution Visualization of Composite Plant Microtubule Organization and Dynamics

• Tereza Vavrdová
• , Pavel Křenek
• , Miroslav Ovečka
• , Olga Šamajová
• , Pavlína Floková
• , Petra Illešová
• , Renáta Šnaurová
• , Jozef Šamaj
•  & George Komis

Frontiers in Plant Science (2020)

• ### Prior-Apprised Unsupervised Learning of Subpixel Curvilinear Features in Low Signal/Noise Images

• Shuhui Yin
• , Ming Tien
•  & Haw Yang

Biophysical Journal (2020)

• ### Active particle feedback control with a single-shot detection convolutional neural network

• Martin Fränzl
•  & Frank Cichos

Scientific Reports (2020)

• ### CytoSeg 2.0: automated extraction of actin filaments

• Jacqueline Nowak
• , Kristin Gennermann
• , Zoran Nikoloski
•  & Jonathan Wren

Bioinformatics (2020)