Spatial Transcriptomics
  • Overview
  • Methods
  • Validation
  • Targets
  • References

A preregistered single-nucleus spatial transcriptomics workflow for documenting pathological microenvironment development

Spatial
Transcriptomics

Slide-tag snRNA-seq → Seurat v5 → scVI → scVelo → CellRank 2 — a preregistered pipeline linking spatial fate trajectories to therapeutic targets across four disease timepoints.

Methods & Design → Validation Suite → Therapeutic Targets →

At a Glance

20 Slide-tag runs
4 Disease timepoints
11 Validation checkpoints
7 scVI tests
4 Terminal states
3-tier Target scoring

Pipeline Dependency Graph

Each node is an executable script. Arrows indicate data flow. Yellow nodes require GPU; teal nodes are R; the rest are Python.

Show code
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor':'#172035','primaryTextColor':'#e8e4d9','primaryBorderColor':'#f5c842','lineColor':'#576880','secondaryColor':'#0e1629','tertiaryColor':'#050b18','edgeLabelBackground':'#0e1629','nodeBorder':'#f5c842'}}}%%

flowchart TD
    A(["`**Raw Slide-tag FASTQ**
    R1: barcode+UMI / R2: cDNA`"]) --> B

    B["`**01_starsolo_alignment.sh**
    STARsolo · Velocyto spliced/unspliced
    Spatial barcode registration`"]

    B --> C["`**02_seurat_processing.R**
    QC · Clustering · Spatial mapping
    Reference label transfer`"]

    B --> D[("`**spatial_coordinates.tsv**
    x_um · y_um per barcode`")]

    C --> E["`**SeuratDisk → h5ad**
    R → Python bridge`"]
    D --> E

    E --> F["`**03_scvi_integration.py**
    Batch correction · 7-test validation
    scVI latent embedding`"]

    F --> G["`**04_scvelo_velocity.py**
    Dynamical mode
    scVI neighbor graph`"]

    G --> H["`**05_cellrank_trajectories.py**
    VelocityKernel + SpatialKernel
    Weight optimization · GPCCA`"]

    H --> I["`**06_spatial_statistics.py**
    Global Moran's I
    LISA · Hotspot tracking`"]

    H --> J["`**07_lineage_drivers_and_targets.py**
    Driver genes · Temporal classification
    GSEApy · Target scoring`"]

    I --> K(["`**PRIMARY ENDPOINT**
    Mann-Whitney U
    Moran's I mid vs baseline`"])

    J --> L(["`**Therapeutic targets**
    Composite score ranked list`"])

    style A fill:#172035,stroke:#f5c842,color:#e8e4d9
    style B fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style C fill:#172035,stroke:#3dd6c8,color:#e8e4d9
    style D fill:#0a0f1e,stroke:#576880,color:#9ba8bc
    style E fill:#0e1629,stroke:#576880,color:#9ba8bc
    style F fill:#172035,stroke:#f5c842,color:#e8e4d9
    style G fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style H fill:#172035,stroke:#f5c842,color:#e8e4d9
    style I fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style J fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style K fill:#0a0f1e,stroke:#f5c842,color:#f5c842
    style L fill:#0a0f1e,stroke:#3dd6c8,color:#3dd6c8

%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor':'#172035','primaryTextColor':'#e8e4d9','primaryBorderColor':'#f5c842','lineColor':'#576880','secondaryColor':'#0e1629','tertiaryColor':'#050b18','edgeLabelBackground':'#0e1629','nodeBorder':'#f5c842'}}}%%

flowchart TD
    A(["`**Raw Slide-tag FASTQ**
    R1: barcode+UMI / R2: cDNA`"]) --> B

    B["`**01_starsolo_alignment.sh**
    STARsolo · Velocyto spliced/unspliced
    Spatial barcode registration`"]

    B --> C["`**02_seurat_processing.R**
    QC · Clustering · Spatial mapping
    Reference label transfer`"]

    B --> D[("`**spatial_coordinates.tsv**
    x_um · y_um per barcode`")]

    C --> E["`**SeuratDisk → h5ad**
    R → Python bridge`"]
    D --> E

    E --> F["`**03_scvi_integration.py**
    Batch correction · 7-test validation
    scVI latent embedding`"]

    F --> G["`**04_scvelo_velocity.py**
    Dynamical mode
    scVI neighbor graph`"]

    G --> H["`**05_cellrank_trajectories.py**
    VelocityKernel + SpatialKernel
    Weight optimization · GPCCA`"]

    H --> I["`**06_spatial_statistics.py**
    Global Moran's I
    LISA · Hotspot tracking`"]

    H --> J["`**07_lineage_drivers_and_targets.py**
    Driver genes · Temporal classification
    GSEApy · Target scoring`"]

    I --> K(["`**PRIMARY ENDPOINT**
    Mann-Whitney U
    Moran's I mid vs baseline`"])

    J --> L(["`**Therapeutic targets**
    Composite score ranked list`"])

    style A fill:#172035,stroke:#f5c842,color:#e8e4d9
    style B fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style C fill:#172035,stroke:#3dd6c8,color:#e8e4d9
    style D fill:#0a0f1e,stroke:#576880,color:#9ba8bc
    style E fill:#0e1629,stroke:#576880,color:#9ba8bc
    style F fill:#172035,stroke:#f5c842,color:#e8e4d9
    style G fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style H fill:#172035,stroke:#f5c842,color:#e8e4d9
    style I fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style J fill:#0e1629,stroke:#9ba8bc,color:#e8e4d9
    style K fill:#0a0f1e,stroke:#f5c842,color:#f5c842
    style L fill:#0a0f1e,stroke:#3dd6c8,color:#3dd6c8

Experimental Design

The pipeline targets the mouse microbead occlusion model of glaucoma (C57BL/6J), which provides inducible IOP elevation with timed onset, wild-type background, and compatibility with Slide-tag. Contralateral eyes serve as within-animal controls.

Design element Choice Rationale
Platform Slide-tag True single-nucleus resolution; R2 cDNA enables RNA velocity
Model C57BL/6J microbead occlusion Inducible, timed, no confounding mutations
Timepoints Baseline / Early (2–4 wk) / Mid (6–8 wk) / Late (12+ wk) Captures initiation through established neurodegeneration
Replicates 5 animals × 4 timepoints × 2 eyes Powers scCODA (≥3) and Moran’s I test (≥300 RGCs/group)
Tissues Retina cross-section + ONH RGC bodies + axon injury site
Control Contralateral eye Within-animal removes inter-animal IOP variability

Key Cell Populations

Primary target
Retinal Ganglion Cells

Subtypes tracked individually. Terminal state: RGC_apoptotic defined by Casp3/Casp9/Bax↑, Rbpms/Thy1↓

Glial response
Müller Glia

Terminal state: Muller_reactive. Gfap/Vim/Lcn2↑, Rlbp1/Glul↓. Key mediator of neuroprotection vs. toxicity switch.

Neuroinflammation
Microglia (DAM)

Terminal state: Microglia_DAM. Trem2/Apoe/Lpl/Cst7↑, P2ry12/Cx3cr1↓. Spatially tracked near ONH.

ONH-specific
ONH Astrocytes

Terminal state: Astrocyte_reactive_ONH. Gfap/Serpina3n/C3↑. Lamina cribrosa-adjacent remodeling.

Reference Datasets

The pipeline uses public datasets at two points: as annotation references (cell type label transfer) and as biological benchmarks (expected gene signatures at known disease stages).

Dataset Access Role
MRCA — Li et al. 2024 GSE243413 / SCP2560 Primary label transfer reference (189k adult C57BL/6J cells)
Macosko et al. 2015 GSE63473 Founding annotation; baseline cell proportion priors
Tran/Sanes et al. 2019 GSE133382 RGC subtype atlas (46 types, ONC time series)
Benhar et al. 2023 GSE199317 Non-neuronal temporal atlas post-ONC
Keuthan et al. 2023 GSE241782 Microbead bulk RNA-seq benchmark (retina + UON + MON)
Note

Validation. The pipeline should reproduce its bulk-level signals in Keuthan 2023 data (Gfap/Osmr/Edn2 upregulation at early timepoints; ECM remodeling in ONH) as a cross-platform validation checkpoint before primary endpoint analysis.

© 2026 — Released under MIT License

Built with Quarto

Pipeline v1.0.0