SpaGCN icon indicating copy to clipboard operation
SpaGCN copied to clipboard

spg.calculate_adj_matrix is making all Nan with our own FFPE histology image

Open galib36 opened this issue 2 years ago • 1 comments

Hello, Thank you for making SpaGCN available to community. When I am trying SpaGCN with my own FFPE histology images on a 10X Visum data, the spg.calculate_adj_matrix is producing all Nan for the Adjacency matrix. I run the following command

adj=spg.calculate_adj_matrix(x=x_pixel,y=y_pixel, x_pixel=x_pixel, y_pixel=y_pixel, image=img, beta=b, alpha=s, histology=True)

But the adj matrix is all zero. Can you please help me to solve this?

Thank you.

galib36 avatar Apr 28 '22 08:04 galib36

Thank you for your interest in SpaGCN. I would recommend you double-check if you are using the correct image, which matches the pixel_x and pixel_y coordinates. If the coordinates do not match, you will get "nan" for the colour values, and the adj becomes "nan".

I have helped other people solve the same problem on GitHub: https://github.com/jianhuupenn/SpaGCN/issues/7#issuecomment-962761985

jianhuupenn avatar Apr 28 '22 15:04 jianhuupenn