dotools_py.utility.add_smooth_kernel

dotools_py.utility.add_smooth_kernel#

dotools_py.utility.add_smooth_kernel(adata, layer_name='smooth_X', bandwidth=100, multiple=True, connectivities_key='spatial_connectivities', batch_key='batch')[source]#

Compute a smooth kernel, i.e, expression matrix is smooth.

Parameters:
adata AnnData

AnnData object.

layer_name str (default: 'smooth_X')

name of the layer with smooth expression matrix.

bandwidth int (default: 100)

radius (the greater, the more neighbors are considered).

multiple bool (default: True)

AnnData Object Contains Multiple Sample.

connectivities_key str (default: 'spatial_connectivities')

key in adata.obsp with spatial connectivities.

batch_key str (default: 'batch')

Column in adata.obs with batch information.

Return type:

None

Returns:

Returns None. A new layer will be added adata.layers['smooth_X' | layer_name]