Preprocessing

Preprocessing#

QC quality#

pp.calculate_global_moran(adata[, ...])

Compute global Moran's I for each gene and return a new AnnData object containing only genes with significant spatial autocorrelation (p-value < alpha).

pp.preprogress_adata(adata_omics1, adata_omics2)

Preprocess two spatial omics AnnData objects by removing spots/cells with no cross-omics spatial neighbors.

Downsampling#

pp.downsampling(adata, resolution[, method, ...])

Downsample a spatial omics dataset by binning spots/cells into a regular grid.

Patch#

pp.extract_spatial_region(adata, minx, miny, ...)

Extract a spatial region from an AnnData object based on spatial coordinates.

pp.clipping_patch(adata_omics1, adata_omics2)

Divide the overlapping spatial region of two spatial omics into a grid of patches.