spatialtis.cell_density¶
- class spatialtis.cell_density(data, ratio=1.0, export_key=None, **kwargs)[source]¶
Calculating cell density in each ROI
The size of each ROI will be auto-computed, it’s the area of convex hull of all the cells in a ROI
- Parameters
data (anndata._core.anndata.AnnData) – AnnData object to perform analysis
ratio (float) – The ratio between the unit used in your dataset and real length unit, default is 1.0; 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 pixels represent 0.001mm length.
export_key (str) – The key used to store result
**kwargs – Pass to
spatialtis.abc.AnalysisBase