scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
400 stars 70 forks source link

Do we need to normalization and scaling before calculating spatial autocorrelation? #779

Open Qirongmao97 opened 6 months ago

Qirongmao97 commented 6 months ago

Hi Squidpy developers:

I am looking for using squidpy to measure the spatial autocorrelation (like Moran's I ) for genes in spatial dataset.

I was wondering if the result would be different between using raw data vs normalized (and scaled) as input?

For my understanding, is that make more sense to use the normalized gene expression data so we could reduce the sequencing depth effects in different spatial regions?

Thanks a lot!

giovp commented 2 months ago

Hi @Qirongmao97 , yes you would need to normalize the data before spatial autocorrelation. Scaling is not necessary but result might slightly vary between just normalized (however you wish to do it) and normalized + scaled, HTH