spatialtis.cell_dispersion#
- spatialtis.cell_dispersion(data, method='id', min_cells=10, pval=0.01, r=None, resample=1000, quad=None, rect_side=None, export_key='cell_dispersion', **kwargs)[source]#
Cell distribution pattern
There are three type of distribution pattern (0 if no cells)
Random (1)
Regular (2)
Cluster (3)
Three methods are provided
Notice that clark evans’ index usually failed to detect local aggregation.
Random
Regular
Cluster
Index of dispersion: ID
ID = 1
ID < 1
ID > 1
Morisita’s index of dispersion: I
I = 1
I < 1
I > 1
Clark and Evans aggregation index: R
R = 1
R > 1
R < 1
- Parameters
- dataAnnData
The AnnData to work with.
- method{‘id’, ‘morisita’, ‘clark_evans’}, default: ‘id’
- min_cellsint, default: 10
The minimum number of the specific type of cells in a ROI to perform analysis.
- pvalfloat
The p-value threshold to determine significance.
- rfloat
Parameters for method=’id’, determine diameter of sample window, default will take 1/10 of the shortest side of the ROI as the diameter.
- resampleint, default: 1000
Parameters for method=’id’, the number of random permutations to perform.
- quadtuple of int, default: (10, 10)
Parameters for method=’morisita’, A tuple (X, Y), Use a grid that is X * Y to tessellation your ROI.
- rect_sidetuple of float
Parameters for method=’morisita’, A tuple (X, Y), Use many rectangles with X * Y side to tessellation your ROI.
- export_keystr
The key used to store result.
- **kwargs
Config for the analysis, for details check
spatialtis.abc.AnalysisBase
.