spatialtis.spatial_autocorr#
- spatialtis.spatial_autocorr(data, method='moran_i', pval=0.05, two_tailed=True, layer_key=None, export_key='spatial_autocorr', **kwargs)[source]#
Spatial auto-correlation for every marker.
Measure the correlation of marker expression with spatial locations.
Moran’s I is more for global spatial autocorrelation.
Geary’s C is more for local spatial autocorrelation.
- Parameters
- dataAnnData
The AnnData to work with.
- method{‘moran_i’, ‘geary_c’}, default: ‘moran_i’
- pvalfloat
The p-value threshold to determine significance.
- two_tailedbool, default: True
If True, p-value is two-tailed.
- layer_keystr
The layer in AnnData to perform analysis.
- export_keystr
The key used to store result.
- **kwargs
Config for the analysis, for details check
spatialtis.abc.AnalysisBase
.
See also