svgbit.core.moran.local_moran#

svgbit.core.moran.local_moran(gene_expression_df: pandas.core.frame.DataFrame, weights: libpysal.weights.weights.W, transformation: str = 'r', permutation: int = 999, cores: int = 2) Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame][source]#

Calculate local moran for hotspot identification.

Parameters
gene_expression_dfpd.DataFrame

Expression matrix for Spatial Transcriptomics Data.

weightslibpysal.weights.W

Spatial weight for calculating Moran’s I.

transformationstr, default ‘r’

Weights transformation passed to esda.moran.Moran_Local

permutationint, default 999

Number of random permutations for calculation of pseudo-p_values.

coresint

Number of threads to run svgbit. Use all available cpus by default.

Returns
hotspotpd.DataFrame

Identified hotspots.

i_valuepd.DataFrame

Local Moran’s I values.

p_valuepd.DataFrame

Local Moran’s I p values.