{'fraction_non_alphanumeric': 0.03802369257440046, 'fraction_numerical': 0.016613695463738806, 'mean_word_length': 4.987026466009341, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, 'https://': 3, 'lorem ipsum': 0, 'www.': 7, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A coordinate-based co-localization index to quantify and visualize spatial associations in single-molecule localization microscopy

Visualizing the subcellular distribution of proteins and determining whether specific proteins co-localize is one of the main strategies in determining the organization and potential interactions of protein complexes in biological samples. The development of super-resolution microscopy techniques such as single-molecule localization microscopy (SMLM) has tremendously increased the ability to resolve protein distribution at nanometer resolution. As super-resolution imaging techniques are becoming instrumental in revealing novel biological insights, new quantitative approaches that exploit the unique nature of SMLM datasets are required. Here, we present a new, local density-based algorithm to quantify co-localization in dual-color SMLM datasets. We show that this method is broadly applicable and only requires molecular coordinates and their localization precision as inputs. Using simulated point patterns, we show that this method robustly measures the co-localization in dual-color SMLM datasets, independent of localization density, but with high sensitivity towards local enrichments. We further validated our method using SMLM imaging of the microtubule network in epithelial cells and used it to study the spatial association between proteins at neuronal synapses. Together, we present a simple and easy-to-use, but powerful method to analyze the spatial association of molecules in dual-color SMLM datasets.

The precise spatial organization of protein complexes within subcellular domains underlies fundamental cellular processes such as migration, cell division and intercellular communication. A central goal in cell biology is therefore to define the mechanisms that control protein distribution and their assembly into functional multi-protein complexes. Fluorescence microscopy evolved to be a powerful and popular strategy to investigate whether specific proteins co-localize and assemble in macromolecular complexes in cells. The development of super-resolution microscopy techniques has tremendously increased the ability to resolve protein distribution at unprecedented resolution 1,2 . In particular, single-molecule localization microscopy (SMLM) techniques such as photoactivated localization microscopy (PALM) 3,4 , (direct) stochastic optical reconstruction microscopy ((d)STORM) 5,6 , point accumulation for imaging in nanoscale topography (PAINT) 7 and MINFLUX 8 achieve a spatial resolution down to only a few tens of nanometers. At this scale, protein organization within subcellular compartments and organelles can be effectively investigated and SMLM has been instrumental in numerous recent discoveries in cell biology 9 .
In SMLM, individual fluorophores are stochastically activated so that during image acquisition, sequential frames contain only a small subset of isolated emission events 10,11 . These events are collected over many thousands over frames and can then be localized using computational fitting routines that determine the position of single molecules with nanometer precision. These localizations are then used to reconstruct a super-resolved image with a ~ 10X improved spatial resolution (< 30 nm) compared to conventional, diffraction-limited images. Thus, SMLM images are principally built from a list of molecular coordinates, providing unique opportunities to quantitatively analyze the spatial distribution of molecules in cells and extract new meaningful biological insights 12,13 . As super-resolution imaging techniques continue to undergo significant technical improvements at a rapid pace, there is an increasing demand for quantitative approaches that exploit the unique nature of SMLM datasets.

Results
A local density-based co-localization index to quantify spatial association of molecules in dual-color SMLM. In dual-color SMLM experiments, the density of localizations can vary significantly across the field of view and between the two channels. This depends on the local abundance of the labeled proteins, labeling strategy, and data processing and filtering steps. To normalize for these variations, in the first step we calculate the local density (LD) value for each localization in a given dataset by counting the number of localizations within a distance d. The distance d thus determines the sensitivity of the LD-value and could be linked to the mean nearest neighbor distance (MNND) 31,33 . However, while theoretically a smaller d would be beneficial for the detection of sub-micron differences in localization density, the effective resolution obtained with SMLM data is limited by a combination of both the MNND and the localization error (ε) 34,35 . Therefore, the localization error and MNND are determined by taking the average value over all localizations. Together, we use the effective resolution as a single value calculated for the complete dataset as d.
In this way, the LD-value assigned to each localization represents the density around this localization in a manner that normalizes across variations in density within the full dataset, thus representing the effective resolution.
Then, to determine the coordinate-based co-localization between two channels, we took a similar strategy as for calculating the LD-value. To calculate the co-localization index CI, for each localization in channel A the number of localizations in channel B are counted within the distance set by the effective resolution in channel B (Fig. 1a). This number is then divided by the mean LD-value of the localizations in channel B. Thus, the colocalization index CI for the ith localization in channel A is computed as: Ai is the number of localizations in channel B within the distance d around the ith localization in channel A. Conversely, for each localization in channel B the CI is calculated as: Thus, the co-localization index of any given localization is a measure of the local density of nearby molecules in the other channel (Fig. 1a). If the local density of Ai in channel B is the same as the average local density in channel B, CI A i will be equal to 1. To demonstrate this approach, we used simulated dual-color SMLM datasets of randomly distributed localizations with varying degrees of overlap between the channels (ranging from 0 to 100% overlap; Fig. 1b). Since the co-localization index is determined for each localization individually, co-localization can be visualized as a www.nature.com/scientificreports/ scatter plot color-coded for the co-localization index. These 'co-localization maps' visualize the spatial distribution of co-localization between the channels (Fig. 1c). Averaging the co-localization index of these localizations for 100 simulated ROIs showed that, the local density-based co-localization index scales linearly between 0 and 1 for homogenously distributed point patterns, where 0 indicates no co-localization and 1 indicates complete co-localization (co-localization index channel A, 0% overlap: 0.0067 ± 0.0002, 25% overlap: 0.25 ± 0.001, 50% overlap: 0.51 ± 0.002, 75% overlap: 0.76 ± 0.002, 100% overlap: 1.00 ± 0.001, P < 0.001, ANOVA, n = 100 point patterns/condition; Fig. 1c). In addition, we performed similar simulations, using sets of multiple overlapping and non-overlapping clusters (Fig. S1a-c) and challenged the method with simulations in which the localizations in channel A are surrounding, but not overlapping localizations in channel B, in a relative confined area (Fig. S2). Next, we aimed to investigate the effect of variations that usually occur in an experimental setting. First, to investigate the effect of variations in the effective resolution on the observed co-localization, we considered www.nature.com/scientificreports/ the 50% overlap condition in (Fig. 1b) and varied the localization densities (which influences the MNND) ( Fig. 1d) or localization error (Fig. 1e). Importantly, the co-localization index remained close to the ground truth across a wide range of localization densities and localization errors (Fig. 1d,e). The co-localization was only slightly overestimated when the localization error was too high (> 50 nm) or the localization density was too low (< 1000 µm -2 ), i.e., conditions that are generally considered to be insufficient to reconstruct valuable SMLM images. To illustrate this further, we additionally used simulated sets of multiple clusters containing of which half of them have overlap with the second channel and decreased the density of localizations in the second channel ( Fig. S1d-f). As expected, co-localization is robustly measured over a large range of densities. Second, we tested the influence of differences in localization blinking kinetics as organic dyes can undergo multiple on-off switching cycles. To test this, we simulated a spatial pattern without blinking (channel A) and measured overlap with a channel with increasing blinking (channel B) but keeping the total number of localizations between the channels the same (Fig. 1f). With increased blinking, small artificial clusters occurred in channel B, lowering the measured co-localization between the channels, as the spatial distribution of the localizations starts to differ (Fig. 1g). This effect is limited in cases where the labeling density, and thus the number of dyes in the sample, is the same between the channels. As such, more blinking results in more localizations, thereby only marginally affecting the spatial distribution, and thus not influencing the co-localization between the channels (Fig. 1h).
Lastly, we tested the effect of background localizations on the outcome of the co-localization. As all localizations were included in the analysis, increasing the background influenced co-localization outcome (Fig. S1g--i). Thus, depending on the biological question, background should be taken into account during pre-processing steps prior to co-localization analysis.
In summary, our approach provides a robust method to determine the spatial co-localization between localizations in dual-color SMLM experiments. It provides a measure for the similarity in spatial distribution, independent from density and reflecting the effective resolution. The algorithm is available as a MATLAB function that requires the x-y coordinates of the localizations in the two channels and their localization error as the only inputs (MATLAB Code S1, Method section, and Supplementary test data sets).
Detection of spatial association within highly crowded regions. In biological samples, proteins are usually not homogenously distributed, but are often concentrated in spatially organized subcellular compartments that contain local variations in enrichments, or nanoscale subdomains [36][37][38] . Within SMLM datasets, this results in substantial variations in local densities across the analyzed image. We reasoned that our approach would be resistant to this and could reveal local, spatially defined regions of co-localization between two channels even within highly crowded molecular structures. Using simulated point distributions, we tested the influence of differences in local density between channels and the effect of local enrichments on the outcome of the co-localization index in three ways.
First, we simulated circular clusters with randomly distributed localizations in two channels and varied the local enrichment of localizations in channel A with increasing local density towards the center of the cluster (Fig. 2a). Since the overall distribution in channel B remained similar, the measured co-localization index for channel A remained constant at values around 1 (Fig. 2a,b). In contrast, the co-localization index values of channel B decreased with increasing local densities in channel A (Fig. 2b), as an increasing fraction of localizations in channel B is associated with a relatively lower local density in channel A. Note that the co-localization maps also directly visualize the spatial distribution of co-localization, with lower co-localization index values for channel B at the edges of the cluster where molecules in channel A are less concentrated.
Second, we simulated a scenario where two proteins co-cluster within a structure. To do so, we simulated ROIs in which the localizations in channel B are now also increasingly concentrated, overlapping with the area of high local density in channel A (Fig. 2c). As expected, in this situation the co-localization index values of channel A decrease, as a decreasing fraction of localizations overlap with the localizations in channel B (Fig. 2c,d). For channel B however, the average co-localization index reached values above 1 because these localizations associated with significantly higher (~ 2 ×) local densities in channel A compared to the mean local density of channel A (Fig. 2d). Thus, co-localization values > 1 indicate that the localizations of channel B are enriched towards a local enrichment in channel A. This shows that the co-localization index reliably reports and visualizes co-clustering of localizations that are spatially confined in small structures or domains.
Third, we evaluated the behavior of the co-localization index in simulations of two overlapping clusters, but with non-overlapping local enrichments (Fig. 2e). As expected, the closer these local enrichments were positioned towards each other, the closer the average co-localization index approached a value of 1 (Fig. 2f). Note that the average co-localization index is close to 1 when two random distributions overlap (Fig. 2a, first example), but also when local enrichments within clusters completely overlap (Fig. 2e, last example) as in both cases the localizations in the two channels have the same distribution. Thus, co-localization as measured here reports the similarity in spatial distribution. Nevertheless, the spatial distribution of the co-localization values of the individual localizations visualized in the co-localization maps revealed clear differences in the extent and position of co-localization between the two conditions. As mentioned earlier, the degree by which co-localization can be detected between two objects (or two objects can be considered non-overlapping), is dependent on the effective resolution of the data 34,35 . To test this further, we repeated the simulations of Fig. 2e, varying the localization error (Fig. S3). As expected, higher effective resolution, i.e., lower localization error, allows for higher sensitivity towards detecting partially overlapping structures.
Together, these simulations demonstrate that our method provides a robust analysis of spatial co-localization between two sets of localizations that is intuitive to interpret and provides a visual output of local co-localization. www.nature.com/scientificreports/ Our method thus measures co-localization, as a measure of similarity in spatial distributions, independent of density and even revealing co-clustering of proteins within densely crowded structures.
Detecting co-localization in biological samples. Next, we wished to validate the co-localization index on experimental data from well-characterized cellular structures. We therefore labeled the microtubule network in U2OS cells using immunostaining for alpha-tubulin and acquired SMLM images using dSTORM (Fig. 3a).
Localizations with a localization precision < 25 nm (Fig. 3b) were selected for rendering a super-resolution image. Then, to approach perfect co-localization, we randomly divided all localizations into two channels (1:1) and determined the co-localization across multiple ROIs. As expected, the individual channels revealed close co-localization between the two channels ( Fig. 3c), resulting in average co-localization values very close to 1 (colocalization index: 1.00 ± 0.003 for channel A and 1.00 ± 0.004 for channel B, n = 18 ROIs from 3 cells; Fig. 3c,d).
To test the sensitivity of the co-localization index, we tested conditions in which the localizations of channel B were laterally shifted or rotated relative to channel A.  Fig. 3e,f). Note that the residual co-localization is mostly the result of remaining microtubule cross-points (Fig. 3e), indicating the sensitivity of this approach and the usefulness of visualizing the co-localization maps. Next, we randomly split the same dataset with varying relative molecular densities (1:9 and 1:99) between the channels. As expected from the simulations in Fig. 1 and S1, changing the localization density did not www.nature.com/scientificreports/ significantly alter the outcome of the co-localization analysis (density ratio 1:9, 1.00 ± 0.004 for channel A and 0.99 ± 0.005 for channel B, density ratio 1:99, 0.99 ± 0.01 for channel A and 1.03 ± 0.01 for channel B, P > 0.05, ANOVA; Fig. 3g,h). We next used these datasets to compare our method to two existing co-localization methods (Fig. S4). First, we compared our method with ClusDoC 32 . ClusDoc uses an optimized cutoff of 0.4 on the -1 (anti-correlated) to + 1 (perfectly correlated distributions) scale developed earlier by Malkusch et al 28 , to obtain a value for the www.nature.com/scientificreports/ percentage of co-localizing localizations. Our approach (Fig. S4a) outperformed ClusDoC, as the latter showed a higher sensitivity to differences in density between the two channels (Fig. S4b). Second, we tested Coloc-Tesseler, which uses Voronoi diagrams with Manders' and Spearman correlations as readouts 29 . Similar to our approach, the Manders' correlation readout of Coloc-Tesseler correctly measured the co-localization in two overlapping channels with similar distribution and densities, although slightly underestimating co-localization when the density in one of the channels becomes lower (Fig. S4c). In contrast, we found the Spearman correlation to consistently underestimate co-localization, similar as shown earlier 29 , and more sensitive to changes in density between the channels (Fig. S4d).
Together, these results demonstrate that the local density-based co-localization index presented here is a simple, yet very powerful tool in detecting and visualizing the degree of spatial co-localization in biological samples.
Detecting co-localization in dual-color SMLM images of neuronal synapses. As a final test case of our method, we turned to neuronal synapses. At synapses, a plethora of protein species are closely packed, both at the presynaptic active zone that is closely aligned with postsynaptic proteins, with only several nanometers between them. The subsynaptic clustering and relative positioning of synaptic proteins is critically important for synaptic transmission 31,33,39,40 .
We reasoned that our co-localization index might be very well-suited for measuring the degree of spatial association between proteins in these dense structures. To this end, we performed dual-color dSTORM on cultured hippocampal neurons co-labeled for the postsynaptic protein Homer1c and the presynaptic protein Bassoon. We first labeled the postsynaptic protein Homer1c with both CF568-and Alexa647-(A647) coupled secondary antibodies (Fig. 4a). As expected, the labeling in the two channels overlapped almost completely and we found a high degree of co-localization between the two channels, also apparent from the co-localization maps of individual synapses (Fig. 4b,c). Next, we analyzed the co-localization index between Homer1c and Bassoon localizations (Fig. 4d,e). As expected, the co-localization between these proteins was significantly lower, and varied largely between individual ROIs, indicative for only partial overlap (co-localization index CF568 > Alexa647: 1.03 ± 0.04 for Homer1c > Homer1c and 0.42 ± 0.03 for Homer1c > Bassoon, n = 6 neurons, P < 0.001, Student t test; Fig. 4g), (co-localization index Alexa647 > CF568: 0.72 ± 0.023 for Homer1c > Homer1c and 0.44 ± 0.04 for Homer1c > Bassoon, n = 6 neurons, P < 0.001, Student t test; Fig. 4h). Importantly, the average co-localization values corresponded well with the observed overlap: synapses with non-overlapping Homer1c-Bassoon clusters had a low average co-localization index while synapses with partially overlapping clusters resulted in a higher average co-localization index (example synapses, Fig. 4e). Note that variations in co-localization index most likely result from the relative orientations of presynaptic and postsynaptic structures with respect to the focal plane (Fig. 4f). Despite differences in the biophysical properties of these dyes which are partially reflected by small differences in the observed effective resolution (Fig. 4i,j), our approach robustly reports co-localization at sub-diffraction resolution. Together, these results show that the co-localization index as described here, can be used as a reliable method to quantify the spatial association of molecules in dual-color SMLM data.

Discussion
The development of SMLM approaches has revolutionized cell biology permitting the precise investigation of the nanoscale organization of protein within cells. SMLM images are essentially coordinate-based datasets, providing unique opportunities to quantify the spatial distribution of molecules. Here, we present a method to quantify the spatial association of molecules in dual-color SMLM data. We first benchmarked the method in silico with various simulated point patterns that mimic commonly found distributions in biological samples. We found that our method is resistant to variations in overall localization density and adequately detects spatial co-localization in fields with randomly distributed points, as well as within highly crowded clusters. Importantly, our method takes the localization density and localization error into account, such that the reported co-localization is on the scale relative to the effective resolution 34,35 of the dataset. We noted from simulated as well as experimental data, that the accuracy of the localization index is more sensitive to the localization density than the localization precision. Ideally, the effective resolution is thus limited by the localization precision and not the molecular density. In addition, we tested the effect of blinking kinetics and background localizations on the outcome of co-localization. We furthermore showed that our co-localization method is versatile and can be applied to various types of biological samples, including the microtubule network in epithelial cells, a sample with distinct differences in localization density across the field of view, and neuronal synapses, structures with a highly dense accumulation of heterogeneously distributed proteins.
We also compared our co-localization index with previously described methods, Coloc-Tesseler 23 and ClusDoC 32 . While Coloc-Tesseler performed well when using the Manders' correlation as an output, ClusDoC underestimated co-localization in datasets with varying densities. Of note, the definition of co-localization in ClusDoC (which integrates a co-localization method developed by Malkusch et al. 28 ), is different from the method presented here, as ClusDoC measures co-clustering. Co-localization as measured in our method, provides a measure for the similarity in spatial distributions between the channels, and is thus independent of localization density, and does not rely on (co-)clustering of molecules.
In conclusion, the method presented here provides a versatile approach to quantify co-localization in dualcolor SMLM experiments. The algorithm is available as a MATLAB function, which can be easily incorporated into existing analysis pipelines and could potentially be extended to 3D datasets and triple-or more -channel experiments. Thus, we believe that the co-localization method described here, will serve as a fast and easy-touse approach to measure spatial associations between molecules in multi-color SMLM-datasets and will be instrumental in unveiling the molecular organization in subcellular compartments.

DNA-plasmids. pCMV-Homer1c-GFP 41 .
Calculation of local density and co-localization index. The local density is determined for each localization in both channels. First, for each localization, the NND is determined within a given ROI using the MATLAB function knnsearch, with input (x,y, 'k' ,2), and output [IDX,D], to obtain the distance (D) for the first nearest neighbor that is not itself. The NND for each localization was averaged to obtain the MNND. Next, for each localization, the local density (LD) is defined as the number of localizations within a radius defined by the effective resolution making use of the MATLAB function rangesearch. For each channel, the LD values are averaged together to obtain LD A and LD B . Effective resolution was calculated as 34 , where ε is the localization error, determined as the average of the complete dataset. Thus, for the second channel, the CI values are calculated as: The CI values calculated for each localization individually can be used to plot a co-localization map and averaged to obtain a single mean-CI value of the full ROI for both channels.
We integrated these calculations in a MATLAB function (Code S1) with the input being the x and y coordinates of channel A and B and their localization errors. The function will return a MATLAB structure, with fields containing the average co-localization index for each channel, the calculated effective resolution (d) as well as the CI values for the individual localizations (See Code S1).

Simulations.
To generate random localization clusters in squares, for each x and y coordinate, a value ρ (between 0 and 1) was generated using the MATLAB function rand. x and y were calculated as ρ multiplied by the cluster dimensions (250 × 250 nm). This was repeated for the second channel. Differences in overlap were generated by increasing the x coordinate of the second channel (+ 62.5 nm for every 25% decrease in overlap). For each condition, we simulated 100 clusters.
For circular clusters, randomly distributed x and y coordinates were calculated as x = √ ρ · cos (θ) · d and y = √ ρ * sin (θ) * d , were θ is a random angle (between 0 and 2π) and d is the diameter of the full cluster.
Background localizations were simulated by generating randomly placed coordinates in a square as described above at a density based on the signal/background ratio of the clusters. Background localizations were then removed from the clusters themselves. Clusters with a local enrichment were generated by combining a set randomly distributed localizations with a set localizations distributed as gaussian distribution. For gaussian distributions, values ρ were generated using the MATLAB function randn. x and y were calculated as x = σ ⋅ ρ ⋅ cos(θ) ⋅ d + dc and y = σ ⋅ ρ ⋅ sin(θ) ⋅ d, with σ being the standard deviation (0.33 for the examples in Fig. 2a,c and 0.25 in Figs. 2e and S1), θ and d as described above, and dc being the distance from the center of the cluster (in nm). For the simulations shown in Fig. 2a we combined randomly distributed localizations with localizations in a gaussian distribution in varying ratios (1:0, 3:1, 1:1, 1:3, 0:1). For simulations in Fig. 2e, we used a ratio of 1:1, but changed dc to position the local-enrichment relative to the center of the cluster. For all conditions, we simulated 100 independent point patterns. Localization error was simulated by offsetting the x and y coordinates with random distance, derived from a gaussian distribution (MATLAB function randn), with the sigma being the intended localization error. A localization error of 15 nm was used if not indicated differently. Blinking was simulated by adding additional localizations around existing ones, with offset derived from a Gaussian distribution (MATLAB function randn), with the sigma varied as the localization error.
U2OS cell culture. U2OS cells (ATCC HTB-96) were grown in DMEM (Lonza) supplemented with 10% fetal calf serum (Sigma), 2 mM glutamine and 1% penicillin and streptomycin (pen/strep) (Gibco). One day before fixation and immunostaining, cells were plated on 18-mm coverslips and grown to ~ 50% confluency.  www.nature.com/scientificreports/ Triton-X100, 0.1% [v/v] glutaraldehyde) for 1 min at room temperature (RT). Next, the cells were further fixed using 4% (w/v) paraformaldehyde (PFA) and 4% (w/v) sucrose in phosphate-buffered saline (PBS) (PFA/Suc) for 10 min at RT, washed three times for 5 min with PBS containing 0.1 M glycine (PBS/Gly), and subsequently incubated with 1 mg/ml sodium borohydride in PBS for 7 min at RT. Coverslips were washed 3 times for 5 min with PBS/Gly. Next, the coverslips were incubated in 2% bovine serum albumin (BSA) and 0.1% Triton-X100 in PBS/Gly for 1 h at 37 °C. Next, microtubules were labeled using anti-alfa-tubulin primary antibody, (E18) rat brains of both genders, as described in 42 and in accordance to the approved DEC work-protocol as mentioned in the ethics statements above. Mother rats were sacrificed by gradual fill CO2/O2. Subsequently the uterus containing the pups is taken out and is stored in a sterile ice cold environment. After the pups were sedated by the cold, they were removed from the uterus and decapitated. Dissociated neurons were plated on Ø18-mm coverslips coated with poly-L-lysine (37.5 µg/ml, Sigma-Aldrich) and laminin ( SMLM and filtering of raw localization data. SMLM experiments were performed using the Nanoimager microscope (Oxford Nanoimaging; ONI) equipped with a 100 × oil-immersion objective (Olympus Plan Apo, NA 1.4) and an XYZ closed-loop piezo stage. Imaging was performed using 473-nm, 561-nm and 640-nm lasers for GFP, CF568 and Alexa647 excitation respectively. Fluorescence was detected using a sCMOS camera (ORCA Flash 4, Hamamatsu). Integrated filters were used to split far-red emission onto the right side of the camera and blue-green-red emission spectra on the left side, enabling simultaneous dual-color imaging. The imaging chamber was temperature-controlled at 30 °C to prevent fluctuations in temperature during the time course of an experiment that might affect the alignment of the channels. Channel alignment was performed before each imaging session using 100-nm TetraSpeck beads (T-7279, Invitrogen) and the ONI software aiming for an alignment error of SD < 8 nm as measured from 2000 points total across a maximum of 20 fields of view. Imaging was performed in near-TIRF (angle: 53.5°) using a motorized mirror and all images were acquired at 50 Hz.

Immunolabeling of microtubules in U2OS cells. U2OS cells were incubated in
Coverslips with neurons labeled as described above were mounted on concave slides in dSTORM-buffer (50 mM Tris, 10 mM NaCl, pH 8.0, supplemented with 5-20 mM MEA, 10% [w/v] glucose, 700 μg/ml glucose oxidase, and 40 μg/ml catalase). Transfected neurons were localized using low laser powers. At low laser powers, a snapshot was obtained of all channels, used later for selection of ROIs.
Dual-color dSTORM was performed simultaneously for CF568 and Alexa647. First, a pulse of high laser power of both the 561-nm and 640-nm lasers was used to bring the dyes into the dark state. Next, laser powers were lowered to around 100-200 mW. The acquisition was started when clear individual (non-overlapping) blinking was observed. 405-nm laser power was increased on demand based the number of blinking events. Imaging was continued for 20.000 frames or till no blinking events could be observed.
Localization coordinates were obtained and corrected for XY-drift using the ONI-software (version 1.12, software integrated with ONI microscope). From here onwards, analyses was continued in MATLAB (version 2019b). Localizations with a x-y-precision of > 50 nm were filtered out. Next, tracking with a tracking radius of 60 nm was performed to find localizations that were detected in multiple consecutive imaging frames. For each track, we selected the localization with the smallest localization error and filtered those further using a < 25 nm cutoff, being the final filtered dataset. Rendered reconstructions were made in Detection of Molecules (DoM), downloaded from: https:// github. com/ ekatr ukha/ DoM_ Utrec ht. Localization plots were made in MATLAB. www.nature.com/scientificreports/ Analysis of co-localization in microtubule dataset. Single-color dSTORM datasets were filtered on localization precision and tracking as described above. Next, the datasets were split by generating n unique random numbers between 1 and n using the MATLAB function randperm, were n is the number of localizations in the dataset. These numbers were used to assign localizations between two channels in ratios 1:1, 1:9 and 1:99. Translation was introduced by adding various distances to the x and y localizations of channel B. For rotations, the localizations of channel B were rotated around the center of the selected ROI by varying angles between 2 and 180 degrees. For the comparison with ClusDoC, we made use of the MATLAB function ClusDoC 32 , downloaded from: https:// github. com/ PRNic ovich/ ClusD oC. We used the default settings, i.e., 0.4 as co-localization cutoff. Data was plotted as the fraction of co-localizing localizations. For Coloc-Tesseler, we made use of the stand-alone software downloaded from: https:// github. com/ flevet/ Coloc-Tesse ler. For both comparisons, we used the data shown in (Fig. 3g,h), to make the comparison.

Scientific
Analysis of co-localization in neuronal synapses. For synaptic structures, we selected ROIs of 702 × 702 nm (6 × 6 pixels at a pixel size of 117 nm) which we subsequently analyzed for co-localization analysis as described above.
Statistics. Statistical significance was tested with a Students t-test when comparing two groups. A P value below 0.05 was considered significant. If multiple groups were compared, statistical significance was tested with a one-way ANOVA followed by a Bonferroni's multiple comparison test. In all figures, * was used to indicate a P value < 0.05, ** for P < 0.01, and *** for P < 0.001. Reported n is number of cells or ROIs as indicated in the text or figure legend, and all biological experiments were replicated in cultures from at least two independent preparations. Statistical analysis and graphs were prepared in GraphPad Prism, and figures were generated in Adobe Illustrator CC.

Data availability
All data generated or analyzed during this study are included in this published article (and its Supplementary  Information files). A test dataset (based on Fig. 3e,f) and scripts, together with a brief user guide are included as Supplementary information.