satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.24k stars 902 forks source link

In Visium data, spot coordinates do not match the image histology #9226

Open ElyasMo opened 1 month ago

ElyasMo commented 1 month ago

I have a few 10xVisium tissue section and associated spatial transcriptomics data. The spaceranger process has been done correctly judging based on the fiducials of the images which has been aligned to the image histology accurately and also high number of genes per spot and saturation.

When I read in the data into the Seurat, I am facing with a strange issue. As you can see in the images below, the coordinates of the spot do not match with the image histology, Here I clustered the white matter and the grey matter of Spinal cord. As you can see this is not the matter of rotated image, but it is mismatch of coordinates to the image histology.

Any ideas why this is happening?

Rplot

jdrnevich commented 3 weeks ago

That is very weird - the clustering pattern clearly looks to be a rotated version of the tissue image, but the spot edges perfectly match the issue image. Was this CytAssist by chance, with a CytAssist image and a brightfield image that needed to be aligned? If the two images were not in the same orientation to start, weird things could happen with the automatic or manual image alignment vs. the tissue-covered spot detection. My guess the mistake is somewhere there, in running Space Ranger. After a first few horrible problems with spaceranger, I always make all my images are in the correct orientation before running space ranger.

ElyasMo commented 3 weeks ago

That is very weird - the clustering pattern clearly looks to be a rotated version of the tissue image, but the spot edges perfectly match the issue image. Was this CytAssist by chance, with a CytAssist image and a brightfield image that needed to be aligned? If the two images were not in the same orientation to start, weird things could happen with the automatic or manual image alignment vs. the tissue-covered spot detection. My guess the mistake is somewhere there, in running Space Ranger. After a first few horrible problems with spaceranger, I always make all my images are in the correct orientation before running space ranger.

The brightfield image was in the right orientation. The problem is images fiducial are cropped and the mapping is misaligned during spaceranger 2. Because in this version the alignment is automatic and turning it of leads to an error which says not enough fiducial have been found.

Two solutions I found is 1) making a Jason file with corrected fiducial in Loup Browser and rerun the space ranger using this jason file and 2) using the Raw.h5 output of space ranger and only rotate the coordinations of the spots (not the image) to the right orientation and then remove the spots which are not overlayed on the H&E tissue.

Hope it save some time for others with the same problem.