OSCR

Spatiotemporally resolved single-nucleus transcriptomics reveals cellular and regional vulnerability in the midbrain in Parkinson's disease.

Code ↔ Paper

5 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 5 matches
  1. [1] § Materials and methods › Cell-type annotation and differential expression analysis ↔ 02_Neuron/pseudobulk.R, lines 1 to 43 · score 0.88 · fitType, glmGamPoi, useT, DESeq2, LRT, Scran · Report a mismatch
  2. [2] § Results › Neuronal heterogeneity and vulnerable dopaminergic subtypes in the PD substantia nigra ↔ 02_Neuron/Step4_SNpc_PD_data_neuron_cluster_anz_norm.ipynb, lines 335 to 336 · score 0.72 · SLC17A7, SLC6A1, ALDH1A1, SLC6A3, PVALB, GAD1 · Report a mismatch
  3. [3] § Materials and methods › Gene regulatory network analysis ↔ 02_Neuron/SCENIC_process_and_comparison_plot.R, lines 65 to 147 · score 0.55 · regulon activity, SCENIC, Networks, TF, RSS, scores · Report a mismatch
  4. [4] § Results › Neuronal heterogeneity and vulnerable dopaminergic subtypes in the PD substantia nigra ↔ 02_Neuron/Step4_SNpc_PD_data_neuron_cluster_anz_norm.ipynb, lines 371 to 372 · score 0.54 · SEMA6D, SLC18A2, KLHL1, TTC6, neurons, PD · Report a mismatch
  5. [5] § Materials and methods › Gene ontology enrichment analysis ↔ 01_Preprocessing/zvalue_exp_heatmap.R, lines 1 to 72 · score 0.53 · log2 fold change, filtered, components, DEGs, clusters, genes · 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

Jupyter notebook · 791 lines · 35 KB · no license · 2 matches

  1. # %%
  2. library(Seurat)
  3. library(SeuratObject)
  4. library(ggplot2)
  5. library(magrittr)
  6. library(dplyr)
  7. # %%
  8. load('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step3_seurat_anz/SNU_PD_20221204_QC_END.RData')
  9. # %% [markdown]
  10. # ### Neuron
  11. # %%
  12. neuron <- subset(snu_pd_data,cluster_names==c("Neuron"))
  13. # %%
  14. DimPlot(neuron,cols = c("grey"))
  15. # %%
  16. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/SNU_neuron_umap_raw.png',width=200,height=200,units="mm")
  17. # %% [markdown]
  18. # #### reclustering
  19. # %%
  20. DefaultAssay(neuron) <- 'integrated'
  21. # %%
  22. ElbowPlot(neuron,ndims = 50)
  23. # %%
  24. neuron <- RunPCA(neuron, features = VariableFeatures(object = neuron))
  25. # %%
  26. neuron <- FindNeighbors(neuron, dims = 1:20)
  27. neuron <- FindClusters(neuron, resolution = 1.5)
  28. neuron <- RunUMAP(neuron, reduction = "pca", dims = 1:20)
  29. neuron <- RunTSNE(neuron, dims = 1:20)
  30. # %%
  31. DimPlot(neuron)
  32. # %%
  33. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_umap.png',width=200,height=200,units="mm")
  34. # %%
  35. DimPlot(neuron,reduction = 'tsne',pt.size = 3,label.size = 6) + NoLegend()
  36. # %%
  37. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_tsne.png',width=200,height=200,units="mm")
  38. # %%
  39. DimPlot(neuron,label = T)
  40. # %%
  41. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_umap_label_na.png',width=200,height=200,units="mm")
  42. # %%
  43. DimPlot(neuron,reduction = 'tsne',label = T)
  44. # %%
  45. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_tsne_label_na.png',width=200,height=200,units="mm")
  46. # %% [markdown]
  47. # #### attach tmp name
  48. # %%
  49. P_levels <- c('3','5','9','2','7','10','4','0','8','6','1')
  50. # %%
  51. Idents(neuron) <- factor(Idents(neuron), levels= P_levels)
  52. # %%
  53. cluster_names <- c('NC1','NC2','NC3','NC4','NC5','NC6','NC7','NC8','NC9','NC10','NC11')
  54. # %%
  55. names(cluster_names) <- levels(neuron)
  56. # %%
  57. neuron <- RenameIdents(neuron, cluster_names)
  58. # %%
  59. tmp_neuron = neuron
  60. group = tibble(Idents(neuron))
  61. colnames(group) = c("cluster_names")
  62. [email hidden] <- [email hidden][, -which(colnames([email hidden]) %in% 'cluster_names')]
  63. [email hidden] <- cbind([email hidden],group)
  64. # %%
  65. rm(tmp_neuron)
  66. rm(cluster_names)
  67. rm(group)
  68. rm(P_levels)
  69. # %%
  70. DimPlot(neuron,label = T,pt.size = 2,label.size = 5) + NoLegend()
  71. # %%
  72. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_umap_label.png',width=200,height=200,units="mm")
  73. # %%
  74. DimPlot(neuron,pt.size = 2) + NoLegend()
  75. # %%
  76. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_umap_n_label.png',width=200,height=200,units="mm")
  77. # %%
  78. DimPlot(neuron,label = T,split.by = c('patient_state')) + NoLegend()
  79. # %%
  80. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_umap_label_sp.png',width=200,height=200,units="mm")
  81. # %%
  82. DimPlot(neuron,reduction = 'tsne',label = T,pt.size = 3,label.size = 6) + NoLegend()
  83. # %%
  84. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_tsne_label.png',width=200,height=200,units="mm")
  85. # %%
  86. DimPlot(neuron,reduction = 'tsne',label = T,split.by = c('sample')) + NoLegend()
  87. # %%
  88. DimPlot(neuron,reduction = 'tsne',label = T,split.by = c('patient_state')) + NoLegend()
  89. # %%
  90. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/SNU_neuron_tsne_label_sp.png',width=400,height=200,units="mm")
  91. # %%
  92. save(neuron,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/SNU_neuron_tmp_20230209.RData')
  93. # %%
  94. load('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/SNU_neuron_tmp_20230209.RData')
  95. # %% [markdown]
  96. # #### check neruon cluster
  97. # %%
  98. DefaultAssay(neuron) <- 'RNA'
  99. Idents(neuron) <- 'cluster_names'
  100. neuron.markers_sc <- FindAllMarkers(neuron, min.pct = 0.25, logfc.threshold = 0.25)
  101. neuron.markers_sc %>%
  102. group_by(cluster) %>%
  103. slice_max(n = 5, order_by = avg_log2FC)-> top10_neuron_sc
  104. # %%
  105. neuron <- ScaleData(neuron, features = rownames(neuron))
  106. DoHeatmap(neuron, features = top10_neuron_sc$gene) +theme(text = element_text(size = 15))
  107. # %%
  108. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/heatmap_top10_genes_sc.png',width=400,height=400,units="mm")
  109. # %%
  110. write.csv(neuron.markers_sc,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neruon_gene_sc.csv')
  111. write.csv(top10_neuron_sc,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neruon_top10_gene_sc.csv')
  112. # %%
  113. DefaultAssay(neuron) <- 'RNA'
  114. Idents(neuron) <- 'patient_state'
  115. # %%
  116. neuron.markers_sp <- FindAllMarkers(neuron, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
  117. neuron.markers_sp %>%
  118. group_by(cluster) %>%
  119. slice_max(n = 10, order_by = avg_log2FC)-> top10_neuron_sp
  120. # %%
  121. neuron <- ScaleData(neuron, features = rownames(neuron))
  122. DoHeatmap(neuron, features = top10_neuron_sp$gene) +theme(text = element_text(size = 15))
  123. # %%
  124. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/heatmap_top10_genes_sp.png',width=200,height=200,units="mm")
  125. # %%
  126. write.csv(neuron.markers_sp,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neruon_gene_sp.csv')
  127. write.csv(top10_neuron_sp,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neruon_top10_gene_sp.csv')
  128. # %%
  129. library(metap)
  130. # %%
  131. DefaultAssay(neuron) <- 'RNA'
  132. Idents(neuron) <- 'cluster_names'
  133. neuron.cm.markers1 <- FindConservedMarkers(neuron, ident.1= "NC1", grouping.var = "patient_state", verbose = FALSE)
  134. neuron.cm.markers2 <- FindConservedMarkers(neuron, ident.1= "NC2", grouping.var = "patient_state", verbose = FALSE)
  135. neuron.cm.markers3 <- FindConservedMarkers(neuron, ident.1= "NC3", grouping.var = "patient_state", verbose = FALSE)
  136. neuron.cm.markers4 <- FindConservedMarkers(neuron, ident.1= "NC4", grouping.var = "patient_state", verbose = FALSE)
  137. neuron.cm.markers5 <- FindConservedMarkers(neuron, ident.1= "NC5", grouping.var = "patient_state", verbose = FALSE)
  138. neuron.cm.markers6 <- FindConservedMarkers(neuron, ident.1= "NC6", grouping.var = "patient_state", verbose = FALSE)
  139. neuron.cm.markers7 <- FindConservedMarkers(neuron, ident.1= "NC7", grouping.var = "patient_state", verbose = FALSE)
  140. neuron.cm.markers8 <- FindConservedMarkers(neuron, ident.1= "NC8", grouping.var = "patient_state", verbose = FALSE)
  141. neuron.cm.markers9 <- FindConservedMarkers(neuron, ident.1= "NC9", grouping.var = "patient_state", verbose = FALSE)
  142. neuron.cm.markers10 <- FindConservedMarkers(neuron, ident.1= "NC10", grouping.var = "patient_state", verbose = FALSE)
  143. neuron.cm.markers11 <- FindConservedMarkers(neuron, ident.1= "NC11", grouping.var = "patient_state", verbose = FALSE)
  144. write.csv(neuron.cm.markers1,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N1.csv')
  145. write.csv(neuron.cm.markers2,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N2.csv')
  146. write.csv(neuron.cm.markers3,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N3.csv')
  147. write.csv(neuron.cm.markers4,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N4.csv')
  148. write.csv(neuron.cm.markers5,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N5.csv')
  149. write.csv(neuron.cm.markers6,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N6.csv')
  150. write.csv(neuron.cm.markers7,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N7.csv')
  151. write.csv(neuron.cm.markers8,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N8.csv')
  152. write.csv(neuron.cm.markers9,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N9.csv')
  153. write.csv(neuron.cm.markers10,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N10.csv')
  154. write.csv(neuron.cm.markers11,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ConservedMarker_result_list/neuron_gene_fcm_N11.csv')
  155. # %%
  156. DefaultAssay(neuron) <- 'RNA'
  157. Idents(neuron) <- 'cluster_names'
  158. NC1 <- subset(neuron,cluster_names==c("NC1"))
  159. NC2 <- subset(neuron,cluster_names==c("NC2"))
  160. NC3 <- subset(neuron,cluster_names==c("NC3"))
  161. NC4 <- subset(neuron,cluster_names==c("NC4"))
  162. NC5 <- subset(neuron,cluster_names==c("NC5"))
  163. NC6 <- subset(neuron,cluster_names==c("NC6"))
  164. NC7 <- subset(neuron,cluster_names==c("NC7"))
  165. NC8 <- subset(neuron,cluster_names==c("NC8"))
  166. NC9 <- subset(neuron,cluster_names==c("NC9"))
  167. NC10 <- subset(neuron,cluster_names==c("NC10"))
  168. NC11 <- subset(neuron,cluster_names==c("NC11"))
  169. # %%
  170. Idents(NC1) <- "patient_state"
  171. Idents(NC2) <- "patient_state"
  172. Idents(NC3) <- "patient_state"
  173. Idents(NC4) <- "patient_state"
  174. Idents(NC5) <- "patient_state"
  175. Idents(NC6) <- "patient_state"
  176. Idents(NC7) <- "patient_state"
  177. Idents(NC8) <- "patient_state"
  178. Idents(NC9) <- "patient_state"
  179. Idents(NC10) <- "patient_state"
  180. Idents(NC11) <- "patient_state"
  181. # %%
  182. NC1.markers_sp <- FindAllMarkers(NC1, min.pct = 0.25, logfc.threshold = 0.25)
  183. NC2.markers_sp <- FindAllMarkers(NC2, min.pct = 0.25, logfc.threshold = 0.25)
  184. NC3.markers_sp <- FindAllMarkers(NC3, min.pct = 0.25, logfc.threshold = 0.25)
  185. NC4.markers_sp <- FindAllMarkers(NC4, min.pct = 0.25, logfc.threshold = 0.25)
  186. NC5.markers_sp <- FindAllMarkers(NC5, min.pct = 0.25, logfc.threshold = 0.25)
  187. NC6.markers_sp <- FindAllMarkers(NC6, min.pct = 0.25, logfc.threshold = 0.25)
  188. NC7.markers_sp <- FindAllMarkers(NC7, min.pct = 0.25, logfc.threshold = 0.25)
  189. NC8.markers_sp <- FindAllMarkers(NC8, min.pct = 0.25, logfc.threshold = 0.25)
  190. NC9.markers_sp <- FindAllMarkers(NC9, min.pct = 0.25, logfc.threshold = 0.25)
  191. NC10.markers_sp <- FindAllMarkers(NC10, min.pct = 0.25, logfc.threshold = 0.25)
  192. NC11.markers_sp <- FindAllMarkers(NC11, min.pct = 0.25, logfc.threshold = 0.25)
  193. # %%
  194. write.csv(NC1.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC1.csv')
  195. write.csv(NC2.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC2.csv')
  196. write.csv(NC3.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC3.csv')
  197. write.csv(NC4.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC4.csv')
  198. write.csv(NC5.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC5.csv')
  199. write.csv(NC6.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC6.csv')
  200. write.csv(NC7.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC7.csv')
  201. write.csv(NC8.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC8.csv')
  202. write.csv(NC9.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC9.csv')
  203. write.csv(NC10.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC10.csv')
  204. write.csv(NC11.markers_sp,file = '/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/cluster_sp_gene_list/neuron_gene_sp_NC11.csv')
  205. # %%
  206. load('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step7_SCENIC_neuron/tot/SNU_neuron_20230308.RData')
  207. # %%
  208. DimPlot(neuron)
  209. # %%
  210. DefaultAssay(neuron) <- 'RNA'
  211. # %%
  212. Neuron_AE_scsp <- AverageExpression(neuron)
  213. # %%
  214. head(Neuron_AE_scsp)
  215. # %%
  216. write.csv(Neuron_AE_scsp$RNA,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neuron_RNA_AE_scsp.csv')
  217. write.csv(Neuron_AE_scsp$integrated,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neuron_IT_AE_scsp.csv')
  218. # %% [markdown]
  219. # #### check neuron marker genes
  220. # %%
  221. DefaultAssay(neuron) <- 'RNA'
  222. Idents(neuron) <- 'cluster_names'
  223. # %%
  224. VlnPlot(neuron,features = c('SYT1','KCNJ6','SYNPR','UNC13C'),pt.size = 0)
  225. # %%
  226. VlnPlot(neuron,pt.size = 0,features = c('PAX6','TH','SLC10A4','ALDH1A1','SLC6A3','RORB','NR2F2','GAD1','GAD2','GRIN1','GRIN2A','GRIN2B'),stack = TRUE,flip = TRUE,fill.by = 'ident',) + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  227. # %%
  228. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check1.png',width=300,height=300,units="mm")
  229. # %%
  230. VlnPlot(neuron,pt.size = 0,features = c('GAD1','GAD2','HTR2C','TH','SLC6A3','MEIS2','SLC17A7'),stack = TRUE,flip = TRUE,fill.by = 'ident',) + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  231. # %%
  232. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check2.png',width=300,height=300,units="mm")
  233. # %%
  234. VlnPlot(neuron,pt.size = 0,features = c('MEIS2','SLC17A7','TH','SLC6A3','GAD1','GAD2','HTR2C'),stack = TRUE,flip = TRUE,fill.by = 'ident',) + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  235. # %%
  236. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check3.png',width=300,height=300,units="mm")
  237. # %%
  238. VlnPlot(neuron,pt.size = 0,features = c('GAD1','GAD2','PAX2','SLC32A1','SLC6A1','GABBR2','GADD45B','VIP','PVALB'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  239. # %%
  240. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check3.png',width=300,height=300,units="mm")
  241. # %%
  242. VlnPlot(neuron,pt.size = 0,features = c('TH','SLC6A3','SLC17A7','SLC17A6','PITX3','SMAD3','NEUROD6','SLC18A3','SLC18A2','DDC'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  243. # %%
  244. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check4.png',width=300,height=300,units="mm")
  245. # %%
  246. VlnPlot(neuron,pt.size = 0,features = c('SLC6A4','TPH2','DDC','SLC18A2','ESM1','SLC22A3'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  247. # %%
  248. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check5.png',width=300,height=300,units="mm")
  249. # %%
  250. VlnPlot(neuron,pt.size = 0,features = c('GAD1','PVALB','VIP','FGF12','NXPH1','EOMES','KCNC2','CALB1','CCK','VSX2','EN1','ETV1'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  251. # %%
  252. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check6.png',width=300,height=300,units="mm")
  253. # %%
  254. VlnPlot(neuron,pt.size = 0,features = c('SLC17A7','GAD1','GAD2','SLC6A1','TH','ALDH1A1','SLC6A3','SLC18A2','PVALB'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  255. # %%
  256. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check7.png',width=300,height=300,units="mm")
  257. # %%
  258. VlnPlot(neuron,pt.size = 0,features = c('SLC17A7','GAD1','GAD2','SLC6A1','TH','ALDH1A1','SLC6A3','SLC18A2','PVALB'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  259. # %%
  260. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check8.png',width=300,height=300,units="mm")
  261. # %%
  262. VlnPlot(neuron,pt.size = 0,features = c('PAX6','TH','SLC10A4','ALDH1A1','SLC6A3','RORB','NR2F2','GAD1','GAD2','GRIN1','GRIN2A','GRIN2B'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  263. # %%
  264. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check9.png',width=300,height=300,units="mm")
  265. # %%
  266. VlnPlot(neuron,pt.size = 0,features = c('FLT3', 'MBP', 'CMYA5', 'MLIP', 'MSR1', 'MAL', 'SLC30A10', 'SLC18A2', 'FOXP2'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  267. # %%
  268. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check10.png',width=300,height=300,units="mm")
  269. # %%
  270. VlnPlot(neuron, feature = c('FAT2','ETV1','FAM160A1','ZIC1','PAX6','ADAMTS16','FSTL5','NEUROD1','LINC01798','DLK1','SLC6A3','SLC18A2','VAT1','SLC10A4','TH','SNCG','ALDH1A1'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()
  271. # %%
  272. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check11.png',width=300,height=600,units="mm")
  273. # %%
  274. VlnPlot(neuron, feature = c('TF','DOCK5','CTNNA3','ST18','MOBP','TENM2','RMST','POU6F2','MATN2','TBR1','MLIP','SATB2','KIAA1211L','CBLN2','FOXG1','RMST','GABRG3','PCDH11X'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()
  275. # %%
  276. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check12.png',width=300,height=600,units="mm")
  277. # %%
  278. VlnPlot(neuron, feature = c('SYTL5','HTR2C','KLHL1','TTC6','SLC18A2','ST8SIA6','SEMA6D','KCNJ6','DRD2','SCGN','TFAP2B','BHLHE22','CLMP','OTX2-AS1','GRIK1','RORB','GRIK1','GULP1','MEIS2','NR2F2','OTX2','PRSS12','LEF1','SYNDIG1L'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend()
  279. # %%
  280. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check13.png',width=300,height=600,units="mm")
  281. # %%
  282. VlnPlot(neuron, feature = c('FAT2','FAM160A1','NEUROD1','PAX6','SLC6A3','SLC18A2','ALDH1A1','DLK1','VAT1','SLC10A4','TH','TF','ST18','MOBP','TENM2','RMST','POU6F2','MATN2','TBR1','MLIP','SATB2','KIAA1211L','GABRG3','PCDH11X','HTR2C','KLHL1','TTC6','SLC18A2','KCNJ6','SCGN','TFAP2B','BHLHE22','CLMP','OTX2-AS1','GRIK1','GULP1','NR2F2','OTX2','LEF1','SYNDIG1L'),stack = TRUE,flip = TRUE,fill.by = 'ident') + NoLegend() + theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  283. # %%
  284. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check14.png',width=300,height=600,units="mm")
  285. # %%
  286. png('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/neuron_vlnplot_check_gene_ss.png',width=800,height=400)
  287. VlnPlot(neuron, features = c('SLC18A2', 'NELL1'),split.by = 'sample',pt.size = 0,stack = TRUE,flip = TRUE,fill.by = 'ident') + FontSize(x.text = 15)
  288. dev.off()
  289. # %%
  290. VlnPlot(neuron,pt.size = 0,features = c('FLT3', 'MBP', 'CMYA5', 'MLIP', 'MSR1', 'MAL', 'SLC30A10', 'SLC18A2', 'FOXP2'),stack = TRUE,flip = TRUE,fill.by = 'ident',split.by = 'patient_state',split.plot = TRUE) + NoLegend()+ theme(axis.text.x = element_text(size = 20),axis.text.y = element_text(size = 20))
  291. # %%
  292. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_gene_check15_scp.png',width=300,height=300,units="mm")
  293. # %%
  294. VlnPlot(neuron, feature = c('PAH','TH','TPST1','MAOA','MAOB','COMT','ALDH1A1','ALDH1A2','SKP1'), pt.size = 0,stack = TRUE,flip = TRUE,fill.by = 'ident',split.by = 'patient_state',split.plot = TRUE) + FontSize(x.text = 15)
  295. # %%
  296. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/vlnplot_DA_pathway_genes.png',width=200,height=200,units="mm")
  297. # %%
  298. DotPlot(neuron,features = c('SLC17A7','GAD1','GAD2','SLC6A1','TH','ALDH1A1','SLC6A3','SLC18A2','PVALB'),dot.scale = 15) + theme(axis.text.x = element_text(size = 13),axis.text.y = element_text(size = 20))
  299. # %%
  300. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/dotplot_gene_check15.png',width=400,height=300,units="mm")
  301. # %%
  302. DotPlot(neuron,features = c('GABRA1','GABRB1','GABRB2','GABRB3','GABRG2','GABRG3','SLC17A7','GAD2','GAD1','SLC6A1','TH','ALDH1A1','SLC6A3','SLC18A2','PVALB'),dot.scale = 10,scale.max = 80) + theme(axis.text.x = element_text(size = 10),axis.text.y = element_text(size = 10),text = element_text(face = "bold"))+ coord_flip()
  303. # %%
  304. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/dotplot_gene_check15.5_2.png',width=220,height=150,units="mm")
  305. # %%
  306. FeaturePlot(neuron,features = c('BCAS1', 'PTPRK', 'SPOCK2' ),split.by = c('patient_state'),reduction = 'tsne')
  307. # %%
  308. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/featureplot_gene_check16_sp.png',width=300,height=300,units="mm")
  309. # %%
  310. FeaturePlot(neuron,features = c('PLCG2', 'COQ4', 'ANKFN1', 'EN2' ),split.by = c('patient_state'),reduction = 'tsne')
  311. # %%
  312. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/featureplot_gene_check17_sp.png',width=300,height=300,units="mm")
  313. # %%
  314. FeaturePlot(neuron, reduction = "tsne", features = c('TH','ALDH1A1','SLC6A3','SLC18A2','GAD1','GAD2','SLC6A1','GRM5'), label=F, max.cutoff = 3,ncol = 4) & NoAxes() & theme(plot.title = element_text(size = 25))
  315. # %%
  316. png('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/monocle_featureplot_neuron_marker_genes.png',width=1600,height=800)
  317. FeaturePlot(neuron, reduction = "tsne", features = c('TH','ALDH1A1','SLC6A3','SLC18A2','GAD1','GAD2','SLC6A1','GRM5'), label=F, max.cutoff = 3,ncol = 4) & NoAxes() & theme(plot.title = element_text(size = 25))
  318. dev.off()
  319. # %%
  320. # %%
  321. NEUAE <- AverageExpression(object = neuron)
  322. # %%
  323. write.csv(NEUAE$RNA,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neuron_RNA_AE_sc.csv')
  324. write.csv(NEUAE$integrated,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/neuron_integrated_AE_sc.csv')
  325. # %%
  326. # %%
  327. # %% [markdown]
  328. # ### integration with public data
  329. # %%
  330. library(rliger)
  331. library(SeuratWrappers)
  332. library(ggalluvial)
  333. # %%
  334. load('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/SNU_neuron_tmp_20230209.RData')
  335. # %%
  336. SNU_PDN <- neuron
  337. rm(neuron)
  338. # %%
  339. load("/home/Data_Drive_8TB_2/BIOSYS/Pub_data/Pub_pd_DA.Rdata")
  340. load("/home/Data_Drive_8TB_2/BIOSYS/Pub_data/Pub_pd_NDA.Rdata")
  341. # %%
  342. [email hidden]$reference = rep("SNU", 722)
  343. [email hidden]$reference = rep("PU", 22048)
  344. [email hidden]$reference = rep("PU", 91479)
  345. # %%
  346. TN_2raw <- merge(SNU_PDN, y= c(Pub_PD_DA,Pub_PD_NDA))
  347. # %%
  348. DefaultAssay(TN_2raw) <- 'RNA'
  349. # %%
  350. TN_2raw <- NormalizeData(TN_2raw)
  351. TN_2raw <- FindVariableFeatures(TN_2raw)
  352. TN_2raw <- ScaleData(TN_2raw, split.by = "reference", do.center = FALSE)
  353. TN_2raw <- RunOptimizeALS(TN_2raw, k = 20, lambda = 5, split.by = "reference")
  354. TN_2raw <- RunQuantileNorm(TN_2raw, split.by = "reference")
  355. TN_2raw <- RunUMAP(TN_2raw, dims = 1:ncol(TN_2raw[["iNMF"]]), reduction = "iNMF")
  356. # %%
  357. save(TN_2raw, file = "/home/Data_Drive_8TB_2/BIOSYS/Pub_data/Liger_PD_TN_snu_20230822.Rdata")
  358. # %%
  359. DimPlot(TN_2raw,label = T,raster=FALSE) + NoLegend()
  360. # %%
  361. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/umap_ligar_PU_SNU_raw.png',width=200,height=200,units="mm")
  362. # %%
  363. Idents(TN_2raw) <- "cluster_names"
  364. # %%
  365. DimPlot(TN_2raw,raster=FALSE)
  366. # %%
  367. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/umap_ligar_PU_SNU.png',width=400,height=200,units="mm")
  368. # %%
  369. DimPlot(TN_2raw,raster=FALSE,label=T) + NoLegend()
  370. # %%
  371. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/umap_ligar_PU_SNU_label.png',width=200,height=200,units="mm")
  372. # %%
  373. DimPlot(TN_2raw, split.by = c("cluster_names"),ncol = 3,raster=FALSE) + NoLegend()
  374. # %%
  375. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/umap_ligar_PU_SNU_sc_label.png',width=400,height=400,units="mm")
  376. # %%
  377. DimPlot(TN_2raw, split.by = c("reference"),ncol = 2,raster=FALSE)
  378. # %%
  379. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/umap_ligar_PU_SNU_sp.png',width=500,height=200,units="mm")
  380. # %%
  381. DimPlot(TN_2raw, split.by = c("reference"),ncol = 2,raster=FALSE,label = T) + NoLegend()
  382. # %%
  383. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4/umap_ligar_PU_SNU_sp_label.png',width=400,height=200,units="mm")
  384. # %% [markdown]
  385. # ### Do alluvial plot
  386. # %%
  387. load("/home/Data_Drive_8TB_2/BIOSYS/Pub_data/Liger_PD_TN_snu_20230822.Rdata")
  388. # %%
  389. TN_2raw_snu <- subset(TN_2raw,reference==c("SNU"))
  390. TN_2raw_pu <- subset(TN_2raw,reference==c("PU"))
  391. # %%
  392. a <- [email hidden]$cluster_names
  393. b <- [email hidden]$clusters
  394. c <- [email hidden]$reference
  395. # %%
  396. matrix_raw = data.frame(a, b, c)
  397. colnames(matrix_raw) = c("cluster_names","clusters","reference")
  398. rm(a,b,c)
  399. # %%
  400. write.csv(matrix_raw,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/matrix_raw.csv')
  401. # %%
  402. matrix_raw_snu <- subset(matrix_raw,reference==c("SNU"))
  403. matrix_raw_pu <- subset(matrix_raw,reference==c("PU"))
  404. # %%
  405. write.csv(matrix_raw_snu,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/matrix_raw_snu.csv')
  406. write.csv(matrix_raw_pu,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/matrix_raw_pu.csv')
  407. # %%
  408. TN_2raw<-RunPCA(TN_2raw)
  409. TN_NH<-FindNeighbors(TN_2raw,k.param = 100,return.neighbor=TRUE)
  410. TN_NH_P <- data.frame()
  411. # %%
  412. for(i in 1:722){
  413. TN_NH_P <- rbind(TN_NH_P ,TopNeighbors(TN_NH[['RNA.nn']],cell=colnames(TN_2raw_snu)[i],n=100))
  414. }
  415. # %%
  416. colnames(TN_NH_P) = c(1:100)
  417. # %%
  418. write.csv(TN_NH_P,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/TN_Neighbors_top.csv')
  419. # %%
  420. TN_NH_M<-data.frame()
  421. # %%
  422. for(i in 1:722){
  423. TN_NH_M <- rbind(TN_NH_M,grep('^pPD',TN_NH_P[i,],value=TRUE)[1])
  424. }
  425. # %%
  426. colnames(TN_NH_M) = c("1")
  427. # %%
  428. write.csv(TN_NH_M,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/TN_Neighbors_PU_top.csv')
  429. # %%
  430. TN_NH_M_list<-TN_NH_M[,1]
  431. # %%
  432. rm(TN_2raw_snu)
  433. rm(TN_2raw)
  434. # %%
  435. write.csv(TN_2raw_pu$cluster_names,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/test_cluster.csv')
  436. # %%
  437. TN_PU_CN <- read.csv('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/test_cluster.csv')
  438. # %%
  439. TN_PU_CN_list=data.frame()
  440. # %%
  441. for (i in 1:722) {
  442. for (j in 1:113527) {
  443. if(TN_NH_M_list[i] == TN_PU_CN[,1][j]){
  444. TN_PU_CN_list<-rbind(TN_PU_CN_list,TN_PU_CN[,2][j])}
  445. }
  446. }
  447. # %%
  448. write.csv(TN_PU_CN_list,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/TN_Neighbors_matching_cell_name.csv')
  449. # %% [markdown]
  450. # ##### in this time, make file for plot by excel. next time i ll try ro r
  451. # %%
  452. test <- c("NC1","NC2","NC3","NC4","NC5","NC6","NC7","NC8","NC9","NC10","NC11")
  453. test2 <- c("Ligar_1","Ligar_2","Ligar_3","Ligar_4","Ligar_5","Ligar_6","Ligar_7","Ligar_8","Ligar_9","Ligar_10","Ligar_11","Ligar_12","Ligar_13","Ligar_14","Ligar_15","Ligar_16","Ligar_17","Ligar_18","Ligar_19","Ligar_20")
  454. test3 <- c("SOX6_AGTR1","SOX6_DDT","SOX6_GFRA2","SOX6_PART1","CALB1_TRHR","CALB1_CALCR","CALB1_PPP1R17","CALB1_CRYM_CCDC68","CALB1_GEM","CALB1_RBP4" ,"Ex_PPP1R1C","Ex_CYP2J2","Ex_SATB2","Ex_LAMP5_NTNG2" ,"Ex_LAMP5_BAIAP3","Ex_VWA5B1_CALB1","Ex_POSTN","Ex_OPRD1","Ex_EBF2_CTC-552D5.1","Ex_MYO5B","Inh_PAX5_VCAN","Inh_OTX2_CASR","Inh_IGFBP5","Inh_PAX5_CCBE1","Inh_PRLR_RP11-384J4.2","Inh_SIX3","Inh_INHBA")
  455. # %%
  456. a<-data.frame()
  457. for (i in 1:11) {
  458. for (j in 1:540) {
  459. a <- rbind(a,test[i])
  460. }
  461. }
  462. # %%
  463. b<-data.frame()
  464. for (i in 1:11) {
  465. for (l in 1:20) {
  466. for (j in 1:27) {
  467. b <- rbind(b,test2[l])
  468. }
  469. }
  470. }
  471. # %%
  472. c<-data.frame()
  473. for (j in 1:220) {
  474. for (i in 1:27) {
  475. c <- rbind(c,test3[i])
  476. }
  477. }
  478. # %%
  479. liger_list <- cbind(a,b,c)
  480. colnames(liger_list) = c("Snu_cluster","Ligar_cluster","PU_cluster")
  481. # %% [markdown]
  482. # #### cluster_number_check
  483. # %%
  484. TN_FN<-read.csv('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/matrix_raw_snu_pu_for_ligar.csv')
  485. # %%
  486. TN_FN_cnsnu <- TN_FN$cluster_names_snu
  487. TN_FN_lc <- TN_FN$clusters
  488. TN_FN_cnpu <- TN_FN$cluster_names_pu
  489. # %%
  490. matrix_TNF = data.frame(TN_FN_cnsnu, TN_FN_lc, TN_FN_cnpu)
  491. rm(TN_FN_cnsnu, TN_FN_lc, TN_FN_cnpu)
  492. # %%
  493. TR<-data.frame()
  494. for(i in 1:5940){
  495. TR<-rbind(TR,paste(liger_list$Snu_cluster[i],liger_list$Ligar_cluster[i],liger_list$PU_cluster[i]))
  496. }
  497. # %%
  498. TR2<-data.frame()
  499. for(i in 1:722){
  500. TR2<-rbind(TR2,paste(matrix_TNF$TN_FN_cnsnu[i],matrix_TNF$TN_FN_lc[i],matrix_TNF$TN_FN_cnpu[i]))
  501. }
  502. # %%
  503. d<-data.frame()
  504. for(i in 1:5940){
  505. d<-rbind(d,length(which(matrix_TNF$TN_FN_cnsnu==liger_list$Snu_cluster[i]&matrix_TNF$TN_FN_lc==liger_list$Ligar_cluster[i]&matrix_TNF$TN_FN_cnpu==liger_list$PU_cluster[i])))
  506. }
  507. # %%
  508. liger_list <- cbind(liger_list,d)
  509. colnames(liger_list) = c("Snu_cluster","Ligar_cluster","PU_cluster","Freq")
  510. write.csv(liger_list,file = '/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/End_matrix_file_for_ligar.csv')
  511. # %% [markdown]
  512. # #### draw plot
  513. # %%
  514. matrix_rpf_snu<-liger_list
  515. #matrix_rpf_snu<-read.csv('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/SC_ANZ_Result_data/step4_neuron/gene_list/ligar/End_matrix_file_for_ligar.csv')
  516. # %%
  517. ggplot(matrix_rpf_snu,aes(y = Freq, axis1 = Snu_cluster, axis2 = Ligar_cluster, axis3 = PU_cluster)) +
  518. geom_alluvium(aes(fill=Ligar_cluster),width = 1/20,show.legend = FALSE) +
  519. geom_stratum(width = 1/12, color = 'grey') +
  520. geom_text(stat = "stratum", aes(label = after_stat(stratum)), size= 8) +
  521. scale_x_discrete(limits = c("Snu_cluster","Ligar_cluster","PU_cluster"), expand = c(.1, .1))+
  522. theme_void()
  523. # %%
  524. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/riverplot_ligar_pu_snu_neuron.png',width=1200,height=1000,units="mm")
  525. # %% [markdown]
  526. # #### neuron cluster proporation
  527. # %%
  528. length(which([email hidden]$patient_state=='CON'))
  529. length(which([email hidden]$patient_state=='PD'))
  530. # %%
  531. length(which([email hidden]$cluster_names=='NC1'&[email hidden]$patient_state=='CON'))
  532. length(which([email hidden]$cluster_names=='NC2'&[email hidden]$patient_state=='CON'))
  533. length(which([email hidden]$cluster_names=='NC3'&[email hidden]$patient_state=='CON'))
  534. length(which([email hidden]$cluster_names=='NC4'&[email hidden]$patient_state=='CON'))
  535. length(which([email hidden]$cluster_names=='NC5'&[email hidden]$patient_state=='CON'))
  536. length(which([email hidden]$cluster_names=='NC6'&[email hidden]$patient_state=='CON'))
  537. length(which([email hidden]$cluster_names=='NC7'&[email hidden]$patient_state=='CON'))
  538. length(which([email hidden]$cluster_names=='NC8'&[email hidden]$patient_state=='CON'))
  539. length(which([email hidden]$cluster_names=='NC9'&[email hidden]$patient_state=='CON'))
  540. length(which([email hidden]$cluster_names=='NC10'&[email hidden]$patient_state=='CON'))
  541. length(which([email hidden]$cluster_names=='NC11'&[email hidden]$patient_state=='CON'))
  542. # %%
  543. length(which([email hidden]$cluster_names=='NC1'&[email hidden]$patient_state=='PD'))
  544. length(which([email hidden]$cluster_names=='NC2'&[email hidden]$patient_state=='PD'))
  545. length(which([email hidden]$cluster_names=='NC3'&[email hidden]$patient_state=='PD'))
  546. length(which([email hidden]$cluster_names=='NC4'&[email hidden]$patient_state=='PD'))
  547. length(which([email hidden]$cluster_names=='NC5'&[email hidden]$patient_state=='PD'))
  548. length(which([email hidden]$cluster_names=='NC6'&[email hidden]$patient_state=='PD'))
  549. length(which([email hidden]$cluster_names=='NC7'&[email hidden]$patient_state=='PD'))
  550. length(which([email hidden]$cluster_names=='NC8'&[email hidden]$patient_state=='PD'))
  551. length(which([email hidden]$cluster_names=='NC9'&[email hidden]$patient_state=='PD'))
  552. length(which([email hidden]$cluster_names=='NC10'&[email hidden]$patient_state=='PD'))
  553. length(which([email hidden]$cluster_names=='NC11'&[email hidden]$patient_state=='PD'))
  554. # %%
  555. total_file <- read.table("/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/proportion_data/neuron_cell_proportion_2.txt", sep="\t", header = T, as.is = T, check.names = F)
  556. # %%
  557. ofp <- ggplot(data=total_file, aes(x=cohort,y=cell_population,fill=factor(cluster_name)),colo) + theme(text = element_text(size = 20)) + geom_bar(colour="black",stat='identity', width = 0.5,position="fill")+ scale_fill_manual("legend", values = c('NC1'= '#F8766D','NC2' = '#DB8E00','NC3' = '#AEA200','NC4' = '#64B200','NC5' = '#00BD5C','NC6' = '#00C1A7','NC7' = '#00BADE','NC8' = '#00A6FF','NC9' = '#B385FF','NC10' = '#EF67EB','NC11' = '#FF63B6')) + ggtitle(" ") + xlab(" ") + ylab(" ") + labs(fill = " ")+ theme_bw()+ theme(panel.border = element_blank(), panel.grid.major = element_blank(),
  558. panel.grid.minor = element_blank(), axis.line = element_line(colour = "black")) + scale_y_continuous(expand = c(0, 0)) + theme(text = element_text(size = 15,face = 'bold')) #+ theme(legend.position="top")
  559. ofp
  560. # %%
  561. P_levels <- c('NC1','NC2','NC3','NC4','NC5','NC6','NC7','NC8','NC9','NC10','NC11')
  562. # %%
  563. ofp$data$cluster_name <- factor(ofp$data$cluster_name, levels = P_levels)
  564. ofp
  565. # %%
  566. ggsave('/home/Data_Drive_8TB_2/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/cell_proporation_tmp_graph.png',width=200,height=200,units="mm")
  567. # %%
  568. ofp <- ggplot(data=total_file, aes(x=cluster_name,y=cell_population,fill=factor(cohort))) + geom_bar(colour="black",stat='identity', width = 0.7,position="fill") + ggtitle(" ") + xlab(" ") + ylab(" ") + labs(fill = " ") + theme_bw()+ theme(panel.border = element_blank(), panel.grid.major = element_blank(),
  569. panel.grid.minor = element_blank(), axis.line = element_line(colour = "black")) + scale_y_continuous(expand = c(0, 0)) + theme(text = element_text(size = 6)) #+ theme(legend.position="top")
  570. ofp
  571. # %%
  572. factor(ofp$data$cluster_name)
  573. # %%
  574. P_levels <- c('NC1','NC2','NC3','NC4','NC5','NC6','NC7','NC8','NC9','NC10','NC11')
  575. # %%
  576. ofp$data$cluster_name <- factor(ofp$data$cluster_name, levels = P_levels)
  577. ofp
  578. # %%
  579. ggsave('/Volumes/BIOSYS/SNUH_PD_Raw/SubNa_SNUH/Result_image/step4_neuron/cell_proporation_graph_total.png',width=100,height=60,units="mm")
  580. # %% [markdown]
  581. # #### neuron cluster colors
  582. # %%
  583. require(scales)
  584. identities <- levels(neuron$seurat_clusters)
  585. my_color_palette <- hue_pal()(length(identities))
  586. # %%
  587. identities <- levels(neuron$seurat_clusters)
  588. my_color_palette <- hue_pal()(length(identities))
  589. my_color_palette

Step4_SNpc_PD_data_neuron_cluster_anz_norm.ipynb at commit e99fd06, no license · at the source

Overview

  1. Department of Pathology, Seoul National University Hospital, College of Medicine,Seoul, Republic of Korea
  2. Brain Bank, Seoul National University Hospital,Seoul, Republic of Korea
  3. School of Systems Biomedical Science, Soongsil University,Seoul, Republic of Korea
  4. Department of Bioinformatics, Soongsil University,Seoul, Republic of Korea
  5. Neuroscience Research Institute, Seoul National University, College of Medicine,Seoul, Republic of Korea
Institutions: Seoul National University Hospital (South Korea); Soongsil University (South Korea); Seoul National University (South Korea)
Journal: Signal transduction and targeted therapy, volume 11, issue 1, article 468
Dates: received 12 August 2025; accepted 11 May 2026; published online 26 October 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41392-026-02794-2 · PMID 42928249 · PMCID PMC13696728 · OpenAlex W7223560604
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), human (organism), Alzheimer's / dementia (population), Parkinson's (population), cellular / molecular (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: Molecular neuroscience, Diseases of the nervous system
MeSH: Mesencephalon*, Parkinson Disease*, Transcriptome*, Aged, alpha-Synuclein, Astrocytes, Dopaminergic Neurons, Female, Gene Regulatory Networks, Genome-Wide Association Study, Humans, Lewy Body Disease, Male, Microglia, Middle Aged, Substantia Nigra (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: Research of Korea Disease Control and Prevention Agency (grant number: 2023-ER1005-01), Korean Ministry of Health and Welfare's Program for Institution of Corpse-derived substance supply (grant number: 2024-437); Ministry of Health & Welfare and Ministry of Science and ICT (MSIT), Republic of Korea (grant number: RS-2022-KH127042); National Research Foundation of Korea (NRF) grant funded by the Korea government MSIT (grant number: RS-2022-NR072380)
Citations: not cited yet (Europe PMC); 65 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.

Repository

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

whistle-ch0i/SNUH_PD_analysis

License: none: the authors keep all their rights
State: the link answers, verified on 27 October 2026
Evidence: files inventoried
Commit: e99fd06b025ff019d197d80a9a5857b769dfeca1, 23 December 2025
Languages: Jupyter (21), R (18), Python (4)
Size: 57 files, 43 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, 21 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (8 files), Seurat (7 files), ggplot2 (6 files), igraph (3 files), Monocle 3 (3 files), pheatmap (3 files), pandas (2 files), patchwork (2 files), anndata (1 file), circlize (1 file), ComplexHeatmap (1 file), DESeq2 (1 file), NumPy (1 file), Scanpy (1 file), scVelo (1 file)
Availability: 1 check, the latest on 27 October 2026: the link answers
  • 27 October 2026: the link answers
10 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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 10 scripts, each with its path and the digest of its content;
  • 5 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.

Code and data availability statement

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

Read it in the paper: doi.org/10.1038/s41392-026-02794-2.

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 October 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 2 keywords, 16 MeSH terms, 3 funders, 64 references.

Cite

This paper

Yoo, S., Lee, K., Seo, J., Choi, H., Kim, S.-I., Chang, J., Shim, Y.-M., Kim, J., Won, J.-K., & Park, S.-H. (2026). Spatiotemporally resolved single-nucleus transcriptomics reveals cellular and regional vulnerability in the midbrain in Parkinson's disease. Signal transduction and targeted therapy, 11(1), 468. https://doi.org/10.1038/s41392-026-02794-2

BibTeX

@article{yoo2026spatiotemporally,
author = {Yoo, Sooyeon and Lee, Kwanghoon and Seo, Junseo and Choi, Hwisoo and Kim, Seong-Ik and Chang, Junyoung and Shim, Yu-Mi and Kim, Junil and Won, Jae-Kyung and Park, Sung-Hye},
title = {{Spatiotemporally resolved single-nucleus transcriptomics reveals cellular and regional vulnerability in the midbrain in Parkinson's disease}},
journal = {Signal transduction and targeted therapy},
year = {2026},
month = oct,
volume = {11},
number = {1},
pages = {468},
publisher = {Nature Publishing Group},
issn = {2095-9907},
doi = {10.1038/s41392-026-02794-2},
url = {https://doi.org/10.1038/s41392-026-02794-2},
pmid = {42928249},
pmcid = {PMC13696728}
}

RIS

TY - JOUR
AU - Yoo, Sooyeon
AU - Lee, Kwanghoon
AU - Seo, Junseo
AU - Choi, Hwisoo
AU - Kim, Seong-Ik
AU - Chang, Junyoung
AU - Shim, Yu-Mi
AU - Kim, Junil
AU - Won, Jae-Kyung
AU - Park, Sung-Hye
TI - Spatiotemporally resolved single-nucleus transcriptomics reveals cellular and regional vulnerability in the midbrain in Parkinson's disease
T2 - Signal transduction and targeted therapy
J2 - Signal Transduct Target Ther
PY - 2026
DA - 2026/10/26
VL - 11
IS - 1
SP - 468
SN - 2095-9907
PB - Nature Publishing Group
DO - 10.1038/s41392-026-02794-2
UR - https://doi.org/10.1038/s41392-026-02794-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41392-026-02794-2",
"type": "article-journal",
"title": "Spatiotemporally resolved single-nucleus transcriptomics reveals cellular and regional vulnerability in the midbrain in Parkinson's disease",
"container-title": "Signal transduction and targeted therapy",
"author": [
{
"family": "Yoo",
"given": "Sooyeon"
},
{
"family": "Lee",
"given": "Kwanghoon"
},
{
"family": "Seo",
"given": "Junseo"
},
{
"family": "Choi",
"given": "Hwisoo"
},
{
"family": "Kim",
"given": "Seong-Ik"
},
{
"family": "Chang",
"given": "Junyoung"
},
{
"family": "Shim",
"given": "Yu-Mi"
},
{
"family": "Kim",
"given": "Junil"
},
{
"family": "Won",
"given": "Jae-Kyung"
},
{
"family": "Park",
"given": "Sung-Hye"
}
],
"container-title-short": "Signal Transduct Target Ther",
"volume": "11",
"issue": "1",
"page": "468",
"DOI": "10.1038/s41392-026-02794-2",
"PMID": "42928249",
"PMCID": "PMC13696728",
"ISSN": "2095-9907",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41392-026-02794-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
10,
26
]
]
}
}

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.isci.2026.114674 [code]
Single-cell transcriptomics revealed molecular vulnerability in a human midbrain-like organoid model of Parkinson's disease.
Journal: iScience
In common: scVelo, Monocle 3, anndata, 12 other tools, Parkinson's, genetics / omics, cellular / molecular, 7 references
[2] 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: scVelo, Monocle 3, anndata, 12 other tools, genetics / omics, cellular / molecular, 9 references
[3] doi:10.1016/j.celrep.2024.115149 [code]
Single-nucleus and spatial landscape of the sub-ventricular zone in human glioblastoma.
Journal: Cell reports
In common: scVelo, Monocle 3, anndata, 12 other tools, cellular / molecular, 4 references
[4] doi:10.1016/j.isci.2026.115399 [code]
Molecular signatures of cell diversity modulated by long noncoding RNAs in the human fetal spinal cord.
Journal: iScience
In common: scVelo, Monocle 3, anndata, 10 other tools, genetics / omics, 6 references
[5] doi:10.1038/s41467-026-71525-6 [code]
Single-nucleus brain transcriptomics reveals microglia dysfunction in multiple system atrophy.
Journal: Nature communications
In common: scVelo, anndata, circlize, 7 other tools, Parkinson's, genetics / omics, cellular / molecular, 8 references
[6] doi:10.1038/s41467-025-67779-1 [code]
An in vivo and in vitro spatiotemporal profile of human midbrain development.
Journal: Nature communications
In common: scVelo, Monocle 3, anndata, 11 other tools, genetics / omics, cellular / molecular, 4 references
[7] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: scVelo, anndata, circlize, 10 other tools, genetics / omics, cellular / molecular, 5 references
[8] doi:10.1016/j.crmeth.2023.100498 [code]
hdWGCNA identifies co-expression networks in high-dimensional transcriptomics data.
Journal: Cell reports methods
In common: scVelo, Monocle 3, anndata, 9 other tools, Alzheimer's / dementia, genetics / omics, cellular / molecular, 6 references
[9] doi:10.3389/fcell.2022.884748 [code]
Single-cell and single-nuclei RNA sequencing as powerful tools to decipher cellular heterogeneity and dysregulation in neurodegenerative diseases.
Journal: Frontiers in cell and developmental biology
In common: Monocle 3, anndata, Scanpy, 5 other tools, Parkinson's, Alzheimer's / dementia, genetics / omics, 1 other category, 11 references
[10] doi:10.1038/s41587-024-02241-z [code]
Tracking single-cell evolution using clock-like chromatin accessibility loci.
Journal: Nature biotechnology
In common: scVelo, Monocle 3, anndata, 10 other tools, genetics / omics, 4 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.1038/s41392-026-02794-2.svg)](https://openscicode.org/badge/doi/10.1038/s41392-026-02794-2)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41392-026-02794-2.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41392-026-02794-2
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41392-026-02794-2"><img src="https://openscicode.org/badge/doi/10.1038/s41392-026-02794-2.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.