liuqivandy / SpaGene

16 stars 1 forks source link

(2k-i) factor in the definition of the Earth Mover's Distance #7

Open kane9530 opened 2 months ago

kane9530 commented 2 months ago

Hi there, thank you very much for the tool!

I wanted to clarify if my understanding of why the EMD is defined with the upper limit of 2k is accurate. Is this due to the physical graph structure from the spatial transcriptomics (Stahl et al., 2016) dataset, where the spots are arranged in a square layout? I note that generalising this to the 10x Visium dataset with a lattice spot arrangement works well (Supp figures S23-27). Is this generally because the method is insensitive to the value of k used and its relationship to the underlying physical graph structure, such that $k_1=8$ for the 10x visium data works too, or was this tuned separately for the Visium dataset?

Best wishes, Kane

liuqivandy commented 2 months ago

Hi Kane, This is not tuned separately for each dataset. If we construct the k-nearest neighbor graph for each spot, the maximum degree of each spot will be 2k. Best, Qi

From: Kane Toh @.> Date: Monday, May 6, 2024 at 10:31 PM To: liuqivandy/SpaGene @.> Cc: Subscribed @.***> Subject: [liuqivandy/SpaGene] (2k-i) factor in the definition of the Earth Mover's Distance (Issue #7)

Hi there, thank you very much for the tool!

I wanted to clarify if my understanding of why the EMD is defined with the upper limit of 2k is accurate. Is this due to the physical graph structure from the spatial transcriptomics (Stahl et al., 2016) dataset, where the spots are arranged in a square layout? I note that generalising this to the 10x Visium dataset with a lattice spot arrangement works well (Supp figures S23-27). Is this generally because the method is insensitive to the value of k used and its relationship to the underlying physical graph structure, such that $k_1=8$ for the 10x visium data works too, or was this tuned separately for the Visium dataset?

Best wishes, Kane

— Reply to this email directly, view it on GitHubhttps://github.com/liuqivandy/SpaGene/issues/7, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIH2RCO5RDHAE3VIE6KYX6LZBBDINAVCNFSM6AAAAABHKE5ELGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DEMJZGY2TANI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

kane9530 commented 2 months ago

Hi Qi,

Thank you for your reply. I am afraid I am still in the dark about your statement "If we construct the k-nearest neighbor graph for each spot, the maximum degree of each spot will be 2k." Could you elaborate on this point further? Is it a particular feature of the spot arrangement?

Best wishes, Kane