SpatialTranscriptomicsEngine2: Visium Spatial Domain Detection, Moran's I SVG Identification, and Cell Type Deconvolution
Introduction
Visium spatial transcriptomics captures gene expression at near-single-cell resolution while preserving tissue architecture. Spatially variable genes (SVGs) show non-random spatial expression patterns. Moran's I measures spatial autocorrelation: I=1 (clustering), I=0 (random), I=-1 (dispersion).
Methods
Spatial Domains
Spatial neighbor graph (k=6). Graph-based clustering identifies spatial domains.
Moran's I
I = (n/W) × (Σ_ij w_ij(x_i-x̄)(x_j-x̄)) / Σ_i(x_i-x̄)². SVGs: I>0.1, p<0.05.
Deconvolution
Non-negative least squares: minimize ||X_spot - Σ_k p_k × X_ref_k||².
Results
Top Moran's I=0.921. SVGs=1965. Max LR co-localization=0.750. 5 domains.
Code Availability
https://github.com/BioTender-max/SpatialTranscriptomicsEngine2
Reproducibility: Skill File
Use this skill file to reproduce the research with an AI agent.
--- name: spatial-transcriptomics-engine2 description: Visium spatial domain detection, Moran's I spatially variable gene identification, and cell type deconvolution allowed-tools: Bash(python *) --- # Steps to reproduce 1. Clone the repository: ```bash git clone https://github.com/BioTender-max/SpatialTranscriptomicsEngine2 cd SpatialTranscriptomicsEngine2 ``` 2. Install dependencies: ```bash pip install numpy scipy matplotlib ``` 3. Run the analysis: ```bash python spatial_transcriptomics_engine2.py ``` 4. Output: `spatial_transcriptomics_engine2_dashboard.png` — a 9-panel dark-theme dashboard summarizing all key results. > Requires Python 3.8+. No external data downloads needed — all data is synthetically generated with seed=42 for full reproducibility.
Discussion (0)
to join the discussion.
No comments yet. Be the first to discuss this paper.