Abstract
A central problem in spatial transcriptomics is detecting differentially expressed (DE) genes within cell types across tissue context. Challenges to learning DE include changing cell type composition across space and measurement pixels detecting transcripts from multiple cell types. Here, we introduce a statistical method, cell type-specific inference of differential expression (C-SIDE), that identifies cell type-specific DE in spatial transcriptomics, accounting for localization of other cell types. We model gene expression as an additive mixture across cell types of log-linear cell type-specific expression functions. C-SIDE’s framework applies to many contexts: DE due to pathology, anatomical regions, cell-to-cell interactions and cellular microenvironment. Furthermore, C-SIDE enables statistical inference across multiple/replicates. Simulations and validation experiments on Slide-seq, MERFISH and Visium datasets demonstrate that C-SIDE accurately identifies DE with valid uncertainty quantification. Last, we apply C-SIDE to identify plaque-dependent immune activity in Alzheimer’s disease and cellular interactions between tumor and immune cells. We distribute C-SIDE within the R package https://github.com/dmcable/spacexr.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$29.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout
Similar content being viewed by others
Data availability
Slide-seq V2 data generated for this study and additional data are available at the Broad Institute Single Cell Portal https://singlecell.broadinstitute.org/single_cell/study/SCP1663. We also used the following publicly available datasets in our study. MERFISH hypothalamus dataset was accessed from Dryad https://doi.org/10.5061/dryad.8t8s248. Visium human lymph node is available at https://www.10xgenomics.com/resources/datasets/human-lymph-node-1-standard-1-1-0. Testes Slide-seq data can be accessed at https://www.dropbox.com/s/ygzpj0d0oh67br0/Testis_Slideseq_Data.zip?dl=0. Cancer Slide-seq data are available at https://singlecell.broadinstitute.org/single_cell/study/SCP1278. Hallmark gene sets were accessed from https://www.gsea-msigdb.org/.
Code availability
C-SIDE is implemented in the open-source R package spacexr, with source code freely available at https://github.com/dmcable/spacexr. Additional code used for analysis in this paper is available at https://github.com/dmcable/spacexr/tree/master/AnalysisCSIDE.
References
Rodriques, S. G. et al. Slide-seq: a scalable technology for measuring genome-wide expression at high spatial resolution. Science 363, 1463–1467 (2019).
Stickels, R. R. et al. Highly sensitive spatial transcriptomics at near-cellular resolution with Slide-seqV2. Nat. Biotechnol. 39, 313–319 (2021).
Chen, K. H., Boettiger, A. N., Moffitt, J. R., Wang, S. & Zhuang, X. Spatially resolved, highly multiplexed RNA profiling in single cells. Science 348, 412 (2015).
Wang, X. et al. Three-dimensional intact-tissue sequencing of single-cell transcriptional states. Science 361, 380 (2018).
10X Genomics: visium spatial gene expression. 10X Genomics https://www.10xgenomics.com/solutions/spatial-gene-expression/ (2020).
Zollinger, D. R., Lingle, S. E., Sorg, K., Beechem, J. M. & Merritt, C. R. GeoMx RNA assay: High multiplex, digital, spatial analysis of RNA in FFPE tissue. In Ian A. Darby & Tim D. Hewitson (eds.) In Situ Hybridization Protocols, 331–345 (Springer, 2020).
Alon, S. et al. Expansion sequencing: spatially precise in situ transcriptomics in intact biological systems. Science 371, 481 (2021).
Moffitt, J. R. et al. Molecular, spatial, and functional single-cell profiling of the hypothalamic preoptic region. Science 362, 792 (2018).
Chen, H. et al. Dissecting mammalian spermatogenesis using spatial transcriptomics. Cell Rep. 37, 109915 (2021).
Svensson, V., Teichmann, S. A. & Stegle, O. SpatialDE: identification of spatially variable genes. Nat. Methods 15, 343–346 (2018).
Sun, S., Zhu, J. & Zhou, X. Statistical analysis of spatial expression patterns for spatially resolved transcriptomic studies. Nat. Methods 17, 193–200 (2020).
Zhu, J., Sun, S. & Zhou, X. SPARK-X: non-parametric modeling enables scalable and robust detection of spatial expression patterns for large spatial transcriptomic studies. Genome Biol. 22, 184 (2021).
Dries, R. et al. Giotto: a toolbox for integrative analysis and visualization of spatial expression data. Genome Biol. 22, 78 (2021).
Butler, A., Hoffman, P., Smibert, P., Papalexi, E. & Satija, R. Integrating single-cell transcriptomic data across different conditions, technologies, and species. Nat. Biotechnol. 36, 411–420 (2018).
Love, M. I., Huber, W. & Anders, S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol. 15, 12 (2014).
Robinson, M. D., McCarthy, D. J. & Smyth, G. K. edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics 26, 139–140 (2010).
Haghverdi, L., Lun, A. T., Morgan, M. D. & Marioni, J. C. Batch effects in single-cell RNA-sequencing data are corrected by matching mutual nearest neighbors. Nat. Biotechnol. 36, 421–427 (2018).
Cable, D. M. et al. Robust decomposition of cell type mixtures in spatial transcriptomics. Nat. Biotechnol. 40, 517–526 (2022).
Regev, A. et al. Science forum: the human cell atlas. eLife 6, e27041 (2017).
Petukhov, V. et al. Cell segmentation in imaging-based spatial transcriptomics. Nat. Biotechnol. 40, 345–354 (2022).
Andersson, A. et al. Single-cell and spatial transcriptomics enables probabilistic inference of cell type topography. Commun. Biol. 3, 565 (2020).
Dong, R. & Yuan, G. C. SpatialDWLS: accurate deconvolution of spatial transcriptomic data. Genome Biol. 22, 145 (2021).
Kleshchevnikov, V. et al. Cell2location maps fine-grained cell types in spatial transcriptomics. Nat. Biotechnol. 40, 661–671 (2022).
Zhao, E. et al. Spatial transcriptomics at subspot resolution with BayesSpace. Nat. Biotechnol. 39, 1375–1384 (2021).
Hardin, J. W., Hardin, J. W., Hilbe, J. M. & Hilbe, J. Generalized Linear Models and Extensions (Stata Press, 2007).
Wood, S. & Wood, M. S. Package ’mgcv’. R package version 1.29 (R Foundation for Statistical Computing, 2015).
Kozareva, V. et al. A transcriptomic atlas of mouse cerebellar cortex comprehensively defines cell types. Nature 598, 214–219 (2021).
Zhao, M., Shirley, C. R., Mounsey, S. & Meistrich, M. L. Nucleoprotein transitions during spermiogenesis in mice with transition nuclear protein Tnp1 and Tnp2 mutations. Biol. Reproduction 71, 1016–1025 (2004).
Hasegawa, K. & Saga, Y. Retinoic acid signaling in Sertoli cells regulates organization of the blood-testis barrier through cyclical changes in gene expression. Development 139, 4347–4355 (2012).
Xu, J. et al. Computerized spermatogenesis staging (CSS) of mouse testis sections via quantitative histomorphological analysis. Med. Image Anal. 70, 101835 (2021).
Mucke, L. et al. High-level neuronal expression of Aβ1–42 in wild-type human amyloid protein precursor transgenic mice: Synaptotoxicity without plaque formation. J. Neurosci. 20, 4050–4058 (2000).
Kraft, A. W. et al. Attenuating astrocyte activation accelerates plaque pathogenesis in APP/PS1 mice. FASEB J. 27, 187–198 (2013).
Hong, S. et al. Complement and microglia mediate early synapse loss in Alzheimer mouse models. Science 352, 712–716 (2016).
Zhou, Y. et al. Human and mouse single-nucleus transcriptomics reveal TREM2-dependent and TREM2-independent cellular responses in Alzheimer’s disease. Nat. Med. 26, 131–142 (2020).
Veerhuis, R. et al. Cytokines associated with amyloid plaques in Alzheimer’s disease brain stimulate human glial and neuronal cell cultures to secrete early complement proteins, but not C1-inhibitor. Exp. Neurol. 160, 289–299 (1999).
Bernstein, H. G. & Keilhoff, G. Putative roles of cathepsin B in Alzheimer’s disease pathology: the good, the bad, and the ugly in one? Neural Regen. Res. 13, 2100 (2018).
Sobue, A. et al. Microglial gene signature reveals loss of homeostatic microglia associated with neurodegeneration of Alzheimer's disease. Acta Neuropathol. Commun. 9, 1 (2021).
Keren-Shaul, H. et al. A unique microglia type associated with restricting development of Alzheimer’s disease. Cell 169, 1276–1290 (2017).
Serrano-Pozo, A., Das, S. & Hyman, B. T. APOE and Alzheimer’s disease: advances in genetics, pathophysiology, and therapeutic approaches. Lancet Neurol. 20, 68–80 (2021).
Mendsaikhan, A., Tooyama, I. & Walker, D. G. Microglial progranulin: involvement in Alzheimer’s disease and neurodegenerative diseases. Cells 8, 230 (2019).
Zhou, X. et al. Cellular and molecular properties of neural progenitors in the developing mammalian hypothalamus. Nature Commun. 11, 4063 (2020).
Romanov, R. A. et al. Molecular interrogation of hypothalamic organization reveals distinct dopamine neuronal subtypes. Nat. Neurosci. 20, 176–188 (2017).
V1_Human_Lymph_Node—Datasets—Spatial Gene Expression https://support.10xgenomics.com/spatial-geneexpression/datasets/1.1.0/V1_Human_Lymph_Node (10X Genomics, 2020).
Milpied, P. et al. Human germinal center transcriptional programs are de-synchronized in B cell lymphoma. Nat. Immunol. 19, 1013–1024 (2018).
Abe, Y. et al. A single-cell atlas of non-haematopoietic cells in human lymph nodes and lymphoma reveals a landscape of stromal remodelling. Nat. Cell Biol. 24, 565–578 (2022).
Weinstein, A. M. & Storkus, W. J. In Wang, X.-Y. & Fisher, P. B. (eds.) Immunotherapy of Cancer Vol. 128 Advances in Cancer Research 197–233 (Academic Press, 2015).
Zhao, T. et al. Spatial genomics enables multi-modal study of clonal heterogeneity in tissues. Nature 601, 85–91 (2022).
Dang, C. V. c-Myc target genes involved in cell growth, apoptosis, and metabolism. Mol. Cell. Biol. 19, 1 (1999).
Jiménez-Sánchez, J. et al. Evolutionary dynamics at the tumor edge reveal metabolic imaging biomarkers. Proc. Natl Acad. Sci. USA 118, 110–118 (2021).
Kodama, M. et al. In vivo loss-of-function screens identify KPNB1 as a new druggable oncogene in epithelial ovarian cancer. Proc. Nat. Acad. Sci. USA 114, E7301–E7310 (2017).
Chen, D. P. et al. Peritumoral monocytes induce cancer cell autophagy to facilitate the progression of human hepatocellular carcinoma. Autophagy 14, 1335–1346 (2018).
Lim, S. Y., Yuzhalin, A. E., Gordon-Weeks, A. N. & Muschel, R. J. Targeting the CCL2-CCR2 signaling axis in cancer metastasis. Oncotarget 7, 28697 (2016).
Pires, B. R. et al. NF-kappaB is involved in the regulation of EMT genes in breast cancer cells. PloS ONE 12, e0169622 (2017).
Dongre, A. & Weinberg, R. A. New insights into the mechanisms of epithelial-mesenchymal transition and implications for cancer. Nat. Rev. Mol. Cell Biol. 20, 69–84 (2019).
Satoh, J.-i. et al. TMEM106B expression is reduced in Alzheimer’s disease brains. Alzheimeras Res. Ther. 6, 17 (2014).
Walker, D. G., Kim, S. U. & McGeer, P. L. Expression of complement C4 and C9 genes by human astrocytes. Brain Res. 809, 31–38 (1998).
Götzl, J. K. et al. Opposite microglial activation stages upon loss of PGRN or TREM 2 result in reduced cerebral glucose metabolism. EMBO Mol. Med. 11, e9711 (2019).
Minami, S. S. et al. Progranulin protects against amyloid β deposition and toxicity in Alzheimer’s disease mouse models. Nat. Med. 20, 1157–1164 (2014).
Yuan, Y. X. A review of trust region algorithms for optimization. In Proc. 4th International Congress on Industrial & Applied Mathematics (ICIAM 99), Edinburgh 271–282 (Oxford Univ. Press, 2000).
Van der Vaart, A. W. Asymptotic Statistics Vol. 3 (Cambridge Univ. Press, 2000).
Benjamini, Y. & Hochberg, Y. Controlling the false discovery rate: a practical and powerful approach to multiple testing. J. R. Stat. Soc. Ser. B Methodol. 57, 289–300 (1995).
DerSimonian, R. & Laird, N. Meta-analysis in clinical trials. Control. Clin. Trials 7, 177–188 (1986).
Green, C. D. et al. A comprehensive roadmap of murine spermatogenesis defined by single-cell RNA-seq. Dev. Cell 46, 651–667 (2018).
Saunders, A. et al. Molecular diversity and specializations among the cells of the adult mouse brain. Cell 174, 1015–1030 (2018).
Bergenstråhle, J., Larsson, L. & Lundeberg, J. Seamless integration of image and molecular analysis for spatial transcriptomics workflows. BMC Genomics 21, 482 (2020).
Dirks, R. M. & Pierce, N. A. Triggered amplification by hybridization chain reaction. Proc. Natl Acad. Sci. USA 101, 15275–15278 (2004).
Liberzon, A. et al. Molecular signatures database (MSigDB) 3.0. Bioinformatics 27, 1739–1740 (2011).
Irizarry, R. A., Wang, C., Zhou, Y. & Speed, T. P. Gene set enrichment analysis made simple. Stat. Methods Med. Res. 18, 565–575 (2009).
Turlach, B. A. & Weingessel, A. quadprog: Functions to solve quadratic programming problems. R package version 1.5-5 (R Foundation for Statistical Computing, 2013).
Acknowledgements
We thank R. Stickels for providing valuable input on the analysis. We thank T. Zhao and Z. Chiang for generously providing the cancer Slide-seq data. We thank S. Marsh (Harvard Medical School/Boston Children’s Hospital) for kindly providing mouse J20 Alzheimer’s model samples. We thank members of the Chen laboratory, Irizarry laboratory and Macosko laboratory including T. Kamath for helpful discussions and feedback. D.M.C. was supported by a Fannie and John Hertz Foundation Fellowship and an National Science Federation Graduate Research Fellowship. This work was supported by an National Institutes of Health (NIH) Early Independence Award (DP5, 1DP5OD024583 to F.C.), the NHGRI (R01, R01HG010647 to F.C. and E.Z.M.), as well as the Burroughs Wellcome Fund, the Searle Scholars Award, and the Merkin Institute to F.C. R.A.I. was supported by NIH grant nos. R35GM131802 and R01HG005220.
Author information
Authors and Affiliations
Contributions
D.M.C., R.A.I. and F.C. conceived the study. F.C., E.M., E.Z.M. and D.M.C. designed the Slide-seq, antibody stain and HCR experiments. E.M. generated the Slide-seq, antibody stain and HCR data. D.M.C., R.A.I. and F.C. developed the statistical methods. D.M.C., F.C. and R.A.I. designed the analysis. D.M.C., S.Z., L.S.Z., M.D., R.A.I. and F.C. analyzed the data. D.M.C., F.C., R.A.I., V.S. and H.C. interpreted biological results. V.S. annotated the tumor H&E stain. D.M.C., F.C. and R.A.I. wrote the manuscript and all authors read and approved the final manuscript.
Corresponding authors
Ethics declarations
Competing interests
E.Z.M. and F.C. are listed as inventors on a patent application related to Slide-seq. F.C. and E.Z.M. are paid consultants of Atlas Bio. The remaining authors declare no competing interests.
Peer review
Peer review information
Nature Methods thanks Pengyi Yang and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling Editor: Lin Tang, in collaboration with the Nature Methods team.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information
Supplementary Methods and Figs. 1–12.
Supplementary Tables
Supplementary Table 1 Slide-seq cerebellum population-level C-SIDE significant results across three experimental replicates. Columns include cell type, mean_est (estimated loge fold-change), sd_est (standard error), Z_est (Z-score), p (P value), q_val (q-val) and sig_p (estimated standard deviation of technical and biological variation across samples). Also contains the log fold-change and standard errors for each of the three datasets. Supplementary Table 2 Slide-seq testes C-SIDE significant results. Columns include cell type, log_fc (estimated loge fold-change across two stages with maximal DE), sd (standard error), Xi (estimated log-e expression in stage i), p_val (P value). Supplementary Table 3 MERFISH hypothalamus linear C-SIDE significant results. Columns include cell type, log_fc (estimated DE loge fold-change), Z_score (Z-score), p_val (P value) and conv (convergence). Supplementary Table 4 MERFISH hypothalamus quadratic C-SIDE significant results. Columns include cell type, log_fc (estimated DE loge fold-change), Z_score (Z-score), p_val (P value) and conv (convergence). Supplementary Table 5 Visium lymph node C-SIDE significant results. Columns include cell type, log_fc (estimated DE loge fold-change), Z_score (Z-score), p_val (P value) and conv (convergence). Supplementary Table 6 Slide-seq J20 Hippocampus population-level C-SIDE significant results across four experimental replicates. Columns include cell type, mean_est (estimated log-e-fold-change), sd_est (standard error), Z_est (Z-score), p (P value), q_val (q-val) and sig_p (estimated standard deviation of technical and biological variation across samples). Also, contains the log fold-change and standard errors for each of the four datasets. Supplementary Table 7 Slide-seq tumor nonparametric C-SIDE significant results. Columns include cell type, Z_score (Z-score), p_val (P value) and conv (convergence). Supplementary Table 8 Gene set testing results on the Slide-seq tumor. Significant gene sets are shown. Supplementary Table 9 Slide-seq tumor parametric C-SIDE significant results. Columns include cell type, log_fc (estimated DE loge fold-change), Z_score (Z-score), p_val (P value) and conv (convergence). Supplementary Table 10 HCR probes used for validation experiments on the cerebellum. Supplementary Table 11 Metadata about datasets analyzed in this C-SIDE paper.
Supplementary Software 1
spacexr package manual, v.2.0.0.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Cable, D.M., Murray, E., Shanmugam, V. et al. Cell type-specific inference of differential expression in spatial transcriptomics. Nat Methods 19, 1076–1087 (2022). https://doi.org/10.1038/s41592-022-01575-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s41592-022-01575-3
This article is cited by
-
Detection of allele-specific expression in spatial transcriptomics with spASE
Genome Biology (2024)
-
Niche-DE: niche-differential gene expression analysis in spatial transcriptomics data identifies context-dependent cell-cell interactions
Genome Biology (2024)
-
spVC for the detection and interpretation of spatial gene expression variation
Genome Biology (2024)
-
Benchmarking spatial clustering methods with spatially resolved transcriptomics data
Nature Methods (2024)
-
Challenges and perspectives in computational deconvolution of genomics data
Nature Methods (2024)