SOAPy_st.tl.global_moran
- SOAPy_st.tl.global_moran(adata: AnnData, score_labels: list | str | None = None, k: int = 6, scale: str | float = 'hires', spatial_in_obsm: str = 'spatial', inplace: bool = True) AnnData
The global Moran index is calculated based on selected genes or indicators such as AUCell score.
Parameters
- adataanndata.AnnData
An AnnData object containing spatial omics data and spatial information.
- score_labelsstr
The label or label lists for the Moran index need to be computed. It could be gene name in adata.uns_names or in adata.uns[‘SOAPy’][‘aucell’] (the result of cal_aucell()).
- kint, optional
Number of nearest neighbors in KNN
- scaleUnion[str, float], optional
The scaling factor for distance scaling. If it’s Visium data it can also be HE image labels (hires or lower). Most of the time you don’t need to change this.
- spatial_in_obsmstr, optional
Keyword of coordinate information in obsm.
- inplacebool, optional
Whether to change the original adata.
Returns
anndata.AnnData.uns['SOAPy']['global_moran']- Global Moran information for each keyword