OSCR

Optics-free spatial genomics for mapping mammalian brain aging by IRISeq.

Code ↔ Paper

9 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 9 matches
  1. [1] § Methods › EasySci sequencing data preprocessing ↔ EasySci_pipeline.sh, lines 1–47 · score 0.77 · shortdT, randomN, EasySci, barcode information, pipeline, exon
  2. [2] § Results › Overview of IRISeq ↔ Analysis_Scripts/2_Fig2_plotting.ipynb, lines 173–203 · score 0.74 · LGN, STN, Unk, Vip, interneurons, DG
  3. [3] § Results › A spatially resolved transcriptome atlas of the mouse brain ↔ Analysis_Scripts/3_Fig1_plotting.ipynb, lines 324–367 · score 0.67 · hippocampal dentate gyrus, caudate putamen, habenula, amygdala, hypothalamus, cortex
  4. [4] § Methods › cDNA data matrix processing ↔ Bead_interaction_pipeline/UMI_barcode_extraction.py, lines 9–78 · score 0.66 · r1 fastq, r2 fastq, bead barcode, Read1, Read2, filtered
  5. [5] § Methods › Single-cell clustering and annotation analysis ↔ Analysis_Scripts/2_Fig2_plotting.ipynb, lines 21–36 · score 0.64 · FindClusters, variable features, SelectIntegrationFeatures, vst, Seurat, clustering
  6. [6] § Methods › cDNA data matrix processing ↔ script_folder/barcoding_reads_paired.py, lines 18–137 · score 0.61 · r1 fastq, r2 fastq, UMIs, trimmed, Read2, barcode
  7. [7] § Methods › EasySci sequencing data preprocessing ↔ script_folder/post_processing_exons.py, lines 69–129 · score 0.59 · shortdT, randomN, doublet, exon, PCR, matrix
  8. [8] § Methods › Differential abundance analysis for IRISeq ↔ Analysis_Scripts/5_Beads_deconvolution_cell_abundance_analysis.ipynb, lines 27–95 · score 0.57 · differentialGeneTest, cell abundance, model, RTCD, gene expression, matrix
  9. [9] § Methods › Computational procedures for processing IRISeq libraries › Bead-connection processing ↔ Sample_reconstruction_code_GPUipynb.ipynb, lines 120–155 · score 0.55 · sender bead, receiver bead, density, row, matrix, filtered

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

Jupyter notebook · 588 lines · 19 KB · no license · 2 matches

  1. # %%
  2. library(Matrix)
  3. library(Seurat)
  4. library(Matrix)
  5. gene_count <- readMM("//genecount.mtx")
  6. df_cell <- read.csv("//df_cell.csv")
  7. df_gene <- read.csv("//df_gene.csv")
  8. colnames(gene_count) = df_cell$cell_name_temp #your cell name column
  9. rownames(gene_count) = df_gene$Gene_name
  10. #must do this
  11. rownames(df_cell) <- df_cell$cell_name_temp
  12. # Now, proceed with creating the Seurat object
  13. Iris_Seurat <- CreateSeuratObject(counts = gene_count, meta.data = df_cell, project = "Spatial", assay = "RNA")
  14. Iris_Seurat <- subset(Iris_Seurat, subset = nCount_RNA >= 400)
  15. # %%
  16. Iris_Seurat <- NormalizeData(Iris_Seurat)
  17. Iris_Seurat <- FindVariableFeatures(Iris_Seurat, selection.method = "vst", nfeatures = 10000)
  18. # plot variable features with and without labels
  19. plot1 <- VariableFeaturePlot(Iris_Seurat)
  20. plot2 <- LabelPoints(plot = plot1, points = top10, repel = TRUE)
  21. plot1 + plot2
  22. all.genes <- rownames(Iris_Seurat)
  23. Iris_Seurat <- ScaleData(Iris_Seurat, features = all.genes)
  24. Iris_Seurat <- RunPCA(Iris_Seurat, features = VariableFeatures(object = Iris_Seurat),npcs=25)
  25. Iris_Seurat <- FindNeighbors(Iris_Seurat, dims = 1:50)
  26. Iris_Seurat <- FindClusters(Iris_Seurat, resolution = 2)
  27. Iris_Seurat <- RunUMAP(Iris_Seurat, dims = 1:40)
  28. DimPlot(Iris_Seurat, reduction = "umap")
  29. # %%
  30. #used this for figure
  31. Iris_Seurat <- FindNeighbors(Iris_Seurat, dims = 1:20)
  32. Iris_Seurat <- FindClusters(Iris_Seurat, resolution = 2)
  33. Iris_Seurat <- RunUMAP(Iris_Seurat, dims = 1:20)
  34. DimPlot(Iris_Seurat, reduction = "umap")
  35. # %%
  36. #used this for figure
  37. Iris_Seurat <- RunUMAP(Iris_Seurat, dims = 1:20,min.dist = 0.1)
  38. # %%
  39. # %%
  40. # %%
  41. # %%
  42. DimPlot(Iris_Seurat, reduction = "umap")+NoLegend()
  43. # %%
  44. Iris_Seurat <- FindClusters(Iris_Seurat, resolution = 2.2)
  45. # %%
  46. Iris_Seurat <- FindClusters(Iris_Seurat, resolution = 1)
  47. # %%
  48. DimPlot(Iris_Seurat, reduction = "umap")
  49. # %%
  50. library(Matrix)
  51. library(Seurat)
  52. library(spacexr)
  53. library(Matrix)
  54. library(doParallel)
  55. # %%
  56. RTCD = readRDS("../10um_RDS.rds")
  57. # %%
  58. weights <- RTCD@results$weights
  59. norm_weights <- normalize_weights(weights)
  60. barcodes <- colnames(RTCD@spatialRNA@counts)
  61. weights <- RTCD@results$weights
  62. RTCD <- as.data.frame(norm_weights)
  63. # %%
  64. #adding umap coords
  65. # Extract UMAP coordinates
  66. umap_coords <- [email hidden][, c("UMAP1", "UMAP2")]
  67. # Set UMAP embeddings in the Seurat object
  68. Iris_Seurat[["umapSpatial"]] <- CreateDimReducObject(embeddings = as.matrix(umap_coords), key = "UMAP_")
  69. # %%
  70. # Assuming 'your_seurat_object' is your Seurat object
  71. # Extract the relevant columns into a matrix
  72. columns_of_interest <- c('Astro_AMY', 'Astro_AMY_CTX', 'Astro_CTX', 'Astro_HPC',
  73. 'Astro_HYPO', 'Astro_STR', 'Astro_THAL_hab', 'Astro_THAL_lat',
  74. 'Astro_THAL_med', 'Astro_WM', 'Endo', 'Ext_Amy_1', 'Ext_Amy_2',
  75. 'Ext_ClauPyr', 'Ext_Hpc_CA1', 'Ext_Hpc_CA2', 'Ext_Hpc_CA3',
  76. 'Ext_Hpc_DG1', 'Ext_Hpc_DG2', 'Ext_L23', 'Ext_L25', 'Ext_L5_1',
  77. 'Ext_L5_2', 'Ext_L5_3', 'Ext_L56', 'Ext_L6', 'Ext_L6B', 'Ext_Med',
  78. 'Ext_Pir', 'Ext_Thal_1', 'Ext_Thal_2', 'Ext_Unk_1', 'Ext_Unk_2',
  79. 'Ext_Unk_3', 'Inh_1', 'Inh_2', 'Inh_3', 'Inh_4', 'Inh_5', 'Inh_6',
  80. 'Inh_Lamp5', 'Inh_Meis2_1', 'Inh_Meis2_2', 'Inh_Meis2_3',
  81. 'Inh_Meis2_4', 'Inh_Pvalb', 'Inh_Sst', 'Inh_Vip', 'LowQ_1',
  82. 'LowQ_2', 'Micro', 'Nb_1', 'Nb_2', 'Oligo_1', 'Oligo_2',
  83. 'OPC_1', 'OPC_2', 'Unk_1', 'Unk_2')
  84. # %%
  85. # %%
  86. DimPlot(Iris_Seurat,reduction="umapSpatial", group.by = "Idents", cols = c("OPC_1"="red"))
  87. DimPlot(Iris_Seurat, group.by = "Idents", cols = c("OPC_1"="red"))
  88. DimPlot(Iris_Seurat,reduction="umapSpatial", group.by = "Idents", cols = c("OPC_2"="red"))
  89. DimPlot(Iris_Seurat, group.by = "Idents", cols = c("OPC_2"="red"))
  90. [email hidden]$Idents
  91. #Astro_AMY, Astro_AMY_CTX, Astro_CTX, , Astro_STR, Astro_THAL_hab,Astro_THAL_lat,Astro_THAL_med=Astrocytes
  92. #Astro_WM=Astrocytes_WM
  93. #Astro_HYPO=Astrocytes_Hypo
  94. #Endo=Endo
  95. #Ext_Amy_1=Ext_Amy_1
  96. #Ext_Amy_2=Ext_Amy_2
  97. #Inh_1=Inh_Amy
  98. #Ext_ClauPyr=Ext_ClauPyr
  99. #Ext_Hpc_CA1=Ext_Hpc_CA1
  100. #Ext_Hpc_CA2=Ext_Hpc_CA2
  101. #Ext_Hpc_CA3=Ext_Hpc_CA3
  102. #Ext_Hpc_DG1,Ext_Hpc_DG2=Ext_Hpc_DG
  103. #Ext_L23=Ext_L23
  104. #Ext_L25=Ext_L25
  105. #Ext_L5_1,Ext_L5_2,Ext_L5_3=Ext_L5
  106. #Ext_L56,Ext_L6B=Ext_L56
  107. #Ext_Med=Ext_Med
  108. #Ext_Pir,Ext_Unk_1=Ext_Pir
  109. #Ext_Thal_1', 'Ext_Thal_2,Ext_Unk_3=Thalamus
  110. #Ext_Unk_2=Ext_Unk_2
  111. #Inh_2,Inh_3,Inh=Hypothalamus
  112. #Inh_5=STN
  113. #Inh_6=Habenuela
  114. #Inh_Lamp5=Inh_Hippocampus
  115. ##Inh_Meis2_1,Inh_Meis2_2,Inh_Meis2_3=Striatal
  116. #Inh_Meis2_4=LGN
  117. #Inh_Sst=Inh_Sst
  118. #Inh_Pvalb=Inh_Pvalb
  119. #Inh_Vip=Inh_Vip
  120. #LowQ_1=Choroid_Plexus
  121. #Micro=Micro
  122. #Nb_1,Nb_2=Nb
  123. #Oligo_1', 'Oligo_2=Oligo
  124. #OPC_2,OPC_1=OPC
  125. #Unk_1', 'Unk_2-interneurons
  126. # %%
  127. # Define the mapping dictionary
  128. idents_mapping <- c(
  129. "Astro_AMY" = "Astrocytes", "Astro_AMY_CTX" = "Astrocytes", "Astro_CTX" = "Astrocytes",
  130. "Astro_STR" = "Astrocytes", "Astro_THAL_hab" = "Astrocytes", "Astro_THAL_lat" = "Astrocytes",
  131. "Astro_THAL_med" = "Astrocytes", "Astro_WM" = "Astrocytes_WM", "Astro_HYPO" = "Astrocytes_Hypo",
  132. "Endo" = "Endo", "Ext_Amy_1" = "Ext_Amy_1", "Ext_Amy_2" = "Ext_Amy_2",
  133. "Inh_1" = "Inh_Amy", "Ext_ClauPyr" = "Ext_ClauPyr", "Ext_Hpc_CA1" = "Ext_Hpc_CA1",
  134. "Ext_Hpc_CA2" = "Ext_Hpc_CA2", "Ext_Hpc_CA3" = "Ext_Hpc_CA3", "Ext_Hpc_DG1" = "Ext_Hpc_DG",
  135. "Ext_Hpc_DG2" = "Ext_Hpc_DG", "Ext_L23" = "Ext_L23", "Ext_L25" = "Ext_L25",
  136. "Ext_L5_1" = "Ext_L5", "Ext_L5_2" = "Ext_L5", "Ext_L5_3" = "Ext_L5",
  137. "Ext_L56" = "Ext_L56", "Ext_L6B" = "Ext_L56", "Ext_Med" = "Ext_Med",
  138. "Ext_Pir" = "Ext_Pir", "Ext_Unk_1" = "Ext_Pir", "Ext_Thal_1" = "Thalamus",
  139. "Ext_Thal_2" = "Thalamus", "Ext_Unk_3" = "Thalamus", "Ext_Unk_2" = "Ext_Unk_2",
  140. "Inh_2" = "Hypothalamus", "Inh_3" = "Hypothalamus", "Inh" = "Hypothalamus",
  141. "Inh_5" = "STN", "Inh_6" = "Habenuela", "Inh_Lamp5" = "Inh_Hippocampus",
  142. "Inh_Meis2_1" = "Striatal", "Inh_Meis2_2" = "Striatal", "Inh_Meis2_3" = "Striatal",
  143. "Inh_Meis2_4" = "LGN", "Inh_Sst" = "Inh_Sst", "Inh_Pvalb" = "Inh_Pvalb",
  144. "Inh_Vip" = "Inh_Vip", "LowQ_1" = "Choroid_Plexus", "Micro" = "Micro",
  145. "Nb_1" = "Nb", "Nb_2" = "Nb", "Oligo_1" = "Oligo", "Oligo_2" = "Oligo",
  146. "OPC_1" = "OPC", "OPC_2" = "OPC", "Unk_1" = "interneurons", "Unk_2" = "interneurons"
  147. )
  148. # Create a new column with mapped values
  149. [email hidden]$NewIdents <- idents_mapping[as.character([email hidden]$Idents)]
  150. # Ensure any NA values (unmapped identities) remain unchanged
  151. [email hidden]$NewIdents[is.na([email hidden]$NewIdents)] <- [email hidden]$Idents[is.na([email hidden]$NewIdents)]
  152. # Verify the changes
  153. table([email hidden]$NewIdents)
  154. # %%
  155. # %%
  156. DimPlot(Iris_Seurat,reduction="umapSpatial", group.by = "NewIdents")+NoLegend()
  157. DimPlot(Iris_Seurat, group.by = "NewIdents")+NoLegend()
  158. # %%
  159. # %%
  160. # %%
  161. # %%
  162. # %%
  163. # %%
  164. # %%
  165. # %%
  166. # %%
  167. # %%
  168. # %%
  169. # %%
  170. # %%
  171. # %%
  172. # %%
  173. FeaturePlot(Iris_Seurat, "Ttr")
  174. DimPlot(Iris_Seurat,reduction="umapSpatial", group.by = "Idents", cols = c("Inh_Meis2_1"="red"))
  175. DimPlot(Iris_Seurat, group.by = "Idents", cols = c("Inh_Meis2_1"="red"))
  176. # %%
  177. # %%
  178. [email hidden] = RTCD[,columns_of_interest]
  179. # %%
  180. # %%
  181. # Get the matrix of values for the specified columns
  182. data_matrix <- FetchData(Iris_Seurat, vars = columns_of_interest)
  183. # Identify the column with the highest value for each cell
  184. max_id <- apply(data_matrix, 1, function(x) columns_of_interest[which.max(x)])
  185. # Add this information as a new column in the Seurat metadata
  186. Iris_Seurat$Idents <- max_id
  187. # Optionally set the Seurat object identity to this new column
  188. Idents(Iris_Seurat) <- "Idents"
  189. # View the updated Seurat object metadata
  190. head([email hidden])
  191. # %%
  192. # %%
  193. # %%
  194. # %%
  195. # %%
  196. # Fetch cell names from Seurat object metadata
  197. metadata_cell_names <- rownames([email hidden])
  198. # Ensure data_matrix includes all metadata cells in the same order
  199. data_matrix <- FetchData(Iris_Seurat, vars = columns_of_interest, cells = metadata_cell_names)
  200. # Use max.col to quickly find the index of the max value for each row
  201. max_indices <- max.col(data_matrix, ties.method = "first")
  202. # Map the indices back to column names
  203. identities <- setNames(columns_of_interest[max_indices], rownames(data_matrix))
  204. # Add the new identities as a metadata column
  205. [email hidden]$Idents <- identities
  206. # %%
  207. # %%
  208. # %%
  209. library(Seurat)
  210. library(ggplot2)
  211. library(RColorBrewer)
  212. library(cowplot)
  213. # Extract unique identities
  214. unique_idents <- unique([email hidden]$NewIdents)
  215. # Generate visually distinct colors
  216. num_clusters <- length(unique_idents)
  217. palette_colors <- colorRampPalette(brewer.pal(12, "Paired"))(num_clusters)
  218. # Assign colors to each identity
  219. names(palette_colors) <- unique_idents
  220. # Plot UMAP with distinct colors
  221. DimPlot(Iris_Seurat, group.by = "NewIdents", cols = palette_colors) +
  222. theme_minimal() +
  223. ggtitle("UMAP with Distinct Clusters")
  224. # %%
  225. DimPlot(Iris_Seurat, group.by = "NewIdents", cols = palette_colors, reduction = "umapSpatial", pt.size = 0.5) +
  226. theme_void() + # Removes background, grid, and axis lines
  227. ggtitle("UMAP with Distinct Clusters") +
  228. theme(
  229. axis.text = element_blank(), # Remove axis text
  230. axis.ticks = element_blank(), # Remove axis ticks
  231. panel.border = element_blank(), # Remove panel border
  232. legend.text = element_text(family = "Helvetica", size = 14), # Set legend font to Helvetica
  233. legend.title = element_text(family = "Helvetica", size = 14)+NoLegend() # Ensure title is also Helvetica
  234. )+NoLegend()
  235. # %%
  236. DimPlot(Iris_Seurat, group.by = "NewIdents", cols = palette_colors, reduction = "umapSpatial", pt.size = 0.5) +
  237. theme_void() + # Removes background, grid, and axis lines
  238. ggtitle("UMAP with Distinct Clusters") +
  239. theme(
  240. axis.text = element_blank(), # Remove axis text
  241. axis.ticks = element_blank(), # Remove axis ticks
  242. panel.border = element_blank(), # Remove panel border
  243. legend.text = element_text(family = "Helvetica", size = 14), # Set legend font to Helvetica
  244. legend.title = element_text(family = "Helvetica", size = 14)+NoLegend() # Ensure title is also Helvetica
  245. )
  246. # %%
  247. # Automatically update colors for all clusters containing "Thal"
  248. palette_colors[grep("Thal", names(palette_colors))] <- "#FCE7C8"
  249. # Automatically update colors for all clusters containing "Thal"
  250. palette_colors[grep("Oligo", names(palette_colors))] <- "#FADA7A"
  251. # Automatically update colors for all clusters containing "Thal"
  252. palette_colors[grep("Striatal", names(palette_colors))] <- "#CBA35C"
  253. # %%
  254. DimPlot(Iris_Seurat, group.by = "NewIdents", cols = palette_colors, reduction = "umapSpatial", pt.size = .5) +
  255. theme_void() + # Removes background, grid, and axis lines
  256. ggtitle("UMAP with Distinct Clusters") +
  257. theme(
  258. axis.text = element_blank(), # Remove axis text
  259. axis.ticks = element_blank(), # Remove axis ticks
  260. panel.border = element_blank(), # Remove panel border
  261. legend.text = element_text(family = "Helvetica", size = 14), # Set legend font to Helvetica
  262. legend.title = element_text(family = "Helvetica", size = 14)+NoLegend() # Ensure title is also Helvetica
  263. )+NoLegend()
  264. # %%
  265. # %%
  266. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Hypothalamus" = "#A94A4A"))
  267. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Ext_Amy_2" = "red"))
  268. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("interneurons" = "red"))
  269. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Ext_L56" = "red"))
  270. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Ext_Pir" = "red"))
  271. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Oligo" = "red"))
  272. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Choroid_Plexus" = "red"))
  273. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Thalamus" = "red"))
  274. DimPlot(Iris_Seurat, reduction = "umapSpatial",group.by = "NewIdents", cols = c("Ext_Med" = "red"))
  275. # %%
  276. DimPlot(Iris_Seurat, group.by = "NewIdents", cols = palette_colors, reduction = "umapSpatial", pt.size = .5) +
  277. theme_void() + # Removes background, grid, and axis lines
  278. ggtitle("UMAP with Distinct Clusters") +
  279. theme(
  280. axis.text = element_blank(), # Remove axis text
  281. axis.ticks = element_blank(), # Remove axis ticks
  282. panel.border = element_blank(), # Remove panel border
  283. legend.text = element_text(family = "Helvetica", size = 14), # Set legend font to Helvetica
  284. legend.title = element_text(family = "Helvetica", size = 14)+NoLegend() # Ensure title is also Helvetica
  285. )+NoLegend()
  286. # %%
  287. # %%
  288. # %%
  289. library(ggplot2)
  290. library(reshape2)
  291. # Convert metadata to a data frame for ggplot
  292. metadata_df <- [email hidden]
  293. # Rename columns for readability
  294. colnames(metadata_df)[colnames(metadata_df) %in% c("nCount_RNA", "nFeature_RNA")] <- c("UMI_Counts", "Gene_Counts")
  295. # Reshape data to long format for side-by-side boxplots
  296. melted_data <- melt(metadata_df, measure.vars = c("UMI_Counts", "Gene_Counts"))
  297. # Custom colors for each box plot
  298. box_colors <- c("UMI_Counts" = "#8B5A2B", "Gene_Counts" = "#1F497D") # Brown & Blue
  299. # Set max y-axis limit
  300. max_y <- 2000 # Adjust based on data range
  301. # Generate Box Plot
  302. pdf("Umi.pdf")
  303. ggplot(melted_data, aes(x = variable, y = value, fill = variable)) +
  304. geom_boxplot(color = "black", outlier.shape = 16, outlier.colour = "black", outlier.size = 1) +
  305. scale_fill_manual(values = box_colors) +
  306. theme_minimal() +
  307. theme(
  308. text = element_text(family = "Helvetica"),
  309. axis.title.x = element_blank(),
  310. axis.title.y = element_blank(),
  311. axis.text.x = element_text(size = 14, face = "bold"),
  312. axis.text.y = element_text(size = 12),
  313. legend.position = "none", # Remove legend for a cleaner look
  314. panel.grid = element_blank(), # Remove grid
  315. panel.border = element_blank(),
  316. axis.line = element_line(color = "black", size = 1), # Add x and y axis lines
  317. axis.ticks = element_line(color = "black", size = 1) # Add ticks to both axes
  318. ) +
  319. coord_cartesian(ylim = c(0, max_y)) # Set y-axis max limit
  320. dev.off()
  321. # %%
  322. pdf("Plotcells.pdf")
  323. DimPlot(Iris_Seurat, group.by = "Idents", cols = palette_colors, reduction ="umapSpatial", pt.size = 0.5) +
  324. theme_void() + # Removes background, grid, and axis lines
  325. ggtitle("UMAP with Distinct Clusters") +
  326. NoLegend() +
  327. theme(
  328. axis.text = element_blank(), # Remove axis text
  329. axis.ticks = element_blank(), # Remove axis ticks
  330. panel.border = element_blank() # Remove panel border
  331. )
  332. # Define custom colors as a named vector
  333. custom_colors <- c(
  334. "Ext_Hpc_CA1" = "#1f77b4",
  335. "Ext_Hpc_CA2" = "#ff7f0e",
  336. "Ext_Hpc_CA3" = "#2ca02c",
  337. "Ext_Hpc_DG1" = "orange",
  338. "Ext_Hpc_DG2" = "orange",
  339. "Ext_L23" = "#8c564b",
  340. "Ext_L25" = "#e377c2",
  341. "Ext_L5_1" = "#7f7f7f",
  342. "Astro_THAL_med" = "#bcbd22",
  343. "Ext_L56" = "#17becf","Astro_THAL_med" = "#D99D81","Astro_THAL_lat" ="#DF9755" , "Astro_THAL_hab"= "#C890A7",
  344. "Oligo_1"="#A31D1D","Oligo_2"="#A31D1D","OPC_1"="#809D3C","OPC_2"="#F4FFC3"
  345. )
  346. # Plot with custom colors
  347. DimPlot(
  348. Iris_Seurat,
  349. group.by = "Idents",
  350. reduction = "umapSpatial",
  351. cols = custom_colors, pt.size = .5
  352. ) + NoLegend()
  353. custom_colors <- c(
  354. "Ext_Hpc_CA1" = "#1f77b4",
  355. "Ext_Hpc_CA2" = "#ff7f0e",
  356. "Ext_Hpc_CA3" = "#2ca02c",
  357. "Ext_Hpc_DG1" = "orange",
  358. "Ext_Hpc_DG2" = "orange",
  359. "Ext_L23" = "#8c564b",
  360. "Ext_L25" = "#e377c2",
  361. "Ext_L5_1" = "#7f7f7f",
  362. "Astro_THAL_med" = "#bcbd22",
  363. "Ext_L56" = "#17becf","Astro_THAL_med" = "#D99D81","Astro_THAL_lat" ="#DF9755" , "Astro_THAL_hab"= "#C890A7",
  364. "Oligo_1"="#A31D1D","Oligo_2"="#A31D1D","OPC_1"="#809D3C","OPC_2"="#F4FFC3"
  365. )
  366. # Plot with custom colors
  367. DimPlot(
  368. Iris_Seurat,
  369. group.by = "Idents",
  370. reduction = "umapSpatial",
  371. cols = custom_colors, pt.size = .5
  372. )
  373. dev.off()
  374. # %%
  375. # %%
  376. FeaturePlot(Iris_Seurat,c("Ext_Hpc_CA1","Ext_Hpc_CA2","Ext_Hpc_CA3"), reduction = "umapSpatial",raster=FALSE)+NoLegend()
  377. # %%
  378. pdf("pdf_subtype.png")
  379. FeaturePlot(Iris_Seurat,"Ext_Hpc_CA1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  380. FeaturePlot(Iris_Seurat,"Ext_Hpc_CA2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  381. FeaturePlot(Iris_Seurat,"Ext_Hpc_CA3", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  382. FeaturePlot(Iris_Seurat,"Ext_ClauPyr", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  383. FeaturePlot(Iris_Seurat,"Endo", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  384. FeaturePlot(Iris_Seurat,"Ext_Thal_1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  385. FeaturePlot(Iris_Seurat,"Ext_Thal_2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  386. FeaturePlot(Iris_Seurat,"Ext_Hpc_DG1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  387. FeaturePlot(Iris_Seurat,"Ext_Hpc_DG2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  388. FeaturePlot(Iris_Seurat,"Ext_L23", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  389. FeaturePlot(Iris_Seurat,"Ext_L25", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  390. FeaturePlot(Iris_Seurat,"Ext_L5_1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  391. FeaturePlot(Iris_Seurat,"Ext_L5_2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  392. FeaturePlot(Iris_Seurat,"Ext_L5_3", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  393. FeaturePlot(Iris_Seurat,"Ext_L56", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  394. FeaturePlot(Iris_Seurat,"Ext_L6", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  395. FeaturePlot(Iris_Seurat,"Ext_L6B", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  396. FeaturePlot(Iris_Seurat,"Ext_Med", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  397. FeaturePlot(Iris_Seurat,"Ext_Pir", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  398. FeaturePlot(Iris_Seurat,"Micro", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  399. FeaturePlot(Iris_Seurat,"Oligo_1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  400. FeaturePlot(Iris_Seurat,"Oligo_2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  401. FeaturePlot(Iris_Seurat,"OPC_1", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  402. FeaturePlot(Iris_Seurat,"OPC_2", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  403. FeaturePlot(Iris_Seurat,"Astro_AMY", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  404. FeaturePlot(Iris_Seurat,"Astro_AMY_CTX", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  405. FeaturePlot(Iris_Seurat,"Astro_CTX", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  406. FeaturePlot(Iris_Seurat,"Astro_HPC", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  407. FeaturePlot(Iris_Seurat,"Astro_HYPO", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  408. FeaturePlot(Iris_Seurat,"Astro_STR", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  409. FeaturePlot(Iris_Seurat,"Astro_THAL_hab", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  410. FeaturePlot(Iris_Seurat,"Astro_THAL_lat", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  411. FeaturePlot(Iris_Seurat,"Astro_THAL_med", reduction = "umapSpatial",raster=FALSE)+NoLegend()
  412. dev.off()

2_Fig2_plotting.ipynb at commit da8bf40, no license · at the source

Overview

Authors: Abdulraouf Abdulraouf1,2,3, Weirong Jiang1, Zehao Zhang1,3, Zihan Xu1,3, Ziyu Lu1,3, Tiffany Merlinsky2, Andrew Liao1,2,3, Ahmet Doymaz1,2,3, Samuel Isakov1, Tanvir Raihan1, Wei Zhou1, Junyue Cao1
  1. Laboratory of Single Cell Genomics and Population Dynamics, The Rockefeller University, New York, NY USA
  2. The Tri-Institutional M.D-Ph.D Program, New York, NY USA
  3. The David Rockefeller Graduate Program in Bioscience, The Rockefeller University, New York, NY USA
Institutions: Rockefeller University (United States)
Journal: Nature neuroscience, volume 29, issue 7, pages 1762-1773
Dates: received 5 April 2025; accepted 6 April 2026; published online 12 May 2026; in print 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41593-026-02293-1 · PMID 42120609 · PMCID PMC13337494 · OpenAlex W7160958222
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), mouse (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: RNA sequencing, Molecular neuroscience, Neuroimmunology
MeSH: Aging*, Brain*, Brain Mapping*, Genomics*, Animals, Lymphocytes, Mice, Mice, Inbred C57BL, Single-Cell Gene Expression Analysis, Spatial Transcriptomics, Transcriptome (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: U.S. Department of Health & Human Services | NIH | National Institute on Aging (U.S. National Institute on Aging) (RM1HG011014, 1R01AG076932); NHGRI NIH HHS (RM1 HG011014); NIGMS NIH HHS (T32 GM152349)
Citations: cited by 4 papers (Europe PMC); 57 references in the paper

Abstract

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

Repositories

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

JunyueCaoLab/EasySci

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: dc7ab035fc6a15a1cac02e60e208b5e965fa6471, 17 January 2024
Languages: Python (10), Shell (1)
Size: 20 files, 11 scripts
Software Heritage: not archived
Found in: the text, “EasySci sequencing data preprocessing”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (6 files), pandas (6 files), Biopython (2 files), SciPy (2 files), SAMtools (1 file), STAR (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
13 files

AbdulAbdulRU/IRISeq

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: da8bf4072343c4fc5c04460ce71cd5b90a02bd22, 8 November 2025
Languages: Python (18), Jupyter (7)
Size: 43 files, 25 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, 7 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: pandas (10 files), NumPy (6 files), Matplotlib (3 files), Scanpy (3 files), scikit-learn (3 files), Seurat (3 files), SciPy (2 files), seaborn (2 files), cowplot (1 file), ggplot2 (1 file), Monocle 3 (1 file), Numba (1 file), reshape2 (1 file), tidyverse (1 file), UMAP (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
26 files

Code availability statement

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

Read it in the paper: doi.org/10.1038/s41593-026-02293-1.

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

Data availability statement

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

Read it in the paper: doi.org/10.1038/s41593-026-02293-1.

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 2, 28 September 2026

  • Publisher: n/a → Nature Portfolio

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 3 keywords, 11 MeSH terms, 3 funders, 56 references.

Cite

This paper

Abdulraouf, A., Jiang, W., Zhang, Z., Xu, Z., Lu, Z., Merlinsky, T., Liao, A., Doymaz, A., Isakov, S., Raihan, T., Zhou, W., & Cao, J. (2026). Optics-free spatial genomics for mapping mammalian brain aging by IRISeq. Nature neuroscience, 29(7), 1762-1773. https://doi.org/10.1038/s41593-026-02293-1

BibTeX

@article{abdulraouf2026optics,
author = {Abdulraouf, Abdulraouf and Jiang, Weirong and Zhang, Zehao and Xu, Zihan and Lu, Ziyu and Merlinsky, Tiffany and Liao, Andrew and Doymaz, Ahmet and Isakov, Samuel and Raihan, Tanvir and Zhou, Wei and Cao, Junyue},
title = {{Optics-free spatial genomics for mapping mammalian brain aging by IRISeq}},
journal = {Nature neuroscience},
year = {2026},
month = may,
volume = {29},
number = {7},
pages = {1762--1773},
publisher = {Nature Portfolio},
issn = {1097-6256},
doi = {10.1038/s41593-026-02293-1},
url = {https://doi.org/10.1038/s41593-026-02293-1},
pmid = {42120609},
pmcid = {PMC13337494}
}

RIS

TY - JOUR
AU - Abdulraouf, Abdulraouf
AU - Jiang, Weirong
AU - Zhang, Zehao
AU - Xu, Zihan
AU - Lu, Ziyu
AU - Merlinsky, Tiffany
AU - Liao, Andrew
AU - Doymaz, Ahmet
AU - Isakov, Samuel
AU - Raihan, Tanvir
AU - Zhou, Wei
AU - Cao, Junyue
TI - Optics-free spatial genomics for mapping mammalian brain aging by IRISeq
T2 - Nature neuroscience
J2 - Nat Neurosci
PY - 2026
DA - 2026/05/12
VL - 29
IS - 7
SP - 1762
EP - 1773
SN - 1097-6256
PB - Nature Portfolio
DO - 10.1038/s41593-026-02293-1
UR - https://doi.org/10.1038/s41593-026-02293-1
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41593-026-02293-1",
"type": "article-journal",
"title": "Optics-free spatial genomics for mapping mammalian brain aging by IRISeq",
"container-title": "Nature neuroscience",
"author": [
{
"family": "Abdulraouf",
"given": "Abdulraouf"
},
{
"family": "Jiang",
"given": "Weirong"
},
{
"family": "Zhang",
"given": "Zehao"
},
{
"family": "Xu",
"given": "Zihan"
},
{
"family": "Lu",
"given": "Ziyu"
},
{
"family": "Merlinsky",
"given": "Tiffany"
},
{
"family": "Liao",
"given": "Andrew"
},
{
"family": "Doymaz",
"given": "Ahmet"
},
{
"family": "Isakov",
"given": "Samuel"
},
{
"family": "Raihan",
"given": "Tanvir"
},
{
"family": "Zhou",
"given": "Wei"
},
{
"family": "Cao",
"given": "Junyue"
}
],
"container-title-short": "Nat Neurosci",
"volume": "29",
"issue": "7",
"page": "1762-1773",
"DOI": "10.1038/s41593-026-02293-1",
"PMID": "42120609",
"PMCID": "PMC13337494",
"ISSN": "1097-6256",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41593-026-02293-1",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
12
]
]
}
}

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

Similar papers

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

[1] doi:10.1038/s41592-026-03211-w [code]
Spatial isoform sequencing at single-cell resolution reveals cell-type-specific spatial isoform variability in multiple brain cell types.
Journal: Nature methods
In common: Biopython, SAMtools, Numba, 12 other tools, genetics / omics, mouse, 6 references
[2] 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: STAR, Monocle 3, Biopython, 13 other tools, genetics / omics, 1 reference
[3] doi:10.1186/s13059-026-04177-w [code]
Genomic sequence evolution underlying human neocortical interareal diversification.
Journal: Genome biology
In common: Monocle 3, SAMtools, UMAP, 11 other tools, genetics / omics, mouse, cellular / molecular, 4 references
[4] 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: Monocle 3, UMAP, Numba, 12 other tools, genetics / omics, cellular / molecular, 3 references
[5] doi:10.1038/s44318-026-00818-9 [code]
FAM134B-mediated ER-phagy degrades APP and suppresses Alzheimer's disease pathology.
Journal: The EMBO journal
In common: Monocle 3, Biopython, UMAP, 13 other tools, mouse, cellular / molecular
[6] doi:10.21203/rs.3.rs-9676637/v1 [code]
A Comprehensive Benchmarking of Spatial Deconvolution and Domain Detection Methods across Diverse Tissues and Spatial Transcriptomic Technologies
Journal: Research Square (preprint)
In common: UMAP, Scanpy, Seurat, 9 other tools, genetics / omics, 5 references
[7] doi:10.7554/elife.106347 [code]
Esr1-dependent signaling and transcriptional maturation in the medial preoptic area of the hypothalamus shape the development of mating behavior during adolescence.
Journal: eLife
In common: Monocle 3, Scanpy, Seurat, 10 other tools, genetics / omics, mouse, 4 references
[8] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: Monocle 3, Biopython, SAMtools, 12 other tools, mouse, cellular / molecular
[9] doi:10.1038/s41592-026-03194-8 [code]
Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.
Journal: Nature methods
In common: Scanpy, Seurat, cowplot, 9 other tools, genetics / omics, 6 references
[10] doi:10.1038/s41586-026-10490-y [code]
Lineage and organ signals sequentially build organ intrinsic nervous systems.
Journal: Nature
In common: Monocle 3, UMAP, Scanpy, 11 other tools, mouse, 3 references

Contribute

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

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

Request its removal

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

Discussion, reproductions, activity

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

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

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