OSCR

Empowering multifaceted analysis of spatial transcriptomics data with RGAST.

Code ↔ Paper

11 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.

5 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 11 matches
  1. [1] § Materials and methods › Spatially variable genes detection › Detection of SVGs ↔ tutorial/SVG_detection.ipynb, lines 76 to 114 · score 0.70 · fold change, neighboring domain, fraction, ratio, DE, rank · Report a mismatch
  2. [2] § Materials and methods › Cell–cell communications analysis ↔ RGAST/cci.py, lines 23 to 72 · score 0.68 · CellChatDB, LR pair, database, subunits, ligand, receptor · block oscr:b:5BXC8C5HVXP9N-Q · Report a mismatch
  3. [3] § Materials and methods › Cell–cell communications analysis ↔ RGAST/cci.py, lines 418 to 476 · score 0.65 · spatial vector fields, signaling direction, weights, matrix, network, spot · block oscr:b:EBK8WQ9WWDEVE-L · Report a mismatch
  4. [4] § Materials and methods › Trajectory and pseudotime inference › Cross-sectional 3D RGAST model ↔ tutorial/3D_RGAST.ipynb, lines 1 to 23 · score 0.65 · discontinuous independent technical, spatial neighborhoods lies, consecutive, noises, adjacent, biological · Report a mismatch
  5. [5] § Materials and methods › Deep embedding clustering (optional) ↔ RGAST/Train_RGAST.py, lines 255 to 378 · score 0.63 · deep embedded clustering, RGAST embedding, DEC, latent · block oscr:b:978CP382PWQ4G-X · Report a mismatch
  6. [6] § Materials and methods › Relational graph attention auto-encoder › Loss function ↔ RGAST/Train_RGAST.py, lines 77 to 118 · score 0.63 · Adam optimizer, weight decay, Loss · block oscr:b:6M9J5J4S10H7R-1 · Report a mismatch
  7. [7] § Results › Overview of the RGAST model ↔ RGAST/Train_RGAST.py, lines 77 to 118 · score 0.62 · graph attention auto, latent embedding, dimensional, profiles, encoder, reconstructed · block oscr:b:6M9J5J4S10H7R-1 · Report a mismatch
  8. [8] § Materials and methods › Scalable training of RGAST ↔ tutorial/train_with_DIC.ipynb, lines 1 to 21 · score 0.61 · mouse olfactory bulb, DIC strategy, Stereo seq, Training · Report a mismatch
  9. [9] § Materials and methods › Scalable training of RGAST ↔ RGAST/Train_RGAST.py, lines 25 to 74 · score 0.54 · Training RGAST, spatial transcriptomics, batch, networks · block oscr:b:D0DHS419815Z5-3 · Report a mismatch
  10. [10] § Results › Validation and application of RGAST in deciphering spatially resolved cell–cell communication networks ↔ tutorial/de_novo_CCC_analysis.ipynb, lines 148 to 162 · score 0.53 · Penk Oprd1, ligand receptor, CCC, score, pathway, cell · Report a mismatch
  11. [11] § Results › Validation and application of RGAST in deciphering spatially resolved cell–cell communication networks ↔ tutorial/de_novo_CCC_analysis.ipynb, lines 148 to 162 · score 0.52 · ligand receptor pair, Penk Oprd1, CCC, scores, pathways, cell · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 394 lines · 18 KB · MIT · 4 matches

  1. import numpy as np
  2. import os
  3. import scanpy as sc
  4. import anndata
  5. from sklearn.metrics.cluster import adjusted_rand_score
  6. from sklearn.metrics import silhouette_score
  7. import random
  8. from tqdm import tqdm
  9. import warnings
  10. from .RGAST import RGAST
  11. from .utils import Transfer_pytorch_Data, res_search_fixed_clus, Batch_Data, Cal_Spatial_Net, Cal_Expression_Net, mclust_R
  12. import torch
  13. import torch.backends.cudnn as cudnn
  14. cudnn.benchmark = True
  15. import torch.nn.functional as F
  16. from torch_geometric.loader import DataLoader
  17. def target_distribution(batch):
  18. weight = (batch ** 2) / torch.sum(batch, 0)
  19. return (weight.t() / torch.sum(weight, 1)).t()
  20. class Train_RGAST:
  21. def __init__(self, adata, dim_reduction = None, batch_data = False, num_batch_x_y = None, device_idx = 7, spatial_net_arg = {}, exp_net_arg = {}, verbose=True, center_msg='out'):
  22. """\
  23. Initialization of a RGAST trainer.
  24. Parameters
  25. ----------
  26. adata
  27. AnnData object of scanpy package.
  28. num_batch_x_y
  29. A tuple specifying the number of points at which to segment the spatially transcribed image on the x and y axes.
  30. Each split is then trained as a batch. This is useful for large scale cases.
  31. spatial_net_arg
  32. A dict passing key-word arguments to calculating spatial network in each batch data. See `Cal_Spatial_Net`.
  33. exp_net_arg
  34. A dict passing key-word arguments to calculating expression network in each batch data. See `Cal_Expression_Net`
  35. """
  36. if dim_reduction == 'PCA':
  37. if 'X_pca' not in adata.obsm.keys():
  38. raise ValueError("PCA has not been done! Run sc.pp.pca first!")
  39. elif dim_reduction == 'HVG':
  40. if 'highly_variable' not in adata.var.keys():
  41. raise ValueError("HVG has not been computed! Run sc.pp.highly_variable_genes first!")
  42. else:
  43. warnings.warn("No dimentional reduction method specified, using all genes' expression as input.")
  44. self.dim_reduction = dim_reduction
  45. self.batch_data = batch_data
  46. self.adata = adata
  47. if 'Spatial_Net' not in adata.uns.keys():
  48. raise ValueError("Spatial_Net is not existed! Run Cal_Spatial_Net first!")
  49. if 'Exp_Net' not in adata.uns.keys():
  50. raise ValueError("Exp_Net is not existed! Run Cal_Expression_Net first!")
  51. self.data = Transfer_pytorch_Data(adata, dim_reduction=dim_reduction,center_msg=center_msg)
  52. if verbose:
  53. print('Size of Input: ', self.data.x.shape)
  54. if batch_data:
  55. self.num_batch_x, self.num_batch_y = num_batch_x_y
  56. Batch_list = Batch_Data(adata, num_batch_x=self.num_batch_x, num_batch_y=self.num_batch_y)
  57. for temp_adata in Batch_list:
  58. Cal_Spatial_Net(temp_adata, **spatial_net_arg)
  59. Cal_Expression_Net(temp_adata, dim_reduce=dim_reduction, **exp_net_arg)
  60. data_list = [Transfer_pytorch_Data(adata, dim_reduction=dim_reduction,center_msg=center_msg) for adata in Batch_list]
  61. self.loader = DataLoader(data_list, batch_size=1, shuffle=True)
  62. self.device = torch.device(f'cuda:{device_idx}' if torch.cuda.is_available() else 'cpu')
  63. self.model = None
  64. def train_RGAST(self, early_stopping = True, label_key = None, save_path = '.', n_clusters = 7, cluster_method = 'leiden',
  65. hidden_dims=[100, 32], n_epochs=1000, lr=0.001, key_added='RGAST', att_drop = 0.3,
  66. gradient_clipping=5., weight_decay=0.0001, min_epochs=300, random_seed=0, save_loss=False,
  67. save_reconstrction=False, save_attention=True):
  68. """\
  69. Training graph attention auto-encoder.
  70. Parameters
  71. ----------
  72. early_stopping
  73. Using early stopping strategy or not. Default = True.
  74. lable_key
  75. A key specify the specific column in adata.obs to be treated as reference label.
  76. save_path
  77. directory to save the trained RGAST model.
  78. n_clusters
  79. number of clusters to set when calculating early stopping criterion.
  80. hidden_dims
  81. The dimension of the encoder (depends on RGAST or RGAST2).
  82. n_epochs
  83. Number of total epochs in training.
  84. lr
  85. Learning rate for AdamOptimizer.
  86. key_added
  87. The latent embeddings are saved in adata.obsm[key_added].
  88. gradient_clipping
  89. Gradient Clipping.
  90. weight_decay
  91. Weight decay for AdamOptimizer.
  92. save_loss
  93. If True, the training loss is saved in adata.uns['RGAST_loss'].
  94. save_reconstrction
  95. If True, the reconstructed PCA profiles are saved in adata.layers['RGAST_ReX'].
  96. Returns
  97. -------
  98. AnnData
  99. """
  100. self.save_path = save_path
  101. self.label_key = label_key
  102. self.n_clusters = n_clusters
  103. # seed_everything()
  104. seed=random_seed
  105. random.seed(seed)
  106. np.random.seed(seed)
  107. torch.manual_seed(seed)
  108. torch.cuda.manual_seed(seed)
  109. if self.model is None:
  110. model = RGAST(hidden_dims = [self.data.x.shape[1]] + hidden_dims, dim_reduce=self.dim_reduction, att_drop=att_drop).to(self.device)
  111. else:
  112. model = self.model.to(self.device)
  113. data = self.data.to(self.device)
  114. optimizer = torch.optim.Adam(model.parameters(), lr=lr, weight_decay=weight_decay)
  115. loss_list = []
  116. score_list = [0]
  117. num_fail = 0
  118. with tqdm(range(n_epochs)) as tq:
  119. for epoch in tq:
  120. if early_stopping:
  121. with torch.no_grad():
  122. if label_key is not None:
  123. if (epoch+1) % 50 == 0:
  124. if self.batch_data:
  125. model.to('cpu')
  126. model.eval()
  127. z, _, _, _ = model(data.x.cpu(), data.edge_index.cpu(), data.edge_type.cpu())
  128. model.to(self.device)
  129. else:
  130. model.eval()
  131. z, _, _, _ = model(data.x, data.edge_index, data.edge_type)
  132. z = z.to('cpu').detach().numpy()
  133. adata_RGAST = anndata.AnnData(z)
  134. adata_RGAST.obs_names=self.adata.obs_names
  135. if cluster_method == 'mclust':
  136. mclust_R(adata_RGAST, n_clusters)
  137. elif cluster_method == 'leiden':
  138. sc.pp.neighbors(adata_RGAST)
  139. _ = res_search_fixed_clus(adata_RGAST, n_clusters)
  140. obs_df = adata_RGAST.obs.join(self.adata.obs[label_key]).dropna(subset=label_key)
  141. ARI = adjusted_rand_score(obs_df['RGAST'], obs_df[label_key])
  142. if ARI <= max(score_list):
  143. num_fail += 1
  144. if num_fail>3 and epoch>=min_epochs:
  145. break
  146. else:
  147. num_fail = 0
  148. torch.save(model,f'{save_path}/model.pth')
  149. self.adata.obs['RGAST'] = adata_RGAST.obs['RGAST']
  150. score_list.append(ARI)
  151. tq.set_postfix(ARI=round(max(score_list),3))
  152. else:
  153. if (epoch+1) % 50 == 0:
  154. if self.batch_data:
  155. model.to('cpu')
  156. model.eval()
  157. z, _, _, _ = model(data.x.cpu(), data.edge_index.cpu(), data.edge_type.cpu())
  158. model.to(self.device)
  159. else:
  160. model.eval()
  161. z, _, _, _ = model(data.x, data.edge_index, data.edge_type)
  162. z = z.to('cpu').detach().numpy()
  163. adata_RGAST = anndata.AnnData(z)
  164. adata_RGAST.obs_names=self.adata.obs_names
  165. sc.pp.neighbors(adata_RGAST)
  166. _ = res_search_fixed_clus(adata_RGAST, n_clusters)
  167. SC = silhouette_score(z, adata_RGAST.obs['RGAST'])
  168. if SC <= max(score_list):
  169. num_fail += 1
  170. if num_fail>3 and epoch>=min_epochs:
  171. break
  172. else:
  173. num_fail = 0
  174. torch.save(model,f'{save_path}/model.pth')
  175. self.adata.obs['RGAST'] = adata_RGAST.obs['RGAST']
  176. score_list.append(SC)
  177. tq.set_postfix(SC=round(max(score_list),3))
  178. if self.batch_data:
  179. for batch in self.loader:
  180. batch = batch.to(self.device)
  181. model.train()
  182. optimizer.zero_grad()
  183. z, out, _, _ = model(batch.x, batch.edge_index, batch.edge_type)
  184. loss = F.mse_loss(batch.x, out) #F.nll_loss(out[data.train_mask], data.y[data.train_mask])
  185. loss.backward()
  186. loss_list.append(loss.item())
  187. torch.nn.utils.clip_grad_norm_(model.parameters(), gradient_clipping)
  188. optimizer.step()
  189. else:
  190. model.train()
  191. optimizer.zero_grad()
  192. z, out, _, _ = model(data.x, data.edge_index, data.edge_type)
  193. loss = F.mse_loss(data.x, out) #F.nll_loss(out[data.train_mask], data.y[data.train_mask])
  194. loss.backward()
  195. loss_list.append(loss.item())
  196. torch.nn.utils.clip_grad_norm_(model.parameters(), gradient_clipping)
  197. optimizer.step()
  198. if early_stopping == True and os.path.exists(f'{save_path}/model.pth'):
  199. model = torch.load(f'{save_path}/model.pth',weights_only=False).to(self.device)
  200. with torch.no_grad():
  201. if self.batch_data:
  202. model.to('cpu')
  203. model.eval()
  204. z, out, att1, att2 = model(data.x.cpu(), data.edge_index.cpu(), data.edge_type.cpu())
  205. model.to(self.device)
  206. else:
  207. model.eval()
  208. z, out, att1, att2 = model(data.x, data.edge_index, data.edge_type)
  209. RGAST_rep = z.to('cpu').detach().numpy()
  210. np.save(f'{save_path}/RGAST_embedding.npy', RGAST_rep)
  211. torch.save(model.to('cpu'),f'{save_path}/model.pth')
  212. self.adata.obsm[key_added] = RGAST_rep
  213. if save_loss:
  214. self.adata.uns['RGAST_loss'] = loss_list
  215. if save_reconstrction:
  216. ReX = out.to('cpu').numpy()
  217. self.adata.obsm['RGAST_ReX'] = ReX
  218. if save_attention:
  219. self.adata.uns['att1'] = (att1[0].to('cpu').numpy(),att1[1].to('cpu').numpy())
  220. self.adata.uns['att2'] = (att2[0].to('cpu').numpy(),att2[1].to('cpu').numpy())
  221. self.model = model
  222. def train_with_dec(self, verbose = True, early_stopping = True, key_added='RGAST', num_epochs=1000, dec_interval=50, dec_tol=0.01):
  223. """\
  224. Training graph attention auto-encoder with deep embedding clustering.
  225. Only call this after call Train_RGAST.train_RGAST() and make sure batch_data = False.
  226. Parameters
  227. ----------
  228. early_stopping
  229. Using early stopping strategy or not. Default = True.
  230. key_added
  231. The latent embeddings are saved in adata.obsm[key_added].
  232. num_epochs
  233. Number of total epochs in training.
  234. dec_interval
  235. Evaluate after how many epochs (for early stopping).
  236. dec_tol
  237. DEC tol.
  238. Returns
  239. -------
  240. AnnData with updated .obsm[key_added]
  241. """
  242. # initialize cluster parameter
  243. model = self.model.to(self.device)
  244. model.eval()
  245. test_z = self.adata.obsm['RGAST']
  246. y_pred_last = np.array(self.adata.obs['RGAST'],dtype=np.int32).copy()
  247. counts = len(np.bincount(y_pred_last))
  248. cluster_layer = []
  249. for i in range(counts):
  250. cluster_layer.append(np.mean(test_z[y_pred_last==i,],axis=0))
  251. cluster_layer = torch.tensor(cluster_layer).to(self.device)
  252. data = self.data.to(self.device)
  253. optimizer = torch.optim.Adam(model.parameters(), lr=0.001, weight_decay=0.0001)
  254. score_list = [0]
  255. num_fail = 0
  256. with tqdm(range(num_epochs)) as tq:
  257. for epoch_id in tq:
  258. if (epoch_id+1) % dec_interval == 0:
  259. if early_stopping:
  260. #early stopping
  261. if self.label_key is not None:
  262. model.eval()
  263. z, _ = model(data.x, data.edge_index, data.edge_type)
  264. z = z.to('cpu').detach().numpy()
  265. adata_RGAST = anndata.AnnData(z)
  266. adata_RGAST.obs_names=self.adata.obs_names
  267. sc.pp.neighbors(adata_RGAST)
  268. _ = res_search_fixed_clus(adata_RGAST, self.n_clusters)
  269. obs_df = adata_RGAST.obs.join(self.adata.obs[self.label_key]).dropna(subset=self.label_key)
  270. ARI = adjusted_rand_score(obs_df['RGAST'], obs_df[self.label_key])
  271. if ARI <= max(score_list):
  272. num_fail += 1
  273. if num_fail>3 and epoch_id>=300:
  274. break
  275. else:
  276. num_fail = 0
  277. torch.save(model,f'{self.save_path}/model.pth')
  278. self.adata.obs['RGAST'] = adata_RGAST.obs['RGAST']
  279. score_list.append(ARI)
  280. tq.set_postfix(ARI=round(max(score_list),3))
  281. else:
  282. model.eval()
  283. z, _ = model(data.x, data.edge_index, data.edge_type)
  284. z = z.to('cpu').detach().numpy()
  285. adata_RGAST = anndata.AnnData(z)
  286. adata_RGAST.obs_names=self.adata.obs_names
  287. sc.pp.neighbors(adata_RGAST)
  288. _ = res_search_fixed_clus(adata_RGAST, self.n_clusters)
  289. SC = silhouette_score(z, adata_RGAST.obs['RGAST'])
  290. if SC <= max(score_list):
  291. num_fail += 1
  292. if num_fail>3 and epoch_id>=300:
  293. break
  294. else:
  295. num_fail = 0
  296. torch.save(model,f'{self.save_path}/model.pth')
  297. self.adata.obs['RGAST'] = adata_RGAST.obs['RGAST']
  298. score_list.append(SC)
  299. tq.set_postfix(SC=round(max(score_list),3))
  300. #DEC update
  301. z, reconst = model(data.x, data.edge_index, data.edge_type)
  302. q = 1.0 / (1.0 + torch.sum(torch.pow(z.unsqueeze(1) - cluster_layer, 2), 2))
  303. q = (q.t() / torch.sum(q, 1)).t()
  304. tmp_p = target_distribution(torch.Tensor(q))
  305. y_pred = tmp_p.cpu().detach().numpy().argmax(1)
  306. delta_label = np.sum(y_pred != y_pred_last).astype(np.float32) / y_pred.shape[0]
  307. y_pred_last = np.copy(y_pred)
  308. if epoch_id > 0 and delta_label < dec_tol:
  309. print('delta_label {:.4}'.format(delta_label), '< tol', dec_tol)
  310. print('Reached tolerance threshold. Stopping training.')
  311. break
  312. # training model
  313. model.train()
  314. optimizer.zero_grad()
  315. z, reconst = model(data.x, data.edge_index, data.edge_type)
  316. q = 1.0 / (1.0 + torch.sum(torch.pow(z.unsqueeze(1) - cluster_layer, 2), 2) / 1.0)
  317. q = (q.t() / torch.sum(q, 1)).t()
  318. loss_rec = F.mse_loss(data.x, reconst)
  319. # clustering KL loss
  320. loss_kl = F.kl_div(q.log(), torch.tensor(tmp_p).to(self.device)).to(self.device)
  321. loss = loss_kl + loss_rec
  322. loss.backward()
  323. optimizer.step()
  324. model = torch.load(f'{self.save_path}/model.pth').to(self.device)
  325. model.eval()
  326. z, _ = model(data.x, data.edge_index, data.edge_type)
  327. RGAST_rep = z.to('cpu').detach().numpy()
  328. np.save(f'{self.save_path}/RGAST_embedding.npy', RGAST_rep)
  329. self.adata.obsm[key_added] = RGAST_rep
  330. self.model = model
  331. def load_model(self, path):
  332. self.model = torch.load(path, map_location=self.device)
  333. def save_model(self, path):
  334. torch.save(self.model,f'{path}/model.pth')
  335. @torch.no_grad()
  336. def process(self, gdata = None):
  337. if gdata is None:
  338. gdata = self.data
  339. self.model.to(self.device)
  340. self.model.eval()
  341. gdata = gdata.to(self.device)
  342. return self.model(gdata.x, gdata.edge_index, gdata.edge_type)

Train_RGAST.py at commit efea2dd, under MIT · at the source

Overview

Authors: Yuqiao Gong1, Xin Yuan1,2,3,4, Zhangsheng Yu1,2,3,5
  1. Department of Bioinformatics and Biostatistics, School of Life Sciences and Biotechnology, Shanghai Jiao Tong University, 800 Dongchuan Road, Minhang District, Shanghai, Shanghai, 200240, China
  2. SJTU-Yale Joint Center for Biostatistics and Data Science Organization, Shanghai Jiao Tong University, 800 Dongchuan Road, Minhang District, Shanghai, Shanghai, 200240, China
  3. Institute of Translational Medicine, Shanghai Jiao Tong University, 800 Dongchuan Road, Minhang District, Shanghai, Shanghai, 200240, China
  4. National Center for Translational Medicine, Shanghai Jiao Tong University, 800 Dongchuan Road, Minhang District, Shanghai, Shanghai, 200240, China
  5. Institute of Clinical Medicine, School of Medicine, Shanghai Jiao Tong University, 800 Dongchuan Road, Minhang District, Shanghai, Shanghai, 200240, China
Institutions: Shanghai Jiao Tong University (China)
Journal: Briefings in bioinformatics, volume 27, issue 3, article bbag298
Dates: received 20 October 2025; accepted 15 May 2026; published online 16 June 2026; in print May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/bib/bbag298 · PMID 42302280 · PMCID PMC13271401 · OpenAlex W7164902072
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), human (organism), mouse (organism), methods / tools (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: spatial transcriptomics, heterogeneous graph network, relational graph attention, cell–cell communication, RGAST
MeSH: Software*, Spatial Transcriptomics*, Algorithms, Animals, Computational Biology, Humans, Mice (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: Shanghai Key Laboratory of Child Brain and Development (24dz2260100); Shanghai Jiao Tong University - Luoyang Orthopedic-Traumatological Hospital of Henan Province Collaborative Research Fund (ZZSW-HLOH-2025006); National Natural Science Foundation of China (325B2022, 12171318, 32500566); Shanghai Science and Technology Commission (21ZR1436300, 23XD1401900, 23DZ2290600, 24JS2810200); Science and Technology Commission of Shanghai Municipality (25ZR1402274); Medical Engineering Cross Fund of Shanghai Jiao Tong University (YG2023ZD21)
Citations: not cited yet (Europe PMC); 51 references in the paper

Abstract

Spatial transcriptomics (ST) enables mapping gene expression in native tissue context to resolve architecture and cellular interactions, but current analytical workflows rely on separate algorithms for distinct tasks. We present RGAST (Relational Graph Attention network for ST analysis), a framework that builds upon and extends our earlier HERGAST model (specifically designed for large-scale ST data analysis) for diverse downstream analysis. By introducing a relational graph attention auto-encoder, RGAST jointly models spatial proximity and gene expression similarity to capture both local and global structures in ST data. This design enables a wide range of downstream tasks within a single framework. Through comprehensive benchmarking, RGAST demonstrates superior performance in spatial domain identification across multiple platforms, improving adjusted rand index by ~10% compared to the second-best model in the dorsolateral prefrontal cortex dataset. RGAST accurately reconstructs known neuroglial interaction patterns in the mouse hypothalamus, including long-range signaling pathways that are often missed by distance-constrained methods. Moreover, RGAST also excels in boosting spatially variable gene identification accuracy, delivering more precise inference of developmental trajectories in the human cortex, and robust reconstruction of 3D tissue architectures from serial sections. Collectively, these results establish RGAST as a powerful tool for providing coherent solution to advance ST data analysis across multiple research scenarios.

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 11 matches between paragraphs and lines of code.

pypi.org/project/rgast

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
At the source: pypi.org/project/RGAST

GYQ-form/RGAST

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: efea2dd94f9edaf1feadbc5eb269de60ad353ca1, 17 June 2026
Languages: Python (7), Jupyter (5)
Size: 26 files, 12 scripts
Software Heritage: not checked
Found in: “Data availability”
Holds: README, license file, environment (environment.yml, setup.py), 5 notebooks
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (10 files), Scanpy (9 files), pandas (8 files), Matplotlib (7 files), scikit-learn (6 files), PyTorch Geometric (4 files), PyTorch (4 files), SciPy (4 files), anndata (3 files), seaborn (3 files), Numba (2 files), Plotly (1 file), rpy2 (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
14 files

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

All data used in this research can be found in Supplementary Table S1. Our RGAST method is available as a Python package on PyPI at https://pypi.org/project/RGAST, free for academic use, and the source code is openly available from our GitHub repository at https://github.com/GYQ-form/RGAST.

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, 3 authors, 5 keywords, 7 MeSH terms, 6 funders, 49 references.

Cite

This paper

Gong, Y., Yuan, X., & Yu, Z. (2026). Empowering multifaceted analysis of spatial transcriptomics data with RGAST. Briefings in bioinformatics, 27(3), bbag298. https://doi.org/10.1093/bib/bbag298

BibTeX

@article{gong2026empowering,
author = {Gong, Yuqiao and Yuan, Xin and Yu, Zhangsheng},
title = {{Empowering multifaceted analysis of spatial transcriptomics data with RGAST}},
journal = {Briefings in bioinformatics},
year = {2026},
month = may,
volume = {27},
number = {3},
pages = {bbag298},
publisher = {Oxford University Press},
issn = {1467-5463},
doi = {10.1093/bib/bbag298},
url = {https://doi.org/10.1093/bib/bbag298},
pmid = {42302280},
pmcid = {PMC13271401}
}

RIS

TY - JOUR
AU - Gong, Yuqiao
AU - Yuan, Xin
AU - Yu, Zhangsheng
TI - Empowering multifaceted analysis of spatial transcriptomics data with RGAST
T2 - Briefings in bioinformatics
J2 - Brief Bioinform
PY - 2026
DA - 2026/05/01
VL - 27
IS - 3
SP - bbag298
SN - 1467-5463
PB - Oxford University Press
DO - 10.1093/bib/bbag298
UR - https://doi.org/10.1093/bib/bbag298
LA - en
ER -

CSL-JSON

{
"id": "10.1093/bib/bbag298",
"type": "article-journal",
"title": "Empowering multifaceted analysis of spatial transcriptomics data with RGAST",
"container-title": "Briefings in bioinformatics",
"author": [
{
"family": "Gong",
"given": "Yuqiao"
},
{
"family": "Yuan",
"given": "Xin"
},
{
"family": "Yu",
"given": "Zhangsheng"
}
],
"container-title-short": "Brief Bioinform",
"volume": "27",
"issue": "3",
"page": "bbag298",
"DOI": "10.1093/bib/bbag298",
"PMID": "42302280",
"PMCID": "PMC13271401",
"ISSN": "1467-5463",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/bib/bbag298",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
1
]
]
}
}

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.1093/bib/bbaf316 [code]
TriCLFF: a multi-modal feature fusion framework using contrastive learning for spatial domain identification.
Journal: Briefings in bioinformatics
In common: PyTorch Geometric, rpy2, anndata, 8 other tools, genetics / omics, mouse, 13 references
[2] doi:10.1038/s41592-026-03034-9 [code]
3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics.
Journal: Nature methods
In common: PyTorch Geometric, rpy2, anndata, 9 other tools, genetics / omics, mouse, 12 references
[3] doi:10.1002/advs.77003 [code]
SemanticST: A Scalable Multi-Contextual Graph Learning Framework for Uncovering Spatial Niches and Robust Multi-Sample Integration in Spatial Transcriptomics.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: PyTorch Geometric, rpy2, anndata, 9 other tools, methods / tools, genetics / omics, 11 references
[4] doi:10.1038/s42003-026-09841-2 [code]
HarveST uses a heterogeneous graph learning framework to reveal spatial transcriptomics patterns.
Journal: Communications biology
In common: rpy2, Scanpy, Numba, 6 other tools, genetics / omics, mouse, 13 references
[5] doi:10.1093/bioinformatics/btag540 [code]
Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal.
Journal: Bioinformatics (Oxford, England)
In common: PyTorch Geometric, rpy2, anndata, 9 other tools, methods / tools, genetics / omics, mouse, 10 references
[6] doi:10.1038/s41467-023-36796-3 [code]
Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with GraphST.
Journal: Nature communications
In common: rpy2, anndata, Scanpy, 8 other tools, genetics / omics, 12 references
[7] doi:10.1038/s41467-023-44367-9 [code]
MENDER: fast and scalable tissue structure identification in spatial omics data.
Journal: Nature communications
In common: PyTorch Geometric, rpy2, anndata, 9 other tools, methods / tools, genetics / omics, 10 references
[8] doi:10.1038/s41592-026-03194-8 [code]
Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.
Journal: Nature methods
In common: PyTorch Geometric, rpy2, anndata, 8 other tools, methods / tools, genetics / omics, 10 references
[9] doi:10.1093/bib/bbaf674 [code]
Probabilistic-graph-based spatial context-aware framework for interpretable spatial omics denoising and augmentation.
Journal: Briefings in bioinformatics
In common: rpy2, anndata, Scanpy, 7 other tools, methods / tools, 12 references
[10] doi:10.1186/s12864-024-10469-x [code]
HyperGCN: an effective deep representation learning framework for the integrative analysis of spatial transcriptomics data.
Journal: BMC genomics
In common: PyTorch Geometric, rpy2, anndata, 8 other tools, genetics / omics, mouse, 10 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1093/bib/bbag298.svg)](https://openscicode.org/badge/doi/10.1093/bib/bbag298)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1093/bib/bbag298.svg
   :target: https://openscicode.org/badge/doi/10.1093/bib/bbag298
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1093/bib/bbag298"><img src="https://openscicode.org/badge/doi/10.1093/bib/bbag298.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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