raphael-group / GASTON

BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Images seem to be mirrored #5

Closed LinearParadox closed 1 month ago

LinearParadox commented 3 months ago

Hi all,

Huge fan of the tool. One issue I have however is that images seem to be getting mirrored in gaston, For example, here is a plot of the glm PCA and a picture of me H&E slide:

image image

The issue is fixed when I invert the image order and rotate by 90 degrees. Not sure why this happens.

uthsavc commented 1 month ago

I think this is a Visium issue... the Visium coordinates are different in the H&E versus the transcriptomics data. Not sure why. One idea is to modify the functions for reading Visium data to make sure the H&E and transcriptomics data have same coordinate system. I'll leave this open for now.

uthsavc commented 1 month ago

The issue is that Visium provides two set of coordinates (array_row and array_col vs pxl_row and pxl_col, or something like that). The first set of coordinates is a rotated/flipped version of the other set of coordinates.

We now updated the code to use a standard SquidPy function to load SpaceRanger output, so hopefully this is not an issue anymore.