Skip to content

jengweitjiu/STRATA-Atlas

Repository files navigation

STRATA-Atlas: Spatial TF Regulatory Architecture in Psoriatic Skin

License: MIT

Code, data, and complete analysis history for:

Coupled but overwhelmed: spatial transcription factor fields reveal regulatory scaling that fails to resolve psoriatic inflammation

Jeng-Wei Tjiu — submitted to Science Immunology

Key Findings

  1. FOXP3 spatial conservation — Treg TF activity is indistinguishable between healthy and psoriatic skin (0/50 DEJ bins significant)
  2. Inflammatory–regulatory coupling — FOXP3/STAT5 scales with NF-κB/STAT3 (ρ = 0.94, R² = 0.95) across 30 biopsies
  3. Regulatory residual predicts PASI — Deviation from coupling predicts severity (ρ = 0.47, P = 0.023); absolute inflammation does not
  4. SMAD3 gradient reversal — TGF-β signaling undergoes spatial reorganization in lesional dermis

Repository Structure

STRATA-Atlas/
├── run_all.sh                              # Master pipeline (--python-only / --quick)
├── requirements.txt                        # Python dependencies
├── REPRODUCTION_NOTES.md                   # Manuscript vs Python concordance
├── CITATION.cff                            # GitHub citation metadata
│
├── R/                                      # R preprocessing (Step 0)
│   ├── 00_preprocess_seurat.R              #   GEO raw → Seurat → DoRothEA/AUCell → CSVs
│   ├── 01_extract_from_zenodo_rds.R        #   Zenodo RDS → CSVs (alternative)
│   └── install_packages.R                  #   One-click R dependency installer
│
├── scripts/                                # Python analysis pipeline (Steps 1–6)
│   ├── utils.py                            #   Shared functions
│   ├── 01_compute_dej_axis.py              #   DEJ axis computation
│   ├── 02_tf_field_profiles.py             #   TF profiles along DEJ → Fig 1b
│   ├── 03_coupling_analysis.py             #   Coupling + PASI → Fig 2
│   ├── 04_foxp3_smad3_analysis.py          #   FOXP3/SMAD3 → Fig 3
│   ├── 05_permutation_validation.py        #   Permutation null models → Fig 4
│   └── 06_generate_fig5_heatmap.py         #   24-TF regulon heatmap → Fig 5
│
├── data/                                   # Processed data (16,424 spots × 24 TFs)
│   ├── README.md                           #   Full data provenance
│   ├── tf_activity_spatial.csv             #   AUCell regulon activity scores
│   ├── metadata.csv                        #   Per-spot metadata + PASI
│   └── spatial_coords.csv                  #   Visium coordinates
│
├── figures/                                # Manuscript figures
│   ├── Fig_COMPOSITE_v3_reordered.png      #   Final composite (a–d panels)
│   ├── Fig_COMPOSITE_v2_publication.png     #   Alternative layout (A–D panels)
│   ├── Fig1b_TF_profiles.pdf               #   Reproduced: TF profiles
│   ├── Fig2_coupling_clinical.pdf           #   Reproduced: Coupling + PASI
│   ├── Fig3_FOXP3_SMAD3.pdf                #   Reproduced: FOXP3/SMAD3
│   ├── Fig4_permutation_validation.pdf      #   Reproduced: Permutation
│   └── Fig5_24TF_heatmap_REAL.pdf           #   Reproduced: 24-TF heatmap
│
├── manuscript/                             # Results text drafts
│   ├── STRATA_Atlas_Results_v3.docx        #   Latest results section
│   └── STRATA_Atlas_Results_Draft.docx     #   Earlier draft
│
├── results/                                # Intermediate results
│   └── phase_diagram_with_residuals.csv    #   Per-sample coupling metrics
│
└── exploratory/                            # Full analysis history (transparency)
    ├── README.md                           #   Timeline and documentation
    ├── HANDOFF_DAY2.md                     #   Session continuity docs
    ├── day1_scrnaseq/                      #   GSE173706 UMAP-based exploration
    │   ├── day1_standalone.py              #     h5ad → CollecTRI → STRATA fields
    │   ├── day1_replot.py                  #     Key skin TF figures
    │   └── *.png                           #     Gradient alignment, TF×celltype
    ├── day2_spatial_fields/                #   First spatial fields + H&E overlay
    │   ├── day2_spatial_strata.py          #     Visium → spatial STRATA fields
    │   ├── day2_he_overlay.py              #     H&E histology overlay script
    │   └── *.png                           #     Per-sample fields, disease heatmap
    ├── day3_dej_phase/                     #   DEJ axis + phase diagram
    │   ├── day3_dej_phase.py              #     → composite manuscript figures
    │   └── phase_diagram_prototype.png     #     Early prototype
    └── permutation_framework/              #   Statistical validation development
        ├── permutation_null.py             #     4-claim null model
        ├── strata_permutation_adapted.py   #     Adapted for CSV/grid
        ├── run_claim2.py                   #     Coupling toroidal shift
        └── visualization.py               #     Null distribution figures

Quick Start

Reproduce manuscript figures (~5 min)

Note: The Python scripts are a reimplementation of the original R/Seurat analysis. Core statistics (coupling ρ, FOXP3 0/50, residual–PASI) match exactly. Bin-level sig counts differ slightly due to DEJ axis implementation. See REPRODUCTION_NOTES.md for a full concordance table.

git clone https://github.com/jengweitjiu/STRATA-Atlas.git
cd STRATA-Atlas
pip install -r requirements.txt
./run_all.sh --python-only

From Zenodo RDS (~15 min + download)

# Download Zenodo pre-built Seurat object
wget https://zenodo.org/record/7562864/files/GITHUB-DATA.zip
unzip GITHUB-DATA.zip

# Extract CSVs from RDS
Rscript R/install_packages.R
Rscript R/01_extract_from_zenodo_rds.R \
  GITHUB-DATA/ST-DATA/PSORIASIS-DATA/RDS-Files/all_samples_merged_obj.RDS data/

# Run Python pipeline
./run_all.sh --python-only

From GEO raw data (~45 min + download)

Rscript R/install_packages.R
# Place Space Ranger outputs under R/geo_raw/
Rscript R/00_preprocess_seurat.R --data_dir data/ --geo_dir R/geo_raw/
./run_all.sh --python-only

Data Provenance

Source: GSE202011 (Castillo et al., Sci. Immunol., 2023) — 30 Visium samples

Condition Spots Samples PASI Range
Healthy 3,786 7
Non-lesional 3,885 9 1.8–32.0
Lesional 8,753 14 1.8–32.0
Total 16,424 30

24 TFs: Selected for skin immunology relevance. Regulon targets from DoRothEA (A–C confidence), scored via AUCell.


Pipeline Summary

Step Script Output
0 R/00_preprocess_seurat.R 3 CSVs from GEO/Zenodo
1 01_compute_dej_axis.py DEJ coordinates per spot
2 02_tf_field_profiles.py Fig 1b: TF profiles along DEJ
3 03_coupling_analysis.py Fig 2: Coupling + PASI
4 04_foxp3_smad3_analysis.py Fig 3: FOXP3 conservation
5 05_permutation_validation.py Fig 4: Permutation validation
6 06_generate_fig5_heatmap.py Fig 5: 24-TF heatmap

Related Work

License

MIT. See LICENSE.

About

STRATA-Atlas: Spatial Regulon Field Theory analysis of transcription factor regulatory architecture in psoriasis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors