==============================================================================
Spatial / communication-level SASP ligand-receptor analysis
==============================================================================
SASP panel: 96 genes; categories: {'growth_factor': 25, 'chemokine': 20, 'cytokine': 19, 'mmp': 19, 'adhesion_receptor': 13}
COMMOT: 13 LR pairs; scDiffCom: 9086 CCIs / 1027 LRIs; spot-sender rows: 130000; CellChat rows: 5286

--- PART 1: COMMOT spatial LR pairs ---
significant at P<0.05: 9/13 (SASP-ligand 6/8; non-SASP 3/5)
        pair  young_mean  old_mean    log2FC            p         BH_q  sasp_ligand  n_slide_comparisons_old_higher
  Angpt1-Tek    0.069815  0.292938  2.068989 2.856068e-27 1.237629e-26         True                               4
  Igf1-Igf1r    0.182844  0.307768  0.751228 1.197913e-78 7.786437e-78         True                               4
 Efna1-Epha3    0.072035  0.101486  0.494521 1.085593e-07 2.352118e-07        False                               4
Tgfb1-Tgfbr1    0.140304  0.194878  0.474015 1.373725e-02 2.232303e-02         True                               4
  Vegfa-Flt1    0.729073  0.900876  0.305266 6.118268e-12 1.590750e-11         True                               4
Tgfb1-Tgfbr2    0.129091  0.157942  0.291005 2.340443e-02 3.380640e-02         True                               2
  Rspo3-Lgr5    0.374205  0.364978 -0.036020 3.431067e-01 4.460388e-01        False                               1
  Vegfc-Flt4    0.381848  0.370614 -0.043077 4.267113e-01 5.042952e-01         True                               2
   Vegfa-Kdr    2.285071  2.215435 -0.044649 5.343366e-01 5.788646e-01         True                               1
 Jag1-Notch1    0.401470  0.327555 -0.293556 1.084144e-03 2.013410e-03         True                               0
   Ngf-Sort1    0.277706  0.213054 -0.382341 7.138833e-01 7.138833e-01        False                               0
   Tgfa-Egfr    1.834069  1.313758 -0.481348 2.045951e-26 6.649341e-26        False                               0
      F2-F2r    2.464250  0.875098 -1.493631 0.000000e+00 0.000000e+00        False                               0
SASP vs non-SASP log2FC: median +0.298 vs -0.382; MWU P=0.1274
Fisher SASP among P<0.05: table [[6, 2], [3, 2]] OR=2 P=1

Layer-resolved log2FC (selected SASP pairs):
Layer         Layer1  Layer2  Layer3  Layer4  Layer5  Layer6  Layer7  Layer8  Layer9
pair                                                                                
Angpt1-Tek      3.92    2.77    3.55    2.43    2.09    1.75    2.06    1.51    0.92
Igf1-Igf1r      0.82    0.77    0.68    0.87    0.38    0.70    0.97    0.96    0.60
Jag1-Notch1    -1.16   -1.57   -0.65   -0.79    0.63   -0.20    0.28   -0.17    0.24
Tgfb1-Tgfbr1    0.39    0.74    0.53    1.05    0.85    0.30    0.07    0.14    0.37
Tgfb1-Tgfbr2    0.32    0.52    0.42    0.94    0.40   -0.05    0.05   -0.21    0.36
Vegfa-Flt1      0.31    0.34    0.09    0.33    0.22    0.28    0.45    0.26    0.41
Vegfa-Kdr      -0.03    0.02   -0.10   -0.12   -0.07   -0.01   -0.02   -0.05   -0.03
Vegfc-Flt4      0.02    0.33    0.46    0.04   -0.26   -0.21   -0.08   -0.22   -0.21

Max |Spearman rho| between spot sender and Zonation_score: 0.175 (all pairs weak)

--- PART 2: scDiffCom differential cell-cell communication ---
SASP-ligand CCIs: 1153/9086; SASP LRIs: 130/1027
SASP ligands detected: ['Angpt1', 'Bmp2', 'Bmp6', 'C3', 'Ccl24', 'Ccl25', 'Ccl5', 'Csf1', 'Cxcl12', 'Fasl', 'Icam1', 'Igf1', 'Igfbp4', 'Il15', 'Il18', 'Il1a', 'Il1b', 'Inhba', 'Jag1', 'Mmp14', 'Nampt', 'Tgfb1', 'Tgfb2', 'Timp2', 'Timp3', 'Tnfsf10', 'Vcam1', 'Vegfa', 'Vegfc', 'Wnt2']
CCI |log2FC| median 0.1654 (SASP) vs 0.1938 (other); MWU P=4.28e-05
CCI signed log2FC median -0.0176 vs -0.0062; MWU P=0.925
Fisher DE q<0.05: table [[132, 1021], [1061, 6872]] OR=0.837 P=0.07606
Fisher age-regulated (UP/DOWN): table [[75, 1078], [582, 7351]] OR=0.879 P=0.3304
Fisher DOWN: OR=0.633 P=0.02819; UP: OR=1.118 P=0.4628
LRI-level: 45/130 SASP LRIs vs 232/897 others have >=1 regulated CCI; OR=1.517 P=0.04409

SASP CCI senders (n, UP, DOWN):
                      n_cci  n_up  n_down  median_abs_log2FC
sender                                                      
mesenchymal           184.0  16.0     5.0              0.152
endothelial           175.0  13.0     4.0              0.190
hepatocyte            163.0   3.0     8.0              0.136
Kupffer 02            154.0  10.0     0.0              0.171
cholangiocyte 01      147.0   2.0     3.0              0.194
Kupffer 01            139.0   1.0     3.0              0.164
non-resident myeloid   96.0   2.0     1.0              0.115
B cells                49.0   0.0     0.0              0.154
T/ILC cells            45.0   1.0     2.0              0.228

--- PART 3: CellChat 5-age SASP trajectory (snRNA) ---
SASP interactions detected in >=4 ages: 20; 17 decline by geriatric
        interaction  prob_young  prob_geriatric  geriatric_over_young
         ANGPT1_TEK       0.699           0.311                 0.445
 BMP2_BMPR1A_ACVR2A       0.459           0.288                 0.627
  BMP2_BMPR1A_BMPR2       0.423           0.289                 0.684
  BMP6_ACVR1_ACVR2A       0.553           0.340                 0.615
   BMP6_ACVR1_BMPR2       0.864           0.462                 0.534
 BMP6_BMPR1A_ACVR2A       0.697           0.520                 0.746
  BMP6_BMPR1A_BMPR2       0.644           0.523                 0.811
     C3_ITGAM_ITGB2         NaN           0.455                   NaN
          CCL5_CCR5       0.113           0.645                 5.721
         IGF1_IGF1R       1.971           1.259                 0.639
   IGF1_ITGAV_ITGB3       0.163           0.115                 0.708
     IGFBP3_TMEM219       0.060           0.024                 0.399
 TGFB1_ACVR1_TGFBR1       0.079           0.055                 0.692
TGFB1_TGFBR1_TGFBR2       0.219           0.161                 0.734
       VEGFA_VEGFR1       0.542           0.358                 0.661
     VEGFA_VEGFR1R2       1.045           0.581                 0.556
       VEGFA_VEGFR2       1.085           0.561                 0.517
       VEGFC_VEGFR2       0.792           0.443                 0.559
     VEGFC_VEGFR2R3       0.616           0.430                 0.698
       VEGFC_VEGFR3       0.250           0.253                 1.014

--- PART 4: SASP module linkage ---
module  n_ligands  n_lri  n_up  n_down                                     ligands
                8     13    11      10 C3,Ccl24,Ccl25,Igfbp4,Il1a,Timp3,Vegfc,Wnt2
   M06          4     12    20       6                      Ccl5,Tgfb1,Timp2,Vcam1
   M03          2      9     6       5                                Angpt1,Vegfa
   M21          2      4     4       2                                Cxcl12,Nampt
   M15          1      4     7       0                                       Icam1
   M18          1      1     1       0                                       Mmp14
  grey          1      2     0       3                                       Inhba

--- writing outputs ---
wrote spatial_sasp_pairs.tsv (143 rows), spatial_sasp_cci.tsv (1153 rows), spatial_commot_layer.tsv (117 rows), spatial_cellchat_trajectory.tsv (20 rows), spatial_enrichment_tests.tsv (8 tests), spatial_summary.json