SpaNiche: spatial niche analysis to explore colocalization patterns and cellular interactions in spatial transcriptomics data.
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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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
- #' spaniche_nmf_comm: Spatial integrative NMF of cell-type abundance
- #' and ligand–receptor interaction matrices, with downstream pathway inference
- #'
- #' @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.
- #' @param spatialdf a data frame or matrix that contains two columns, "col" and "row". Row names must be
- #' spot barcodes and consistent with \code{spot_by_celltype}.
- #' @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'.
- #' @param smoothing_type Character vector specifying the spatial smoothing
- #' levels to include. Supported values are:
- #' \itemize{
- #' \item \code{"view0"}: no smoothing (original matrix)
- #' \item \code{"view1"}: first-order spatial neighbors
- #' \item \code{"view2"}: second-order spatial neighbors
- #' }
- #' Valid combinations are \code{c("view0")},
- #' \code{c("view0","view1")}, and
- #' \code{c("view0","view1","view2")}.
- #' 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.
- #' @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)).
- #' @param digits integer indicating the number of decimal places.
- #' @param LRDB This parameter represents the reference for cell-cell interactions, which comes from CellChat.
- #' @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.
- #' @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).
- #' @param var_thre Variance threshold
- #' @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.
- #' @param defined_weight Either \code{"default"} to use data-driven modality
- #' weights, or a numeric vector of length two specifying user-defined weights
- #' for the cell-type and LR matrices.
- #' @param lambda_v Vector of spatial regularization parameters controlling the
- #' strength of Laplacian smoothness.
- #' @param sigma_v Gaussian kernel parameter. Used in the computation of the Laplacian matrix, influencing how spatial information is incorporated into the factorization.
- #' @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.
- #' @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.
- #' @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.
- #' @param topic_lr_quantile_thre A threshold for quantile selection. Only data above this quantile will be considered for visualization. Default is 0.95.
- #' @param spot_topic.quantile.thre Quantile threshold defining topic-high and
- #' topic-low spot groups (default: top and bottom 20 %).
- #' @param S_intra_thre S_intra_thre
- #' @param term_topn Number of top enriched functional terms retained for visualization.
- #' @param num_core Number of CPU cores used for parallel computation in downstream scSeqComm analysis.
- #'
- #' @return A list containing:
- #' \itemize{
- #' \item \code{LRintegratedmatrix}: Filtered spatial LR interaction matrix.
- #' \item \code{nmf_res}: Results from spatially regularized integrative NMF.
- #' \item \code{go_res}: GO enrichment results for topic-specific signaling. Only terms with a p-value < 0.01 are retained.
- #' \item \code{go_plot}: Visualization of enriched functional pathways. No p-value filtering is applied; the top "term_topn" terms are plotted.
- #' }
- #' @import Seurat
- #' @import tidyverse
- #' @import IntNMF
- #' @import scales
- #' @import scSeqComm
- #' @export
- spaniche_nmf_comm = function(
- ## Basic inputs
- spatial.seu,
- spatialdf,
- spot_by_celltype,
- smoothing_type = c('view0', 'view1', 'view2'),
- distance_thre = c(NA,2/(3^0.5),4/(3^0.5)),
- digits = 2,
- ## Parameters related to ligand–receptor interactions
- LRDB = SpaNiche::CellChatDB.human,
- LR_dm_type = c("view1", "view2"),
- LR_distance_thre = c(2/(3^0.5),4/(3^0.5)),
- var_thre = c(0.2,0.99),
- ## Parameters related to joint matrix factorization
- topic_num = 15,
- defined_weight = "default",
- lambda_v =c(0.5, 1, 2),
- sigma_v = c(0.5, 1, 1.5),
- maxiter = 200,
- st.count = 20,
- epsilon = 1e-04,
- # Downstream cellular responses
- topic_lr_quantile_thre = 0.95,
- spot_topic.quantile.thre = 0.2,
- S_intra_thre = 0.8,
- term_topn = 20,
- num_core = 1
- ){
- distance_thre = round(distance_thre,digits)
- LR_distance_thre = round(LR_distance_thre,digits)
- # Ensure consistent spot ordering
- if(identical(rownames(spatialdf),colnames(spatial.seu))){
- print("The spot order is consistent between spatialdf and spatial.seu.")
- } else {
- spatialdf = spatialdf[colnames(spatial.seu),]
- print("The spot order between spatialdf and spatial.seu is inconsistent. Adjust the spot order of spatialdf.")
- }
- if(identical(rownames(spatialdf),rownames(spot_by_celltype))){
- print("The spot order is consistent between spatialdf and spot_by_celltype.")
- } else {
- spot_by_celltype=spot_by_celltype[rownames(spatialdf),]
- print("The spot order between spatialdf and spot_by_celltype is inconsistent. Adjust the spot order of spot_by_celltype.")
- }
- # Construct spatially extended cell-type enrichment matrix
- spot.ct.df = get_spot_by_celltype_extended(
- spatialdf = spatialdf,
- spot_by_celltype = spot_by_celltype,
- smoothing_type = smoothing_type,
- distance_thre = distance_thre,
- digits = digits
- )
- write.csv(spot.ct.df,file = "spot_by_celltype_extended.csv",quote = F,row.names = T)
- ### Part II: Construction of ligand–receptor integrated matrix
- step1_res=prepare_for_LRintegratedmatrix(spatial.seu,LRDB)
- distance_matrix = make_distance_matrix_LR(spatialdf = spatialdf,dm_type = LR_dm_type,distance_thre = LR_distance_thre,digits = digits)
- LRelementmatrix = step1_res[[1]]
- cc_interaction = step1_res[[2]]
- # Receptor expression within each spot
- rmat = LRelementmatrix %>% t() %>% .[,cc_interaction$receptor]
- # Ligand expression within each spot
- lmat = LRelementmatrix %>% t() %>% .[,cc_interaction$ligand]
- # NOTE: This section may be generalized in the future; currently assumes four LR configurations (m1–m4).
- m1=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view1,neighbor_geneexp = rmat,center_geneexp = lmat,center_is_ligand = T)
- m2=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view1,neighbor_geneexp = lmat,center_geneexp = rmat,center_is_ligand = F)
- colnames(m1)=paste0(colnames(m1)," (view1)")
- colnames(m2)=paste0(colnames(m2)," (view1)")
- m3=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view2,neighbor_geneexp = rmat,center_geneexp = lmat,center_is_ligand = T)
- m4=generate_LRintegratedmatrix(whoisneighbor = distance_matrix$view2,neighbor_geneexp = lmat,center_geneexp = rmat,center_is_ligand = F)
- colnames(m3)=paste0(colnames(m3)," (view2)")
- colnames(m4)=paste0(colnames(m4)," (view2)")
- LRintegratedmatrix=m1 %>% cbind(m2) %>% cbind(m3) %>% cbind(m4)
- LRintegratedmatrix[is.na(LRintegratedmatrix)] = 0
- saveRDS(LRintegratedmatrix,file = "LRintegratedmatrix.rds")
- rm(list = paste0("m",1:4))
- ### Compute Moran's I and annotate ligand–receptor interactions ###
- moransi_output_df = moransi_for_LRintegratedmatrix(t(LRintegratedmatrix),spatial.seu,cc_interaction)
- saveRDS(moransi_output_df,file = "LRintegratedmatrix_with_moransi.rds")
- print("Moran's index calculation completed")
- ### Part III: Joint factorization of cell-type and LR interaction matrices
- LRintegratedmatrix = LRintegratedmatrix[,colSums(LRintegratedmatrix) > 0]
- colnames(LRintegratedmatrix)=colnames(LRintegratedmatrix) %>% str_replace_all("_","-")
- LRintegratedmatrix=LRintegratedmatrix[spot.ct.df %>% rownames(),]
- # Variance-based filtering of LR interactions
- var.df1 = LRintegratedmatrix %>% apply(2, function(x){var(x)}) %>% as.data.frame()
- colnames(var.df1) = "var_value"
- var.df1$interaction = rownames(var.df1)
- var.df1 = var.df1 %>% arrange(var_value)
- var.df1$index = 1:length(var.df1$var_value)
- var_thre_1 = quantile(var.df1$var_value,var_thre[1])
- var_thre_2 = quantile(var.df1$var_value,var_thre[2])
- var.df1 = var.df1 %>% filter(var_value > var_thre_1 & var_value < var_thre_2)
- used_interaction = var.df1$interaction
- used_interaction = intersect(colnames(LRintegratedmatrix),used_interaction)
- LRintegratedmatrix=LRintegratedmatrix[,used_interaction]
- print("Filtering the LR integrated matrix based on variance and selecting some LR pairs.")
- # to matrix
- spot.ct.df = as.matrix(spot.ct.df)
- LRintegratedmatrix = as.matrix(LRintegratedmatrix)
- # Estimate initial modality weights prior to running IntNMF
- dat <- list(spot.ct.df,LRintegratedmatrix)
- theta_v = define_initial_weight(dat)
- # The function nmf.mnnals requires the samples to be on rows and variables on columns.
- fit <- nmf.mnnals(dat=dat,k=topic_num,maxiter=50,st.count=10,n.ini=3,ini.nndsvd=TRUE,seed=TRUE,wt = theta_v)
- # Determine refined modality weights
- if (length(defined_weight) == 2 & all(defined_weight > 0)) {
- rho_v = define_good_weight(X = dat,Wzero = fit$W,Hzero = fit$H,theta_v = theta_v,weight_input = defined_weight)
- } else if (length(defined_weight) == 1 & defined_weight == "default") {
- rho_v = theta_v
- } else {
- stop("defined_weight error")
- }
- print("Weights for different matrices have been determined, now starting joint factorization of the two matrices:")
- # Joint matrix factorization
- myfit = nmf_modified(
- dat = dat,
- Wzero = fit$W,
- Hzero = fit$H,
- wt = rho_v,
- k=topic_num,
- lambda = lambda_v,
- sigma = sigma_v,
- maxiter = maxiter,
- st.count = st.count,
- spatialdf = as.matrix(spatialdf[,c("row","col")]),
- epsilon = epsilon
- )
- saveRDS(myfit,file = "nmf_modified_fit.rds")
- print("joint factorization has been completed.")
- ### Part IV: Linking latent topics to downstream cellular responses
- spot_topic = as.data.frame(myfit$W)
- colnames(spot_topic) = paste0("topic",1:topic_num)
- allSB = rownames(spot_topic)
- gene_expr_matrix = spatial.seu@assays$Spatial@data
- gene_expr_matrix = as.matrix(gene_expr_matrix)
- gene_expr_matrix = gene_expr_matrix[rowSums(gene_expr_matrix) > 0,]
- tmpplot = plot_topic_lr(
- topic_lr = t(myfit$H$H2),
- topic_lr_quantile_thre = topic_lr_quantile_thre
- )
- topic_lr_small_file = dir(getwd(),"topic_lr_small_.*csv")
- topic_lr_small = read.csv(topic_lr_small_file)
- # Color palette for topic visualization
- color_cluster = hue_pal()(topic_num)
- names(color_cluster) = paste0("topic",1:topic_num)
- # Objects to be exported
- plot.list=list()
- all.go = data.frame()
- print("Exploring pathway changes due to cell interactions:")
- for (ti in colnames(spot_topic)) {
- tmpst = spot_topic[,ti]
- tmpquan = quantile(tmpst,c(spot_topic.quantile.thre,1 - spot_topic.quantile.thre))
- low.index = which(tmpst <= tmpquan[1])
- high.index = which(tmpst > tmpquan[2])
- lowSB = allSB[low.index]
- highSB = allSB[high.index]
- ########## Load scRNA-seq data
- tmp_gene_expr_matrix = gene_expr_matrix[,c(highSB,lowSB)]
- tmp_anno = data.frame(
- "Cell_ID" = c(highSB,lowSB),
- "Cluster_ID" = c(
- rep(paste(ti,"high",sep = "_"),length(highSB)),
- rep(paste(ti,"low",sep = "_"),length(lowSB))
- )
- )
- ########## Ligand-receptor pairs
- tmp_topic_lr = topic_lr_small %>% filter(topic == ti)
- tmp_topic_lr$lr = str_remove(tmp_topic_lr$LRinteraction," .*$")
- tmp_topic_lr$r = ifelse(str_detect(tmp_topic_lr$lr,">"),
- str_remove(tmp_topic_lr$lr,"^.*>"),
- str_remove(tmp_topic_lr$lr,"<.*$"))
- tmp_topic_lr$l = ifelse(str_detect(tmp_topic_lr$lr,">"),
- str_remove(tmp_topic_lr$lr,"->.*$"),
- str_remove(tmp_topic_lr$lr,"^.*<-"))
- tmp_topic_lr=tmp_topic_lr[,c("l","r")] %>% unique()
- colnames(tmp_topic_lr) = c("ligand","receptor")
- tmp_topic_lr$ligand = str_replace(tmp_topic_lr$ligand,"^HLA-","xxx") %>% str_replace("-",",") %>% str_replace("xxx","HLA-")
- tmp_topic_lr$receptor = str_replace(tmp_topic_lr$receptor,"-",",")
- LR_db = tmp_topic_lr
- ########## Transcriptional regulatory networks
- TF_TG_db <- scSeqComm::TF_TG_TRRUSTv2_HTRIdb_RegNetwork_High
- ########## Receptor-Transcription factor a-priori association
- TF_PPR <- scSeqComm::TF_PPR_KEGG_human
- ########## Identify and quantify intercellular and intracellular signaling
- scSeqComm_res <- scSeqComm_analyze(gene_expr = tmp_gene_expr_matrix,
- cell_metadata = tmp_anno,
- inter_signaling = F,
- LR_pairs_DB = LR_db,
- TF_reg_DB = TF_TG_db,
- R_TF_association = TF_PPR,
- N_cores = num_core,
- DEmethod = "wilcoxon")
- ### Downstream cellular responses induced by ligand–receptor interactions
- topic_high_comm = dplyr::filter(
- scSeqComm_res$comm_results,
- cluster == paste(ti,"high",sep = "_") & S_intra >= S_intra_thre
- )
- topic_high_comm = as.data.frame(topic_high_comm) #20260426
- if (dim(topic_high_comm)[1] < 2) {next} #20231018
- # GO analysis of topic_high communication
- geneUniverse <- unique(unlist(scSeqComm_res$TF_reg_DB_scrnaseq))
- cell_functional_response <- scSeqComm_GO_analysis(
- results_signaling = topic_high_comm,
- geneUniverse = geneUniverse,
- method = "general")
- # plot
- cell_functional_response$pval = as.numeric(cell_functional_response$pval)
- cell_functional_response = cell_functional_response %>% arrange(pval)
- cell_functional_response$pval_log10_neg = -log10(cell_functional_response$pval)
- cell_functional_response$cluster = ti
- all.go = rbind(all.go,cell_functional_response %>% filter(pval < 0.01))
- tmpres = cell_functional_response %>% slice_head(n = term_topn)
- tmpres=tmpres%>%arrange(pval_log10_neg)
- tmpres$Term=factor(tmpres$Term,levels = tmpres$Term)
- tmpbar = tmpres %>% ggplot(aes(x=Term,y=pval_log10_neg))+
- geom_hline(yintercept = -log10(0.01),color = "black",alpha=0.7)+
- geom_bar(stat="identity",alpha=0.8,aes(fill=cluster))+
- geom_text(mapping = aes(x=Term,y=0,label=Term),hjust=0)+
- scale_x_discrete("")+
- scale_y_continuous("-log10(p value)",expand = c(0.02,0))+
- scale_fill_manual(values = color_cluster)+
- coord_flip()+
- labs(title = ti)+
- theme_bw()+
- theme(
- panel.grid = element_blank(),
- axis.ticks.y = element_blank(),
- axis.text.y = element_blank(),
- axis.text.x.bottom = element_text(color = "black"),
- legend.position = "none",
- plot.title = element_text(hjust = 0.5,size = 20)
- )
- index=which(ti == colnames(spot_topic))
- plot.list[[get("index")]]=tmpbar
- }
- print("Completed.")
- output = list(
- LRintegratedmatrix=LRintegratedmatrix,
- nmf_res=myfit,
- go_res=all.go, # p-values filtered with threshold pval < 0.01
- go_plot=plot.list # no p-value filtering, only the top "term_topn" terms are plotted
- )
- print("Output all results.")
- return(output)
- }
spaniche_nmf_comm.R at commit 84a43cf, under other · at the source
Overview
- Academy for Advanced Interdisciplinary Studies, Peking University, Beijing, 100871 China
- Present Address: Ray and Stephanie Lane Computational Biology Department, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA USA
- Center for Statistical Science, Peking University, Beijing, 100871 China
- School of Mathematical Sciences, Peking University, Beijing, 100871 China
- 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
- Institute of Clinical Medicine, Shanghai Jiao Tong University School of Medicine, Shanghai, 200025 China
- School of Mathematical Sciences, Shanghai Jiao Tong University, Shanghai, 200240 China
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
84a43cf0e77e49f84acf66eb130b45612234bb12, 2 June 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
24 files
- R/
DEinteractions_twocluste , R, 106 linesrs.R - R/
SpaNiche-package.R , R, 15 lines - R/
calculate_laplacian_matr , R, 54 lines, 1 matchix_with_gausskernel.R - R/
data.R , R, 7 lines - R/
define_good_weight.R , R, 27 lines - R/
define_initial_weight.R , R, 31 lines - R/
distribution_2d.R , R, 124 lines - R/
estimate_ecotype_ratio.R , R, 77 lines - R/
generate_LRintegratedmat , R, 76 linesrix.R - R/
get_spot_by_celltype_ext , R, 110 linesended.R - R/
make_distance_matrix.R , R, 72 lines - R/
make_distance_matrix_LR. , R, 72 linesR - R/
moransi_for_LRintegrated , R, 83 linesmatrix.R - R/
nmf_modified.R , R, 207 lines, 1 match - R/
plot_NMF_components.R , R, 103 lines - R/
plot_topic_lr.R , R, 92 lines - R/
prepare_for_LRintegrated , R, 80 linesmatrix.R - R/
spaniche_nmf_celltype_an , R, 166 lines, 2 matchesd_gene.R - R/
spaniche_nmf_celltype_an , R, 189 linesd_lr.R - R/
spaniche_nmf_comm.R , R, 332 lines, 3 matches - R/
stat_for_interactionwith , R, 67 linesmoransi.R - LICENSE, License, 2 lines
- LICENSE.md, License, 21 lines
- README.md, Text, 52 lines
Zenodo 19179447
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
- 29 September 2026: the link answers (HTTP 200)
24 files
- R/
DEinteractions_twocluste , R, 106 linesrs.R - R/
SpaNiche-package.R , R, 15 lines - R/
calculate_laplacian_matr , R, 54 linesix_with_gausskernel.R - R/
data.R , R, 7 lines - R/
define_good_weight.R , R, 27 lines - R/
define_initial_weight.R , R, 31 lines - R/
distribution_2d.R , R, 124 lines - R/
estimate_ecotype_ratio.R , R, 77 lines - R/
generate_LRintegratedmat , R, 76 linesrix.R - R/
get_spot_by_celltype_ext , R, 110 linesended.R - R/
make_distance_matrix.R , R, 72 lines - R/
make_distance_matrix_LR. , R, 72 linesR - R/
moransi_for_LRintegrated , R, 83 linesmatrix.R - R/
nmf_modified.R , R, 207 lines - R/
plot_NMF_components.R , R, 102 lines - R/
plot_topic_lr.R , R, 92 lines - R/
prepare_for_LRintegrated , R, 80 linesmatrix.R - R/
spaniche_nmf_celltype_an , R, 166 lines, 2 matchesd_gene.R - R/
spaniche_nmf_celltype_an , R, 189 linesd_lr.R - R/
spaniche_nmf_comm.R , R, 328 lines, 3 matches - R/
stat_for_interactionwith , R, 67 linesmoransi.R - LICENSE, License, 2 lines
- LICENSE.md, License, 21 lines
- README.md, Text, 42 lines
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
- geo:GSE220442, at NCBI GEO; found in “Data availability”
- zenodo:7526696, at Zenodo; found in “Data availability”
- zenodo:7760264, at Zenodo; found in “Data availability”
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:
- it points to 3 datasets: NCBI GEO GSE220442, Zenodo 7526696, Zenodo 7760264
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://
BibTeX
@article{huang2026spanic
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/
url = {https://
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/
VL - 27
IS - 1
SP - 182
SN - 1474-7596
PB - BMC
DO - 10.1186/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1186/
"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":
"volume": "27",
"issue": "1",
"page": "182",
"DOI": "10.1186/
"PMID": "42015285",
"PMCID": "PMC13231777",
"ISSN": "1474-7596",
"publisher": "BMC",
"URL": "https://
"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 TechnologiesJournal: 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 medicineIn 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 methodsIn 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 bioinformaticsIn 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 neuroscienceIn 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 biologyIn 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 reportsIn 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: iScienceIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 42 scripts, and 12 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:bf04fc225f0ead4f…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
