OSCR

Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.

Code ↔ Paper

10 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 10 matches
  1. [1] § RESULTS › Spatial reorganization of multiple cell types following RIR ↔ 02figure2/fig 2D.ipynb, lines 43–67 · score 0.86 · Schwann cell, proliferating cell, CEC, CSK, LEC, LSC
  2. [2] § RESULTS › Spatial reorganization of multiple cell types following RIR ↔ 02figure2/fig 2A-B.ipynb, lines 143–164 · score 0.86 · Schwann cell, proliferating cell, CEC, CSK, LEC, LSC
  3. [3] § RESULTS › RIR induces spatially restricted inflammation and molecular alterations dominated by microglial activation in the inner retina ↔ 03figure3/fig 3J.ipynb, lines 143–145 · score 0.77 · Pde6b, Ms4a7, P2ry12, C1qa, Cd44, Hexb
  4. [4] § RESULTS › High‐resolution ST delineates region‐specific molecular architecture in the RIR ocular globes ↔ 02figure2/fig 2E.ipynb, lines 169–202 · score 0.68 · Col17a1, Aldh3a1, Nefm, Sncg, Krt12, Nefl
  5. [5] § METHODS › Processing, dimensionality reduction, clustering, and annotation of public scRNA‐seq datasets ↔ vignettes/geseca-tutorial.Rmd, lines 377–432 · score 0.67 · dimensionality reduction, UMAP, Seurat, downstream, spatial transcriptomics, PCA
  6. [6] § METHODS › Dividing mouse eyeball into 10 regions ↔ 01figure1/fig 1E.ipynb, lines 61–63 · score 0.59 · Cornea conj, Optic nerve, CB, Iris, Muscle, INL
  7. [7] § METHODS › Dividing mouse eyeball into 10 regions ↔ 03figure3/fig 3A.ipynb, lines 122–124 · score 0.59 · Cornea conj, Optic nerve, CB, Iris, Muscle, INL
  8. [8] § METHODS › Processing, dimensionality reduction, clustering, and annotation of public scRNA‐seq datasets ↔ vignettes/geseca-tutorial.Rmd, lines 377–432 · score 0.56 · UMAP, Seurat, variable, PCA, dimensionality, resolution
  9. [9] § METHODS › Annotation of spatial transcriptomic data ↔ 01figure1/fig 1E.ipynb, lines 61–63 · score 0.54 · Cornea conj, optic nerve, CB, Iris, muscle, RPE
  10. [10] § METHODS › Annotation of spatial transcriptomic data ↔ 03figure3/fig 3A.ipynb, lines 122–124 · score 0.54 · Cornea conj, optic nerve, CB, Iris, muscle, RPE

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R Markdown · 536 lines · 19 KB · MIT · 2 matches

  1. ---
  2. title: "Gene set co-regulation analysis tutorial"
  3. output:
  4. rmarkdown::html_vignette:
  5. toc: true
  6. vignette: >
  7. %\VignetteIndexEntry{Gene set co-regulation analysis tutorial}
  8. %\VignetteEngine{knitr::rmarkdown}
  9. %\VignetteEncoding{UTF-8}
  10. ---
  11. ```{r, include = FALSE}
  12. knitr::opts_chunk$set(
  13. collapse = TRUE,
  14. comment = "#>"
  15. )
  16. ```
  17. ```{r echo=FALSE}
  18. library(BiocParallel)
  19. register(SerialParam())
  20. ```
  21. This vignette describes GESECA (gene set co-regulation analysis): a method
  22. to identify gene sets that have high gene correlation.
  23. We will show how GESECA can be used to find regulated pathways
  24. in multi-conditional data, where there is no obvious contrast that
  25. can be used to rank genes for GSEA analysis.
  26. As examples we will consider a time course microarray experiment
  27. and a spatial transcriptomics dataset.
  28. ## Overiew of GESECA method
  29. GESECA takes as an input:
  30. * *E* - gene expression matrix, where rows and columns correspond to genes and samples respectively.
  31. * *P* - list of gene sets (i.e.
  32. [hallmark gene sets](http://www.gsea-msigdb.org/gsea/msigdb/human/collections.jsp#H)).
  33. **Note**: genes identifier type should be the same for both elements of *P* and for row names of matrix *E*.
  34. By default, GESECA method performs centering for rows of the matrix *E*.
  35. So, after that, the gene values are assumed to have zero mean.
  36. Then for each gene set *p* in *P* let us introduce the gene set score in the following form:
  37. ```{r eval=FALSE}
  38. score <- sum(colSums(E[p, ])**2) / length(p)
  39. ```
  40. This score was inspired by the variance of principal components
  41. from the principal component analysis (PCA).
  42. Therefore, the given score can be viewed in terms of explained variance by the gene set *p*.
  43. Geometrically, this can be considered as an embedding of samples into
  44. a one-dimensional space, given by a unit vector in which nonzero
  45. positions correspond to genes from gene set *p*.
  46. In the case of row-centered matrix *E* the variance of
  47. highly correlated genes is summed up to a higher score.
  48. While the genes that are not correlated cancel each other and the total
  49. gene set variance is low.
  50. See the toy example:
  51. ![Toy example of GESECA score calculation](geseca-vignette-score-toy-example.png){width=90%}
  52. Another major feature of the proposed score is that it does not require
  53. an explicit sample annotation or a contrast.
  54. As the result, GESECA can be applied to various types of sequencing technologies: RNA-seq, single-cell sequencing, spatial RNA-seq, etc.
  55. To assess statistical significance for a given gene set *p* we calculate
  56. an empirical P-value by using gene permutations.
  57. The definition of the P-value is given by the following expression:
  58. \[
  59. \mathrm{P} \left(\text{random score} \geqslant \text{score of p} \right).
  60. \]
  61. The estimation of the given P-value is done by sampling random gene sets
  62. with the same size as *p* from the row names of matrix *E*.
  63. In practice, the theoretical P-value can be extremely small,
  64. so we use the adaptive multilevel Markov Chain Monte Carlo scheme,
  65. that we used previously in `fgseaMultilevel` procedure.
  66. For more details, see the [preprint](https://www.biorxiv.org/content/10.1101/060012v3).
  67. ## Analysis of time course data
  68. In the first example we will consider a time course data of Th2 activation
  69. from the dataset GSE200250.
  70. First, let prepare the dataset. We load it from Gene Expression Omnibus,
  71. apply log and quantile normalization and filter lowly expressed genes.
  72. ```{r message=FALSE}
  73. library(GEOquery)
  74. library(limma)
  75. gse200250 <- getGEO("GSE200250", AnnotGPL = TRUE, returnType = "ExpressionSet")[[1]]
  76. es <- gse200250
  77. es <- es[, grep("Th2_", es$title)]
  78. es$time <- as.numeric(gsub(" hours", "", es$`time point:ch1`))
  79. es <- es[, order(es$time)]
  80. exprs(es) <- normalizeBetweenArrays(log2(exprs(es)), method="quantile")
  81. es <- es[order(rowMeans(exprs(es)), decreasing=TRUE), ]
  82. es <- es[!duplicated(fData(es)$`Gene ID`), ]
  83. rownames(es) <- fData(es)$`Gene ID`
  84. es <- es[!grepl("///", rownames(es)), ]
  85. es <- es[rownames(es) != "", ]
  86. fData(es) <- fData(es)[, c("ID", "Gene ID", "Gene symbol")]
  87. es <- es[head(order(rowMeans(exprs(es)), decreasing=TRUE), 12000), ]
  88. head(exprs(es))
  89. ```
  90. Then we obtain the pathway list. Here we use Hallmarks
  91. collection from MSigDB database.
  92. ```{r}
  93. library(msigdbr)
  94. pathwaysDF <- msigdbr(species="mouse", collection="H")
  95. pathways <- split(as.character(pathwaysDF$ncbi_gene), pathwaysDF$gs_name)
  96. ```
  97. Now we can run GESECA analysis:
  98. ```{r message=FALSE}
  99. library(fgsea)
  100. set.seed(1)
  101. gesecaRes <- geseca(pathways, exprs(es), minSize = 15, maxSize = 500)
  102. ```
  103. The resulting table contain GESECA scores and the corresponding P-values:
  104. ```{r}
  105. head(gesecaRes, 10)
  106. ```
  107. We can plot gene expression profile of HALLMARK_E2F_TARGETS pathway and see
  108. that these genes are strongly activated at 24 hours time point:
  109. ```{r fig.width=10, fig.height=4, out.width="100%"}
  110. plotCoregulationProfile(pathway=pathways[["HALLMARK_E2F_TARGETS"]],
  111. E=exprs(es), titles = es$title, conditions=es$`time point:ch1`)
  112. ```
  113. Hypoxia genes have slightly different profile, getting activated around 48 hours:
  114. ```{r fig.width=10, fig.height=4, out.width="100%"}
  115. plotCoregulationProfile(pathway=pathways[["HALLMARK_HYPOXIA"]],
  116. E=exprs(es), titles = es$title, conditions=es$`time point:ch1`)
  117. ```
  118. To get an overview of the top pathway patterns we can use `plotGesecaTable`
  119. function:
  120. ```{r fig.width=10, fig.height=6, out.width="100%"}
  121. plotGesecaTable(gesecaRes |> head(10), pathways, E=exprs(es), titles = es$title)
  122. ```
  123. When the expression matrix contains many samples, a PCA-reduced expression matrix
  124. can be used instead of the full matrix to improve the performance.
  125. Let reduce the sample space from `r ncol(es)` to 10 dimensions, preserving as much gene variation as possible.
  126. ```{r}
  127. E <- t(base::scale(t(exprs(es)), scale=FALSE))
  128. pcaRev <- prcomp(E, center=FALSE)
  129. Ered <- pcaRev$x[, 1:10]
  130. dim(Ered)
  131. ```
  132. Now we can run GESECA on the reduced matrix, however we need to disable automatic centering, as we already have done it before the reduction.
  133. ```{r}
  134. set.seed(1)
  135. gesecaResRed <- geseca(pathways, Ered, minSize = 15, maxSize = 500, center=FALSE)
  136. head(gesecaResRed, 10)
  137. ```
  138. The scores and P-values are similar to the ones we obtained for the full matrix.
  139. ```{r fig.width=4, fig.height=4}
  140. library(ggplot2)
  141. ggplot(data=merge(gesecaRes[, list(pathway, logPvalFull=-log10(pval))],
  142. gesecaResRed[, list(pathway, logPvalRed=-log10(pval))])) +
  143. geom_point(aes(x=logPvalFull, y=logPvalRed)) +
  144. coord_fixed() + theme_classic()
  145. ```
  146. ## Analysis of single-cell RNA-seq
  147. Let us load necessary libraries. We a going to use `Seurat` package for working with singe cell data.
  148. ```{r}
  149. suppressMessages(library(Seurat))
  150. ```
  151. As an example dataset we will use GSE116240 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE116240).
  152. The dataset features single cell RNA sequencing of aortic CD45+ cells
  153. and foam cells from atherosclerotic aorta and is extensively described
  154. in the corresponding publication (https://pubmed.ncbi.nlm.nih.gov/30359200/).
  155. We also thank the authors for providing the corresponding Seurat object
  156. used for the publication.
  157. ```{r fig.width=8, fig.height=3.5}
  158. obj <- readRDS(url("https://alserglab.wustl.edu/files/fgsea/GSE116240.rds"))
  159. obj
  160. newIds <- c("0"="Adventitial MF",
  161. "3"="Adventitial MF",
  162. "5"="Adventitial MF",
  163. "1"="Intimal non-foamy MF",
  164. "2"="Intimal non-foamy MF",
  165. "4"="Intimal foamy MF",
  166. "7"="ISG+ MF",
  167. "8"="Proliferating cells",
  168. "9"="T-cells",
  169. "6"="cDC1",
  170. "10"="cDC2",
  171. "11"="Non-immune cells")
  172. obj <- RenameIdents(obj, newIds)
  173. DimPlot(obj) + ggplot2::coord_fixed()
  174. ```
  175. We apply an appropriate normalization (note that we are using 10000 genes,
  176. which will be later used as a gene universe for the analysis):
  177. ```{r}
  178. obj <- SCTransform(obj, verbose = FALSE, variable.features.n = 10000)
  179. ```
  180. To speed up the analysis, instead of using the full transformed
  181. gene expression matrix, we will consider only its first
  182. principal components. Note that a "reverse" PCA should be done:
  183. the principal components should correspond to linear combinations
  184. of the cells, not linear combinations of the genes as in "normal" PCA.
  185. By default `SCTransform` returns centered gene expression, so we
  186. can run PCA directly.
  187. ```{r}
  188. length(VariableFeatures(obj)) # make sure it's a full gene universe of 10000 genes
  189. obj <- RunPCA(obj, assay = "SCT", verbose = FALSE,
  190. rev.pca = TRUE, reduction.name = "pca.rev",
  191. reduction.key="PCR_", npcs = 50)
  192. E <- obj@reductions$[email hidden]
  193. ```
  194. Following the authors we are going to use KEGG pathway collection.
  195. ```{r}
  196. library(msigdbr)
  197. pathwaysDF <- msigdbr(species="mouse", collection="C2", subcollection = "CP:KEGG_LEGACY")
  198. pathways <- split(pathwaysDF$gene_symbol, pathwaysDF$gs_name)
  199. ```
  200. Now we can run the analysis (we set `center=FALSE` because we use the
  201. reduced matrix):
  202. ```{r}
  203. set.seed(1)
  204. gesecaRes <- geseca(pathways, E, minSize = 5, maxSize = 500, center = FALSE, eps=1e-100)
  205. head(gesecaRes, 10)
  206. ```
  207. Now we can plot profiles of the top pathways (we need to specify the reduction
  208. as we are using the one from the publication):
  209. ```{r fig.width=12, fig.height=7, out.width="100%"}
  210. topPathways <- gesecaRes[, pathway] |> head(4)
  211. titles <- sub("KEGG_", "", topPathways)
  212. ps <- plotCoregulationProfileReduction(pathways[topPathways], obj,
  213. title=titles,
  214. reduction="tsne")
  215. cowplot::plot_grid(plotlist=ps[1:4], ncol=2)
  216. ```
  217. We can see that inflammatory pathways (e.g. KEGG_LEISHMANIA_INFECTION) are
  218. more associated with the non-foamy intimal macrophages, which was one of the
  219. main points of the Kim et al. Another pathway highlighted by the authors, KEGG_LYSOSOME, is specific to intimal foamy macrophages:
  220. ```{r fig.width=5, fig.height=3.5, out.width="50%"}
  221. plotCoregulationProfileReduction(pathways$KEGG_LYSOSOME,
  222. obj,
  223. title=sprintf("KEGG_LYSOSOME (pval=%.2g)",
  224. gesecaRes[match("KEGG_LYSOSOME", pathway), pval]),
  225. reduction="tsne")
  226. ```
  227. ## Analysis of spatial transcriptomic data
  228. ### Analysis of 10X visium spatial data
  229. Similarly to single cell RNA-seq, GESECA can be used for gene set enrichment analysis of spatial
  230. transcriptomics profiling. As an example we will use glioblastoma
  231. sample from Ravi et al (https://pubmed.ncbi.nlm.nih.gov/35700707/).
  232. ```{r message=FALSE}
  233. library(Seurat)
  234. obj <- readRDS(url("https://alserglab.wustl.edu/files/fgsea/275_T_ST_Seurat.rds"))
  235. ```
  236. As for scRNA-seq, we apply normalization for 10000 genes and run a do a PCA reduction.
  237. ```{r}
  238. obj <- SCTransform(obj, assay = "Spatial", verbose = FALSE, variable.features.n = 10000)
  239. obj <- RunPCA(obj, assay = "SCT", verbose = FALSE,
  240. rev.pca = TRUE, reduction.name = "pca.rev",
  241. reduction.key="PCR_", npcs = 50)
  242. E <- obj@reductions$[email hidden]
  243. ```
  244. We will use HALLMARK pathways as the gene set collection.
  245. ```{r}
  246. library(msigdbr)
  247. pathwaysDF <- msigdbr(species="human", collection="H")
  248. pathways <- split(pathwaysDF$gene_symbol, pathwaysDF$gs_name)
  249. ```
  250. Now we can run the analysis (remember, we set `center=FALSE` because we use the
  251. reduced matrix):
  252. ```{r}
  253. set.seed(1)
  254. gesecaRes <- geseca(pathways, E, minSize = 15, maxSize = 500, center = FALSE)
  255. head(gesecaRes, 10)
  256. ```
  257. Finally, let us plot spatial expression of the top four pathways:
  258. ```{r fig.width=10, fig.height=7, out.width="100%"}
  259. topPathways <- gesecaRes[, pathway] |> head(4)
  260. titles <- sub("HALLMARK_", "", topPathways)
  261. ps <- plotCoregulationProfileSpatial(pathways[topPathways], obj,
  262. title=titles,
  263. pt.size.factor=2.5)
  264. cowplot::plot_grid(plotlist=ps, ncol=2)
  265. ```
  266. <!-- ![](geseca-spatial-top.png){width=100%} -->
  267. Consistent with the Ravi et al, we see a distinct hypoxic region (defined by HALLMARK_HYPOXIA) and a reactive immune region (defined by HALLMARK_INTERFERON_GAMMA_RESPONSE). Further, we can explore behavior of
  268. HALLMARK_OXIDATIVE_PHOSPHORYLATION pathway to see that oxidative metabolism
  269. is more characteristic to the "normal" tissue region:
  270. ```{r fig.width=5, fig.height=3.5, out.width="50%"}
  271. plotCoregulationProfileSpatial(pathways$HALLMARK_OXIDATIVE_PHOSPHORYLATION,
  272. obj,
  273. pt.size.factor=2.5,
  274. title=sprintf("HALLMARK_OXIDATIVE_PHOSPHORYLATION\n(pval=%.2g)",
  275. gesecaRes[
  276. match("HALLMARK_OXIDATIVE_PHOSPHORYLATION", pathway),
  277. pval]))
  278. ```
  279. ### Analysis of 10X xenium spatial transcriptomics data
  280. GESECA can also be applied to spatial transcriptomics data generated by high-plex in situ technologies with subcellular resolution, such as 10X Genomics' Xenium platform. In this example, we analyze a Human Ovarian Cancer sample profiled using the Xenium 5K panel.
  281. The raw data used in this analysis is publicly available and can be downloaded from the following sources:
  282. - Xenium output bundle: [Download link](https://s3-us-west-2.amazonaws.com/10x.files/samples/xenium/3.0.0/Xenium_Prime_Ovarian_Cancer_FFPE_XRrun/Xenium_Prime_Ovarian_Cancer_FFPE_XRrun_outs.zip)
  283. - Cell annotation file: [Download link](https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Ovarian_Cancer_FFPE_XRrun/Xenium_Prime_Ovarian_Cancer_FFPE_XRrun_cell_groups.csv)
  284. To prepare the data for GESECA analysis, we carried out the following custom preprocessing steps using Seurat:
  285. ```{r eval=FALSE}
  286. fldr <- "" # Path to downloaded Xenium output
  287. annf_path <- "" # Path to downloaded cell annotation CSV
  288. # Load the Xenium data as a Seurat object
  289. xobj <- Seurat::LoadXenium(fldr, molecule.coordinates = FALSE)
  290. # Remove assays not needed for downstream analysis
  291. for (nm in names(xobj@assays)[-1]) {
  292. xobj@assays[[nm]] <- NULL
  293. }
  294. # Add spatial coordinates to metadata
  295. coords <- data.table::as.data.table(xobj@images$fov@boundaries$centroids@coords)
  296. [email hidden] <- cbind([email hidden], coords)
  297. # Integrate external cell annotations
  298. annot <- data.table::fread(annf_path)
  299. xobj <- xobj[, rownames([email hidden]) %in% annot$cell_id]
  300. [email hidden]$annotation <- annot[match(rownames([email hidden]), annot$cell_id), ]$group
  301. [email hidden]$annotation <- factor([email hidden]$annotation)
  302. # Filter out low-quality cells
  303. xobj <- subset(xobj, subset = nCount_Xenium > 50)
  304. # Optional: Crop the region and subsample the object
  305. # These steps reduce size and complexity for a more compact vignette
  306. # Helps keep the vignette lightweight and quick to render
  307. xobj <- xobj[, xobj$x < 3000 & xobj$y < 4000]
  308. set.seed(1)
  309. xobj <- xobj[, sample.int(ncol(xobj), 40000)]
  310. # Normalize and scale data
  311. xobj <- NormalizeData(xobj, normalization.method = "LogNormalize", scale.factor = 1000, verbose = FALSE)
  312. xobj <- FindVariableFeatures(xobj, nfeatures = 2000, verbose = FALSE)
  313. xobj <- ScaleData(xobj, verbose = FALSE)
  314. # Perform PCA and UMAP dimensionality reduction
  315. xobj <- RunPCA(xobj, verbose = FALSE)
  316. xobj <- RunUMAP(xobj, dims = 1:20)
  317. ```
  318. Additionally, before saving the object for use in the vignette, we remove the following components from the Seurat object to reduce its size and keep it tidy:
  319. ```{r eval=FALSE}
  320. xobj@reductions$pca <- NULL
  321. xobj@assays$Xenium@layers$scale.data <- NULL
  322. xobj@assays$Xenium@layers$data <- NULL
  323. ```
  324. For this tutorial, we directly use the Seurat object that was preprocessed using the steps described above:
  325. ```{r}
  326. xobj <- readRDS(url("https://alserglab.wustl.edu/files/fgsea/xenium-human-ovarian-cancer.rds"))
  327. xobj <- NormalizeData(xobj, verbose = FALSE)
  328. xobj <- ScaleData(xobj, verbose = FALSE)
  329. ```
  330. The plot below compares the spatial localization of annotated cells (left) with their transcriptional similarity via UMAP (right):
  331. ```{r fig.width=10, fig.height=5, out.width="100%"}
  332. p1 <- ImageDimPlot(xobj, group.by = "annotation",
  333. dark.background = FALSE, size = 0.5,
  334. flip_xy = TRUE) +
  335. theme(legend.position = "none")
  336. p1 <- suppressMessages(p1 + coord_flip() + scale_x_reverse() + theme(aspect.ratio = 1.0))
  337. p2 <- DimPlot(xobj, group.by = "annotation", raster = FALSE, pt.size = 0.5, stroke.size = 0.0) +
  338. coord_fixed()
  339. p1 | p2
  340. ```
  341. The command `suppressMessages(p1 + coord_flip() + scale_x_reverse() + theme(aspect.ratio = 1.0))` adjusts the plot orientation to match the spatial layout shown in the [Xenium Explorer web viewer](https://www.10xgenomics.com/datasets/xenium-prime-ffpe-human-ovarian-cancer), ensuring consistency between the analysis and the original data presentation.
  342. We will now perform the GESECA analysis in the same manner as previously demonstrated with both scRNA-seq and Visium datasets. For consistency and interpretability, we will once again use the HALLMARK gene sets from the MSigDB collection.
  343. ```{r}
  344. xobj <- RunPCA(xobj, verbose = F, rev.pca = TRUE, reduction.name = "pca.rev",
  345. reduction.key="PCR_", npcs=30)
  346. E <- xobj@reductions$[email hidden]
  347. gsets <- msigdbr(species="human", collection="H")
  348. gsets <- split(gsets$gene_symbol, gsets$gs_name)
  349. set.seed(1)
  350. gesecaRes <- geseca(gsets, E, minSize = 15, maxSize = 500, center = FALSE, eps = 1e-100)
  351. head(gesecaRes, 10)
  352. ```
  353. Next, we visualize the top enriched pathways identified by GESECA using UMAP embeddings. This allows us to assess transcriptional patterns of gene set activity across cells.
  354. ```{r fig.width=10, fig.height=7, out.width="100%"}
  355. topPathways <- gesecaRes[, pathway] |> head(6)
  356. titles <- sub("HALLMARK_", "", topPathways)
  357. pvals <- gesecaRes[match(topPathways, pathway), pval]
  358. pvals <- paste("p-value:", formatC(pvals, digits = 1, format = "e"))
  359. titles <- paste(titles, pvals, sep = "\n")
  360. plots <- fgsea::plotCoregulationProfileReduction(
  361. gsets[topPathways], xobj,
  362. reduction = "umap", title = titles,
  363. raster = TRUE, raster.dpi = c(500, 500),
  364. pt.size = 2.5
  365. )
  366. plots <- lapply(plots, function(p){
  367. p + theme(plot.title = element_text(hjust=0), text = element_text(size=10))
  368. })
  369. cowplot::plot_grid(plotlist = plots, ncol = 2)
  370. ```
  371. In addition to UMAP plots, you can visualize the spatial expression patterns of the most enriched pathways using the `plotCoregulationProfileImage` function. This enables a detailed view of how pathway activities vary across spatial coordinates:
  372. ```{r fig.width=10, fig.height=15, out.width="100%"}
  373. imagePlots <- plotCoregulationProfileImage(
  374. gsets[topPathways], object = xobj,
  375. dark.background = FALSE,
  376. title = titles,
  377. size=0.8
  378. )
  379. imagePlots <- lapply(imagePlots, function(p){
  380. suppressMessages(
  381. p + coord_flip() + scale_x_reverse() +
  382. theme(plot.title = element_text(hjust=0), text = element_text(size=10), aspect.ratio = 1.0)
  383. )
  384. })
  385. cowplot::plot_grid(plotlist = imagePlots, ncol = 2)
  386. ```
  387. ## Session info
  388. ```{r echo=TRUE}
  389. sessionInfo()
  390. ```

geseca-tutorial.Rmd at commit 570f590, under MIT · at the source

Overview

Authors: Yunhong Shi1,2, Jinpei Lin3,4, Yi Wu1, Shengsong Xu2,5, Naiyuan Zhang1, Yiji Pan1, Anli Ren1, Ying Fang1, Yu Huang6, Xiayin Zhang7, Zhuoting Zhu8, Yehong Zhuo2, Honghua Yu9
  1. Guangdong Eye Institute, Department of Ophthalmology, Guangdong Provincial People's Hospital (Guangdong Academy of Medical Sciences) Southern Medical University Guangzhou China
  2. State Key Laboratory of Ophthalmology, Zhongshan Ophthalmic Center Sun Yat‐sen University, Guangdong Provincial Key Laboratory of Ophthalmology Visual Science Guangzhou China
  3. College of Life Sciences University of Chinese Academy of Sciences Beijing China
  4. Analysis Center of Agrobiology and Environmental Sciences Zhejiang University Hangzhou China
  5. Shenzhen Eye Hospital, Shenzhen Eye Medical Center Southern Medical University Shenzhen China
  6. Department of Eye and Vision Sciences, Institute of Life Course and Medical Sciences University of Liverpool Liverpool UK
  7. Singapore Eye Research Institute Singapore National Eye Center Singapore Singapore
  8. Centre for Eye Research Australia, University of Melbourne, Department of Surgery (Ophthalmology) University of Melbourne Melbourne Australia
  9. Joint Shantou International Eye Center of Shantou University and The Chinese University of Hong Kong Shantou China
Journal: iMeta, volume 5, issue 4, article e70163
Dates: received 9 May 2026; accepted 21 July 2026; published online 20 August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1002/imt2.70163 · PMID 42630359 · PMCID PMC13494123 · OpenAlex W7203942256
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), mouse (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Connectivity
Keywords: immunometabolic remodeling, retinal ischemia‐reperfusion, spatial metabolomics, spatial transcriptomics, Trem2 + microglia
Topic: Neuroinflammation and Neurodegeneration Mechanisms (Neurology, Neuroscience), according to OpenAlex
Funding: National Natural Science Foundation of China (U24A20707, 82271125, 82301260, 82301046, 82301205); Brolucizumab Efficacy and Safety Single‐Arm Descriptive Trial in Patients with Persistent Diabetic Macular Edema (2024‐29); GDPH Supporting Fund (KY012026080, KY012026074, KY012026083, KY012026082, KY012026100); GDPH Postdoctoral Supporting Fund (BY012024031, BY012025033, BY012025017, BY012025020, BY012025046)
Citations: cited by 1 paper (Europe PMC); 78 references in the paper

Abstract

Retinal ischemia‐reperfusion (RIR) injury is a central mechanism underlying irreversible vision loss in glaucoma and other retinal diseases, yet the spatial organization of the pathogenic microenvironment remains poorly understood. Here, we constructed a high‐resolution, whole‐eye spatial multi‐omics atlas integrating Stereo‐seq transcriptomics and MALDI‐MSI‐based metabolomics to capture the early molecular events in the RIR mouse model. Spatially, retinal ganglion cell (RGC) interactions with surrounding cells were markedly reduced after injury, whereas immune–glial interactions were enhanced, revealing a shift from a neuron‐centered to an immunometabolic state. Within the ganglion cell layer (GCL), the primary pathological locus, we identified Trem2 + microglia that expand in situ, establish close proximity to degenerating RGCs, and exhibit strong spatial association with dysregulated sphingolipid metabolism. Mechanistically, using Trem2 knockout mice and microglia‐specific Trem2 siRNA knockdown, we demonstrate that TREM2 directly binds to SPTLC2, the rate‐limiting enzyme of de novo sphingolipid biosynthesis, driving ceramide‐centric metabolic reprogramming that modulates the AKT‐mTOR signaling axis and amplifies inflammatory activation. Pharmacological inhibition of serine palmitoyl transferase (SPT) with myriocin reverses this cascade, protecting RGCs. Multi‐omics integration of human glaucoma aqueous humor datasets further reveals conserved upregulation of sphingolipid biosynthetic enzymes, sphingolipid metabolites, and lipid‐sensing immune effectors, offering preliminary translational clues. Collectively, our findings reveal that spatially defined immunometabolic remodeling—in which Trem2 + microglia are central—converges on sphingolipid metabolism as a druggable regulatory axis, with the TREM2‐SPTLC2 interface thus emerging as a new therapeutic opportunity for retinal neurodegenerative diseases.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 10 matches between paragraphs and lines of code.

alserglab/fgsea

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 570f5903545835cb340e699fcdfdf444b1ba07ec, 22 September 2026
Languages: R (33), C++ (10), C/C++ (8)
Size: 107 files, 51 scripts
Software Heritage: archived
Found in: the text, “GSEA analysis”
Holds: README, license file, environment (DESCRIPTION), tests, continuous integration, documentation, 2 notebooks
Not found: CITATION.cff
Tools: data.table (12 files), ggplot2 (4 files), limma (4 files), cowplot (3 files), Seurat (2 files)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
53 files

pienapple1/eyeball_STSM

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 25b0e5bfff66ec91a343c292b22257d1800df964, 16 September 2026
Languages: Jupyter (65), Python (10), R (6)
Size: 131 files, 81 scripts
Software Heritage: not archived
Found in: “DATA AVAILABILITY STATEMENT”
Holds: README, 37 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (41 files), patchwork (39 files), clusterProfiler (37 files), ggplot2 (37 files), ggpubr (37 files), pheatmap (37 files), reshape2 (37 files), Seurat (37 files), cowplot (35 files), DESeq2 (35 files), edgeR (35 files), Harmony (35 files), limma (35 files), Monocle 3 (33 files), circlize (23 files), ComplexHeatmap (23 files), rstatix (23 files), data.table (4 files), Matplotlib (4 files), NumPy (4 files), pandas (4 files), Plotly (4 files), SingleCellExperiment (4 files), anndata (2 files), igraph (2 files), OpenCV (2 files), Pillow (2 files), Scanpy (2 files), scikit-image (2 files), scikit-learn (2 files), SciPy (2 files), seaborn (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
46 files, not copied: shown from their source

OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit 25b0e5b, when its fingerprint is the one OSCR verified. How this works.

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 97 scripts, each with its path and the digest of its content;
  • 10 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability statement

The data that support the findings of this study are available from the corresponding author upon reasonable request. Data generated during this study have been deposited in the Genome Sequence Archive in BIG Data Center, Beijing Institute of Genomics (BIG, https://ngdc.cncb.ac.cn/gsa/), Chinese Academy of Sciences, under the Project Accession No. OMIX011996 https://ngdc.cncb.ac.cn/omix/release/OMIX011996 and PRJCA041282 https://ngdc.cncb.ac.cn/bioproject/browse/PRJCA041282. The data and scripts used are saved in GitHub: https://github.com/pienapple1/eyeball_STSM. Supplementary materials (figures, tables, graphical abstract, slides, videos, Chinese translated version, and updated materials) may be found in the online DOI or iMeta Science (http://www.imeta.science).

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 13 authors, 5 keywords, 4 funders, 78 references.

Cite

This paper

Shi, Y., Lin, J., Wu, Y., Xu, S., Zhang, N., Pan, Y., Ren, A., Fang, Y., Huang, Y., Zhang, X., Zhu, Z., Zhuo, Y., & Yu, H. (2026). Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche. iMeta, 5(4), e70163. https://doi.org/10.1002/imt2.70163

BibTeX

@article{shi2026spatial,
author = {Shi, Yunhong and Lin, Jinpei and Wu, Yi and Xu, Shengsong and Zhang, Naiyuan and Pan, Yiji and Ren, Anli and Fang, Ying and Huang, Yu and Zhang, Xiayin and Zhu, Zhuoting and Zhuo, Yehong and Yu, Honghua},
title = {{Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche}},
journal = {iMeta},
year = {2026},
month = aug,
volume = {5},
number = {4},
pages = {e70163},
publisher = {Wiley},
issn = {2770-5986},
doi = {10.1002/imt2.70163},
url = {https://doi.org/10.1002/imt2.70163},
pmid = {42630359},
pmcid = {PMC13494123}
}

RIS

TY - JOUR
AU - Shi, Yunhong
AU - Lin, Jinpei
AU - Wu, Yi
AU - Xu, Shengsong
AU - Zhang, Naiyuan
AU - Pan, Yiji
AU - Ren, Anli
AU - Fang, Ying
AU - Huang, Yu
AU - Zhang, Xiayin
AU - Zhu, Zhuoting
AU - Zhuo, Yehong
AU - Yu, Honghua
TI - Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche
T2 - iMeta
J2 - Imeta
PY - 2026
DA - 2026/08/20
VL - 5
IS - 4
SP - e70163
SN - 2770-5986
PB - Wiley
DO - 10.1002/imt2.70163
UR - https://doi.org/10.1002/imt2.70163
LA - en
ER -

CSL-JSON

{
"id": "10.1002/imt2.70163",
"type": "article-journal",
"title": "Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche",
"container-title": "iMeta",
"author": [
{
"family": "Shi",
"given": "Yunhong"
},
{
"family": "Lin",
"given": "Jinpei"
},
{
"family": "Wu",
"given": "Yi"
},
{
"family": "Xu",
"given": "Shengsong"
},
{
"family": "Zhang",
"given": "Naiyuan"
},
{
"family": "Pan",
"given": "Yiji"
},
{
"family": "Ren",
"given": "Anli"
},
{
"family": "Fang",
"given": "Ying"
},
{
"family": "Huang",
"given": "Yu"
},
{
"family": "Zhang",
"given": "Xiayin"
},
{
"family": "Zhu",
"given": "Zhuoting"
},
{
"family": "Zhuo",
"given": "Yehong"
},
{
"family": "Yu",
"given": "Honghua"
}
],
"container-title-short": "Imeta",
"volume": "5",
"issue": "4",
"page": "e70163",
"DOI": "10.1002/imt2.70163",
"PMID": "42630359",
"PMCID": "PMC13494123",
"ISSN": "2770-5986",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/imt2.70163",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
20
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: Monocle 3, edgeR, limma, 23 other tools, mouse, cellular / molecular
[2] doi:10.1038/s41593-026-02300-5 [code]
Integrated single-cell and spatial transcriptomic profiling in ALS uncovers peripheral-to-central immune infiltration and reprogramming.
Journal: Nature neuroscience
In common: Harmony, edgeR, anndata, 20 other tools, genetics / omics, cellular / molecular, 1 reference
[3] doi:10.1186/s13059-026-04177-w [code]
Genomic sequence evolution underlying human neocortical interareal diversification.
Journal: Genome biology
In common: Monocle 3, rstatix, anndata, 20 other tools, genetics / omics, mouse, cellular / molecular
[4] doi:10.1126/sciadv.aeg3223 [code]
The extreme diversity of retinal amacrine cells has deep evolutionary roots.
Journal: Science advances
In common: rstatix, anndata, DESeq2, 19 other tools, genetics / omics, cellular / molecular, 1 reference
[5] doi:10.1093/bioinformatics/btag592 [code]
Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.
Journal: Bioinformatics (Oxford, England)
In common: edgeR, limma, rstatix, 20 other tools, genetics / omics
[6] doi:10.1016/j.cpblue.2026.100007 [code]
An integrated single-cell and spatial proteotranscriptomics atlas of fibroblast-driven immunoregulation within the human adult oral cavity.
Journal: Cell press blue
In common: SingleCellExperiment, edgeR, limma, 20 other tools
[7] doi:10.1038/s44318-026-00818-9 [code]
FAM134B-mediated ER-phagy degrades APP and suppresses Alzheimer's disease pathology.
Journal: The EMBO journal
In common: Monocle 3, Harmony, SingleCellExperiment, 19 other tools, mouse, cellular / molecular
[8] doi:10.1038/s41593-026-02367-0 [code]
A reproducible three-dimensional model of human brain tissue to investigate physiological and disease-associated microglia phenotypes.
Journal: Nature neuroscience
In common: Monocle 3, Harmony, SingleCellExperiment, 16 other tools, cellular / molecular
[9] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: Harmony, rstatix, anndata, 19 other tools, genetics / omics, mouse, cellular / molecular
[10] doi:10.1038/s41380-026-03629-w [code]
Maternal fasting during early gestation induces epigenetic alterations and schizophrenia-related phenotypes.
Journal: Molecular psychiatry
In common: Harmony, limma, anndata, 16 other tools, genetics / omics, mouse, cellular / molecular, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.