OSCR

SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data.

Code ↔ Paper

12 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 12 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 197–259 · score 0.72 · regulatory networks, scSeqComm, transcription factor, TF, cell interactions, downstream
  2. [2] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 197–259 · score 0.72 · regulatory networks, scSeqComm, transcription factor, TF, cell interactions, downstream
  3. [3] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 262–332 · score 0.68 · scSeqComm_analyze, intracellular signal, cellular responses, go, ligand receptor, interactions
  4. [4] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 262–328 · score 0.68 · scSeqComm_analyze, intracellular signal, cellular responses, go, ligand receptor, interactions
  5. [5] § Results › Overview of SpaNiche ↔ R/spaniche_nmf_celltype_and_gene.R, lines 1–57 · score 0.63 · graph regularized joint, abundance matrix, matrix factorization, expression matrix, computational, SpaNiche
  6. [6] § Results › Overview of SpaNiche ↔ R/spaniche_nmf_celltype_and_gene.R, lines 1–57 · score 0.63 · graph regularized joint, abundance matrix, matrix factorization, expression matrix, computational, SpaNiche
  7. [7] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 262–332 · score 0.62 · intracellular signaling, TF association, PPR, quantifying, GO, genes
  8. [8] § Methods › Inference of pathways regulated by cell–cell interactions ↔ R/spaniche_nmf_comm.R, lines 262–328 · score 0.62 · intracellular signaling, TF association, PPR, quantifying, GO, genes
  9. [9] § Results › Overview of SpaNiche ↔ R/spaniche_nmf_celltype_and_gene.R, lines 1–57 · score 0.59 · graph regularized joint, abundance matrix, expression matrix, Visium, computational, view1
  10. [10] § Results › Overview of SpaNiche ↔ R/spaniche_nmf_celltype_and_gene.R, lines 1–57 · score 0.59 · graph regularized joint, abundance matrix, expression matrix, Visium, computational, view1
  11. [11] § Methods › Joint NMF with graph regularization ↔ R/nmf_modified.R, lines 1–27 · score 0.58 · spatial smoothness, objective function, modified, optimization, components, weights
  12. [12] § Methods › Joint NMF with graph regularization ↔ R/calculate_laplacian_matrix_with_gausskernel.R, the whole file · a weak match · score 0.56 · graph Laplacian, weighted adjacency matrix

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 · 332 lines · 16 KB · other · 3 matches

  1. #' spaniche_nmf_comm: Spatial integrative NMF of cell-type abundance
  2. #' and ligand–receptor interaction matrices, with downstream pathway inference
  3. #'
  4. #' @param spatial.seu ST data is processed as a Seurat object with 'Spatial' as the assay name. Seurat object is normalized by using the 'NormalizeData' function. The order of spots must be consistent with spatialdf.
  5. #' @param spatialdf a data frame or matrix that contains two columns, "col" and "row". Row names must be
  6. #' spot barcodes and consistent with \code{spot_by_celltype}.
  7. #' @param spot_by_celltype a data frame or matrix representing the abundance of cell types, with spots as rows and cell types as columns. Its row names should be consistent with the row names of 'spatialdf'.
  8. #' @param smoothing_type Character vector specifying the spatial smoothing
  9. #' levels to include. Supported values are:
  10. #' \itemize{
  11. #' \item \code{"view0"}: no smoothing (original matrix)
  12. #' \item \code{"view1"}: first-order spatial neighbors
  13. #' \item \code{"view2"}: second-order spatial neighbors
  14. #' }
  15. #' Valid combinations are \code{c("view0")},
  16. #' \code{c("view0","view1")}, and
  17. #' \code{c("view0","view1","view2")}.
  18. #' As it involves the merging of matrices, the returned matrix's dimension varies depending on the chosen option. The dimensions corresponding to the three options are 1x, 2x, and 3x of the original dimensions, respectively.
  19. #' @param distance_thre This parameter represents distance, defining the central distance from center to loop1 (view1), and from center to loop2 (view2). For view0, the distance is ignored and should be set to NA. The length of the vector is consistent with the smoothing_type parameter. For example, A typical choice for Visium data is: distance_thre = c(NA,round(2/(3^0.5),2),round(4/(3^0.5),2)).
  20. #' @param digits integer indicating the number of decimal places.
  21. #' @param LRDB This parameter represents the reference for cell-cell interactions, which comes from CellChat.
  22. #' @param LR_dm_type This parameter can be one or more values from c('view1', 'view2'), representing the type of adjacency matrix to be returned.
  23. #' @param LR_distance_thre A numeric vector specifying distance thresholds. If only \code{"view1"} is requested, a single value is sufficient, defining the distance from center to first-order neighbors (view1). If \code{"view1"} + \code{"view2"} is requested, two values are required, defining the distance from center to first-order neighbors (view1) and from center to second-order neighbors (view2).
  24. #' @param var_thre Variance threshold
  25. #' @param topic_num An integer specifying the number of components or topics to be extracted. It determines the number of columns in the W matrix and the number of rows in each H matrix.
  26. #' @param defined_weight Either \code{"default"} to use data-driven modality
  27. #' weights, or a numeric vector of length two specifying user-defined weights
  28. #' for the cell-type and LR matrices.
  29. #' @param lambda_v Vector of spatial regularization parameters controlling the
  30. #' strength of Laplacian smoothness.
  31. #' @param sigma_v Gaussian kernel parameter. Used in the computation of the Laplacian matrix, influencing how spatial information is incorporated into the factorization.
  32. #' @param maxiter The maximum number of iterations allowed for the factorization process. This acts as a stopping criterion to prevent the algorithm from running indefinitely.
  33. #' @param st.count Convergence counter. If the change in the reconstruction error remains below epsilon for st.count consecutive iterations, the algorithm stops, assuming it has converged.
  34. #' @param epsilon Threshold on the relative change in the objective function used to assess convergence. If the relative change in error is less than epsilon for st.count consecutive iterations, convergence is assumed.
  35. #' @param topic_lr_quantile_thre A threshold for quantile selection. Only data above this quantile will be considered for visualization. Default is 0.95.
  36. #' @param spot_topic.quantile.thre Quantile threshold defining topic-high and
  37. #' topic-low spot groups (default: top and bottom 20 %).
  38. #' @param S_intra_thre S_intra_thre
  39. #' @param term_topn Number of top enriched functional terms retained for visualization.
  40. #' @param num_core Number of CPU cores used for parallel computation in downstream scSeqComm analysis.
  41. #'
  42. #' @return A list containing:
  43. #' \itemize{
  44. #' \item \code{LRintegratedmatrix}: Filtered spatial LR interaction matrix.
  45. #' \item \code{nmf_res}: Results from spatially regularized integrative NMF.
  46. #' \item \code{go_res}: GO enrichment results for topic-specific signaling. Only terms with a p-value < 0.01 are retained.
  47. #' \item \code{go_plot}: Visualization of enriched functional pathways. No p-value filtering is applied; the top "term_topn" terms are plotted.
  48. #' }
  49. #' @import Seurat
  50. #' @import tidyverse
  51. #' @import IntNMF
  52. #' @import scales
  53. #' @import scSeqComm
  54. #' @export
  55. spaniche_nmf_comm = function(
  56. ## Basic inputs
  57. spatial.seu,
  58. spatialdf,
  59. spot_by_celltype,
  60. smoothing_type = c('view0', 'view1', 'view2'),
  61. distance_thre = c(NA,2/(3^0.5),4/(3^0.5)),
  62. digits = 2,
  63. ## Parameters related to ligand–receptor interactions
  64. LRDB = SpaNiche::CellChatDB.human,
  65. LR_dm_type = c("view1", "view2"),
  66. LR_distance_thre = c(2/(3^0.5),4/(3^0.5)),
  67. var_thre = c(0.2,0.99),
  68. ## Parameters related to joint matrix factorization
  69. topic_num = 15,
  70. defined_weight = "default",
  71. lambda_v =c(0.5, 1, 2),
  72. sigma_v = c(0.5, 1, 1.5),
  73. maxiter = 200,
  74. st.count = 20,
  75. epsilon = 1e-04,
  76. # Downstream cellular responses
  77. topic_lr_quantile_thre = 0.95,
  78. spot_topic.quantile.thre = 0.2,
  79. S_intra_thre = 0.8,
  80. term_topn = 20,
  81. num_core = 1
  82. ){
  83. distance_thre = round(distance_thre,digits)
  84. LR_distance_thre = round(LR_distance_thre,digits)
  85. # Ensure consistent spot ordering
  86. if(identical(rownames(spatialdf),colnames(spatial.seu))){
  87. print("The spot order is consistent between spatialdf and spatial.seu.")
  88. } else {
  89. spatialdf = spatialdf[colnames(spatial.seu),]
  90. print("The spot order between spatialdf and spatial.seu is inconsistent. Adjust the spot order of spatialdf.")
  91. }
  92. if(identical(rownames(spatialdf),rownames(spot_by_celltype))){
  93. print("The spot order is consistent between spatialdf and spot_by_celltype.")
  94. } else {
  95. spot_by_celltype=spot_by_celltype[rownames(spatialdf),]
  96. print("The spot order between spatialdf and spot_by_celltype is inconsistent. Adjust the spot order of spot_by_celltype.")
  97. }
  98. # Construct spatially extended cell-type enrichment matrix
  99. spot.ct.df = get_spot_by_celltype_extended(
  100. spatialdf = spatialdf,
  101. spot_by_celltype = spot_by_celltype,
  102. smoothing_type = smoothing_type,
  103. distance_thre = distance_thre,
  104. digits = digits
  105. )
  106. write.csv(spot.ct.df,file = "spot_by_celltype_extended.csv",quote = F,row.names = T)
  107. ### Part II: Construction of ligand–receptor integrated matrix
  108. step1_res=prepare_for_LRintegratedmatrix(spatial.seu,LRDB)
  109. distance_matrix = make_distance_matrix_LR(spatialdf = spatialdf,dm_type = LR_dm_type,distance_thre = LR_distance_thre,digits = digits)
  110. LRelementmatrix = step1_res[[1]]
  111. cc_interaction = step1_res[[2]]
  112. # Receptor expression within each spot
  113. rmat = LRelementmatrix %>% t() %>% .[,cc_interaction$receptor]
  114. # Ligand expression within each spot
  115. lmat = LRelementmatrix %>% t() %>% .[,cc_interaction$ligand]
  116. # NOTE: This section may be generalized in the future; currently assumes four LR configurations (m1–m4).
  117. m1=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view1,neighbor_geneexp = rmat,center_geneexp = lmat,center_is_ligand = T)
  118. m2=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view1,neighbor_geneexp = lmat,center_geneexp = rmat,center_is_ligand = F)
  119. colnames(m1)=paste0(colnames(m1)," (view1)")
  120. colnames(m2)=paste0(colnames(m2)," (view1)")
  121. m3=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view2,neighbor_geneexp = rmat,center_geneexp = lmat,center_is_ligand = T)
  122. m4=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view2,neighbor_geneexp = lmat,center_geneexp = rmat,center_is_ligand = F)
  123. colnames(m3)=paste0(colnames(m3)," (view2)")
  124. colnames(m4)=paste0(colnames(m4)," (view2)")
  125. LRintegratedmatrix=m1 %>% cbind(m2) %>% cbind(m3) %>% cbind(m4)
  126. LRintegratedmatrix[is.na(LRintegratedmatrix)] = 0
  127. saveRDS(LRintegratedmatrix,file = "LRintegratedmatrix.rds")
  128. rm(list = paste0("m",1:4))
  129. ### Compute Moran's I and annotate ligand–receptor interactions ###
  130. moransi_output_df = moransi_for_LRintegratedmatrix(t(LRintegratedmatrix),spatial.seu,cc_interaction)
  131. saveRDS(moransi_output_df,file = "LRintegratedmatrix_with_moransi.rds")
  132. print("Moran's index calculation completed")
  133. ### Part III: Joint factorization of cell-type and LR interaction matrices
  134. LRintegratedmatrix = LRintegratedmatrix[,colSums(LRintegratedmatrix) > 0]
  135. colnames(LRintegratedmatrix)=colnames(LRintegratedmatrix) %>% str_replace_all("_","-")
  136. LRintegratedmatrix=LRintegratedmatrix[spot.ct.df %>% rownames(),]
  137. # Variance-based filtering of LR interactions
  138. var.df1 = LRintegratedmatrix %>% apply(2, function(x){var(x)}) %>% as.data.frame()
  139. colnames(var.df1) = "var_value"
  140. var.df1$interaction = rownames(var.df1)
  141. var.df1 = var.df1 %>% arrange(var_value)
  142. var.df1$index = 1:length(var.df1$var_value)
  143. var_thre_1 = quantile(var.df1$var_value,var_thre[1])
  144. var_thre_2 = quantile(var.df1$var_value,var_thre[2])
  145. var.df1 = var.df1 %>% filter(var_value > var_thre_1 & var_value < var_thre_2)
  146. used_interaction = var.df1$interaction
  147. used_interaction = intersect(colnames(LRintegratedmatrix),used_interaction)
  148. LRintegratedmatrix=LRintegratedmatrix[,used_interaction]
  149. print("Filtering the LR integrated matrix based on variance and selecting some LR pairs.")
  150. # to matrix
  151. spot.ct.df = as.matrix(spot.ct.df)
  152. LRintegratedmatrix = as.matrix(LRintegratedmatrix)
  153. # Estimate initial modality weights prior to running IntNMF
  154. dat <- list(spot.ct.df,LRintegratedmatrix)
  155. theta_v = define_initial_weight(dat)
  156. # The function nmf.mnnals requires the samples to be on rows and variables on columns.
  157. fit <- nmf.mnnals(dat=dat,k=topic_num,maxiter=50,st.count=10,n.ini=3,ini.nndsvd=TRUE,seed=TRUE,wt = theta_v)
  158. # Determine refined modality weights
  159. if (length(defined_weight) == 2 & all(defined_weight > 0)) {
  160. rho_v = define_good_weight(X = dat,Wzero = fit$W,Hzero = fit$H,theta_v = theta_v,weight_input = defined_weight)
  161. } else if (length(defined_weight) == 1 & defined_weight == "default") {
  162. rho_v = theta_v
  163. } else {
  164. stop("defined_weight error")
  165. }
  166. print("Weights for different matrices have been determined, now starting joint factorization of the two matrices:")
  167. # Joint matrix factorization
  168. myfit = nmf_modified(
  169. dat = dat,
  170. Wzero = fit$W,
  171. Hzero = fit$H,
  172. wt = rho_v,
  173. k=topic_num,
  174. lambda = lambda_v,
  175. sigma = sigma_v,
  176. maxiter = maxiter,
  177. st.count = st.count,
  178. spatialdf = as.matrix(spatialdf[,c("row","col")]),
  179. epsilon = epsilon
  180. )
  181. saveRDS(myfit,file = "nmf_modified_fit.rds")
  182. print("joint factorization has been completed.")
  183. ### Part IV: Linking latent topics to downstream cellular responses
  184. spot_topic = as.data.frame(myfit$W)
  185. colnames(spot_topic) = paste0("topic",1:topic_num)
  186. allSB = rownames(spot_topic)
  187. gene_expr_matrix = spatial.seu@assays$Spatial@data
  188. gene_expr_matrix = as.matrix(gene_expr_matrix)
  189. gene_expr_matrix = gene_expr_matrix[rowSums(gene_expr_matrix) > 0,]
  190. tmpplot = plot_topic_lr(
  191. topic_lr = t(myfit$H$H2),
  192. topic_lr_quantile_thre = topic_lr_quantile_thre
  193. )
  194. topic_lr_small_file = dir(getwd(),"topic_lr_small_.*csv")
  195. topic_lr_small = read.csv(topic_lr_small_file)
  196. # Color palette for topic visualization
  197. color_cluster = hue_pal()(topic_num)
  198. names(color_cluster) = paste0("topic",1:topic_num)
  199. # Objects to be exported
  200. plot.list=list()
  201. all.go = data.frame()
  202. print("Exploring pathway changes due to cell interactions:")
  203. for (ti in colnames(spot_topic)) {
  204. tmpst = spot_topic[,ti]
  205. tmpquan = quantile(tmpst,c(spot_topic.quantile.thre,1 - spot_topic.quantile.thre))
  206. low.index = which(tmpst <= tmpquan[1])
  207. high.index = which(tmpst > tmpquan[2])
  208. lowSB = allSB[low.index]
  209. highSB = allSB[high.index]
  210. ########## Load scRNA-seq data
  211. tmp_gene_expr_matrix = gene_expr_matrix[,c(highSB,lowSB)]
  212. tmp_anno = data.frame(
  213. "Cell_ID" = c(highSB,lowSB),
  214. "Cluster_ID" = c(
  215. rep(paste(ti,"high",sep = "_"),length(highSB)),
  216. rep(paste(ti,"low",sep = "_"),length(lowSB))
  217. )
  218. )
  219. ########## Ligand-receptor pairs
  220. tmp_topic_lr = topic_lr_small %>% filter(topic == ti)
  221. tmp_topic_lr$lr = str_remove(tmp_topic_lr$LRinteraction," .*$")
  222. tmp_topic_lr$r = ifelse(str_detect(tmp_topic_lr$lr,">"),
  223. str_remove(tmp_topic_lr$lr,"^.*>"),
  224. str_remove(tmp_topic_lr$lr,"<.*$"))
  225. tmp_topic_lr$l = ifelse(str_detect(tmp_topic_lr$lr,">"),
  226. str_remove(tmp_topic_lr$lr,"->.*$"),
  227. str_remove(tmp_topic_lr$lr,"^.*<-"))
  228. tmp_topic_lr=tmp_topic_lr[,c("l","r")] %>% unique()
  229. colnames(tmp_topic_lr) = c("ligand","receptor")
  230. tmp_topic_lr$ligand = str_replace(tmp_topic_lr$ligand,"^HLA-","xxx") %>% str_replace("-",",") %>% str_replace("xxx","HLA-")
  231. tmp_topic_lr$receptor = str_replace(tmp_topic_lr$receptor,"-",",")
  232. LR_db = tmp_topic_lr
  233. ########## Transcriptional regulatory networks
  234. TF_TG_db <- scSeqComm::TF_TG_TRRUSTv2_HTRIdb_RegNetwork_High
  235. ########## Receptor-Transcription factor a-priori association
  236. TF_PPR <- scSeqComm::TF_PPR_KEGG_human
  237. ########## Identify and quantify intercellular and intracellular signaling
  238. scSeqComm_res <- scSeqComm_analyze(gene_expr = tmp_gene_expr_matrix,
  239. cell_metadata = tmp_anno,
  240. inter_signaling = F,
  241. LR_pairs_DB = LR_db,
  242. TF_reg_DB = TF_TG_db,
  243. R_TF_association = TF_PPR,
  244. N_cores = num_core,
  245. DEmethod = "wilcoxon")
  246. ### Downstream cellular responses induced by ligand–receptor interactions
  247. topic_high_comm = dplyr::filter(
  248. scSeqComm_res$comm_results,
  249. cluster == paste(ti,"high",sep = "_") & S_intra >= S_intra_thre
  250. )
  251. topic_high_comm = as.data.frame(topic_high_comm) #20260426
  252. if (dim(topic_high_comm)[1] < 2) {next} #20231018
  253. # GO analysis of topic_high communication
  254. geneUniverse <- unique(unlist(scSeqComm_res$TF_reg_DB_scrnaseq))
  255. cell_functional_response <- scSeqComm_GO_analysis(
  256. results_signaling = topic_high_comm,
  257. geneUniverse = geneUniverse,
  258. method = "general")
  259. # plot
  260. cell_functional_response$pval = as.numeric(cell_functional_response$pval)
  261. cell_functional_response = cell_functional_response %>% arrange(pval)
  262. cell_functional_response$pval_log10_neg = -log10(cell_functional_response$pval)
  263. cell_functional_response$cluster = ti
  264. all.go = rbind(all.go,cell_functional_response %>% filter(pval < 0.01))
  265. tmpres = cell_functional_response %>% slice_head(n = term_topn)
  266. tmpres=tmpres%>%arrange(pval_log10_neg)
  267. tmpres$Term=factor(tmpres$Term,levels = tmpres$Term)
  268. tmpbar = tmpres %>% ggplot(aes(x=Term,y=pval_log10_neg))+
  269. geom_hline(yintercept = -log10(0.01),color = "black",alpha=0.7)+
  270. geom_bar(stat="identity",alpha=0.8,aes(fill=cluster))+
  271. geom_text(mapping = aes(x=Term,y=0,label=Term),hjust=0)+
  272. scale_x_discrete("")+
  273. scale_y_continuous("-log10(p value)",expand = c(0.02,0))+
  274. scale_fill_manual(values = color_cluster)+
  275. coord_flip()+
  276. labs(title = ti)+
  277. theme_bw()+
  278. theme(
  279. panel.grid = element_blank(),
  280. axis.ticks.y = element_blank(),
  281. axis.text.y = element_blank(),
  282. axis.text.x.bottom = element_text(color = "black"),
  283. legend.position = "none",
  284. plot.title = element_text(hjust = 0.5,size = 20)
  285. )
  286. index=which(ti == colnames(spot_topic))
  287. plot.list[[get("index")]]=tmpbar
  288. }
  289. print("Completed.")
  290. output = list(
  291. LRintegratedmatrix=LRintegratedmatrix,
  292. nmf_res=myfit,
  293. go_res=all.go, # p-values filtered with threshold pval < 0.01
  294. go_plot=plot.list # no p-value filtering, only the top "term_topn" terms are plotted
  295. )
  296. print("Output all results.")
  297. return(output)
  298. }

spaniche_nmf_comm.R at commit 84a43cf, under other · at the source

Overview

Authors: Siyuan Huang1, Qinghua Ran1, Junjie Tang2,3, Xiaochen Wang4, Junqing Xi5, Shiyang Ma6,7, Ruibin Xi1,3,4
ORCID iDs: Junjie Tang
  1. Academy for Advanced Interdisciplinary Studies, Peking University, Beijing, 100871 China
  2. Present Address: Ray and Stephanie Lane Computational Biology Department, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA USA
  3. Center for Statistical Science, Peking University, Beijing, 100871 China
  4. School of Mathematical Sciences, Peking University, Beijing, 100871 China
  5. Department of Interventional Therapy, National Cancer Center/National Clinical Research Center for Cancer/Cancer Hospital, Chinese Academy of Medical Sciences and Peking Union Medical College, Beijing, 100021 China
  6. Institute of Clinical Medicine, Shanghai Jiao Tong University School of Medicine, Shanghai, 200025 China
  7. School of Mathematical Sciences, Shanghai Jiao Tong University, Shanghai, 200240 China
Journal: Genome biology, volume 27, issue 1, article 182
Dates: received 8 September 2025; accepted 2 April 2026; published online 21 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1186/s13059-026-04069-z · PMID 42015285 · PMCID PMC13231777 · OpenAlex W7155045354
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), Alzheimer's / dementia (population), cellular / molecular (subfield)
Methods: Statistics, Connectivity, Machine learning, fMRI & imaging
MeSH: Spatial Transcriptomics*, Transcriptome*, Alzheimer Disease, Cerebral Cortex, Colorectal Neoplasms, Humans, Prostatic Neoplasms (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: Sichuan Science and Technology Program (2025YFHZ0069); National Natural Science Foundation of China (12425110); National Key Research and Development Program of China (2023YFC3603200, 2024YFF0507404); Shanghai Municipal Commission of Education (JWAIYB-3); Fundamental and Interdisciplinary Disciplines Breakthrough Plan of the Ministry of Education of China (JYB2025XDXM118); Fundamental Research Funds for the Central Universities (YG2023QNA01); Clinical Research Project of Shanghai Municipal Health Commission in Health Industry (20234Y0285); Chengdu Municipal Science and Technology Program (2024-YF05-01784-SN); Shanghai Rising Star Program (23YF1421000)
Citations: not cited yet (Europe PMC); 72 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

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

SiyuanHuang1/SpaNiche

License: other
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 84a43cf0e77e49f84acf66eb130b45612234bb12, 2 June 2026
Languages: R (21)
Size: 69 files, 21 scripts
Software Heritage: not archived
Found in: the references
Holds: README, license file, environment (DESCRIPTION), documentation
Not found: CITATION.cff, tests, continuous integration
Tools: tidyverse (13 files), Seurat (5 files), patchwork (2 files), reshape2 (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
24 files

Zenodo 19179447

License: MIT
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (13 files), Seurat (5 files), patchwork (2 files), reshape2 (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
24 files
At the source:

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;
  • 42 scripts, each with its path and the digest of its content;
  • 12 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

Datasets cited

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1186/s13059-026-04069-z.

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 7 MeSH terms, 9 funders, 59 references.

Cite

This paper

Huang, S., Ran, Q., Tang, J., Wang, X., Xi, J., Ma, S., & Xi, R. (2026). SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data. Genome biology, 27(1), 182. https://doi.org/10.1186/s13059-026-04069-z

BibTeX

@article{huang2026spaniche,
author = {Huang, Siyuan and Ran, Qinghua and Tang, Junjie and Wang, Xiaochen and Xi, Junqing and Ma, Shiyang and Xi, Ruibin},
title = {{SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data}},
journal = {Genome biology},
year = {2026},
month = apr,
volume = {27},
number = {1},
pages = {182},
publisher = {BMC},
issn = {1474-7596},
doi = {10.1186/s13059-026-04069-z},
url = {https://doi.org/10.1186/s13059-026-04069-z},
pmid = {42015285},
pmcid = {PMC13231777}
}

RIS

TY - JOUR
AU - Huang, Siyuan
AU - Ran, Qinghua
AU - Tang, Junjie
AU - Wang, Xiaochen
AU - Xi, Junqing
AU - Ma, Shiyang
AU - Xi, Ruibin
TI - SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data
T2 - Genome biology
J2 - Genome Biol
PY - 2026
DA - 2026/04/21
VL - 27
IS - 1
SP - 182
SN - 1474-7596
PB - BMC
DO - 10.1186/s13059-026-04069-z
UR - https://doi.org/10.1186/s13059-026-04069-z
LA - en
ER -

CSL-JSON

{
"id": "10.1186/s13059-026-04069-z",
"type": "article-journal",
"title": "SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data",
"container-title": "Genome biology",
"author": [
{
"family": "Huang",
"given": "Siyuan"
},
{
"family": "Ran",
"given": "Qinghua"
},
{
"family": "Tang",
"given": "Junjie"
},
{
"family": "Wang",
"given": "Xiaochen"
},
{
"family": "Xi",
"given": "Junqing"
},
{
"family": "Ma",
"given": "Shiyang"
},
{
"family": "Xi",
"given": "Ruibin"
}
],
"container-title-short": "Genome Biol",
"volume": "27",
"issue": "1",
"page": "182",
"DOI": "10.1186/s13059-026-04069-z",
"PMID": "42015285",
"PMCID": "PMC13231777",
"ISSN": "1474-7596",
"publisher": "BMC",
"URL": "https://doi.org/10.1186/s13059-026-04069-z",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
21
]
]
}
}

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.21203/rs.3.rs-9676637/v1 [code]
A Comprehensive Benchmarking of Spatial Deconvolution and Domain Detection Methods across Diverse Tissues and Spatial Transcriptomic Technologies
Journal: Research Square (preprint)
In common: Seurat, tidyverse, genetics / omics, 9 references
[2] doi:10.1093/bioinformatics/btag578 [code]
NicheDeSig: niche-aware deconvolution and adaptive signature analysis for spatial transcriptomics.
Journal: Bioinformatics (Oxford, England)
In common: genetics / omics, 10 references
[3] doi:10.1186/s13073-026-01704-z [code]
Gene expression profiling enables refined parcellation of cortical layers in the heterogeneous human cerebral cortex.
Journal: Genome medicine
In common: Seurat, reshape2, patchwork, 1 other tool, genetics / omics, cellular / molecular, 6 references
[4] doi:10.1038/s41592-026-03194-8 [code]
Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.
Journal: Nature methods
In common: Seurat, reshape2, tidyverse, genetics / omics, 7 references
[5] doi:10.1093/bib/bbag298 [code]
Empowering multifaceted analysis of spatial transcriptomics data with RGAST.
Journal: Briefings in bioinformatics
In common: genetics / omics, 8 references
[6] doi:10.1038/s41593-026-02293-1 [code]
Optics-free spatial genomics for mapping mammalian brain aging by IRISeq.
Journal: Nature neuroscience
In common: Seurat, reshape2, tidyverse, genetics / omics, cellular / molecular, 5 references
[7] doi:10.1038/s42003-026-10259-z [code]
Spatial transcriptomic profiling of developing mouse hearts reveals a spatially patterned signaling environment.
Journal: Communications biology
In common: Seurat, patchwork, tidyverse, genetics / omics, cellular / molecular, 5 references
[8] doi:10.1093/bioinformatics/btag540 [code]
Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal.
Journal: Bioinformatics (Oxford, England)
In common: Alzheimer's / dementia, genetics / omics, 7 references
[9] doi:10.1016/j.celrep.2026.117500 [code]
Spatio-molecular gene expression reflects dorsal anterior cingulate cortex structure and function in the human brain.
Journal: Cell reports
In common: Seurat, reshape2, patchwork, 1 other tool, genetics / omics, cellular / molecular, 3 references
[10] doi:10.1016/j.isci.2026.117206 [code]
ReliST: A model-agnostic risk layer for spatial transcriptomics deconvolution.
Journal: iScience
In common: genetics / omics, 7 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.