squidpy icon indicating copy to clipboard operation
squidpy copied to clipboard

FOVs wrongly taken into account for spatial neighborhood calculation

Open SaskiaFreytag opened this issue 2 years ago • 1 comments

It appears to me that when data is in FOVs (Nanostring CosMX data) the spatial neighbors are calculated wrongly. I get many more neighbors between distant FOVs than within the FOV. This seems wrong.

SaskiaFreytag avatar Feb 14 '23 22:02 SaskiaFreytag

Hi @SaskiaFreytag , thank you for the interest in squidpy. Could you please clarify the issue by providing a reprex (reproducible example) or attaching a piece of code that could help me understand the bug?

thank you

giovp avatar Feb 15 '23 16:02 giovp

I believe this issue is that you need to pass the library_key to the spatial_neighbor function in order to compute neighbors graph only on points belonging to the same fov. Closing this but feel free to reopen if necessary

giovp avatar Jul 07 '24 08:07 giovp