SC2Spa.bm.BVMI

SC2Spa.bm.BVMI(adata1: AnnData, adata2: AnnData, GL: list, coords_name='spatial', n_neighbors=300, max_dis=1700)

Calculate bivariate Moran’s I of the genes of two ST data.

The two ST datasets share some or all ST voxels/cells

Parameters

adata1

a anndata object.

adata2

a anndata object that has the same voxels as or share part of the voxels with adata1. The obs_names of the two objects should be consistent to extract the overlapped voxels.

GL: The list of genes to be calculated. The genes should be in var_names of

adata1 and adata2

coords_name

the spatial information should be stored in adata2.obsm[coords_name]

n_neighbors

the number of max neighbors for the knn algorithm

max_dis

max distance of two neighbors

Returns

MoranI_BV
a dataframe contains the gene name information and bivariate

moran’s I values