

Alternatively, in the Matlab “Home” tab, section “Environment”, press "Set Path", select "Add folder," and browse to the Grafeo package folder. Note: Step d has to be performed anytime a new Matlab session is started. Once the InPolygon is installed, the following message will appear: “Building with 'MinGW64 Compiler (C)'. Next, in the Matlab command window type mex InPolygon.c. Once the installation of C compiler is completed, copy the downloaded InPolygon folder to the desired location on your computer and change the Matlab current directory (cd) by typing in the command window cd("InPolygonDirectory"), where “InPolygonDirectory” is a full path on your computer, e.g., “C:∖Documents∖matlab∖InPolygon”. Download MinGW compiler from the Matlab website ( ) and follow the installation instruction.

If no C compiler is installed, an error message will be displayed: “No supported compiler was found”. If you have, e.g., a free C compiler installed for Matlab (MinGW), the following message will appear: “MEX configured to use 'MinGW64 Compiler (C)' for C language compilation”, where 64 stands for the Windows 64 bits. For this type mex –setup c in the Matlab command window. First, check if you have a C language compiler compatible with Matlab installed on your machine. Installing ‘InPolygon’ third party function. The data can be analyzed using Ripley's K and L functions, point correlation function (PCF), and using Delaunay triangulation (graph-based segmentation) (see "Data clustering" red box). The different types of ROI can be drawn: polygonal or polygonal freehand ROI (No. Data visualization and analysis require prior creation of a region of interest (ROI) in the main axes. The data can be visualized using still, or animated scatter plots (see "Data visualization" box), Voronoi diagrams, and Delaunay triangulation (see "Data clustering" red box). Multicolor data can be aligned automatically (see the main menu bar, "2–3 color Voronoi") or manually (see "Channel alignment" red box). The single-molecule data can be filtered by applying the threshold to photon number (PN), localization precision (LP), and the Voronoi diagram density (VD) (see "Filtering parameters" red box). The raw dSTORM data is converted to Matlab ".mat" file format that can be loaded as a single color file and combined to a multicolor file (see "Load data" red box). The main menu bar permits, among others, importing the raw single-molecule data in the different formats (here, only Nikon NSTORM 'txt' format is discussed).

Different sections discussed in the protocol are highlighted with red boxes.
