bio-spatial-transcriptomics-spatial-statistics
Installation
SKILL.md
Version Compatibility
Reference examples tested with: squidpy 1.4+, scanpy 1.10+, anndata 0.10+, esda 2.5+, libpysal 4.9+ (SPARK, SPARK-X, and nnSVG are R/Bioconductor packages)
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - R:
packageVersion('<pkg>')then?function_nameto verify parameters
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Spatial Statistics
"Find spatially variable genes / run Moran's I / test which cell types colocalize" -> Quantify spatial structure in expression or in cell-type arrangement against an explicit null model.
- Python:
squidpy.gr.spatial_autocorr(Moran/Geary),squidpy.gr.nhood_enrichment,squidpy.gr.co_occurrence,esda.Moran_Local/esda.getisord.G_Local(LISA, Getis-Ord) - R: SPARK / SPARK-X / nnSVG (SVG),
spdep(Moran/Geary/Getis-Ord/LISA)