SpaGTL.refine_spatial_domains#

SpaGTL.refine_spatial_domains(adata, domain_key, spatial_key='spatial', n_neighbors=6)[source]#

Refine spatial domains based on spatial neighbors.

Parameters:
adata : AnnData

Annotated data matrix.

domain_key : str

The key to find the identified spatial domains in adata.obs.

spatial_key : str (default: 'spatial')

The key to find the spatial corrdinates in adata.obsm.

n_neighbors : int (default: 6)

Number of spatial neighbors to refine spatial domains.

Return type:

None

Returns:

: Updates adata with the following fields.

.obs[domain_key+’refined’]

The refined spatial domains.