Geographic Information Systems (GIS)-based spatial analysis of cell distribution

Adalberto Merighi, Laura Lossi

Published: 2023-04-21 DOI: 10.17504/protocols.io.ewov1o697lr2/v1

Disclaimer

DISCLAIMER – FOR INFORMATIONAL PURPOSES ONLY; USE AT YOUR OWN RISK

The protocol content here is for informational purposes only and does not constitute legal, medical, clinical, or safety advice, or otherwise; content added to protocols.io is not peer-reviewed and may not have undergone formal approval of any kind. Information presented in this protocol should not substitute for independent professional judgment, advice, diagnosis, or treatment. Any action you take or refrain from taking using or relying upon the information presented here is strictly at your own risk. You agree that neither the Company nor any of the authors, contributors, administrators, or anyone else associated with protocols.io, can be held responsible for your use of the information contained in or linked to this protocol or any of our Sites/Apps and Services.

Abstract

This protocol describes how to perform a Geographic Information Systems (GIS)-based spatial analysis of cerebellar images. It can be used for any biological images to study cellular or molecular spatial distributions, or, more generally, the distribution of any biological feature of interest.

The procedures described here can be employed singularly or in combination to analyze clustering/dispersion by GIS spatially. It is based on the use of ESRI ArcMap to calculate the Average Nearest Neighbor, the High/Low Clustering (G tool), the Multi-distance Spatial Cluster Analysis (Ripley’s K Function), and the Spatial Autocorrelation (Global Moran’s I). It is also shown how to represent the features' distribution graphically.

Before start

Familiarize yourself with the basics of spatial statistics.

Steps

Calculation of cells' X-Y coordinates

1.

Open the image to be analyzed using Fiji : FileOpen

Note
All images should be of the same pixel size and magnification if one wants to further compare the analysis results of individual images within a single experimental group and/or between groups.

2.

Set the appropriate scale for the image using AnalyzeSet Scale . In the pop-up window report the distance in pixels related to the known distance using the correct unit of length (μM). Leave the pixel aspect ratio at 1.0.

Note
It is important to set the appropriate scales of the images because it may be possible that not all images are acquired at the same magnification or with the same microscope. Set the unit of length in microns (μM) in the Fiji dialog window. The ArcMap Coordinate System dialog window allows you to add a new customized coordinate system but does not permit you to set the Linear Unit in microns. Setting the Linear Unit of the Microscope Coordinate System in Millimeters is advisable. With these settings, the output of the ArcMap elaborations is nominally in millimeters, but actually in microns.

3.

Use the Multipoint tool and click with the mouse on the center of each labeled cell. The tool should be configured so that clicked cells are visualized directly on the image. To do so double-click with the mouse on the tool icon and tick the Label points box.

4.

Set the measurements to be computed using AnalyzeSet Measurements . In the pop-up window verify that all boxes are not ticked. Set the Decimal places box to 3. Use AnalyzeMeasure to calculate the X-Y coordinates. A new window pops up where the results are shown in tabular form.

5.

Save data as a .csv file .

Image elaboration with ArcMap

6.

Load all .csv files to an ad hoc folder in ArcMap.

7.

Open the program and create a new map document: FileNewNew MapsMy TemplatesBlank Map .

8.

On the ribbon click ViewData Frame Propertie s. In the pop-up window click Coordinate System . Click on the world icon and select NewProjected Coordinate System . For name type the name of the new coordinate system e.g. Microscope Coordinate System . For Linear Unit Name choose Millimeter. Leave all other parameters unchanged. Save the new coordinate system: the program creates a new folder named Custom that contains the file Microscope_Coordinate_System .

Note
There may be differences in the way the coordinate system is displayed according to the version in use of the software. Be sure that the following parameters are applied:Projection: Transverse_MercatorFalse_Easting: 0.0False_Northing: 0.0Central_Meridian: 0.0Scale_Factor: 1.0Latitude_Of_Origin: 0.0Linear Unit: Millimeter (0.001)

9.

• Save the Blank Map file and name it with the name of the image under investigation, e.g. Image1. The program saves a file named Image1.mdx

10.

Add the X-Y coordinates of the cells to the map. On the toolbar click the Add data icon then → Add Data . Choose the .csv file with the X-Y coordinates of the cells and upload it. The program creates a new layer on the map with the same name as the .csv file and an attribute table containing the cell coordinates. Right-click with the mouse on the new layer and choose  Display XY Data . In the pop-up window, be sure that the X and Y fields for the layer correspond to the fields of X and Y coordinates in your .csv file , and press the OK button. A window appears with the warning Table Does Not Have Object-ID Field . This is because the layer created so far is an X-Y event layer that must be converted into a feature layer for further analysis. Press the OK button and the positions of the cells will be displayed as in the figure below.

Note
As far as one adds information to the map, the software creates layers whose characteristics depend on the source of the information. Layers can be visualized in the Table of content window of the program. The layers created from tabular data such as .csv files containing objects (cells) coordinates are saved as Event layers . In ArcMap, Event layers are based on tables without ObjectID fields and cannot be edited in ArcGIS.

Left: Original image of a cerebellar slice from a mutant mouse (Reeler) after labeling of the Purkinje neurons (see Merighi A and Lossi L. Co-cultures of cerebellar slices from mice with different reelin genetic backgrounds as a model to study cortical lamination [version 1; peer review: 2 approved with reservations]. F1000Research 2022, 11:1183 (https://doi.org/10.12688/f1000research.126787.1). Right: X-Y coordinates of the labeled Purkinje neurons as they appear in the data view window of ArcMap. Cells are displayed as black dots but one can choose any type of symbology for their visualization.
Left: Original image of a cerebellar slice from a mutant mouse (Reeler) after labeling of the Purkinje neurons (see Merighi A and Lossi L. Co-cultures of cerebellar slices from mice with different reelin genetic backgrounds as a model to study cortical lamination [version 1; peer review: 2 approved with reservations]. F1000Research 2022, 11:1183 (https://doi.org/10.12688/f1000research.126787.1). Right: X-Y coordinates of the labeled Purkinje neurons as they appear in the data view window of ArcMap. Cells are displayed as black dots but one can choose any type of symbology for their visualization.
11.

Convert the X-Y event layer into a feature layer. On the layer right click → DataExport DataAll features . Select Use the same coordinate system as this layer source data and press OK . The program generates a new layer named Export_Output#_ . By double-clicking with the mouse on the layer name, the Layer Properties window opens and it is possible to customize the data by e.g. changing the layer name and using a different symbology to display the cells.

 X-Y coordinates of the labeled Purkinje neurons as they appear in the data view window of ArcMap after conversion of the X-Y event layer into a Feature layer. A different symbology has been used to recognize the layer in the map more easily. Features (the objects in the layer, i.e. the labeled Purkinje neurons) can then be processed for further analysis.
X-Y coordinates of the labeled Purkinje neurons as they appear in the data view window of ArcMap after conversion of the X-Y event layer into a Feature layer. A different symbology has been used to recognize the layer in the map more easily. Features (the objects in the layer, i.e. the labeled Purkinje neurons) can then be processed for further analysis.

Analysis of cell distribution with spatial statistics

12.

Average Nearest Neighbor

The Average Nearest Neighbor tool calculates the nearest neighbor index based on the average distance from each feature (i.e. a labeled Purkinje neuron) to its nearest neighboring feature. The Average Nearest Neighbor tool returns five values: Observed Mean Distance , Expected Mean Distance , Nearest Neighbor Index , z-score , and p-value . The values are written as messages at the bottom of the Geoprocessing pane during tool execution and passed as derived output values. With the Generate Report box ticked the tool produces an HTML report file with a graphical summary of the results (see figure below).

Note
If the image scale and the coordinate system are set as indicated above the tool output will be indicated in millimeters but it will correspond to microns .

12.1.

On the toolbar select the Arc Toolbox icon then→ Spatial Statistics ToolsAnalyzing PatternsAverage Nearest Neighbor

12.2.

In the pop-up windows for Input Feature Class select Export Output # , for Distance Method , select EUCLIDEAN DISTANCE, and tick the box Generate Report .

The graphic report is generated by ArcMap as an output of the Average Nearest Neighbor tool. Given the z-score of 2.11252332149, there is a less than 5% likelihood that this dispersed pattern could result from random chance.
The graphic report is generated by ArcMap as an output of the Average Nearest Neighbor tool. Given the z-score of 2.11252332149, there is a less than 5% likelihood that this dispersed pattern could result from random chance.
13.

High/Low Clustering (G tool)

The High/Low Clustering tool measures the degree of clustering for either high or low values using the Getis-Ord General G statistic . The High/Low Clustering tool returns four values: Observed General G , Expected General G , z-score , and p-value . The values are written as messages at the bottom of the Geoprocessing pane during tool execution and passed as derived output values. With the Generate Report box ticked the tool generates an HTML report file with a graphical summary of results (see figure below).

Note
If the image scale and the coordinate system are set as indicated above the tool output will be indicated in millimeters but it will correspond to microns .

13.1.

On the toolbar select the Arc Toolbox icon then→ Spatial Statistics ToolsAnalyzing PatternsHigh/Low Clustering (Getis-Ord General G)

13.2.

In the pop-up windows for Input Feature Class select Export Output # , for Input Field select XM, for Conceptualization of Spatial Relationship select INVERSE DISTANCE, for Distance Method , select EUCLIDEAN DISTANCE, for standardization select NONE, and tick the box Generate Report.

The graphic report is generated by ArcMap as an output of the High/Low Clustering tool (G tool). Given the z-score of 7.58089500969, there is a less than 1% likelihood that this high-clustered pattern could result from random chance.
The graphic report is generated by ArcMap as an output of the High/Low Clustering tool (G tool). Given the z-score of 7.58089500969, there is a less than 1% likelihood that this high-clustered pattern could result from random chance.
14.

Multi-distance Spatial Cluster Analysis (Ripley’s K Function)

The Multi-Distance Spatial Cluster Analysis (Ripley's K Function) determines whether features or the values associated with features exhibit statistically significant clustering or dispersion over a range of distances . The tool output is a table with two fields: ExpectedK and ObservedK containing the expected and observed K values, respectively. Because the L(d) transformation is applied, the ExpectedK values will always match the Distance value. A field named DiffK contains the Observed K values minus the Expected K values. As a confidence interval option is specified, two additional fields named LwConfEnv and HiConfEnv will be included in the Output Table . The output graph is shown in the figure below.

14.1.

On the toolbar select the Arc Toolbox icon then→ Spatial Statistics ToolsAnalyzing PatternsMulti-distance spatial cluster analysis (Ripley’s K function)

14.2.

In the pop-up windows for Input Feature Class select Export Output # for Output Table leave the program generated name ( Export Output # MultiDistan) , for Compute Confidence Envelope (optional) choose 99_PERMUTATIONS , tick the box Display Results Graphically

Note
If the image scale and the coordinate system are set as indicated above the tool output will be indicated in millimeters but it will correspond to microns .The graph should be exported in JPEG format at a size of 900x510 pixels if used for publication. In the Options window select: Quality 100% and 300 DPI.
The graphic generated by ArcMap as an output of the Multi-distance spatial cluster analysis (Ripley’s K function) tool. The observed K value (red line) is larger than the expected K value (blu line) for all distances. Therefore, the distribution is more clustered than a random distribution at the scale of analysis. As the observed K value is larger than the upper confidence envelope value (upper gray dashed line) all along the distance interval computed, spatial clustering for that interval is statistically significant.
The graphic generated by ArcMap as an output of the Multi-distance spatial cluster analysis (Ripley’s K function) tool. The observed K value (red line) is larger than the expected K value (blu line) for all distances. Therefore, the distribution is more clustered than a random distribution at the scale of analysis. As the observed K value is larger than the upper confidence envelope value (upper gray dashed line) all along the distance interval computed, spatial clustering for that interval is statistically significant.

15.
           ***Graphical visualization of cell counts*** 

By this approach, it is possible to display graphically on the map a series of polygons (tessellation) over the labeled cells and to join the cell counts to each polygon so that a graphic display of the cell distribution is obtained.

15.1.

Generate tessellation. With the mouse select the Export_Output # layer. On the toolbar select the Arc Toolbox icon then → DataManagementToolsSamplingGenerateTessellation . This tool generates a polygon feature class of a tessellated grid of regular polygons which will entirely cover a given extent. In the pop-up window leave unchanged the path of the Output Feature Class. For Extent click on the folder icon and choose Same as layer Export Output # . Selection of the shape type is optional. Check that HEXAGON is selected by the program. The program creates a new layer named Generate Tessellation # and the tessellation appears above the cells (see figure below).

Note
By selecting Same as layer Export Output # for the Extent of the tessellation, one adjusts the size of the tessellation to that occupied by the cells.

Left: A hexagon tesselation is generated to cover the entire area of the distribution of the cells. Right: combined view of the hexagon tessellation layer and the Export Output layer with cell coordinates.
Left: A hexagon tesselation is generated to cover the entire area of the distribution of the cells. Right: combined view of the hexagon tessellation layer and the Export Output layer with cell coordinates.
15.2.

Select hexagons with cells. From the ribbon click SelectionSelectbylocation . In the pop-up window, for Target layer(s) select Generate tessellation # , for the Source layer select Export_Output # , and for the Spatial selection method for target layer feature(s) choose Intersect the source layer feature . Click OK. The hexagons containing cells are highlighted (see the left figure below).

15.3.

Join cell positions to selected hexagons. Select the Arc Toolbox icon on the toolbar→ AnalysisToolsOverlaySpatialJoin . In the pop-up window, for Target features select Generate Tessellation # , for Join Features select Export_Output # . The program creates a new layer named Export_Output # SpatialJoin# Export_Output # SpatialJoin# with the hexagons containing cells visualized in a different color than those with no cells (see the right figure below).

Left: Hexagons containing cells are selected and highlighted in cyan. Right: Cell positions are joined to the selected hexagons.
Left: Hexagons containing cells are selected and highlighted in cyan. Right: Cell positions are joined to the selected hexagons.
15.4.

Graphical visualization of the cell counts on the map. Remove the layer Generate Tessellation # from the map (right-click with the mouse) and turn off the visibility of the layer Export Output # . Only the hexagons with cells remain visible (see the left figure below). With the mouse right-click on layer → PropertiesSymbologyShow quantitiesSelect color ramp (e.g. cyan-to-purple) → Fields : Value = Join-Count ; Normalization = none . Hexagons on the map are displayed in different colors according to the number of cells that they contain (see the right figure below).

Left: The cell-containing hexagons are displayed with underlying information on the number of cells in each hexagon (not visible yet). Right: application of a color ramp (cyan-to-purple) to display hexagons containing different numbers of cells in different colors. The color legend is displayed at the bottom right.
Left: The cell-containing hexagons are displayed with underlying information on the number of cells in each hexagon (not visible yet). Right: application of a color ramp (cyan-to-purple) to display hexagons containing different numbers of cells in different colors. The color legend is displayed at the bottom right.
16.

Spatial Autocorrelation (Global Moran’s I)

The Spatial Autocorrelation (Global Moran’s I) tool measures spatial autocorrelation based on feature locations and attribute values using the Global Moran's I statistic.

The tool returns five values: Moran's I Index , Expected Index , Variance , z-score , and p-value. The values are written as messages at the bottom of the Geoprocessing pane during tool execution and passed as derived output values. With the Generate Report box ticked the tool produces an HTML report file with a graphical summary of results (see figure below).

16.1.

On the toolbar select the Arc Toolbox icon then → Spatial Statistics ToolsAnalyzing PatternsSpatial Autocorrelation (Global Moran’s I) .

16.2.

In the pop-up windows for Input Feature Class select GenerateTessellation#Spati# , for Input Field select Join-Count, for Conceptualization of Spatial Relationship select INVERSE_DISTANCE , for Distance Method select EUCLIDEAN DISTANCE , for STANDARDIZATION select ROW . Tick Generate Report and click OK .

16.3.

After the tool has run, no layer is added to the map but a report is generated. To view the report in the ribbon, click GeoprocessingResults .

16.4.

In the results list, expand the Spatial Autocorrelation (Moran's I) folder and click on the Report File to view the report in the browser window (see figure below). The report file is automatically saved as a .html file in the ArcGIS folder of the computer.

The graphic report is generated by ArcMap as an output of the Spatial Autocorrelation (Global Moran’s I) tool. Given the z-score of 7.75723418722, there is a less than 1% likelihood that this clustered pattern could result from random chance.
The graphic report is generated by ArcMap as an output of the Spatial Autocorrelation (Global Moran’s I) tool. Given the z-score of 7.75723418722, there is a less than 1% likelihood that this clustered pattern could result from random chance.

Note
If the image scale and the coordinate system are set as indicated above the tool output will be indicated in millimeters but it will correspond to microns .The program saves the Moran’s I report files in the following format MoransI_Result_###__####_.html. It is advisable to rename these files to clearly refer them to the original images.

33.

推荐阅读

Nature Protocols
Protocols IO
Current Protocols
扫码咨询