This repository contains a comprehensive analysis pipeline for Stereo-seq spatial transcriptomics data, focusing on gut tissue characterization and cell type deconvolution.
The pipeline processes Stereo-seq data at 50μm bin resolution to perform spatial cell type mapping, clustering analysis, and tissue organization studies. The analysis combines single-cell reference data with spatial transcriptomics to understand cellular composition and spatial patterns in gut tissue.
Spatial distribution of cell types across gut tissue showing epithelial and immune cell organization
- Quality control metrics calculation
- Gene and cell filtering
- Normalization and scaling
- Spatial coordinate handling
- Cell2location-based spatial deconvolution
- Integration with gut tissue reference atlas
- Cell type abundance estimation per spatial location
- Supports bin50 Stereo-seq data format
- Spatial-aware clustering algorithms
- Multiple resolution clustering
- Cluster validation metrics
- Spatial coherence analysis
- Interactive dashboards (
stomics_dashboad.py) - Automated report generation (
comprehensive_report_generator.py) - OMERO integration for image management
The pipeline uses Cell2location to deconvolve spatial transcriptomics data, identifying:
- Epithelial cells (Enterocytes, Goblet cells, Paneth cells)
- Immune cells (T cells, B cells, Plasma cells, Myeloid cells)
- Stromal cells (Mesenchymal, Fibroblasts)
- Endothelial cells (Vascular components)
- Neuronal cells (Enteric nervous system)
- Quality Control: Comprehensive QC metrics and filtering
- Spatial Clustering: Identify tissue regions and structures
- Cell Type Deconvolution: Estimate cell type abundances
- Gradient Analysis: Detect spatial gradients and transitions
- ROI Analysis: Focus on specific tissue regions
- Interactive Visualization: Real-time data exploration
- Spatial data: H5AD format with bin50 resolution
- Reference data: Single-cell RNA-seq atlas with cell type annotations
- Spatial coordinates: Embedded in AnnData.obsm['spatial']
conda env create -f environment.yml
conda activate cell2loc_env
# Activate environment
conda activate cell2loc_env
# Run preprocessing
python src/preprocessing_stomics.py
# Perform cell type deconvolution
python src/deconvolution_cell2loc.py
# Generate clustering analysis
python src/clustering_analysis.py
# Create comprehensive report
python src/comprehensive_report_generator.py