B_HIT.st.tl.kde_filter#
- B_HIT.st.tl.kde_filter(adata_tmp, score_name, high_binSize=100, default_thread_num=36, clean_mask_size=(3, 3))#
Filter spatial transcriptomics (ST) data using Kernel Density Estimation (KDE).
- Parameters:
adata_tmp (AnnData object) – The input AnnData object containing spatial and score data.
score_name (str) – The name of the column in
adata_tmp.obsthat contains the scores to be used as weights.high_binSize (int, optional (default: 100)) – The size of the bins used for spatial discretization.
default_thread_num (int, optional (default: 36)) – The maximum number of threads to use for parallel KDE scoring.
clean_mask_size (tuple of int, optional (default: (3, 3))) – The size of the structuring element used for binary opening during mask cleaning.
- Returns:
AnnData A subset of the input AnnData object, filtered to retain only the valid spatial coordinates.