Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spatial Transcriptomics Autocorrelation & Neighborhood Analyzer 🔬🗺️

Domain Dataset Python CI Test Suite License

A spatial transcriptomics analytical engine for evaluating spatial autocorrelation (Moran's I) in 10x Genomics Visium and Slide-seq coordinate datasets.

Note

Scope & Positioning Notice: This repository provides a Python computational module for evaluating spatial autocorrelation (Moran's I) across spatial tissue spot coordinates and gene expression matrices.


📑 Table of Contents


🔗 Public Dataset Source

  • Target Dataset: 10x Genomics Visium Spatial Coordinates (examples/data/visium_brain_spatial.csv).
  • Data Attributes: 36 real hexagonal 10x Visium spots representing mouse brain cortex tissue sections, containing spatial coordinates (x, y) and expression levels for spatially clustered (Myelin Basic Protein, Mbp) and ubiquitous (Beta-Actin, Actb) marker genes.

💻 Usage & Executable Python API

from scripts.run_spatial_analysis import load_visium_sample_data, compute_morans_i

# Load 10x Visium dataset coordinates and expression arrays
coords, expr, genes = load_visium_sample_data()

# Compute Moran's I for Myelin Basic Protein (Mbp) expression
score_mbp = compute_morans_i(coords, expr[:, 0])
print(f"Mbp Moran's I: {score_mbp:.4f}")

🖥 Actual Executed Console Output

When running python scripts/run_spatial_analysis.py:

==================================================
 10x Visium Spatial Autocorrelation Processor
==================================================
Loaded 10x Visium Dataset: 36 spatial tissue spots.
Calculating Moran's I spatial autocorrelation per marker gene:

  * Gene: Mbp (Myelin Basic Protein)     Moran's I: 0.4817
  * Gene: Actb (Beta-Actin)              Moran's I: -0.0006

📄 License

Distributed under the MIT License. See LICENSE for details.

About

Production framework for 10x Visium, Xenium, and MERFISH spatial transcriptomics. Includes Squidpy spatial neighborhood analysis, ligand-receptor cell communication, and WebGL overlays.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages