OSCR

Interpretable deep generative ensemble learning for single-cell omics with Hydra.

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 · 5 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Running existing methods › UMINT ↔ Proposed/umint.py, lines 9–60 · score 0.88 · mid_neuron, layer_neuron, lambda_act, lambda_weight, CombinedEncoder, UMINT
  2. [2] § Methods › Running existing methods › scSorterDL ↔ code/scSorterDL_final/train.py, lines 263–320 · score 0.76 · LocalSwarmLDA, cell_sampling, gene_sampling, pred, shrinkage, ldareg
  3. [3] § Methods › Running existing methods › scSorterDL ↔ code/scSorterDL_final/plt_all_submit_query.sh, the whole file · a weak match · score 0.73 · scSorterDL, cell_sampling, gene_sampling, ldareg, uniform, epochs
  4. [4] § Methods › Running existing methods › scPred ↔ Preprocessing/MALT10k_Preprocessing.R, the whole file · a weak match · score 0.72 · FindVariableFeatures, NormalizeData, ScaleData, Seurat, preprocessed, raw
  5. [5] § Methods › Running existing methods › scPred ↔ Benchmarking/Seuratv4/MALT10k_Seurat.R, the whole file · a weak match · score 0.71 · FindVariableFeatures, NormalizeData, ScaleData, Seurat, preprocessed, raw
  6. [6] § Methods › Running existing methods › Statistical tests ↔ R/featureSelection.R, lines 57–101 · score 0.71 · eBayes, lmFit, limma, sum, matrices, model
  7. [7] § Methods › Running existing methods › MOFA+ ↔ Benchmarking/MOFA2/MALT10k_MOFA2.R, the whole file · a weak match · score 0.69 · convergence_mode, model options, train options, MOFA, embeddings, seed
  8. [8] § Methods › Running existing methods › MOFA+ ↔ Benchmarking/MOFA2/bmcite30k_MOFA2.R, the whole file · a weak match · score 0.69 · convergence_mode, model options, train options, MOFA, embeddings, seed
  9. [9] § Methods › Running existing methods › scClassify ↔ vignettes/scClassify.Rmd, lines 132–163 · score 0.64 · selectFeatures, scClassify, cosine, WKNN, HOPACH, algorithm
  10. [10] § Methods › Running existing methods › UMINT ↔ Proposed/autoencoder.py, lines 61–110 · score 0.64 · lambda_act, lambda_weight, encodings, bs, layer, loss
  11. [11] § Methods › Feature ranking module › Refinement and feature ranking ↔ hydra/Hydra.py, lines 334–375 · score 0.64 · refined models, original model, trained model, decoder, epochs, autoencoder
  12. [12] § Results › Joint learning and annotation in diverse single-cell multiome datasets ↔ hydra/Hydra.py, lines 613–664 · score 0.59 · scADT, scATAC, scRNA, CITE, attributed, seq

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

Python · 734 lines · 37 KB · MIT · 2 matches

  1. #!/usr/bin/python
  2. ##############################################
  3. # Manoj M Wagle (USydney, MIT CSAIL)
  4. ##############################################
  5. import os, sys, random, subprocess
  6. os.environ["RETICULATE_PYTHON"] = sys.executable
  7. import argparse
  8. import logging
  9. import glob
  10. from captum.attr import *
  11. from tqdm import tqdm
  12. import pandas as pd
  13. import numpy as np
  14. import h5py
  15. import pkg_resources
  16. # Logging to Standard Error
  17. Log_Format = "%(levelname)s - %(asctime)s - %(message)s \n"
  18. logging.basicConfig(stream = sys.stderr, format = Log_Format, level = logging.INFO)
  19. ##############################################
  20. # Check if the user requested help for the annotation script
  21. if '--setting' in sys.argv and 'annotation' in sys.argv and ('--help' in sys.argv or '-h' in sys.argv):
  22. annotation_script_path = pkg_resources.resource_filename(__name__, 'Annotation.py')
  23. subprocess.run(["python", annotation_script_path, "--help"])
  24. sys.exit(0)
  25. class CustomHelpFormatter(argparse.RawTextHelpFormatter):
  26. def format_help(self):
  27. help_text = super().format_help()
  28. welcome_message = (
  29. "\nThank you for using Hydra 😄, an interpretable deep generative tool for single-cell omics. Please refer to the full documentation available at https://sydneybiox.github.io/Hydra/ for detailed usage instructions. If you encounter any issues running the tool - Please open an issue on Github, and we will get back to you as soon as possible!!\n\n"
  30. )
  31. Note_message = "\n📍 NOTE 📍: You need to run feature selection (`fs`) on the train datatset before annotating the cell types in the query dataset. If you have already run feature selection on the train & want to annotate (`annotation`) a different related query dataset, please process the data (`processdata`) first and then provide the path to the directory containing this processed data.\n\n"
  32. return welcome_message + Note_message + help_text
  33. # Create argument parser
  34. parser = argparse.ArgumentParser("Hydra", formatter_class=CustomHelpFormatter)
  35. parser.add_argument('--seed', type = int, default = 42, help ='seed')
  36. # Input
  37. parser.add_argument('--train', help='Path to the training dataset (Seurat, SCE or Anndata object)')
  38. parser.add_argument('--test', help='Path to the test dataset (Seurat or SCE object)')
  39. parser.add_argument('--celltypecol', default='cell_type', help='Cell type label column in your input dataset (Seurat, SCE or Anndata object). Default: `cell_type`')
  40. parser.add_argument('--modality', default='rna', choices=['rna', 'adt', 'atac'], help='Input data modality. Default: `rna`')
  41. parser.add_argument('--base_dir', metavar = 'DIR', default=os.getcwd(), help = 'Path to the directory containing processed data directory. Default: Current working directory')
  42. parser.add_argument('--gene', help='Name of the gene whose expression is to be highlighted in the plot')
  43. parser.add_argument('--ctofinterest', help='Name of the cell type for which a ridgeline plot of gene expression should be generated')
  44. parser.add_argument('--predictions', help='Generate UMAP plot for Hydra predicted cell types', default=False)
  45. parser.add_argument('--ctpredictions', help='Path to the csv file containing cell types predicted by Hydra', default=False)
  46. # parser.add_argument('--peak', help='If you are providing peak data for scATAC instead of Gene-activity, filtering will be turned off during data processing. This means that all peaks will be included', default=False)
  47. parser.add_argument('--processdata_batch_size', type = int, default = 1000, help = 'batch size for processing reference and query datasets')
  48. # Training
  49. parser.add_argument('--batch_size', type = int, default = 512, help = 'batch size for processing data during training')
  50. parser.add_argument('--attr_batch_size', type = int, default = 500, help = 'batch size for feature atrribution. Please adjust this based on your GPU memory')
  51. parser.add_argument('--epochs', type = int, default = 40, help = 'num of training epochs')
  52. parser.add_argument('--lr', type = float, default = 0.02, help = 'learning rate')
  53. # GPU specification
  54. parser.add_argument('--gpu', type = str, default = '0', help = 'Please specify the GPU to use')
  55. # Model
  56. parser.add_argument('--z_dim', type = int, default = 100, help = 'Number of neurons in latent space')
  57. parser.add_argument('--hidden_rna', type = int, default = 185, help = 'Number of neurons for RNA layer')
  58. parser.add_argument('--hidden_adt', type = int, default = 30, help = 'Number of neurons for ADT layer')
  59. parser.add_argument('--hidden_atac', type = int, default = 185, help = 'Number of neurons for ATAC layer')
  60. parser.add_argument('--num_models', type = int, default = 25, help= 'Number of models for Ensemble Learning')
  61. # Task
  62. parser.add_argument('--setting', type=str, required=True,
  63. choices=['processdata', 'fs', 'plot', 'annotation'],
  64. help=(
  65. "`processdata` for processing input train and test Seurat, SCE or Anndata objects;\n"
  66. "`fs` for feature selection to obtain cell-identity genes;\n"
  67. "`plot` for generating UMAP plot of the dataset (Additionally, highlights gene expression when called with the `--gene` argument; Generates a ridgeline plot of expression of the specified gene in cell type of interest vs all other cell types when called with `--ctofinterest` argument; Generates a UMAP plot of Hydra predicted labels when called with `--predictions` argument);\n"
  68. "`annotation` for automated annotation of the query dataset\n\n"
  69. )
  70. )
  71. # Capture all remaining arguments for the annotation setting
  72. parser.add_argument('annotation_args', nargs=argparse.REMAINDER, help='Additional arguments for annotation script')
  73. # Parse the command-line arguments
  74. args = parser.parse_args()
  75. if args.gpu:
  76. os.environ["CUDA_VISIBLE_DEVICES"] = args.gpu
  77. ##############################################
  78. # Processing input data
  79. def run_r_script(train_file, test_file, cell_type_label, data_type, processdata_batch_size):
  80. r_command = [
  81. "Rscript",
  82. pkg_resources.resource_filename(__name__, 'R/Process_Dataset.R'),
  83. train_file,
  84. test_file,
  85. cell_type_label,
  86. data_type,
  87. # str(peak),
  88. str(processdata_batch_size)
  89. ]
  90. try:
  91. subprocess.run(r_command, check=True)
  92. except subprocess.CalledProcessError:
  93. print("Error: The R script failed to execute.")
  94. sys.exit(1)
  95. ##############################################
  96. def create_UMAP_plots(rds_file, modality, celltypecol, gene_name=None, ctofinterest=None):
  97. r_command = [
  98. "Rscript",
  99. pkg_resources.resource_filename(__name__, 'R/UMAP_plot.R'),
  100. rds_file,
  101. modality,
  102. celltypecol,
  103. gene_name if gene_name else "None",
  104. ctofinterest if ctofinterest else "None"
  105. ]
  106. try:
  107. subprocess.check_call(r_command)
  108. except subprocess.CalledProcessError as e:
  109. print(f"Error: The R script failed to execute. {e}")
  110. sys.exit(1)
  111. except FileNotFoundError as e:
  112. print(f"Error: File not found. {e}")
  113. sys.exit(1)
  114. ##############################################
  115. def create_UMAP_Hydra_predictions(rds_file, modality, cell_type_predicted):
  116. r_command = [
  117. "Rscript",
  118. pkg_resources.resource_filename(__name__, 'R/plot_predictions.R'),
  119. rds_file,
  120. modality,
  121. cell_type_predicted
  122. ]
  123. try:
  124. subprocess.check_call(r_command)
  125. except subprocess.CalledProcessError as e:
  126. print(f"Error: The R script failed to execute. {e}")
  127. sys.exit(1)
  128. except FileNotFoundError as e:
  129. print(f"Error: File not found. {e}")
  130. sys.exit(1)
  131. ##############################################
  132. # Query dataset annotation
  133. def run_annotation_script(annotation_args):
  134. annotation_command = ["python", pkg_resources.resource_filename(__name__, 'Annotation.py')] + annotation_args
  135. subprocess.run(annotation_command, check=True)
  136. ##############################################
  137. # Import torch-related libraries after setting the CUDA_VISIBLE_DEVICES
  138. import torch
  139. from torch.utils.data import DataLoader
  140. import torch.nn as nn
  141. from .model import (Autoencoder_CITEseq_Step1, Autoencoder_SHAREseq_Step1, Autoencoder_TEAseq_Step1,
  142. Autoencoder_CITEseq_Step2, Autoencoder_SHAREseq_Step2, Autoencoder_TEAseq_Step2,
  143. Autoencoder_RNAseq_Step1, Autoencoder_RNAseq_Step2, Autoencoder_ADTseq_Step1,
  144. Autoencoder_ADTseq_Step2, Autoencoder_ATACseq_Step1, Autoencoder_ATACseq_Step2)
  145. from .train import train_model
  146. from .util import (MyDataset, read_h5_data, Index2Label, read_fs_label,
  147. load_and_preprocess_data, perform_data_augmentation, setup_seed)
  148. # Check the device type based on GPU availability, MPS availability, or defaulting to CPU
  149. device_str = "CUDA" if torch.cuda.is_available() \
  150. else "MPS" if torch.backends.mps.is_built() \
  151. else "CPU"
  152. device = torch.device(device_str.lower())
  153. FloatTensor = torch.FloatTensor
  154. LongTensor = torch.LongTensor
  155. setup_seed(args.seed) ### set seed for reproducbility
  156. ##############################################
  157. print("\nThank you for using Hydra 😄, an interpretable deep generative tool for single-cell omics. Please refer to the full documentation available at https://sydneybiox.github.io/Hydra/ for detailed usage instructions. If you encounter any issues running the tool - Please open an issue on Github, and we will get back to you as soon as possible!!\n\n")
  158. specified_gpus = args.gpu.split(',') if args.gpu else []
  159. num_gpus_specified = len(specified_gpus)
  160. # If CUDA_VISIBLE_DEVICES is not set, use PyTorch to get the total GPU count.
  161. if not specified_gpus:
  162. num_gpus = torch.cuda.device_count()
  163. else:
  164. num_gpus = num_gpus_specified
  165. # Get the indices of GPUs that are currently visible to PyTorch
  166. active_gpu_indices = os.environ.get("CUDA_VISIBLE_DEVICES", "").split(',')
  167. if num_gpus >= 1 and (device_str == "CPU"):
  168. print("It seems the CPU version of PyTorch is installed. For GPU utilization, please install the GPU version of PyTorch. Currently, running on CPU!!!")
  169. print("===============================\n")
  170. print("Device to be used:", device_str, "\n")
  171. print("===============================\n")
  172. ##############################################
  173. def main():
  174. logging.info("Starting to run")
  175. if args.setting.lower() == 'processdata':
  176. if not args.train or not args.modality:
  177. parser.error("--train and --modality are required when --setting is 'processdata'")
  178. else:
  179. # Call the R script to process the data
  180. logging.info("Processing datasets...")
  181. test_file = args.test if args.test else "None"
  182. run_r_script(args.train, test_file, args.celltypecol, args.modality, args.processdata_batch_size)
  183. elif args.setting.lower() == 'plot':
  184. if args.predictions:
  185. if not args.test or not args.modality or not args.ctpredictions:
  186. parser.error("--test, --modality and --ctpredictions are required when --setting is 'plot' and --predictions is True")
  187. else:
  188. # Call the R script to create UMAP plots with predicted cell types
  189. logging.info("Generating plot for Hydra predicted cell types...")
  190. create_UMAP_Hydra_predictions(args.test, args.modality, args.ctpredictions)
  191. else:
  192. if not args.train or not args.modality:
  193. parser.error("--train and --modality are required when --setting is 'UMAPplot'")
  194. else:
  195. # Call the R script to create UMAP plots
  196. logging.info("Generating plot...")
  197. create_UMAP_plots(args.train, args.modality, args.celltypecol, args.gene, args.ctofinterest)
  198. elif args.setting.lower() == 'fs':
  199. dataset_folder_path = os.path.join(args.base_dir, "Input_Processed")
  200. if not os.path.exists(dataset_folder_path):
  201. logging.info(f"Error: The dataset folder '{dataset_folder_path}' does not exist. Please provide path to the directory containing `Input_Processed` directory!!!")
  202. sys.exit(1)
  203. dataset_folders = sorted(glob.glob(f"{args.base_dir}/Input_Processed"))
  204. cwd = os.getcwd()
  205. for dataset_folder in dataset_folders:
  206. logging.info("Training model...")
  207. split_folders = sorted(glob.glob(f"{dataset_folder}/split_*"))
  208. for split_folder in split_folders:
  209. model_save_path = os.path.join(cwd, 'trained_model')
  210. os.makedirs(model_save_path, exist_ok = True)
  211. if os.path.isfile(f"{split_folder}/rna_train.h5"):
  212. args.rna = f"{split_folder}/rna_train.h5"
  213. else:
  214. args.rna = "NULL"
  215. if os.path.isfile(f"{split_folder}/adt_train.h5"):
  216. args.adt = f"{split_folder}/adt_train.h5"
  217. else:
  218. args.adt = "NULL"
  219. if os.path.isfile(f"{split_folder}/atac_train.h5"):
  220. args.atac = f"{split_folder}/atac_train.h5"
  221. else:
  222. args.atac = "NULL"
  223. args.cty = f"{split_folder}/ct_train.csv"
  224. if args.rna != "NULL" and args.adt != "NULL" and args.atac != "NULL":
  225. # Load and preprocess the data
  226. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_rna, nfeatures_adt, nfeatures_atac, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  227. logging.info("The Dataset is: scRNA+scADT+scATAC")
  228. if args.rna != "NULL" and args.adt != "NULL" and args.atac == "NULL":
  229. # Load and preprocess the data
  230. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_rna, nfeatures_adt, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  231. logging.info("The Dataset is: scRNA+scADT")
  232. if args.rna != "NULL" and args.adt == "NULL" and args.atac != "NULL":
  233. # Load and preprocess the data
  234. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_rna, nfeatures_atac, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  235. logging.info("The Dataset is: scRNA+scATAC")
  236. if args.adt == "NULL" and args.atac == "NULL": # scRNA-seq
  237. # Load and preprocess the data
  238. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_rna, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  239. logging.info("The Dataset is: scRNA-seq")
  240. if args.atac == "NULL" and args.rna == "NULL": # scADT-Seq
  241. # Load and preprocess the data
  242. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_adt, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  243. logging.info("The Dataset is: scADT-seq")
  244. if args.adt == "NULL" and args.rna == "NULL": # scATAC-Seq
  245. # Load and preprocess the data
  246. (train_data, train_dl, train_label, mode, classify_dim, nfeatures_atac, feature_num, label_to_name_mapping) = load_and_preprocess_data(args, setting = "train")
  247. logging.info("The Dataset is: scATAC-seq")
  248. ########## Step 1 ###########
  249. ### Build model
  250. if mode == "scRNA+scADT+scATAC":
  251. model = Autoencoder_TEAseq_Step1(nfeatures_rna, nfeatures_adt, nfeatures_atac, args.hidden_rna, args.hidden_adt, args.hidden_atac, args.z_dim, classify_dim, args.num_models)
  252. elif mode == "scRNA+scADT":
  253. model = Autoencoder_CITEseq_Step1(nfeatures_rna, nfeatures_adt, args.hidden_rna, args.hidden_adt, args.z_dim, classify_dim, args.num_models)
  254. elif mode == "scRNA+scATAC":
  255. model = Autoencoder_SHAREseq_Step1(nfeatures_rna, nfeatures_atac, args.hidden_rna, args.hidden_atac, args.z_dim, classify_dim, args.num_models)
  256. elif mode == "scRNA-seq":
  257. model = Autoencoder_RNAseq_Step1(nfeatures_rna, args.hidden_rna, args.z_dim, classify_dim, args.num_models)
  258. elif mode == "scADT-seq":
  259. model = Autoencoder_ADTseq_Step1(nfeatures_adt, args.hidden_adt, args.z_dim, classify_dim, args.num_models)
  260. elif mode == "scATAC-seq":
  261. model = Autoencoder_ATACseq_Step1(nfeatures_atac, args.hidden_atac, args.z_dim, classify_dim, args.num_models)
  262. model = model.to(device)
  263. # Train the original model on the original raw data including all classifiers
  264. model, loss, train_num = train_model(model, train_dl, lr=args.lr, epochs=args.epochs,
  265. classify_dim=classify_dim, save_path=model_save_path,
  266. save_filename='Original_Model.pth.tar', feature_num=feature_num)
  267. checkpoint_tar = os.path.join(model_save_path, 'Original_Model.pth.tar')
  268. if os.path.exists(checkpoint_tar):
  269. # Load the model's weights
  270. checkpoint = torch.load(checkpoint_tar, weights_only=False)
  271. model = model.module if isinstance(model, nn.DataParallel) else model
  272. model.load_state_dict(checkpoint['state_dict'], strict=True)
  273. ########## Step 2 - Finetuning ###########
  274. min_epochs, max_epochs = 30, 50
  275. for modelI in range(args.num_models):
  276. logging.info("\n\nRefining Model: %s", modelI+1)
  277. if mode == "scRNA+scADT+scATAC":
  278. Step2_model = Autoencoder_TEAseq_Step2(nfeatures_rna, nfeatures_adt, nfeatures_atac, args.hidden_rna, args.hidden_adt, args.hidden_atac, args.z_dim, classify_dim)
  279. elif mode == "scRNA+scADT":
  280. Step2_model = Autoencoder_CITEseq_Step2(nfeatures_rna, nfeatures_adt, args.hidden_rna, args.hidden_adt, args.z_dim, classify_dim)
  281. elif mode == "scRNA+scATAC":
  282. Step2_model = Autoencoder_SHAREseq_Step2(nfeatures_rna, nfeatures_atac, args.hidden_rna, args.hidden_atac, args.z_dim, classify_dim)
  283. elif mode == "scRNA-seq":
  284. Step2_model = Autoencoder_RNAseq_Step2(nfeatures_rna, args.hidden_rna, args.z_dim, classify_dim)
  285. elif mode == "scADT-seq":
  286. Step2_model = Autoencoder_ADTseq_Step2(nfeatures_adt, args.hidden_adt, args.z_dim, classify_dim)
  287. elif mode == "scATAC-seq":
  288. Step2_model = Autoencoder_ATACseq_Step2(nfeatures_atac, args.hidden_atac, args.z_dim, classify_dim)
  289. # Load the encoder weights trained from Step 1
  290. encoder_weights = model.encoder.state_dict()
  291. Step2_model.encoder.load_state_dict(encoder_weights)
  292. # Load the decoder weights trained from Step 1
  293. decoder_weights = model.decoder.state_dict()
  294. Step2_model.decoder.load_state_dict(decoder_weights)
  295. # Load the classifier weights trained from Step 1
  296. classifier_weights = model.classifiers[modelI].state_dict()
  297. Step2_model.classify.load_state_dict(classifier_weights)
  298. # Move the model to GPU and automatically utilize multiple GPUs if available
  299. Step2_model = Step2_model.to(device)
  300. # Generate Augmented dataset
  301. new_data, new_label, new_label_names = perform_data_augmentation(label_to_name_mapping, train_num, classify_dim, train_label, train_data, model, args)
  302. # Process the new data after augmentation
  303. train_transformed_dataset = MyDataset(new_data, new_label)
  304. new_train_dl = DataLoader(train_transformed_dataset, batch_size=args.batch_size, shuffle=True, num_workers=0, drop_last = False)
  305. # set a random number of epochs for this model
  306. epochs = random.randint(min_epochs, max_epochs)
  307. Step2_model, loss, _ = train_model(Step2_model, new_train_dl, lr=args.lr, epochs=epochs,
  308. classify_dim=classify_dim, save_path=model_save_path,
  309. save_filename='FineTuned_Model.pth.tar', feature_num=feature_num)
  310. # Create directory for balanced data if it does not exist
  311. balanced_data_dir = os.path.join(cwd, f'Balanced_Data-{args.num_models}')
  312. os.makedirs(balanced_data_dir, exist_ok = True)
  313. new_data, new_label, new_label_names = perform_data_augmentation(label_to_name_mapping, train_num, classify_dim, train_label, train_data, Step2_model, args)
  314. # Modify new_data_path and new_label_path to use balanced_data_dir
  315. new_data_path = os.path.join(balanced_data_dir, f'train_data_bal_{modelI+1}.pt')
  316. torch.save(new_data, new_data_path)
  317. new_label_path = os.path.join(balanced_data_dir, f'train_label_bal_{modelI+1}.pt')
  318. torch.save(new_label, new_label_path)
  319. # Create directory for final models if it does not exist
  320. final_models_dir = os.path.join(model_save_path, f'Final_Models-{args.num_models}')
  321. os.makedirs(final_models_dir, exist_ok = True)
  322. final_model = Step2_model.module if isinstance(Step2_model, nn.DataParallel) else Step2_model
  323. # Save the final model
  324. final_model_path = os.path.join(final_models_dir, f'model_{modelI+1}.pth.tar')
  325. torch.save({'state_dict': final_model.state_dict()}, final_model_path)
  326. ############ Run feature selection ############
  327. logging.info("\n\nRunning feature selection...")
  328. # Convert feature names to string format
  329. rna_name_new = []
  330. adt_name_new = []
  331. atac_name_new = []
  332. if os.path.isfile(f"{split_folder}/rna_train.h5"):
  333. rna_data_path = f"{split_folder}/rna_train.h5"
  334. rna_data_path_noscale = f"{split_folder}/rna_train_noscale.h5"
  335. else:
  336. rna_data_path = "NULL"
  337. if os.path.isfile(f"{split_folder}/adt_train.h5"):
  338. adt_data_path = f"{split_folder}/adt_train.h5"
  339. adt_data_path_noscale = f"{split_folder}/adt_train_noscale.h5"
  340. else:
  341. adt_data_path = "NULL"
  342. if os.path.isfile(f"{split_folder}/atac_train.h5"):
  343. atac_data_path = f"{split_folder}/atac_train.h5"
  344. atac_data_path_noscale = f"{split_folder}/atac_train_noscale.h5"
  345. else:
  346. atac_data_path = "NULL"
  347. label_path = f"{split_folder}/ct_train.csv"
  348. (label, _) = read_fs_label(label_path)
  349. index_to_label = Index2Label(label_path, classify_dim)
  350. classify_dim = (max(label)+1).cpu().numpy()
  351. if adt_data_path != "NULL" and atac_data_path != "NULL" and rna_data_path != "NULL":
  352. mode = "scRNA+scADT+scATAC"
  353. rna_name = h5py.File(rna_data_path, "r")['matrix/features'][:]
  354. adt_name = h5py.File(adt_data_path, "r")['matrix/features'][:]
  355. atac_name = h5py.File(atac_data_path, "r")['matrix/features'][:]
  356. rna_data = read_h5_data(rna_data_path)
  357. adt_data = read_h5_data(adt_data_path)
  358. atac_data = read_h5_data(atac_data_path)
  359. rna_data_noscale = read_h5_data(rna_data_path_noscale)
  360. adt_data_noscale = read_h5_data(adt_data_path_noscale)
  361. atac_data_noscale = read_h5_data(atac_data_path_noscale)
  362. nfeatures_rna = rna_data.shape[1]
  363. nfeatures_adt = adt_data.shape[1]
  364. nfeatures_atac = atac_data.shape[1]
  365. feature_num = nfeatures_rna + nfeatures_adt + nfeatures_atac
  366. data = torch.cat((rna_data, adt_data, atac_data), 1)
  367. data_noscale = torch.cat((rna_data_noscale, adt_data_noscale, atac_data_noscale), 1)
  368. if args.rna != "NULL" and adt_data_path != "NULL" and atac_data_path == "NULL":
  369. mode = "scRNA+scADT"
  370. rna_name = h5py.File(rna_data_path, "r")['matrix/features'][:]
  371. adt_name = h5py.File(adt_data_path, "r")['matrix/features'][:]
  372. rna_data = read_h5_data(rna_data_path)
  373. adt_data = read_h5_data(adt_data_path)
  374. rna_data_noscale = read_h5_data(rna_data_path_noscale)
  375. adt_data_noscale = read_h5_data(adt_data_path_noscale)
  376. nfeatures_rna = rna_data.shape[1]
  377. nfeatures_adt = adt_data.shape[1]
  378. feature_num = nfeatures_rna + nfeatures_adt
  379. data = torch.cat((rna_data, adt_data), 1)
  380. data_noscale = torch.cat((rna_data_noscale, adt_data_noscale), 1)
  381. if args.rna != "NULL" and adt_data_path == "NULL" and atac_data_path != "NULL":
  382. mode = "scRNA+scATAC"
  383. rna_name = h5py.File(rna_data_path, "r")['matrix/features'][:]
  384. atac_name = h5py.File(atac_data_path, "r")['matrix/features'][:]
  385. rna_data = read_h5_data(rna_data_path)
  386. atac_data = read_h5_data(atac_data_path)
  387. rna_data_noscale = read_h5_data(rna_data_path_noscale)
  388. atac_data_noscale = read_h5_data(atac_data_path_noscale)
  389. nfeatures_rna = rna_data.shape[1]
  390. nfeatures_atac = atac_data.shape[1]
  391. feature_num = nfeatures_rna + nfeatures_atac
  392. data = torch.cat((rna_data, atac_data), 1)
  393. data_noscale = torch.cat((rna_data_noscale, atac_data_noscale), 1)
  394. if adt_data_path == "NULL" and atac_data_path == "NULL":
  395. mode = "scRNA-seq"
  396. rna_name = h5py.File(rna_data_path, "r")['matrix/features'][:]
  397. rna_data = read_h5_data(rna_data_path)
  398. rna_data_noscale = read_h5_data(rna_data_path_noscale)
  399. nfeatures_rna = rna_data.shape[1]
  400. feature_num = nfeatures_rna
  401. data = rna_data
  402. data_noscale = rna_data_noscale
  403. if rna_data_path == "NULL" and atac_data_path == "NULL":
  404. mode = "scADT-seq"
  405. adt_name = h5py.File(adt_data_path, "r")['matrix/features'][:]
  406. adt_data = read_h5_data(adt_data_path)
  407. adt_data_noscale = read_h5_data(adt_data_path_noscale)
  408. nfeatures_adt = adt_data.shape[1]
  409. feature_num = nfeatures_adt
  410. data = adt_data
  411. data_noscale = adt_data_noscale
  412. if rna_data_path == "NULL" and adtdatapath == "NULL":
  413. mode = "scATAC-seq"
  414. atac_name = h5py.File(atac_data_path, "r")['matrix/features'][:]
  415. atac_data = read_h5_data(atac_data_path)
  416. atac_data_noscale = read_h5_data(atac_data_path_noscale)
  417. nfeatures_atac = atac_data.shape[1]
  418. feature_num = nfeatures_atac
  419. data = atac_data
  420. data_noscale = atac_data_noscale
  421. if mode == "scRNA+scADT+scATAC":
  422. for i in range(nfeatures_rna):
  423. a = str(rna_name[i], encoding="utf-8") + "_RNA_"
  424. rna_name_new.append(a)
  425. for i in range(nfeatures_adt):
  426. a = str(adt_name[i], encoding="utf-8") + "_ADT_"
  427. adt_name_new.append(a)
  428. for i in range(nfeatures_atac):
  429. a = str(atac_name[i], encoding="utf-8") + "_ATAC_"
  430. atac_name_new.append(a)
  431. features = rna_name_new + adt_name_new + atac_name_new
  432. if mode == "scRNA+scADT":
  433. for i in range(nfeatures_rna):
  434. a = str(rna_name[i], encoding="utf-8") + "_RNA_"
  435. rna_name_new.append(a)
  436. for i in range(nfeatures_adt):
  437. a = str(adt_name[i], encoding="utf-8") + "_ADT_"
  438. adt_name_new.append(a)
  439. features = rna_name_new + adt_name_new
  440. if mode == "scRNA+scATAC":
  441. for i in range(nfeatures_rna):
  442. a = str(rna_name[i], encoding="utf-8") + "_RNA_"
  443. rna_name_new.append(a)
  444. for i in range(nfeatures_atac):
  445. a = str(atac_name[i], encoding="utf-8") + "_ATAC_"
  446. atac_name_new.append(a)
  447. features = rna_name_new + atac_name_new
  448. if mode == "scRNA-seq":
  449. for i in range(nfeatures_rna):
  450. a = str(rna_name[i], encoding="utf-8") + "_RNA_"
  451. rna_name_new.append(a)
  452. features = rna_name_new
  453. if mode == "scADT-seq":
  454. for i in range(nfeatures_adt):
  455. a = str(adt_name[i], encoding="utf-8") + "_ADT_"
  456. adt_name_new.append(a)
  457. features = adt_name_new
  458. if mode == "scATAC-seq":
  459. for i in range(nfeatures_atac):
  460. a = str(atac_name[i], encoding="utf-8") + "_ATAC_"
  461. atac_name_new.append(a)
  462. features = atac_name_new
  463. # Load all model files
  464. model_files = glob.glob(os.path.join(model_save_path, f'Final_Models-{args.num_models}/*.pth.tar'))
  465. # Run feature selection for each cell type
  466. for i in tqdm(range(classify_dim)):
  467. cell_type_name = index_to_label[i]
  468. try:
  469. cell_type_name = cell_type_name.replace("/", "_")
  470. except:
  471. pass
  472. # Select the data for the current cell type and for all other cell types
  473. current_type_data = data_noscale[torch.where(label == i)].reshape(-1, feature_num)
  474. other_type_data = data_noscale[torch.where(label != i)].reshape(-1, feature_num)
  475. # Calculate the mean expression for each feature across the two groups
  476. mean_current_type = torch.mean(current_type_data, dim=0)
  477. mean_other_types = torch.mean(other_type_data, dim=0)
  478. # Compute fold changes for each feature
  479. epsilon = 1e-6
  480. fold_changes = (mean_current_type + epsilon) / (mean_other_types + epsilon)
  481. # Apply log transformation to fold changes
  482. log_fold_changes = torch.log2(fold_changes)
  483. # Get indices of cells with the current cell type
  484. train_index_fs = torch.where(label == i)
  485. train_index_fs = [t.cpu().numpy() for t in train_index_fs]
  486. train_index_fs = np.array(train_index_fs)
  487. # Get data for the current cell type
  488. train_data_each_celltype_fs = data[train_index_fs, :].reshape(-1, feature_num)
  489. attributions_all_models = []
  490. # Compute the attribution for each cell of the current cell type
  491. for model_file in model_files:
  492. if mode == "scRNA+scADT+scATAC":
  493. model_test = Autoencoder_TEAseq_Step2(nfeatures_rna, nfeatures_adt, nfeatures_atac, args.hidden_rna, args.hidden_adt, args.hidden_atac, args.z_dim, classify_dim)
  494. elif mode == "scRNA+scADT":
  495. model_test = Autoencoder_CITEseq_Step2(nfeatures_rna, nfeatures_adt, args.hidden_rna, args.hidden_adt, args.z_dim, classify_dim)
  496. elif mode == "scRNA+scATAC":
  497. model_test = Autoencoder_SHAREseq_Step2(nfeatures_rna, nfeatures_atac, args.hidden_rna, args.hidden_atac, args.z_dim, classify_dim)
  498. elif mode == "scRNA-seq":
  499. model_test = Autoencoder_RNAseq_Step2(nfeatures_rna, args.hidden_rna, args.z_dim, classify_dim)
  500. elif mode == "scADT-seq":
  501. model_test = Autoencoder_ADTseq_Step2(nfeatures_adt, args.hidden_adt, args.z_dim, classify_dim)
  502. elif mode == "scATAC-seq":
  503. model_test = Autoencoder_ATACseq_Step2(nfeatures_atac, args.hidden_atac, args.z_dim, classify_dim)
  504. # Load the model's weights
  505. checkpoint = torch.load(model_file, weights_only=False)
  506. model_test.load_state_dict(checkpoint['state_dict'], strict=True)
  507. model_test = model_test.to(device)
  508. classify_model = nn.Sequential(*list(model_test.children()))[0:2]
  509. deconv = IntegratedGradients(classify_model)
  510. Attr_batch_size = args.attr_batch_size
  511. # Initialize the attributions tensor
  512. attribution = torch.zeros(1, feature_num).to(device)
  513. # Calculate the attributions in batches
  514. for j in range(0, train_data_each_celltype_fs.size(0), Attr_batch_size):
  515. batch = train_data_each_celltype_fs[j:j + Attr_batch_size, :]
  516. batch = batch.to(device)
  517. attribution += torch.sum(torch.abs(deconv.attribute(batch, target=i)), dim=0, keepdim=True)
  518. # take mean attribution for the current model
  519. attribution_mean = torch.mean(attribution, dim=0)
  520. attributions_all_models.append(attribution_mean)
  521. del model_test # delete the current model to free up memory
  522. torch.cuda.empty_cache() # empty GPU cache to avoid out-of-memory errors
  523. # calculate the average attribution across all models
  524. average_attribution = sum(attributions_all_models) / len(model_files)
  525. fs_score = average_attribution.reshape(-1).detach().cpu().numpy()
  526. # Adjust by the sign of the log fold changes
  527. fs_score = fs_score * np.sign(log_fold_changes.numpy())
  528. # Directly sort by the scores themselves
  529. indices_sorted = np.argsort(-fs_score) # This sorts the scores in descending order
  530. # Use the sorted indices to order your features and scores
  531. fs_results = [features[index] + str(index) for index in indices_sorted]
  532. fs_scores = [fs_score[index] for index in indices_sorted]
  533. # Convert fs_results to a pandas DataFrame
  534. fs_results_df = pd.DataFrame({'Feature Name': fs_results, 'Score': fs_scores})
  535. # Saving feature selection results
  536. cwd = os.getcwd() # Get the current working directory
  537. Hydra_folder = os.path.join(cwd, f"Results/Feature_Selection/Hydra-{args.num_models}")
  538. if not os.path.exists(Hydra_folder):
  539. os.makedirs(Hydra_folder)
  540. # Save the feature selection results to a CSV file
  541. fs_results_df.to_csv(os.path.join(Hydra_folder, f'fs.{cell_type_name}_Hydra.csv'), index=False)
  542. elif args.setting.lower() == "annotation":
  543. run_annotation_script(args.annotation_args)
  544. logging.info("Completed successfully!")
  545. return
  546. ##############################################
  547. if __name__ == "__main__":
  548. # Call the main function
  549. main()

Hydra.py at commit c1b2934, under MIT · at the source

Overview

Authors: Manoj M Wagle1,2,3,4, Chunlei Liu1,2, Zunpeng Liu4,5, Yongheng Wang4,5, Manolis Kellis4,5, Ellis Patrick1,3,6,7, Pengyi Yang1,2,3,6
  1. School of Mathematics and Statistics, Faculty of Science, The University of Sydney,Camperdown, NSW Australia
  2. Computational Systems Biology Unit, Children’s Medical Research Institute, Faculty of Medicine and Health, The University of Sydney,Westmead, NSW Australia
  3. Sydney Precision Data Science Center, The University of Sydney,Camperdown, NSW Australia
  4. Computer Science and Artificial Intelligence Laboratory, Massachusetts Institute of Technology,Cambridge, MA USA
  5. Computational Biology Group, The Broad Institute of MIT and Harvard,Cambridge, MA USA
  6. Charles Perkins Center, The University of Sydney,Camperdown, NSW Australia
  7. Center for Cancer Research, Westmead Institute for Medical Research,Westmead, NSW Australia
Journal: Molecular systems biology, volume 22, issue 7, pages 1161-1179
Dates: received 21 September 2025; accepted 24 March 2026; published online 11 April 2026; in print July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s44320-026-00208-7 · PMID 41965454 · PMCID PMC13328726 · OpenAlex W4413439263
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cellular / molecular (subfield)
Methods: Connectivity, Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: Chromatin, Transcription & Genomics, Computational Biology
MeSH: Computational Biology*, Deep Learning*, Single-Cell Analysis*, Autoencoder, Ensemble Learning, Genomics, Humans (* major topic)
Topic: Time Series Analysis and Forecasting (Signal Processing, Computer Science), according to OpenAlex
Citations: not cited yet (Europe PMC); 64 references in the paper

Abstract

Single-cell omics enable the dissection of cellular heterogeneity, yet the high dimensionality, inherent noise, and sparsity present significant challenges. These challenges are amplified for rare cell populations, which are often difficult to annotate reliably but can be central to development and disease. As single-cell assays increasingly capture multiple molecular layers, the integrative analysis of such multimodal data further increases complexity. Here, we propose Hydra, a deep generative framework based on an ensemble of variational autoencoders for effective learning of unimodal and multimodal single-cell omics data. Hydra implements interpretable modules for capturing cell-type-specific molecular signatures. The ensemble of such interpretable modules enables reproducible feature selection and robust cell-type annotation, with particular effectiveness for rare populations. We benchmarked Hydra on a repertoire of 21 datasets, including unimodal and multimodal single-cell omics data. Our results demonstrate that Hydra offers comparable to superior performance to several state-of-the-art methods. Finally, we highlight the utility of Hydra in robustly annotating brain cellular subtypes and preserving disease-relevant signatures using our previously published dataset that profiles Alzheimer’s disease.

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

SydneyBioX/scClassify

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 74fe32784b401492da0fd203736f39bcd6f2a2c5, 20 October 2021
Languages: R (15)
Size: 53 files, 15 scripts
Software Heritage: not archived
Found in: the text, “Methods”
Holds: README, environment (DESCRIPTION), continuous integration, documentation, 2 notebooks
Not found: license file, CITATION.cff, tests
Tools: ggplot2 (2 files), igraph (1 file), limma (1 file), mgcv (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
16 files

kellen8hao/scSorterDL

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: b0c29b000df3d9243f236498e3e15a6df7613995, 7 July 2025
Languages: Shell (9), Python (6)
Size: 31 files, 15 scripts
Software Heritage: not archived
Found in: the text, “Methods”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: PyTorch (4 files), scikit-learn (3 files), Matplotlib (2 files), NumPy (2 files), pandas (2 files), seaborn (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
16 files

deeplearner87/UMINT

License: MIT
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 3a588f834dc74879394466147e40378f2d5ad95c, 30 May 2023
Languages: Jupyter (32), R (10), Python (3)
Size: 47 files, 45 scripts
Software Heritage: not archived
Found in: the text, “Methods”
Holds: README, license file, 32 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (33 files), pandas (33 files), scikit-learn (28 files), TensorFlow (25 files), Keras (22 files), SciPy (17 files), tidyverse (12 files), Seurat (8 files), Matplotlib (7 files), Scanpy (5 files), cowplot (4 files), data.table (4 files), ggplot2 (4 files), anndata (2 files), patchwork (2 files), pysam (2 files), SingleCellExperiment (2 files), UMAP (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
47 files

SydneyBioX/Hydra

License: MIT
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: c1b293442b30734c8f4a347311a3be106d2373a0, 23 July 2026
Languages: Python (7), R (3)
Size: 42 files, 10 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file, environment (pyproject.toml, requirements.txt, setup.py), continuous integration, documentation
Not found: CITATION.cff, tests
Tools: PyTorch (6 files), NumPy (5 files), pandas (4 files), h5py (3 files), reticulate (3 files), SciPy (3 files), Seurat (3 files), SingleCellExperiment (3 files), data.table (2 files), ggplot2 (2 files), Scanpy (2 files), anndata (1 file), Numba (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
12 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:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 85 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

Data links

Data availability

The computer code produced in this study is available in the following databases: GitHub (https://github.com/SydneyBioX/Hydra). Documentation for using the tool is available at (https://sydneybiox.github.io/Hydra/).

The source data of this paper are collected in the following database record: biostudies:S-SCDT-10_1038-S44320-026-00208-7 (https://www.ebi.ac.uk/biostudies/sourcedata/studies/S-SCDT-10_1038-S44320-026-00208-7).

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

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 2 keywords, 7 MeSH terms, 1 funder, 56 references.

Cite

This paper

Wagle, M. M., Liu, C., Liu, Z., Wang, Y., Kellis, M., Patrick, E., & Yang, P. (2026). Interpretable deep generative ensemble learning for single-cell omics with Hydra. Molecular systems biology, 22(7), 1161-1179. https://doi.org/10.1038/s44320-026-00208-7

BibTeX

@article{wagle2026interpretable,
author = {Wagle, Manoj M and Liu, Chunlei and Liu, Zunpeng and Wang, Yongheng and Kellis, Manolis and Patrick, Ellis and Yang, Pengyi},
title = {{Interpretable deep generative ensemble learning for single-cell omics with Hydra}},
journal = {Molecular systems biology},
year = {2026},
month = apr,
volume = {22},
number = {7},
pages = {1161--1179},
publisher = {Nature Publishing Group},
issn = {1744-4292},
doi = {10.1038/s44320-026-00208-7},
url = {https://doi.org/10.1038/s44320-026-00208-7},
pmid = {41965454},
pmcid = {PMC13328726}
}

RIS

TY - JOUR
AU - Wagle, Manoj M
AU - Liu, Chunlei
AU - Liu, Zunpeng
AU - Wang, Yongheng
AU - Kellis, Manolis
AU - Patrick, Ellis
AU - Yang, Pengyi
TI - Interpretable deep generative ensemble learning for single-cell omics with Hydra
T2 - Molecular systems biology
J2 - Mol Syst Biol
PY - 2026
DA - 2026/04/11
VL - 22
IS - 7
SP - 1161
EP - 1179
SN - 1744-4292
PB - Nature Publishing Group
DO - 10.1038/s44320-026-00208-7
UR - https://doi.org/10.1038/s44320-026-00208-7
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s44320-026-00208-7",
"type": "article-journal",
"title": "Interpretable deep generative ensemble learning for single-cell omics with Hydra",
"container-title": "Molecular systems biology",
"author": [
{
"family": "Wagle",
"given": "Manoj M"
},
{
"family": "Liu",
"given": "Chunlei"
},
{
"family": "Liu",
"given": "Zunpeng"
},
{
"family": "Wang",
"given": "Yongheng"
},
{
"family": "Kellis",
"given": "Manolis"
},
{
"family": "Patrick",
"given": "Ellis"
},
{
"family": "Yang",
"given": "Pengyi"
}
],
"container-title-short": "Mol Syst Biol",
"volume": "22",
"issue": "7",
"page": "1161-1179",
"DOI": "10.1038/s44320-026-00208-7",
"PMID": "41965454",
"PMCID": "PMC13328726",
"ISSN": "1744-4292",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s44320-026-00208-7",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
11
]
]
}
}

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.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: pysam, SingleCellExperiment, limma, 20 other tools, cellular / molecular, 1 reference
[2] doi:10.1093/nar/gkag706 [code]
scDifformer: diffusion-based post-training for virtual cell modeling across large-scale single-cell data.
Journal: Nucleic acids research
In common: Keras, UMAP, anndata, 13 other tools, 7 references
[3] doi:10.1038/s44318-026-00818-9 [code]
FAM134B-mediated ER-phagy degrades APP and suppresses Alzheimer's disease pathology.
Journal: The EMBO journal
In common: SingleCellExperiment, reticulate, limma, 18 other tools, cellular / molecular, 1 reference
[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: SingleCellExperiment, limma, anndata, 15 other tools, 4 references
[5] doi:10.1093/bioinformatics/btag652 [code]
mmVelo: a deep generative model for estimating cell state-dependent dynamics across multiple modalities.
Journal: Bioinformatics (Oxford, England)
In common: pysam, UMAP, anndata, 8 other tools, 9 references
[6] doi:10.1016/j.cpblue.2026.100007 [code]
An integrated single-cell and spatial proteotranscriptomics atlas of fibroblast-driven immunoregulation within the human adult oral cavity.
Journal: Cell press blue
In common: SingleCellExperiment, reticulate, limma, 16 other tools, 1 reference
[7] doi:10.1038/s41467-026-71803-3 [code]
Charting the transition from in vitro gliogenesis to the in vivo maturation of human glial progenitor cells transplanted into the hypomyelinated mouse brain.
Journal: Nature communications
In common: reticulate, anndata, Numba, 15 other tools, cellular / molecular, 3 references
[8] doi:10.1016/j.xcrm.2026.102651 [code]
Integrative CSF profiling identifies disease-specific immune responses in leptomeningeal disease.
Journal: Cell reports. Medicine
In common: SingleCellExperiment, reticulate, UMAP, 16 other tools, cellular / molecular
[9] doi:10.1038/s41467-026-76675-1 [code]
Long-read proteogenomic atlas of human neuronal differentiation reveals isoform diversity informing neurodevelopmental risk mechanisms.
Journal: Nature communications
In common: pysam, reticulate, limma, 16 other tools
[10] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: reticulate, limma, Keras, 16 other tools, cellular / molecular

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.