Abstract
<title>Abstract</title> <p>Background Spatial transcriptomics captures tissue architecture, yet pathway enrichment analysis often neglects spatial context. SEMA, a framework that integrates spatial information into pathway enrichment to better decode spatially resolved data. Results SEMA outperformed other major methods in accuracy, specificity and efficiency on brain, lymph node and tumor datasets. In breast cancer, it revealed metabolic pathway enrichment and ligand–receptor pairs colocalized with tertiary lymphoid structures. Pan-cancer analysis identified fibroblasts as spatial hubs, with their segregation from epithelial/carcinoma cells correlating with enhanced immune activity and distinct cancer-associated fibroblast subtypes. Conclusions SEMA is a powerful tool for uncovering spatially pathway activities, providing valuable insights into tumor biology and tissue microenvironments.</p>