StatBiomed/SpatialDM

weight_matrix with n_nearest_neighbors and n_neighbors

wyq977 opened this issue · 1 comments

Hi, I am wondering why there are two parameters for nearest neighbours in weight matrix calculation.

def weight_matrix(adata, l, cutoff=None, n_neighbors=None, n_nearest_neighbors=6, single_cell=False):

It seems to me that there is no need for both or am I missing sth?

Best

n_neighbors is for secreted (long-distance) signaling, while n_nearest_neighbors is for adjacent signaling (ECM or cell-cell contact).