StatBiomed / SpatialDM

Spatial direct messaging detected by bivariate Moran
https://spatialdm.readthedocs.io
Apache License 2.0
24 stars 5 forks source link

weight_matrix with n_nearest_neighbors and n_neighbors #5

Open wyq977 opened 1 year ago

wyq977 commented 1 year ago

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

https://github.com/StatBiomed/SpatialDM/blob/aa1762496437a45787314a27e88313bdec6287c0/spatialdm/main.py#L34

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

Best

leeyoyohku commented 1 year ago

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