SpaPheno: Linking Spatial Transcriptomics to Clinical Phenotypes with Interpretable Machine Learning
Linking spatial transcriptomic patterns to clinically relevant phenotypes is a critical step toward spatially informed precision oncology. Here, we introduce SpaPheno, an interpretable machine learning framework that integrates spatial transcriptomics with clinically annotated bulk RNA-seq data to uncover spatially resolved biomarkers predictive of patient outcomes. Leveraging Elastic Net regression combined with SHAP-based attribution, SpaPheno uniquely identifies spatial features at multiple scales—from tissue regions to specific cell types and individual spatial spots—that are associated with patient survival, tumor stage, and immunotherapy response. We demonstrate the robustness and generalizability of SpaPheno through comprehensive simulations and applications spanning primary liver cancer, clear cell renal cell carcinoma, breast cancer, and melanoma. Across these diverse settings, SpaPheno achieves high predictive accuracy while providing biologically meaningful and spatially precise interpretations. Our framework offers a powerful and extensible approach for translating complex spatial omics data into actionable clinical insights, accelerating the development of precision oncology strategies grounded in tumor spatial architecture.
-
Integration of spatial transcriptomics with clinically annotated bulk RNA-seq data
-
Multi-scale interpretable machine learning framework
-
Robust applicability across diverse cancer types and clinical endpoints
if (!require("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
## Install suggested packages
# BiocManager::install(c(
# "glmnet",
# "FNN",
# "survival"
# ))
# install.packages("devtools")
# devtools::install_github("bm2-lab/SpaDo")
# SpaPheno installation
# devtools::install_github("Duan-Lab1/SpaPheno", dependencies = c("Depends", "Imports", "LinkingTo"))
library(SpaPheno)
library(tidyverse)
library(ggplot2)
library(reshape2)
library(stringr)
library(survival)
Download the pre-packaged installation package directly from the GitHub repository
install.packages("SpaPheno_0.0.1.tar.gz", repos = NULL, type = "source")
The data required for the test are all listed in the following google cloud directory SpaPheno Demo Data.
├── BRCAsurvival.RData
├── HCC_stage.RData
├── HCC_survival.RData
├── KIRC_survival.RData
├── Melanoma_ICB.RData
├── Simulation_osmFISH.RData
└── Simulation_STARmap.RData
For more information and documentation, please visit the SpaPheno website.
Using the following command and Choosing the html
for more details.
utils::browseVignettes(package = "SpaPheno")
Welcome any contributions or comments, and you can file them here.
Thanks all the developers of the methods integrated into SpaPheno.
Kindly cite by using citation("SpaPheno")
if you think SpaPheno
helps you. Alternative way is Bin Duan (2025). SpaPheno: Linking
Spatial Transcriptomics to Clinical Phenotypes with Interpretable
Machine Learning. R package version 0.0.1,
<URL:https://github.com/Duan-Lab1/SpaPheno>.