scSLAT.model.utils.spatial_match

scSLAT.model.utils.spatial_match(embds, reorder=True, top_n=20, smooth=True, smooth_range=20, scale_coord=True, adatas=None, verbose=False)[source]

Use embedding to match cells from different datasets based on cosine similarity

Parameters:

Note

Automatically use larger dataset as source

Return type:

typing.List[typing.Union[torch.Tensor, numpy.ndarray]]

Returns:

Best matching, Top n matching and cosine similarity matrix of top n

Note

Use faiss to accelerate, refer https://github.com/facebookresearch/faiss/issues/95