spatialtis.cell_density#
- spatialtis.cell_density(data, ratio=1.0, export_key='cell_density', **kwargs)[source]#
Calculating cell density in each ROI.
The size of each ROI will be auto-computed as convex hull of all the cells in a ROI.
- Parameters
- dataAnnData
The AnnData to work with.
- ratiofloat, default: 1.0
The ratio between the unit used in your dataset and real length unit. ratio = Dataset unit / real length unit. For example, if the resolution of your dataset is 1μm, but you want to use 1mm as unit, then you should set the ratio as 0.001, 1 pixel = 0.001mm.
- export_keystr
The key used to store result.
- **kwargs
Config for the analysis, for details check
spatialtis.abc.AnalysisBase
.