OSCR

Spindle neurons in human cortex possess distinctive firing properties and transcriptomic signatures.

Code ↔ Paper

16 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 16 matches
  1. [1] § Results › SPNs transcriptomically belong to IT/ET clusters ↔ mapping.ipynb, lines 363–374 · score 0.91 · LINC00507 FREM3, THEMIS C1QL3, Exc L2, FEZF2 SCN4B, Exc L4, Exc L5
  2. [2] § Methods › Differential gene expression analysis ↔ VEN submission.R, lines 1127–1214 · score 0.79 · FindAllMarkers, FindMarkers, logfc.threshold, min.pct, COSG, subtypes
  3. [3] § Methods › Statistics and reproducibility ↔ Figure 4/Code_subthresWave_new.m, lines 111–200 · score 0.71 · Wilcoxon rank sum, Shapiro Wilk, MATLAB, error
  4. [4] § Methods › Quality control of the patch-seq data ↔ VEN submission.R, lines 1–83 · score 0.70 · GABAergic, human MTG, gene expression, exon, glutamatergic, matrix
  5. [5] § Results › SPNs transcriptomically belong to IT/ET clusters ↔ VEN submission.R, lines 1360–1430 · score 0.67 · cellular component, biological process, molecular function, GO, enriched, enrichment
  6. [6] § Results › Molecular fingerprint of SPNs ↔ VEN submission.R, lines 1127–1214 · score 0.66 · POU3F1, CACNA1H, ADRA1A, Spearman, subtypes, SULF2
  7. [7] § Methods › Feature selection for SPNs ↔ feature_select_step1.ipynb, lines 65–76 · score 0.66 · random forest classifier, feature selection, Boruta
  8. [8] § Methods › Feature selection for SPNs ↔ feature_select_step2.ipynb, lines 94–107 · score 0.66 · random forest classifier, feature selection, Boruta
  9. [9] § Results › SPNs transcriptomically belong to IT/ET clusters ↔ VEN submission.R, lines 761–847 · score 0.64 · CACNA1H, min.pct, ontology, KEGG, GO, DEGs
  10. [10] § Results › SPNs are transcriptomically distinct from nearby TRI/PCs ↔ VEN submission.R, lines 761–847 · score 0.63 · POU3F1, SCN4B, GRIK2, SYT2, NPTX1, ridge
  11. [11] § Methods › Patch-seq sample mapping ↔ mapping.ipynb, lines 240–264 · score 0.60 · mapping probability, bootstrapped, iterations, root, tree, correlation
  12. [12] § Methods › GO and KEGG enrichment analyses ↔ VEN submission.R, lines 1037–1124 · score 0.57 · clusterProfiler, simplified, KEGG, cutoff, GO, enriched
  13. [13] § Methods › Clustering patch-seq data ↔ VEN submission.R, lines 672–758 · score 0.53 · Seurat, dimensional, PCA, HVGs, log2, UMAP
  14. [14] § Results › Molecular fingerprint of SPNs ↔ VEN submission.R, lines 1270–1308 · score 0.52 · hdWGCNA, co expression, modules, network, gene
  15. [15] § Methods › RNA-seq ↔ src/knownadapters.h, lines 71–130 · score 0.52 · Kit V2, primer, mix, PCR, Illumina, RNA
  16. [16] § Results › SPNs show overall ET-like electrophysiology but differ in morphology ↔ Figure 3/Code_FIcurve_statistic_Etype.m, lines 356–439 · score 0.52 · Kruskal Wallis, AP waveform parameters, SEM, Figure 3, cell

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 1,434 lines · 75 KB · no license · 9 matches

  1. suppressPackageStartupMessages({
  2. library(Seurat)
  3. library(cowplot)
  4. library(ggplot2)
  5. library(ggsci)
  6. library(dplyr)
  7. library(psych)
  8. library(pheatmap)
  9. library(clusterProfiler)
  10. library(AnnotationDbi)
  11. library(org.Hs.eg.db)
  12. library(DOSE)
  13. library(GOSemSim)
  14. library(enrichplot)
  15. library(patchwork)
  16. library(gridExtra)
  17. library(data.table)
  18. library(tidyverse)
  19. library(AnnoProbe)
  20. library(VENcelltypes)
  21. library(feather)
  22. library(matrixStats)
  23. library(edgeR)
  24. library(GenomicFeatures)
  25. library(parallel)
  26. library(COSG)
  27. library(WGCNA)
  28. library(hdWGCNA)
  29. library(scPred)
  30. library(magrittr)
  31. library(plot1cell)
  32. library(EnhancedVolcano)
  33. library(viridis)
  34. library(msigdbr)
  35. library(GSVA)
  36. library(SCENIC)
  37. library(report)
  38. library(enrichR)
  39. library(igraph)
  40. library(JASPAR2020)
  41. library(JASPAR2024)
  42. library(motifmatchr)
  43. library(TFBSTools)
  44. library(EnsDb.Hsapiens.v86)
  45. library(BSgenome.Hsapiens.UCSC.hg38)
  46. library(GenomicRanges)
  47. library(xgboost)
  48. })
  49. rm(list = ls())
  50. options(stringsAsFactors = FALSE)
  51. # loading reference (2018 nature MTG)
  52. MTG18_exon <- fread("reference/Human MTG 2018/human_MTG_gene_expression_matrices_2018-06-14/human_MTG_2018-06-14_exon-matrix.csv", header = T, data.table = F)
  53. MTG18_exon <- column_to_rownames(MTG18_exon, var = "V1")
  54. MTG18_gene_info <- read.csv(file = "reference/Human MTG 2018/human_MTG_gene_expression_matrices_2018-06-14/human_MTG_2018-06-14_genes-rows.csv", header = TRUE)
  55. table(duplicated(MTG18_gene_info$gene))
  56. table(duplicated(MTG18_gene_info$entrez_id))
  57. MTG18_meta.data <- read.csv(file = "reference/Human MTG 2018/human_MTG_gene_expression_matrices_2018-06-14/human_MTG_2018-06-14_samples-columns.csv", header = TRUE)
  58. table(MTG18_meta.data$class)
  59. ## GABAergic Glutamatergic no class Non-neuronal
  60. ## 4164 10525 325 914
  61. txdb <- makeTxDbFromGFF(file = "reference/Human MTG 2018/rsem_GRCh38.p2.gtf/rsem_GRCh38.p2.gtf", format = "gtf")
  62. exons.list.per.gene <- exonsBy(txdb, by = "gene")
  63. gene_len_from_exon <- sum(width(exons.list.per.gene))
  64. gene_len_from_exon <- data.frame(ENTREZID = names(gene_len_from_exon), length = as.numeric(gene_len_from_exon))
  65. MTG18_exons.counts <- subset(MTG18_exon, rownames(MTG18_exon) %in% gene_len_from_exon$ENTREZID)
  66. dim(MTG18_exons.counts)
  67. ## [1] 50267 15928
  68. gene_len_sub = gene_len_from_exon[match(rownames(MTG18_exons.counts), gene_len_from_exon$ENTREZID), ]
  69. gene_len_sub = data.frame(length = gene_len_sub$length, row.names = gene_len_sub$ENTREZID)
  70. head(gene_len_sub)
  71. identical(rownames(MTG18_exons.counts), rownames(gene_len_sub))
  72. counts_to_TPM <- function(counts, geneLength) {
  73. rpk <- counts / geneLength
  74. scaling_factor <- colSums(rpk, na.rm = TRUE)
  75. tpm <- sweep(rpk, 2, scaling_factor, "/") * 1e6
  76. tpm[, scaling_factor == 0] <- NA
  77. return(tpm)
  78. }
  79. MTG18_TPM <- counts_to_TPM(MTG18_exons.counts, gene_len_sub$length)
  80. colSums(MTG18_TPM)
  81. MTG18_TPM[4:8,4:8]
  82. rownames(MTG18_TPM) <- MTG18_gene_info[match(rownames(MTG18_TPM), MTG18_gene_info$entrez_id), 1]
  83. identical(colnames(MTG18_TPM), MTG18_meta.data$sample_name)
  84. ## prepare MTG18GluN ref data for celltype mapping
  85. MTG18GluN_meta.data <- subset(MTG18_meta.data, class == "Glutamatergic")
  86. MTG18GluN_TPM <- MTG18_TPM[,MTG18GluN_meta.data$sample_name]
  87. dim(MTG18GluN_TPM)
  88. #[1] 50267 10525
  89. identical(colnames(MTG18GluN_TPM), MTG18GluN_meta.data$sample_name)
  90. MTG18GluN <- CreateSeuratObject(counts = log2(MTG18GluN_TPM + 1), project = "MTG18GluN", min.cells = 1)
  91. MTG18GluN_TPM4mapping <- MTG18GluN@assays$RNA@counts
  92. write.table(MTG18GluN_TPM4mapping, file = "MTG18GluN_TPM4mapping.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  93. ## Identify ON and OFF markers
  94. MTG18ref_meta.data <- subset(MTG18_meta.data, !class %in% "no class")
  95. MTG18ref_meta.data <- subset(MTG18ref_meta.data, !(brain_subregion %in% c("L1", "L2", "L3") & class == "Glutamatergic"))
  96. table(MTG18ref_meta.data$class)
  97. ## GABAergic Glutamatergic Non-neuronal
  98. ## 4164 6861 914
  99. table(MTG18ref_meta.data$cluster)
  100. MTG18ref_meta.data$cell_type <- MTG18ref_meta.data$cluster
  101. MTG18ref_meta.data$cell_type <- sub("\\s.*", "", MTG18ref_meta.data$cell_type)
  102. table(MTG18ref_meta.data$cell_type)
  103. ## Astro Endo Exc Inh Micro Oligo OPC
  104. ## 291 9 6861 4164 63 313 238
  105. MTG18.refdata <- MTG18_TPM[,MTG18ref_meta.data$sample_name]
  106. MTG18_ref <- CreateSeuratObject(counts = log2(MTG18.refdata + 1), project = "MTG18_ref", min.cells = 1)
  107. MTG18_ref$cell_type <- MTG18ref_meta.data[match(colnames(MTG18.refdata), MTG18ref_meta.data$sample_name), 35]
  108. MTG18_ref
  109. ## An object of class Seurat
  110. ## 47991 features across 11939 samples within 1 assay
  111. ## Active assay: RNA (47991 features, 0 variable features)
  112. Idents(MTG18_ref) <- "cell_type"
  113. MTG18_Allmarkers <- FindAllMarkers(MTG18_ref, only.pos = TRUE, min.pct = 0.9, logfc.threshold = 3.2)
  114. ON_proportion <- rowSums(MTG18.refdata > 10) / ncol(MTG18.refdata)
  115. ON_matrix <- MTG18.refdata[ON_proportion > 0.75, ]
  116. cat("Ori_gene:", nrow(MTG18.refdata), "\n")
  117. cat("filtered_gene:", nrow(ON_matrix), "\n")
  118. cat("filtered_gene_example:", head(rownames(ON_matrix)), "\n")
  119. MTG_deepPC_ONmarkers <- subset(MTG18_Allmarkers, !rownames(MTG18_Allmarkers) %in% rownames(ON_matrix))
  120. MTG_deepPC_ONmarkers <- subset(MTG_deepPC_ONmarkers, cluster == "Exc")
  121. table(duplicated(MTG_deepPC_ONmarkers$gene))
  122. MTG_deepPC_ONmarkers_AverExp <- MTG18.refdata[MTG_deepPC_ONmarkers$gene,]
  123. MTG18deepPC_ID <- subset(MTG18ref_meta.data, cell_type == "Exc")
  124. MTG_deepPC_ONmarkers_AverExp <- MTG_deepPC_ONmarkers_AverExp[,MTG18deepPC_ID$sample_name]
  125. MTG_deepPC_ONmarkers_AverExp <- as.data.frame(rowMeans(MTG_deepPC_ONmarkers_AverExp, na.rm = TRUE))
  126. MTG_deepPC_ONmarkers_AverExp <- subset(MTG_deepPC_ONmarkers_AverExp, MTG_deepPC_ONmarkers_AverExp > 100)
  127. MTG_deepPC_ONmarkers <- subset(MTG_deepPC_ONmarkers, rownames(MTG_deepPC_ONmarkers) %in% rownames(MTG_deepPC_ONmarkers_AverExp))
  128. Astro_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "Astro", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  129. Endo_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "Endo", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  130. Micro_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "Micro", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  131. Oligo_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "Oligo", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  132. OPC_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "OPC", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  133. Inh_OFF_markers <- FindMarkers(MTG18_ref, ident.1 = "Inh", ident.2 = "Exc", only.pos = TRUE, logfc.threshold = 3.2)
  134. Astro_OFF_markers <- subset(Astro_OFF_markers, pct.2 < 0.1)
  135. Endo_OFF_markers <- subset(Endo_OFF_markers, pct.2 < 0.1)
  136. Micro_OFF_markers <- subset(Micro_OFF_markers, pct.2 < 0.1)
  137. Oligo_OFF_markers <- subset(Oligo_OFF_markers, pct.2 < 0.1)
  138. OPC_OFF_markers <- subset(OPC_OFF_markers, pct.2 < 0.1)
  139. Inh_OFF_markers <- subset(Inh_OFF_markers, pct.2 < 0.1)
  140. Astro_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Astro")
  141. Astro_OFF_matrix <- MTG18.refdata[,Astro_OFF_matrix$sample_name]
  142. Astro_OFF_proportion <- rowSums(Astro_OFF_matrix < 10) / ncol(Astro_OFF_matrix)
  143. Astro_OFF_matrix <- Astro_OFF_matrix[Astro_OFF_proportion > 0.5, ]
  144. Astro_OFF_markers <- subset(Astro_OFF_markers, !rownames(Astro_OFF_markers) %in% rownames(Astro_OFF_matrix))
  145. Endo_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Endo")
  146. Endo_OFF_matrix <- MTG18.refdata[,Endo_OFF_matrix$sample_name]
  147. Endo_OFF_proportion <- rowSums(Endo_OFF_matrix < 10) / ncol(Endo_OFF_matrix)
  148. Endo_OFF_matrix <- Endo_OFF_matrix[Endo_OFF_proportion > 0.5, ]
  149. Endo_OFF_markers <- subset(Endo_OFF_markers, !rownames(Endo_OFF_markers) %in% rownames(Endo_OFF_matrix))
  150. Micro_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Micro")
  151. Micro_OFF_matrix <- MTG18.refdata[,Micro_OFF_matrix$sample_name]
  152. Micro_OFF_proportion <- rowSums(Micro_OFF_matrix < 10) / ncol(Micro_OFF_matrix)
  153. Micro_OFF_matrix <- Micro_OFF_matrix[Micro_OFF_proportion > 0.5, ]
  154. Micro_OFF_markers <- subset(Micro_OFF_markers, !rownames(Micro_OFF_markers) %in% rownames(Micro_OFF_matrix))
  155. Oligo_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Oligo")
  156. Oligo_OFF_matrix <- MTG18.refdata[,Oligo_OFF_matrix$sample_name]
  157. Oligo_OFF_proportion <- rowSums(Oligo_OFF_matrix < 10) / ncol(Oligo_OFF_matrix)
  158. Oligo_OFF_matrix <- Oligo_OFF_matrix[Oligo_OFF_proportion > 0.5, ]
  159. Oligo_OFF_markers <- subset(Oligo_OFF_markers, !rownames(Oligo_OFF_markers) %in% rownames(Oligo_OFF_matrix))
  160. OPC_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "OPC")
  161. OPC_OFF_matrix <- MTG18.refdata[,OPC_OFF_matrix$sample_name]
  162. OPC_OFF_proportion <- rowSums(OPC_OFF_matrix < 10) / ncol(OPC_OFF_matrix)
  163. OPC_OFF_matrix <- OPC_OFF_matrix[OPC_OFF_proportion > 0.5, ]
  164. OPC_OFF_markers <- subset(OPC_OFF_markers, !rownames(OPC_OFF_markers) %in% rownames(OPC_OFF_matrix))
  165. Inh_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Inh")
  166. Inh_OFF_matrix <- MTG18.refdata[,Inh_OFF_matrix$sample_name]
  167. Inh_OFF_proportion <- rowSums(Inh_OFF_matrix < 10) / ncol(Inh_OFF_matrix)
  168. Inh_OFF_matrix <- Inh_OFF_matrix[Inh_OFF_proportion > 0.5, ]
  169. Inh_OFF_markers <- subset(Inh_OFF_markers, !rownames(Inh_OFF_markers) %in% rownames(Inh_OFF_matrix))
  170. Glu_OFF_matrix <- subset(MTG18ref_meta.data, cell_type == "Exc")
  171. Glu_OFF_matrix <- MTG18.refdata[,Glu_OFF_matrix$sample_name]
  172. Glu_OFF_proportion <- rowSums(Glu_OFF_matrix > 10) / ncol(Glu_OFF_matrix)
  173. Glu_OFF_matrix <- Glu_OFF_matrix[Glu_OFF_proportion > 0.33, ]
  174. Astro_OFF_markers <- subset(Astro_OFF_markers, !rownames(Astro_OFF_markers) %in% rownames(Glu_OFF_matrix))
  175. Endo_OFF_markers <- subset(Endo_OFF_markers, !rownames(Endo_OFF_markers) %in% rownames(Glu_OFF_matrix))
  176. Micro_OFF_markers <- subset(Micro_OFF_markers, !rownames(Micro_OFF_markers) %in% rownames(Glu_OFF_matrix))
  177. Oligo_OFF_markers <- subset(Oligo_OFF_markers, !rownames(Oligo_OFF_markers) %in% rownames(Glu_OFF_matrix))
  178. OPC_OFF_markers <- subset(OPC_OFF_markers, !rownames(OPC_OFF_markers) %in% rownames(Glu_OFF_matrix))
  179. Inh_OFF_markers <- subset(Inh_OFF_markers, !rownames(Inh_OFF_markers) %in% rownames(Glu_OFF_matrix))
  180. MTG_deepPC_ONmarkers$cluster <- "Exc on"
  181. Astro_OFF_markers$cluster <- "Ast"
  182. Astro_OFF_markers$gene <- rownames(Astro_OFF_markers)
  183. Endo_OFF_markers$cluster <- "End"
  184. Endo_OFF_markers$gene <- rownames(Endo_OFF_markers)
  185. Micro_OFF_markers$cluster <- "Mic"
  186. Micro_OFF_markers$gene <- rownames(Micro_OFF_markers)
  187. Oligo_OFF_markers$cluster <- "Oli"
  188. Oligo_OFF_markers$gene <- rownames(Oligo_OFF_markers)
  189. OPC_OFF_markers$cluster <- "OPC"
  190. OPC_OFF_markers$gene <- rownames(OPC_OFF_markers)
  191. Inh_OFF_markers$cluster <- "Inh"
  192. Inh_OFF_markers$gene <- rownames(Inh_OFF_markers)
  193. MTG18deepPC_ONOFF_markers <- rbind(MTG_deepPC_ONmarkers, Astro_OFF_markers, Endo_OFF_markers, Micro_OFF_markers, Oligo_OFF_markers, OPC_OFF_markers, Inh_OFF_markers)
  194. table(duplicated(MTG18deepPC_ONOFF_markers$gene))
  195. ## FALSE TRUE
  196. ## 182 22
  197. duplicate_rows <- MTG18deepPC_ONOFF_markers[duplicated(MTG18deepPC_ONOFF_markers$gene), ]
  198. dup_markers <- unique(duplicate_rows$gene)
  199. MTG18_dup_markers_Exp <- as.data.frame(AverageExpression(MTG18_ref, features = dup_markers, assays = "RNA", slot = "counts"))
  200. Astro_OFF_markers <- subset(Astro_OFF_markers, !gene %in% c("HTRA1", "FGFR2", "PLEKHB1"))
  201. Endo_OFF_markers <- subset(Endo_OFF_markers, !gene %in% c("MT2A", "SLC7A11"))
  202. OPC_OFF_markers <- subset(OPC_OFF_markers, !gene %in% c("S100B", "COL9A2", "PLLP", "PON2", "DOCK10"))
  203. Micro_OFF_markers <- subset(Micro_OFF_markers, !gene %in% c("TLR4", "SLC1A3", "HTRA1", "SPP1"))
  204. Oligo_OFF_markers <- subset(Oligo_OFF_markers, !gene %in% c("HTRA1", "NDRG2", "S100B", "TSC22D4", "BCAS1", "OLIG1"))
  205. Inh_OFF_markers <- subset(Inh_OFF_markers, !gene %in% c("DOCK10", "ZNF536"))
  206. MTG18deepPC_ONOFF_markers_unique <- rbind(MTG_deepPC_ONmarkers, Astro_OFF_markers, Endo_OFF_markers, Micro_OFF_markers, Oligo_OFF_markers, OPC_OFF_markers, Inh_OFF_markers)
  207. # loading data for cell type mapping
  208. patchseq.data.1 <- fread("data/NCBI ID feature_counts 1.csv", header = T, data.table = F)
  209. patchseq.data.2 <- fread("data/NCBI ID feature_counts 2.csv", header = T, data.table = F)
  210. patchseq.data <- merge(patchseq.data.1[,1:116], patchseq.data.2[,1:16], by = "gene_id", all = TRUE)
  211. table(duplicated(patchseq.data$gene_id))
  212. ## FALSE
  213. ## 48354
  214. table(duplicated(patchseq.data.1$gene_name))
  215. ## FALSE TRUE
  216. ## 44091 4263
  217. patchseq.count <- column_to_rownames(patchseq.data, var = "gene_id")
  218. geneid_efflen <- subset(patchseq.data.1, select = c("gene_id", "gene_length"))
  219. colnames(geneid_efflen) <- c("geneid", "efflen")
  220. efflen <- geneid_efflen[match(rownames(patchseq.count), geneid_efflen$geneid), "efflen"]
  221. counts2TPM <- function(count = patchseq.count, efflength = efflen){
  222. RPK <- count/(efflength/1000)
  223. PMSC_rpk <- sum(RPK)/1e6
  224. RPK/PMSC_rpk
  225. }
  226. patchseq.TPM <- as.data.frame(apply(patchseq.count, 2, counts2TPM))
  227. colSums(patchseq.TPM)
  228. NCBI_gene_symbol <- patchseq.data.1[match(rownames(patchseq.count), patchseq.data.1$gene_id), "gene_name"]
  229. table(duplicated(NCBI_gene_symbol))
  230. patchseq.count <- aggregate(patchseq.count, by = list(NCBI_gene_symbol), FUN = sum)
  231. patchseq.count$Group.1 <- gsub("\t", "", patchseq.count$Group.1)
  232. patchseq.count <- column_to_rownames(patchseq.count,'Group.1')
  233. patchseq.TPM <- aggregate(patchseq.TPM, by = list(NCBI_gene_symbol), FUN = sum)
  234. patchseq.TPM$Group.1 <- gsub("\t", "", patchseq.TPM$Group.1)
  235. patchseq.TPM <- column_to_rownames(patchseq.TPM,'Group.1')
  236. head(patchseq.TPM)
  237. ## QC for patch-seq mapping data (calculate contamination score)
  238. MTG18deepPC4score <- subset(MTG18_ref, ident = "Exc")
  239. MTG18deepPC4score <- MTG18deepPC4score@assays$RNA@counts
  240. PC_Ast.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(Astro_OFF_markers), ]
  241. PC_Ast.sums <- colSums(PC_Ast.mtx, na.rm = TRUE)
  242. d_PC_Ast <- median(PC_Ast.sums, na.rm = TRUE)
  243. PC_End.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(Endo_OFF_markers), ]
  244. PC_End.sums <- colSums(PC_End.mtx, na.rm = TRUE)
  245. d_PC_End <- median(PC_End.sums, na.rm = TRUE)
  246. PC_Mic.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(Micro_OFF_markers), ]
  247. PC_Mic.sums <- colSums(PC_Mic.mtx, na.rm = TRUE)
  248. d_PC_Mic <- median(PC_Mic.sums, na.rm = TRUE)
  249. PC_Oli.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(Oligo_OFF_markers), ]
  250. PC_Oli.sums <- colSums(PC_Oli.mtx, na.rm = TRUE)
  251. d_PC_Oli <- median(PC_Oli.sums, na.rm = TRUE)
  252. PC_OPC.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(OPC_OFF_markers), ]
  253. PC_OPC.sums <- colSums(PC_OPC.mtx, na.rm = TRUE)
  254. d_PC_OPC <- median(PC_OPC.sums, na.rm = TRUE)
  255. PC_Inh.mtx <- MTG18deepPC4score[rownames(MTG18deepPC4score) %in% rownames(Inh_OFF_markers), ]
  256. PC_Inh.sums <- colSums(PC_Inh.mtx, na.rm = TRUE)
  257. d_PC_Inh <- median(PC_Inh.sums, na.rm = TRUE)
  258. table([email hidden])
  259. ## Inh Exc Oligo OPC Astro Micro Endo
  260. ## 4164 6861 313 238 291 63 9
  261. Ast_Ast.mtx <- subset(MTG18_ref, ident = "Astro")
  262. Ast_Ast.mtx <- Ast_Ast.mtx@assays$RNA@counts
  263. Ast_Ast.mtx <- Ast_Ast.mtx[rownames(Ast_Ast.mtx) %in% rownames(Astro_OFF_markers), ]
  264. Ast_Ast.sums <- colSums(Ast_Ast.mtx, na.rm = TRUE)
  265. d_Ast_Ast <- median(Ast_Ast.sums, na.rm = TRUE)
  266. End_End.mtx <- subset(MTG18_ref, ident = "Endo")
  267. End_End.mtx <- End_End.mtx@assays$RNA@counts
  268. End_End.mtx <- End_End.mtx[rownames(End_End.mtx) %in% rownames(Endo_OFF_markers), ]
  269. End_End.sums <- colSums(End_End.mtx, na.rm = TRUE)
  270. d_End_End <- median(End_End.sums, na.rm = TRUE)
  271. Mic_Mic.mtx <- subset(MTG18_ref, ident = "Micro")
  272. Mic_Mic.mtx <- Mic_Mic.mtx@assays$RNA@counts
  273. Mic_Mic.mtx <- Mic_Mic.mtx[rownames(Mic_Mic.mtx) %in% rownames(Micro_OFF_markers), ]
  274. Mic_Mic.sums <- colSums(Mic_Mic.mtx, na.rm = TRUE)
  275. d_Mic_Mic <- median(Mic_Mic.sums, na.rm = TRUE)
  276. Oli_Oli.mtx <- subset(MTG18_ref, ident = "Oligo")
  277. Oli_Oli.mtx <- Oli_Oli.mtx@assays$RNA@counts
  278. Oli_Oli.mtx <- Oli_Oli.mtx[rownames(Oli_Oli.mtx) %in% rownames(Oligo_OFF_markers), ]
  279. Oli_Oli.sums <- colSums(Oli_Oli.mtx, na.rm = TRUE)
  280. d_Oli_Oli <- median(Oli_Oli.sums, na.rm = TRUE)
  281. OPC_OPC.mtx <- subset(MTG18_ref, ident = "OPC")
  282. OPC_OPC.mtx <- OPC_OPC.mtx@assays$RNA@counts
  283. OPC_OPC.mtx <- OPC_OPC.mtx[rownames(OPC_OPC.mtx) %in% rownames(OPC_OFF_markers), ]
  284. OPC_OPC.sums <- colSums(OPC_OPC.mtx, na.rm = TRUE)
  285. d_OPC_OPC <- median(OPC_OPC.sums, na.rm = TRUE)
  286. Inh_Inh.mtx <- subset(MTG18_ref, ident = "Inh")
  287. Inh_Inh.mtx <- Inh_Inh.mtx@assays$RNA@counts
  288. Inh_Inh.mtx <- Inh_Inh.mtx[rownames(Inh_Inh.mtx) %in% rownames(Inh_OFF_markers), ]
  289. Inh_Inh.sums <- colSums(Inh_Inh.mtx, na.rm = TRUE)
  290. d_Inh_Inh <- median(Inh_Inh.sums, na.rm = TRUE)
  291. ## calculating contamination score for patchseq data
  292. meta.data <- read.csv(file = "data/meta.data.csv", header = TRUE)
  293. patchseq.data4QC <- patchseq.TPM
  294. colnames(patchseq.data4QC) <- meta.data[match(colnames(patchseq.data4QC), meta.data$Sample.ID), 5]
  295. patchseq4QC <- CreateSeuratObject(counts = log2(patchseq.data4QC + 1), project = "VENQC_project", min.cells = 1)
  296. [email hidden]$sample_ID <- meta.data[match(colnames(patchseq.data4QC), meta.data$Cell.name), 1]
  297. [email hidden]$cell_name <- meta.data[match(colnames(patchseq.data4QC), meta.data$Cell.name), 5]
  298. [email hidden]$M_type <- meta.data[match(colnames(patchseq.data4QC), meta.data$Cell.name), 6]
  299. [email hidden]$brain_region <- meta.data[match(colnames(patchseq.data4QC), meta.data$Cell.name), 10]
  300. patchseq_TPM4QC <- patchseq4QC@assays$RNA@counts
  301. patch_Ast.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(Astro_OFF_markers), ]
  302. patch_Ast.sums <- colSums(patch_Ast.mtx, na.rm = TRUE)
  303. CS.patch_Ast <- as.matrix((patch_Ast.sums - d_PC_Ast)/(d_Ast_Ast - d_PC_Ast))
  304. [email hidden]$Ast_contam <- CS.patch_Ast[match(colnames(patchseq.data4QC), rownames(CS.patch_Ast)), 1]
  305. patch_End.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(Endo_OFF_markers), ]
  306. patch_End.sums <- colSums(patch_End.mtx, na.rm = TRUE)
  307. CS.patch_End <- as.matrix((patch_End.sums - d_PC_End)/(d_End_End - d_PC_End))
  308. [email hidden]$End_contam <- CS.patch_End[match(colnames(patchseq.data4QC), rownames(CS.patch_End)), 1]
  309. patch_Mic.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(Micro_OFF_markers), ]
  310. patch_Mic.sums <- colSums(patch_Mic.mtx, na.rm = TRUE)
  311. CS.patch_Mic <- as.matrix((patch_Mic.sums - d_PC_Mic)/(d_Mic_Mic - d_PC_Mic))
  312. [email hidden]$Mic_contam <- CS.patch_Mic[match(colnames(patchseq.data4QC), rownames(CS.patch_Mic)), 1]
  313. patch_Oli.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(Oligo_OFF_markers), ]
  314. patch_Oli.sums <- colSums(patch_Oli.mtx, na.rm = TRUE)
  315. CS.patch_Oli <- as.matrix((patch_Oli.sums - d_PC_Oli)/(d_Oli_Oli - d_PC_Oli))
  316. [email hidden]$Oli_contam <- CS.patch_Oli[match(colnames(patchseq.data4QC), rownames(CS.patch_Oli)), 1]
  317. patch_OPC.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(OPC_OFF_markers), ]
  318. patch_OPC.sums <- colSums(patch_OPC.mtx, na.rm = TRUE)
  319. CS.patch_OPC <- as.matrix((patch_OPC.sums - d_PC_OPC)/(d_OPC_OPC - d_PC_OPC))
  320. [email hidden]$OPC_contam <- CS.patch_OPC[match(colnames(patchseq.data4QC), rownames(CS.patch_OPC)), 1]
  321. patch_Inh.mtx <- patchseq_TPM4QC[rownames(patchseq_TPM4QC) %in% rownames(Inh_OFF_markers), ]
  322. patch_Inh.sums <- colSums(patch_Inh.mtx, na.rm = TRUE)
  323. CS.patch_Inh <- as.matrix((patch_Inh.sums - d_PC_Inh)/(d_Inh_Inh - d_PC_Inh))
  324. [email hidden]$Inh_contam <- CS.patch_Inh[match(colnames(patchseq.data4QC), rownames(CS.patch_Inh)), 1]
  325. [email hidden] <- [email hidden] %>%
  326. mutate(contamination_score = rowSums(across(all_of(c("Ast_contam", "End_contam", "Mic_contam", "Oli_contam", "OPC_contam", "Inh_contam"))), na.rm = TRUE))
  327. MTG18deepPC <- subset(MTG18_ref, ident = "Exc")
  328. MTG18deepPC_ONOFF_Exp <- AverageExpression(MTG18deepPC, features = MTG18deepPC_ONOFF_markers_unique$gene, assays = "RNA", slot = "counts")
  329. typeof(MTG18deepPC_ONOFF_Exp)
  330. head(MTG18deepPC_ONOFF_Exp$RNA)
  331. MTG18deepPC_ONOFF_Exp <- as.data.frame(MTG18deepPC_ONOFF_Exp)
  332. colnames(MTG18deepPC_ONOFF_Exp) <- "MTG18deepPC"
  333. MTG18deepPC_ONOFF_Exp$gene <- rownames(MTG18deepPC_ONOFF_Exp)
  334. patchseq_ONOFF_Exp <- AverageExpression(patchseq4QC, features = MTG18deepPC_ONOFF_markers_unique$gene, assays = "RNA", slot = "counts")
  335. patchseq_ONOFF_Exp <- as.data.frame(patchseq_ONOFF_Exp)
  336. colnames(patchseq_ONOFF_Exp) <- "patchseq"
  337. patchseq_ONOFF_Exp$gene <- rownames(patchseq_ONOFF_Exp)
  338. ONOFFgene_cor_mtx <- merge(MTG18deepPC_ONOFF_Exp, patchseq_ONOFF_Exp, by = "gene", all = TRUE)
  339. ONOFFgene_cor_mtx <- column_to_rownames(ONOFFgene_cor_mtx, var = "gene")
  340. ONOFFgene_cor_result <- shapiro.test(ONOFFgene_cor_mtx$patchseq)
  341. print(ONOFFgene_cor_result)
  342. ONOFFgene_cor <- cor.test(ONOFFgene_cor_mtx$MTG18deepPC, ONOFFgene_cor_mtx$patchseq, method = "spearman")
  343. cor_value <- round(ONOFFgene_cor$estimate, 2)
  344. cor_p_value <- format.pval(ONOFFgene_cor$p.value, digits = 2)
  345. [email hidden] <- [email hidden] %>% mutate(scaled_score = contamination_score * 0.3105976)
  346. ONOFFgene_cor_mtx$cluster <- MTG18deepPC_ONOFF_markers_unique[match(rownames(ONOFFgene_cor_mtx), MTG18deepPC_ONOFF_markers_unique$gene), 6]
  347. ggplot(ONOFFgene_cor_mtx, aes(x = MTG18deepPC, y = patchseq, color = cluster)) + geom_point(size = 3) +
  348. annotate("text", x = min(ONOFFgene_cor_mtx$MTG18deepPC), y = max(ONOFFgene_cor_mtx$patchseq),
  349. label = paste0("spearman r = ", cor_value, "\nP = ", cor_p_value), hjust = 0, vjust = 1, size = 4, color = "black") +
  350. geom_smooth(method = "lm", formula = y ~ x, se = FALSE, color = "black") +
  351. theme(axis.ticks.length = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.5), panel.background = element_rect(fill = "white")) +
  352. scale_y_continuous(breaks = seq(0,10, by = 2), limits = c(0,10)) + scale_x_continuous(breaks = seq(0,10, by = 2), limits = c(0,10))
  353. ggplot(ONOFFgene_cor_mtx, aes(x = MTG18deepPC, y = patchseq, color = cluster)) + geom_point(size = 3) + facet_wrap(~ cluster, scales = "free") +
  354. theme(axis.ticks.length = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.5), panel.background = element_rect(fill = "white"))
  355. ## cell type mapping data preparation (filter patchseq data)
  356. OFF_markers4QC <- subset(MTG18deepPC_ONOFF_markers_unique, cluster != "Exc on")
  357. OFF_markers4QC_ID <- subset(patchseq.data.1, gene_name %in% OFF_markers4QC$gene)
  358. table(duplicated(OFF_markers4QC_ID$gene_name))
  359. ## FALSE TRUE
  360. ## 176 47
  361. table(duplicated(OFF_markers4QC_ID$gene_id))
  362. patchseq.count <- column_to_rownames(patchseq.data, var = "gene_id")
  363. patchseq.count_QC <- subset(patchseq.count, !rownames(patchseq.count) %in% OFF_markers4QC_ID$gene_id)
  364. efflen <- geneid_efflen[match(rownames(patchseq.count_QC), geneid_efflen$geneid), "efflen"]
  365. counts2TPM <- function(count = patchseq.count_QC, efflength = efflen){
  366. RPK <- count/(efflength/1000)
  367. PMSC_rpk <- sum(RPK)/1e6
  368. RPK/PMSC_rpk
  369. }
  370. patchseq.TPM_QC <- as.data.frame(apply(patchseq.count_QC, 2, counts2TPM))
  371. colSums(patchseq.TPM_QC)
  372. NCBI_gene_symbol <- patchseq.data.1[match(rownames(patchseq.count_QC), patchseq.data.1$gene_id), "gene_name"]
  373. table(duplicated(NCBI_gene_symbol))
  374. patchseq.count_QC <- aggregate(patchseq.count_QC, by = list(NCBI_gene_symbol), FUN = sum)
  375. patchseq.count_QC$Group.1 <- gsub("\t", "", patchseq.count_QC$Group.1)
  376. patchseq.count_QC <- column_to_rownames(patchseq.count_QC,'Group.1')
  377. patchseq.TPM_QC <- aggregate(patchseq.TPM_QC, by = list(NCBI_gene_symbol), FUN = sum)
  378. patchseq.TPM_QC$Group.1 <- gsub("\t", "", patchseq.TPM_QC$Group.1)
  379. patchseq.TPM_QC <- column_to_rownames(patchseq.TPM_QC,'Group.1')
  380. head(patchseq.TPM_QC)
  381. colnames(patchseq.TPM_QC) <- meta.data[match(colnames(patchseq.TPM_QC), meta.data$Sample.ID), 5]
  382. patchseq.TPM_QC <- subset(patchseq.TPM_QC, select = -c(PC43, PC64, TRI33, TRI32, TRI20, PC52))
  383. patchseq4mapping <- CreateSeuratObject(counts = log2(patchseq.TPM_QC + 1), project = "patchseq2mapping", min.cells = 1)
  384. [email hidden]$sample_ID <- meta.data[match(colnames(patchseq.TPM_QC), meta.data$Cell.name), 1]
  385. [email hidden]$cell_name <- meta.data[match(colnames(patchseq.TPM_QC), meta.data$Cell.name), 5]
  386. [email hidden]$M_type <- meta.data[match(colnames(patchseq.TPM_QC), meta.data$Cell.name), 6]
  387. [email hidden]$brain_region <- meta.data[match(colnames(patchseq.TPM_QC), meta.data$Cell.name), 10]
  388. patchseq_TPM4mapping <- patchseq4mapping@assays$RNA@counts
  389. write.table(patchseq_TPM4mapping, file = "VEN4mapping.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  390. write.table([email hidden], file = "VEN4mapping_meta_data.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  391. patchseq4mapping <- FindVariableFeatures(patchseq4mapping, selection.method = "vst", nfeatures = 3000)
  392. VariableFeaturePlot(patchseq4mapping, log = TRUE)
  393. patchseq4mapping <- ScaleData(patchseq4mapping, features = rownames(patchseq4mapping), verbose = FALSE)
  394. VEN4mapping_mat <- as.data.frame(patchseq4mapping@assays$[email hidden])
  395. ETIT_markers <- c("POU3F1", "FAM84B", "BCL11B", "NRP1", "DSCAML1", "NFIB", "NTNG1", "SYT2", "SEMA6A", "DAB1", "SEZ6",
  396. "MYO16", "ASAP1", "SEMA3D", "GFRA1", "PTPRM", "CRTAC1", "IGSF21", "SERPINE2", "ABAT", "GRIK2", "SLC1A1",
  397. "ETV5", "SEZ6L", "AKAP12", "PTPRF", "SORCS2", "ADRA1A", "SPARC", "SLC6A1", "CDHR3", "GRIK1", "CACNA1H",
  398. "CACNA2D2", "SCN4B", "TRPC4", "SCN9A", "GRM4", "SLC5A8", "PCSK6", "LOC101929728", "PDE9A", "LOC105378657",
  399. "ATP6V1C2", "RNF152", "MEIS2", "DGKD", "ALCAM", "LOC105378653", "FEZF2", "EYA4", "ADCY8", "RXFP1", "NPTX1",
  400. "PDZRN3", "DACH1", "LY86-AS1", "SPATS2L", "FIGN", "LINC01202", "MGAT5B", "THEMIS")
  401. ETIT_markers <- c("POU3F1", "FAM84B", "BCL11B", "NRP1", "DSCAML1", "NFIB", "NTNG1", "SYT2", "SEMA6A", "DAB1", "SEZ6",
  402. "MYO16", "ASAP1", "SEMA3D", "GFRA1", "PTPRM", "CRTAC1", "IGSF21", "SERPINE2", "ABAT", "GRIK2", "SLC1A1",
  403. "ETV5", "SEZ6L", "AKAP12", "PTPRF", "SORCS2", "ADRA1A", "SPARC", "SLC6A1", "CDHR3", "CACNA1H",
  404. "CACNA2D2", "SCN4B", "TRPC4", "SCN9A", "GRM4", "SLC5A8", "PCSK6", "LOC101929728", "PDE9A", "LOC105378657",
  405. "ATP6V1C2", "RNF152", "MEIS2", "DGKD", "ALCAM", "LOC105378653", "FEZF2", "EYA4", "ADCY8", "RXFP1", "NPTX1",
  406. "PDZRN3", "DACH1", "LY86-AS1", "SPATS2L", "FIGN", "LINC01202", "MGAT5B", "THEMIS")
  407. ETIT_markers_mat <- VEN4mapping_mat[ETIT_markers,]
  408. pheatmap(ETIT_markers_mat, fontsize_row = 5, clustering_method = "ward.D", fontsize_col = 5, cluster_rows = F,
  409. color = c("blue", "lightgrey", "firebrick3"))
  410. # loading and QC VEN patchseq data for clustering and other downstream analysis
  411. ## remove OFF markers
  412. VEN_data_1 <- fread("data/feature_counts 1.csv", header = T, data.table = F)
  413. VEN_data_2 <- fread("data/feature_counts 2.csv", header = T, data.table = F)
  414. VEN_data_3 <- fread("data/feature_counts 3.csv", header = T, data.table = F)
  415. VEN_data_4 <- fread("data/feature_counts 4.csv", header = T, data.table = F)
  416. VEN_data_5 <- fread("data/feature_counts 5.csv", header = T, data.table = F)
  417. VEN_counts1 <- VEN_data_1[,1:84]
  418. VEN_counts2 <- VEN_data_2[,1:24]
  419. VEN_counts3 <- VEN_data_3[,1:7]
  420. VEN_counts4 <- VEN_data_4[,1:19]
  421. VEN_counts5 <- VEN_data_5[,1:16]
  422. VEN_counts <- merge(VEN_counts1, VEN_counts2, by = "gene_id", all = TRUE)
  423. VEN_counts <- merge(VEN_counts, VEN_counts3, by = "gene_id", all = TRUE)
  424. VEN_counts <- merge(VEN_counts, VEN_counts4, by = "gene_id", all = TRUE)
  425. VEN_counts <- merge(VEN_counts, VEN_counts5, by = "gene_id", all = TRUE)
  426. VEN_counts <- column_to_rownames(VEN_counts, var = "gene_id")
  427. OFF_markers_miss <- subset(OFF_markers4QC, !rownames(OFF_markers4QC) %in% VEN_data_1$gene_name)
  428. OFF_markers_miss$gene
  429. ## "LOC101930275", "PPAP2B", "LOC105376917", "LOC105369345", "FYB", "LOC101929249", "LOC105379054", "LPPR1"
  430. OFF_markers_miss_NCBI_ID <- patchseq.data.1[match(OFF_markers_miss$gene, patchseq.data.1$gene_name), "gene_id"]
  431. OFF_markers_miss_NCBI_ID
  432. ## "101930275", "8613", "105376917", "105369345", "2533", "101929249", "105379054", "54886_1"
  433. ## "ENSG00000253944", "ENSG00000162407", "ENSG00000082074", "ENSG00000249835", "ENSG00000148123"
  434. OFF_markers_overlap <- subset(VEN_data_1, gene_name %in% OFF_markers4QC$gene)
  435. table(duplicated(OFF_markers_overlap$gene_name))
  436. ## FALSE
  437. ## 168
  438. table(duplicated(OFF_markers_overlap$gene_id))
  439. table(duplicated(OFF_markers4QC$gene))
  440. ## FALSE
  441. ## 176
  442. VEN_counts_QC <- subset(VEN_counts, !rownames(VEN_counts) %in% c("ENSG00000253944", "ENSG00000162407", "ENSG00000082074", "ENSG00000249835", "ENSG00000148123"))
  443. VEN_counts_QC <- subset(VEN_counts_QC, !rownames(VEN_counts_QC) %in% OFF_markers_overlap$gene_id)
  444. geneid_efflen <- subset(VEN_data_1, select = c("gene_id", "gene_length"))
  445. colnames(geneid_efflen) <- c("geneid", "efflen")
  446. efflen <- geneid_efflen[match(rownames(VEN_counts_QC), geneid_efflen$geneid), "efflen"]
  447. counts2TPM <- function(count = VEN_counts_QC, efflength = efflen){
  448. RPK <- count/(efflength/1000)
  449. PMSC_rpk <- sum(RPK)/1e6
  450. RPK/PMSC_rpk
  451. }
  452. VEN.TPM_QC <- as.data.frame(apply(VEN_counts_QC, 2, counts2TPM))
  453. colSums(VEN.TPM_QC)
  454. gene_symbol <- VEN_data_1[match(rownames(VEN_counts_QC), VEN_data_1$gene_id), "gene_name"]
  455. table(duplicated(gene_symbol))
  456. ## FALSE TRUE
  457. ## 56996 1566
  458. VEN_counts_QC <- aggregate(VEN_counts_QC, by = list(gene_symbol), FUN = sum)
  459. VEN_counts_QC$Group.1 <- gsub("\t", "", VEN_counts_QC$Group.1)
  460. VEN_counts_QC <- column_to_rownames(VEN_counts_QC,'Group.1')
  461. VEN.TPM_QC <- aggregate(VEN.TPM_QC, by = list(gene_symbol), FUN = sum)
  462. VEN.TPM_QC$Group.1 <- gsub("\t", "", VEN.TPM_QC$Group.1)
  463. VEN.TPM_QC <- column_to_rownames(VEN.TPM_QC,'Group.1')
  464. head(VEN.TPM_QC)
  465. colnames(VEN.TPM_QC) <- meta.data[match(colnames(VEN.TPM_QC), meta.data$Sample.ID), 5]
  466. ## Sample filter
  467. VEN.TPM4clust <- VEN.TPM_QC[,colnames(VEN.TPM_QC) %in% colnames(patchseq4mapping)]
  468. all_genes <- subset(VEN_data_1, select = c("gene_id", "gene_name", "gene_chr", "gene_biotype"))
  469. table(duplicated(all_genes$gene_name))
  470. all_genes <- subset(all_genes, all_genes$gene_name %in% rownames(VEN.TPM4clust))
  471. table(duplicated(all_genes$gene_name))
  472. all_genes <- all_genes[!duplicated(all_genes[c("gene_name")]), ]
  473. all_genes$gene_name <- gsub("\t", "", all_genes$gene_name)
  474. allgenes_biotype <- as.data.frame(table(all_genes$gene_biotype))
  475. colnames(allgenes_biotype) <- c("biotype", "count")
  476. ggplot() + geom_bar(data = allgenes_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  477. theme(axis.title = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  478. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  479. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  480. scale_y_continuous(expand = c(0, 0), breaks = seq(0,20000, by = 4000), limits = c(0,20000))
  481. all_genes4clustering <- subset(all_genes, !gene_chr == "X")
  482. all_genes4clustering <- subset(all_genes4clustering, !gene_chr == "Y")
  483. all_genes4clustering <- subset(all_genes4clustering, !gene_chr == "MT")
  484. Human_Mito <- fread("data/Human.MitoCarta3.0.csv", header = T, data.table = F)
  485. table(duplicated(Human_Mito$Symbol))
  486. all_genes4clustering <- subset(all_genes4clustering, !gene_name %in% Human_Mito$Symbol)
  487. VEN.data4clust <- VEN.TPM4clust[all_genes4clustering$gene_name,]
  488. write.table(VEN.data4clust, file = "VEN.data4clustTPM.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  489. VEN4FS <- CreateSeuratObject(counts = log2(VEN.TPM4clust + 1), project = "VEN4FS", min.cells = 1)
  490. [email hidden]$sample_ID <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 1]
  491. [email hidden]$batch <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 2]
  492. [email hidden]$donor <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 3]
  493. [email hidden]$cell_name <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 5]
  494. [email hidden]$M_type <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 6]
  495. [email hidden]$PM_type <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 8]
  496. [email hidden]$E_type <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 9]
  497. [email hidden]$brain_region <- meta.data[match(colnames(VEN.TPM4clust), meta.data$Cell.name), 10]
  498. [email hidden]$contamination_score <- [email hidden][match(colnames(VEN.TPM4clust), colnames(patchseq.data4QC)), "scaled_score"]
  499. VEN4FS <- ScaleData(VEN4FS, features = rownames(VEN4FS), verbose = FALSE)
  500. write.table(VEN4FS@assays$[email hidden], file = "VEN4FS_scaled.data.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  501. # downstream analysis for clustering
  502. VEN4clust <- CreateSeuratObject(counts = log2(VEN.data4clust + 1), project = "VEN_project", min.cells = 2)
  503. write.table(VEN4clust@assays$RNA@data, file = "VEN_datalog2TPM.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  504. [email hidden]$sample_ID <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 1]
  505. [email hidden]$batch <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 2]
  506. [email hidden]$donor <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 3]
  507. [email hidden]$cell_name <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 5]
  508. [email hidden]$M_type <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 6]
  509. [email hidden]$PM_type <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 8]
  510. [email hidden]$E_type <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 9]
  511. [email hidden]$brain_region <- meta.data[match(colnames(VEN.data4clust), meta.data$Cell.name), 10]
  512. [email hidden]$contamination_score <- [email hidden][match(colnames(VEN.data4clust), colnames(patchseq.data4QC)), "scaled_score"]
  513. VEN4clust[["percent.mt"]] <- PercentageFeatureSet(VEN4clust, pattern = "^MT-")
  514. write.table([email hidden], file = "VEN4clust_meta.data.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  515. Idents(VEN4clust) <- "M_type"
  516. QCP1 <- VlnPlot(VEN4clust, features = "nFeature_RNA", pt.size = 1) + scale_y_continuous(breaks = seq(0,50000, by = 10000), limits = c(0,50000)) + NoLegend()
  517. QCP2 <- VlnPlot(VEN4clust, features = "nCount_RNA", pt.size = 1) + scale_y_continuous(breaks = seq(0,200000, by = 40000), limits = c(0,200000)) + NoLegend()
  518. wrap_plots(plots = list(QCP1, QCP2), ncol = 2)
  519. VEN4clust
  520. ## An object of class Seurat
  521. ## 50890 features across 124 samples within 1 assay
  522. ## Active assay: RNA (50890 features, 0 variable features)
  523. table(VEN4clust$PM_type)
  524. ## ET_PC ET_VEN IT_PC IT_VEN
  525. ## 31 13 71 9
  526. table(VEN4clust$E_type)
  527. ## 1 2 3
  528. ## 38 12 6
  529. table(VEN4clust$brain_region)
  530. ## Frontal Parietal Temporal
  531. ## 41 18 65
  532. VEN4clust <- FindVariableFeatures(VEN4clust, selection.method = "vst", nfeatures = 2500)
  533. VariableFeaturePlot(VEN4clust, log = TRUE)
  534. HVG_2500 <- subset(all_genes, all_genes$gene_name %in% VEN4clust@assays$[email hidden])
  535. HVG_2500_biotype <- as.data.frame(table(HVG_2500$gene_biotype))
  536. colnames(HVG_2500_biotype) <- c("biotype", "count")
  537. ggplot() + geom_bar(data = HVG_2500_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  538. theme(axis.title.x = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  539. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  540. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  541. scale_y_continuous(expand = c(0, 0), breaks = seq(0,500, by = 100), limits = c(0,500))
  542. VEN4clust <- ScaleData(VEN4clust, features = rownames(VEN4clust), verbose = FALSE)
  543. VEN4clust <- RunPCA(VEN4clust, npcs = 50, verbose = FALSE)
  544. VEN4clust
  545. ## An object of class Seurat
  546. ## 50890 features across 124 samples within 1 assay
  547. ## Active assay: RNA (50890 features, 2500 variable features)
  548. ## 1 dimensional reduction calculated: pca
  549. VizDimLoadings(VEN4clust, dims = 1:9, reduction = "pca")
  550. DimPlot(object = VEN4clust, reduction = "pca", pt.size = 2)
  551. FeatureScatter(VEN4clust, feature1 = "nCount_RNA", feature2 = "nFeature_RNA", pt.size = 2)
  552. VEN4clust <- JackStraw(VEN4clust, num.replicate = 100)
  553. VEN4clust <- ScoreJackStraw(VEN4clust, dims = 1:20)
  554. JackStrawPlot(VEN4clust, dims = 1:20)
  555. ElbowPlot(VEN4clust)
  556. VEN4clust$PM_type <- factor(x = VEN4clust$PM_type, levels = c("ET_VEN", "ET_PC", "IT_VEN", "IT_PC"))
  557. VEN4clust <- FindNeighbors(VEN4clust, reduction = "pca", dims = c(1,2,3,4,5,6,9))
  558. VEN4clust <- FindClusters(VEN4clust, resolution = 0.7)
  559. VEN4clust <- RunUMAP(VEN4clust, reduction = "pca", dims = c(1,2,3,4,5,6,9))
  560. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "seurat_clusters")
  561. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "M_type")
  562. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "PM_type")
  563. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "E_type")
  564. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "brain_region")
  565. DimPlot(VEN4clust, reduction = "umap", label = TRUE, pt.size = 3, group.by = "sample_ID") + NoLegend()
  566. VlnPlot(VEN4clust, features = c("SLC17A6", "SLC17A7", "POU3F1", "COL22A1", "PVALB", "SLC32A1", "GAD1", "GAD2", "TH",
  567. "SLC6A3", "SLC18A2", "AQP4", "CX3CR1", "MBP"), group.by = "M_type", same.y.lims = TRUE, add.noise = FALSE, slot = "counts")
  568. write.table(VEN4clust@assays$[email hidden], file = "VEN4clust_scaled.data.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  569. ## DEG among clusters
  570. All_cluster_markers <- FindAllMarkers(VEN4clust, logfc.threshold = 1, only.pos = TRUE, min.pct = 1)
  571. All_cluster_markers <- subset(All_cluster_markers, p_val_adj < 0.05)
  572. table(All_cluster_markers$cluster)
  573. cluster1_markers <- subset(All_cluster_markers, cluster == 0)
  574. cluster2_markers <- subset(All_cluster_markers, cluster == 1)
  575. cluster1_markers_biotype <- all_genes[match(cluster1_markers$gene, all_genes$gene_name), 4]
  576. cluster2_markers_biotype <- all_genes[match(cluster2_markers$gene, all_genes$gene_name), 4]
  577. table(cluster1_markers_biotype)
  578. ## antisense lincRNA protein_coding sense_intronic sense_overlapping
  579. ## 3 4 176 1 1
  580. table(cluster2_markers_biotype)
  581. ## antisense lincRNA processed_pseudogene
  582. ## 3 9 1
  583. ## processed_transcript protein_coding sense_intronic
  584. ## 2 261 3
  585. ## sense_overlapping snoRNA transcribed_unprocessed_pseudogene
  586. ## 1 1 1
  587. write.table(All_cluster_markers, file = "All_cluster_markers.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  588. All_cluster_markers_cosg <- cosg(VEN4clust, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  589. expressed_pct = 1, n_genes_user = 300)
  590. clust_marker4plot <- All_cluster_markers_cosg$names[1:5,]
  591. clust_marker4plot <- c(clust_marker4plot[,1], clust_marker4plot[,2])
  592. DoHeatmap(VEN4clust, features = All_cluster_markers$gene, draw.lines = FALSE, hjust = 0) + scale_fill_gradientn(colors = c("#2f58a7", "lightgrey", "#FF6347"))
  593. VlnPlot(VEN4clust, features = clust_marker4plot, same.y.lims = TRUE, stack = TRUE, flip = TRUE)
  594. RidgePlot(VEN4clust, features = clust_marker4plot, fill.by = "ident", ncol = 5)
  595. RidgePlot(VEN4clust, features = c("SULF2", "FAM84B", "ADRA1A", "VAT1L", "POU3F1", "FEZF2", "SCN4B", "BCL11B"), stack = TRUE, fill.by = "ident")
  596. RidgePlot(VEN4clust, features = c("NPTX1", "RXFP1", "PDZRN3", "LY86-AS1", "SPATS2L", "MGAT5B","SCN3B", "THEMIS"), stack = TRUE, fill.by = "ident")
  597. All_cluster_markers.df <- bitr(All_cluster_markers$gene, fromType = "SYMBOL", toType = c("ENTREZID", "ENSEMBL"), OrgDb = org.Hs.eg.db)
  598. ## 5.57% of input gene IDs are fail to map...
  599. All_cluster_markers_ID <- unique(All_cluster_markers.df$ENTREZID)
  600. All_cluster_markers_ego <- enrichGO(gene = All_cluster_markers_ID, OrgDb = org.Hs.eg.db, ont = "BP", readable = TRUE)
  601. d <- godata('org.Hs.eg.db', ont = "BP")
  602. goCls <- pairwise_termsim(All_cluster_markers_ego, method = "Resnik", semData = d)
  603. treeplot(goCls)
  604. All_cluster_markers_ego <- as.data.frame(All_cluster_markers_ego)
  605. All_cluster_markers_ego_top5 <- All_cluster_markers_ego %>% group_by(ONTOLOGY) %>% arrange(p.adjust) %>% slice_head(n = 5)
  606. All_cluster_markers_ego_top5$ONTOLOGY <- factor(x = All_cluster_markers_ego_top5$ONTOLOGY, levels = c("MF", "BP", "CC"))
  607. All_cluster_markers_ego_top5$Description <- factor(All_cluster_markers_ego_top5$Description, levels = rev(All_cluster_markers_ego_top5$Description))
  608. mycol3 <- c('#FF7F50', '#6B8E23', '#6BA5CE')
  609. p <- ggplot(data = All_cluster_markers_ego_top5, aes(x = Count, y = Description, fill = ONTOLOGY)) +
  610. geom_bar(width = 0.5, stat = "identity") + theme_classic() +
  611. scale_x_continuous(expand = c(0,0.5), breaks = seq(0,70, by = 14), limits = c(0,70)) +
  612. scale_fill_manual(values = alpha(mycol3, 0.8))
  613. p <- p + theme(axis.text.y = element_blank()) +
  614. geom_text(data = All_cluster_markers_ego_top5, aes(x = 0.1, y = Description, label = Description), size = 5, hjust = 0)
  615. p <- p + geom_text(data = All_cluster_markers_ego_top5, aes(x = 0.1, y = Description, label = geneID, color = -log10(pvalue)), size = 3,
  616. fontface = 'italic', hjust = 0, vjust = 2.7) + scale_colour_viridis(option = "G", direction = -1, end = 0.8)
  617. p <- p + labs(title = 'Enriched top 5 GO terms') +
  618. theme(plot.title = element_text(size = 14, face = 'bold'), axis.title = element_text(size = 14),
  619. axis.line = element_line(colour = "black"), axis.text = element_text(size = 12, colour = "black"),
  620. axis.ticks.y = element_blank())
  621. p
  622. All_cluster_markers_kegg <- enrichKEGG(gene = All_cluster_markers_ID, keyType = "kegg", organism = "hsa", pAdjustMethod = "BH", pvalueCutoff = 0.05,
  623. qvalueCutoff = 0.2)
  624. clusterProfiler::dotplot(All_cluster_markers_kegg, title = "All_cluster_markers_KEGG")
  625. ETIT_markers <- c("POU3F1", "FAM84B", "BCL11B", "NRP1", "DSCAML1", "NFIB", "NTNG1", "SYT2", "SEMA6A", "DAB1", "SEZ6",
  626. "MYO16", "ASAP1", "SEMA3D", "GFRA1", "PTPRM", "CRTAC1", "IGSF21", "SERPINE2", "ABAT", "GRIK2", "SLC1A1",
  627. "ETV5", "SEZ6L", "AKAP12", "PTPRF", "SORCS2", "ADRA1A", "SPARC", "SLC6A1", "CDHR3", "GRIK1", "CACNA1H",
  628. "CACNA2D2", "SCN4B", "TRPC4", "SCN9A", "GRM4", "SLC5A8", "PCSK6", "LOC101929728", "PDE9A", "LOC105378657",
  629. "ATP6V1C2", "RNF152", "MEIS2", "DGKD", "ALCAM", "AL139158.2", "FEZF2", "EYA4", "ADCY8", "RXFP1", "NPTX1",
  630. "PDZRN3", "DACH1", "LY86-AS1", "SPATS2L", "FIGN", "LINC01202", "MGAT5B", "THEMIS")
  631. DoHeatmap(VEN4clust, features = ETIT_markers, draw.lines = FALSE, hjust = 0) + scale_fill_gradientn(colors = c("#2f58a7", "lightgrey", "#FF6347"))
  632. ## channels and receptors
  633. Idents(VEN4clust) <- "E_type"
  634. VEN4Etype <- subset(VEN4clust, ident = c(1, 2, 3))
  635. VEN4Etype
  636. ## An object of class Seurat
  637. ## 50890 features across 56 samples within 1 assay
  638. ## Active assay: RNA (50890 features, 2500 variable features)
  639. ## 2 dimensional reductions calculated: pca, umap
  640. DimPlot(VEN4Etype, reduction = "umap", pt.size = 3, group.by = "E_type", shape.by = "seurat_clusters")
  641. VlnPlot(VEN4Etype, features = c("CACNA1A", "CACNA1B", "CACNA1C", "CACNA1D", "CACNA1E", "CACNA1F", "CACNA1G", "CACNA1H", "CACNA1I", "CACNA1S",
  642. "CACNA2D1", "CACNA2D2", "CACNA2D3", "CACNA2D4", "CACNB1", "CACNB2", "CACNB3", "CACNB4", "CACNG1", "CACNG2",
  643. "CACNG3", "CACNG4", "CACNG5", "CACNG6", "CACNG7", "CACNG8"), fill.by = "ident", adjust = 1, stack = TRUE,
  644. same.y.lims = TRUE, flip = TRUE) + NoLegend()
  645. VlnPlot(VEN4Etype, features = c("CLCC1", "CLCF1", "CLCN1", "CLCN2", "CLCN3", "CLCN4", "CLCN5", "CLCN6", "CLCN7", "CLCNKA", "CLCNKB"),
  646. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  647. VlnPlot(VEN4Etype, features = c("SCN1A", "SCN1B", "SCN2A", "SCN2B", "SCN3A", "SCN3B", "SCN4A", "SCN4B", "SCN5A", "SCN7A", "SCN8A",
  648. "SCN9A", "SCN10A", "SCN11A", "SCNM1", "SCNN1A", "SCNN1B", "SCNN1G"), fill.by = "ident", stack = TRUE,
  649. same.y.lims = TRUE, flip = TRUE) + NoLegend()
  650. VlnPlot(VEN4Etype, features = c("HCN1", "HCN2", "HCN3", "HCN4", "KCNA1", "KCNA2", "KCNA3", "KCNA4", "KCNA5", "KCNA7", "KCNA10", "KCNAB1",
  651. "KCNAB2", "KCNAB3", "KCNB1", "KCNB2", "KCNC1", "KCNC2", "KCNC3", "KCNC4", "KCND1", "KCND2", "KCND3"),
  652. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  653. VlnPlot(VEN4Etype, features = c("KCNE1", "KCNE2", "KCNE3", "KCNE4", "KCNF1", "KCNG1", "KCNG3", "KCNG4", "KCNH1", "KCNH2", "KCNH3", "KCNH5",
  654. "KCNH6", "KCNH7", "KCNH8", "KCNIP1", "KCNIP2", "KCNIP3", "KCNIP4", "KCNJ1", "KCNJ2", "KCNJ3", "KCNJ4"),
  655. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  656. VlnPlot(VEN4Etype, features = c("KCNJ5", "KCNJ6", "KCNJ8", "KCNJ9", "KCNJ10", "KCNJ11", "KCNJ12", "KCNJ13", "KCNJ14", "KCNJ15", "KCNJ16",
  657. "KCNK1", "KCNK2", "KCNK3", "KCNK4", "KCNK5", "KCNK6", "KCNK7", "KCNK9", "KCNK10", "KCNK12", "KCNK13",
  658. "KCNK15"), fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  659. VlnPlot(VEN4Etype, features = c("KCNK18", "KCNMA1", "KCNMB1", "KCNMB2", "KCNMB4", "KCNN1", "KCNN2", "KCNN3", "KCNN4", "KCNQ1", "KCNQ2",
  660. "KCNQ3", "KCNQ5", "KCNRG", "KCNS1", "KCNS2", "KCNS3", "KCNT1", "KCNT2", "KCNU1", "KCNV1", "KCNV2"),
  661. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  662. VlnPlot(VEN4Etype, features = c("GABBR1", "GABBR2", "GABRA1", "GABRA2", "GABRA3", "GABRA4", "GABRA5", "GABRA6", "GABRB1", "GABRB2", "GABRB3",
  663. "GABRD", "GABRE", "GABRG1", "GABRG2", "GABRG3", "GABRP", "GABRQ", "GABRR1", "GABRR2", "GABRR3"),
  664. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  665. VlnPlot(VEN4Etype, features = c("GRM1", "GRM2", "GRM3", "GRM4", "GRM5", "GRM6", "GRM7", "GRM8", "GRIA1", "GRIA2", "GRIA3", "GRIA4", "GRID1",
  666. "GRID2", "GRIK1", "GRIK2", "GRIK3", "GRIK4", "GRIK5", "GRIN1", "GRIN2A", "GRIN2B", "GRIN2D", "GRIN3A",
  667. "GRIN3B", "GRINA"), fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  668. VlnPlot(VEN4Etype, features = c("DRD1", "DRD2", "DRD3", "DRD4", "DRD5", "HTR1A", "HTR1B", "HTR1D", "HTR1F", "HTR2A", "HTR2B", "HTR2C",
  669. "HTR3A", "HTR3B", "HTR4", "HTR5A", "HTR6", "HTR7"),
  670. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  671. VlnPlot(VEN4Etype, features = c('CHRM1', 'CHRM2', 'CHRM3', 'CHRM4', 'CHRM5', 'CHRNA1', 'CHRNA10', 'CHRNA2', 'CHRNA3', 'CHRNA4', 'CHRNA5',
  672. 'CHRNA6', 'CHRNA7', 'CHRNA9', 'CHRNB1', 'CHRNB2', 'CHRNB3', 'CHRNB4', 'CHRND', 'CHRNE', 'CHRNG'),
  673. fill.by = "ident", stack = TRUE, same.y.lims = TRUE, flip = TRUE) + NoLegend()
  674. ## VEN markers
  675. Idents(VEN4clust) <- "M_type"
  676. VEN4clust <- RenameIdents(VEN4clust, `cVEN` = "VEN", `PC` = "non_VEN", `TRI` = "non_VEN")
  677. VEN4clust$VEN_type <- [email hidden]
  678. Idents(VEN4clust) <- "VEN_type"
  679. VEN_markers.cad_1 <- FindMarkers(VEN4clust, ident.1 = "VEN", ident.2 = "non_VEN", only.pos = TRUE, min.pct = 1, logfc.threshold = 0.5)
  680. VEN_markers.cad_2 <- cosg(VEN4clust, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  681. expressed_pct = 1, n_genes_user = 1939)
  682. VEN_markers.cad_1 <- subset(VEN_markers.cad_1, rownames(VEN_markers.cad_1) %in% VEN_markers.cad_2$names$VEN)
  683. VEN_Negmarkers.cad_1 <- FindMarkers(VEN4clust, ident.1 = "VEN", ident.2 = "non_VEN", only.pos = FALSE, min.pct = 0.8, logfc.threshold = 0.5)
  684. VEN_Negmarkers.cad_1 <- subset(VEN_Negmarkers.cad_1, avg_log2FC < 0)
  685. VEN_Negmarkers.cad_1 <- subset(VEN_Negmarkers.cad_1, pct.2 == 1)
  686. VEN_Negmarkers.cad_2 <- cosg(VEN4clust, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  687. expressed_pct = 1, n_genes_user = 1279)
  688. VEN_Negmarkers.cad_1 <- subset(VEN_Negmarkers.cad_1, rownames(VEN_Negmarkers.cad_1) %in% VEN_Negmarkers.cad_2$names$non_VEN)
  689. VEN_markers.cad <- rbind(VEN_markers.cad_1, VEN_Negmarkers.cad_1)
  690. EnhancedVolcano(VEN_markers.cad, lab = rownames(VEN_markers.cad), x = 'avg_log2FC', y = 'p_val', pCutoff = 0.05, shape = c(4, 7, 2, 1),
  691. colAlpha = 1, selectLab = c("COL5A2", "EPHA6", "SLC35F2", "LYPD1", "SLC5A8", "PCDH9", "SLC7A14", "NPTXR", "DNAJA4", "HSPA1A"),
  692. labSize = 3, labFace = "italic", boxedLabels = TRUE, title = "VEN markers", subtitle = "vs. non-VEN",
  693. cutoffLineCol = "black", gridlines.minor = F, gridlines.major = F, FCcutoff = 1) +
  694. scale_x_continuous(expand = c(0, 0), breaks = seq(-4,3, by = 1), limits = c(-4,3)) +
  695. scale_y_continuous(expand = c(0, 0), breaks = seq(0,9, by = 3), limits = c(0,9)) +
  696. theme(axis.text.x = element_text(size = 16, colour = "black"), axis.text.y = element_text(size = 16, colour = "black"),
  697. axis.line = element_line(color = "black", size = 1))
  698. VEN_markers.cad_flit <- subset(VEN_markers.cad, p_val < 0.05)
  699. VEN_markers.cad_flit <- subset(VEN_markers.cad_flit, abs(avg_log2FC) > 1)
  700. write.table(VEN_markers.cad_flit, file = "VENvsNonVEN_markers.cad_flit.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  701. VEN_markers.cad_ETIT <- subset(VEN_markers.cad_flit, rownames(VEN_markers.cad_flit) %in% ETIT_markers)
  702. VEN_known_markers <- c("POU3F1", "ITGA4", "BMP3", "VAT1L", "SULF2", "LYPD1", "CHST8", "ADRA1A", "GABRQ", "SLC18A2", "DRD3",
  703. "HTR2B", "NMB", "DISC1", "ATF3", "IL4R", "AVPR1A")
  704. VEN_markers.cad_known <- subset(VEN_markers.cad_flit, rownames(VEN_markers.cad_flit) %in% VEN_known_markers)
  705. Idents(VEN4clust) <- "M_type"
  706. VEN4clust$M_type <- factor(x = VEN4clust$M_type, levels = c("cVEN", "PC", "TRI"))
  707. RidgePlot(VEN4clust, features = rownames(VEN_markers.cad_ETIT), stack = TRUE, fill.by = "ident")
  708. RidgePlot(VEN4clust, features = c("LYPD1", "SULF2", "ATF3", "ADRA1A", "CHST8"), stack = TRUE, fill.by = "ident")
  709. VEN_markers_biotype <- subset(all_genes, all_genes$gene_name %in% rownames(VEN_markers.cad_flit))
  710. VEN_markers_biotype <- as.data.frame(table(VEN_markers_biotype$gene_biotype))
  711. colnames(VEN_markers_biotype) <- c("biotype", "count")
  712. ggplot() + geom_bar(data = VEN_markers_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  713. theme(axis.title = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  714. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  715. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  716. scale_y_continuous(expand = c(0, 0), breaks = seq(0,400, by = 80), limits = c(0,400))
  717. write.table(VEN_markers_biotype, file = "VEN_markers_biotype.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  718. ## VEN vs IT-PC
  719. Idents(VEN4clust) <- "seurat_clusters"
  720. VEN4clust$clust_PM <- paste(Idents(VEN4clust), VEN4clust$PM_type, sep = " ")
  721. Idents(VEN4clust) <- "clust_PM"
  722. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "clust_PM")
  723. VENIT <- subset(VEN4clust, ident = c("0 IT_PC", "0 ET_VEN", "0 IT_VEN", "1 ET_VEN", "1 IT_VEN"))
  724. DimPlot(VENIT, reduction = "umap", label = FALSE, pt.size = 3, group.by = "clust_PM")
  725. Idents(VENIT) <- "VEN_type"
  726. DimPlot(VENIT, reduction = "umap", label = FALSE, pt.size = 3, group.by = "VEN_type")
  727. VENvsITPC.cad_1 <- FindMarkers(VENIT, ident.1 = "VEN", ident.2 = "non_VEN", only.pos = TRUE, min.pct = 1, logfc.threshold = 0.5)
  728. VENvsITPC.cad_2 <- cosg(VENIT, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  729. expressed_pct = 1, n_genes_user = 1597)
  730. VENvsITPC.cad_1 <- subset(VENvsITPC.cad_1, rownames(VENvsITPC.cad_1) %in% VENvsITPC.cad_2$names$VEN)
  731. ITPCvsVEN.cad_1 <- FindMarkers(VENIT, ident.1 = "VEN", ident.2 = "non_VEN", only.pos = FALSE, min.pct = 0.8, logfc.threshold = 0.5)
  732. ITPCvsVEN.cad_1 <- subset(ITPCvsVEN.cad_1, avg_log2FC < 0)
  733. ITPCvsVEN.cad_1 <- subset(ITPCvsVEN.cad_1, pct.2 == 1)
  734. ITPCvsVEN.cad_2 <- cosg(VENIT, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T, expressed_pct = 1,
  735. n_genes_user = 1644)
  736. ITPCvsVEN.cad_1 <- subset(ITPCvsVEN.cad_1, rownames(ITPCvsVEN.cad_1) %in% ITPCvsVEN.cad_2$names$non_VEN)
  737. VENvsITPC_markers.cad <- rbind(VENvsITPC.cad_1, ITPCvsVEN.cad_1)
  738. EnhancedVolcano(VENvsITPC_markers.cad, lab = rownames(VENvsITPC_markers.cad), x = 'avg_log2FC', y = 'p_val', pCutoff = 0.05,
  739. shape = c(4, 7, 2, 1), colAlpha = 1, labSize = 3, labFace = "italic", boxedLabels = TRUE,
  740. selectLab = c("CCK", "NPTXR", "NPTX1", "NCALD", "CCL4L2", "CCL3L1", "KCTD16", "POU3F1", "ADRA1A", "SULF2", "PCP4L1",
  741. "VAT1L", "SYT2", "COL5A2"), title = "VEN markers", subtitle = "vs. IT_PC", cutoffLineCol = "black",
  742. gridlines.minor = F, gridlines.major = F, FCcutoff = 1) +
  743. scale_x_continuous(expand = c(0, 0), breaks = seq(-8,6, by = 2), limits = c(-8,6)) +
  744. scale_y_continuous(expand = c(0, 0), breaks = seq(0,12, by = 3), limits = c(0,12)) +
  745. theme(axis.text.x = element_text(size = 16, colour = "black"), axis.text.y = element_text(size = 16, colour = "black"),
  746. axis.line = element_line(color = "black", size = 1))
  747. VENvsITPC_markers.cad_filt <- subset(VENvsITPC_markers.cad, p_val < 0.05)
  748. VENvsITPC_markers.cad_filt <- subset(VENvsITPC_markers.cad_filt, abs(avg_log2FC) > 1)
  749. write.table(VENvsITPC_markers.cad_filt, file = "VENvsITPC_markers.cad_filt.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  750. VENvsITPC_markers_biotype <- subset(all_genes, all_genes$gene_name %in% rownames(VENvsITPC_markers.cad_filt))
  751. VENvsITPC_markers_biotype <- as.data.frame(table(VENvsITPC_markers_biotype$gene_biotype))
  752. colnames(VENvsITPC_markers_biotype) <- c("biotype", "count")
  753. ggplot() + geom_bar(data = VENvsITPC_markers_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  754. theme(axis.title = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  755. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  756. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  757. scale_y_continuous(expand = c(0, 0), breaks = seq(0,600, by = 120), limits = c(0,600))
  758. write.table(VENvsITPC_markers_biotype, file = "VENvsITPC_markers_biotype.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  759. VENETIT <- subset(VEN4clust, ident = c("0 IT_PC", "0 ET_VEN", "0 IT_VEN", "1 ET_VEN", "1 IT_VEN", "1 ET_PC"))
  760. Idents(VENETIT) <- "PM_type"
  761. DimPlot(VENETIT, reduction = "umap", label = FALSE, pt.size = 3, group.by = "PM_type")
  762. VENETIT <- RenameIdents(VENETIT, `ET_VEN` = "VEN", `IT_VEN` = "VEN")
  763. [email hidden]$VEN_M_type <- [email hidden]
  764. DimPlot(VENETIT, reduction = "umap", label = FALSE, pt.size = 3)
  765. VENvsIT_markers.cad_ETIT <- subset(VENvsITPC_markers.cad_filt, rownames(VENvsITPC_markers.cad_filt) %in% ETIT_markers)
  766. VENvsIT_markers.cad_known <- subset(VENvsITPC_markers.cad_filt, rownames(VENvsITPC_markers.cad_filt) %in% VEN_known_markers)
  767. RidgePlot(VENETIT, features = c("POU3F1", "SYT2", "SPARC", "FEZF2", "NPTX1", "RNF152"), stack = TRUE, fill.by = "ident")
  768. RidgePlot(VENETIT, features = c("SULF2", "ADRA1A", "LYPD1", "VAT1L", "CHST8", "BMP3"), stack = TRUE, fill.by = "ident")
  769. ## VEN vs ET-PC
  770. DimPlot(VEN4clust, reduction = "umap", label = FALSE, pt.size = 3, group.by = "clust_PM")
  771. VENET <- subset(VEN4clust, ident = c("0 ET_VEN", "0 IT_VEN", "1 ET_PC", "1 ET_VEN", "1 IT_VEN"))
  772. DimPlot(VENET, reduction = "umap", label = FALSE, pt.size = 3, group.by = "clust_PM")
  773. Idents(VENET) <- "M_type"
  774. DimPlot(VENET, reduction = "umap", label = FALSE, pt.size = 3, group.by = "M_type")
  775. VENvsET.cad_1 <- FindMarkers(VENET, ident.1 = "cVEN", ident.2 = "PC", only.pos = TRUE, min.pct = 1, logfc.threshold = 0.5)
  776. VENvsET.cad_2 <- cosg(VENET, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  777. expressed_pct = 1, n_genes_user = 5017)
  778. VENvsET.cad_1 <- subset(VENvsET.cad_1, rownames(VENvsET.cad_1) %in% VENvsET.cad_2$names$cVEN)
  779. ETvsVEN.cad_1 <- FindMarkers(VENET, ident.1 = "cVEN", ident.2 = "PC", only.pos = FALSE, min.pct = 0.7, logfc.threshold = 0.5)
  780. ETvsVEN.cad_1 <- subset(ETvsVEN.cad_1, avg_log2FC < 0)
  781. ETvsVEN.cad_1 <- subset(ETvsVEN.cad_1, pct.2 == 1)
  782. ETvsVEN.cad_2 <- cosg(VENET, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  783. expressed_pct = 1, n_genes_user = 1747)
  784. ETvsVEN.cad_1 <- subset(ETvsVEN.cad_1, rownames(ETvsVEN.cad_1) %in% ETvsVEN.cad_2$names$PC)
  785. VENvsET_markers.cad <- rbind(VENvsET.cad_1, ETvsVEN.cad_1)
  786. EnhancedVolcano(VENvsET_markers.cad, lab = rownames(VENvsET_markers.cad), x = 'avg_log2FC', y = 'p_val', pCutoff = 0.05,
  787. shape = c(4, 7, 2, 1), colAlpha = 1, labSize = 3, labFace = "italic", boxedLabels = TRUE,
  788. selectLab = c("SYNJ1", "DIRAS1", "PEG10", "SYT2", "SCN4B", "LINC02002", "AL512590.1", "CCK", "CARD16", "CLLU1"),
  789. title = "VEN markers", subtitle = "vs. ET_PC", cutoffLineCol = "black",
  790. gridlines.minor = F, gridlines.major = F, FCcutoff = 1) +
  791. scale_x_continuous(expand = c(0, 0), breaks = seq(-3,3, by = 1), limits = c(-3,3)) +
  792. scale_y_continuous(expand = c(0, 0), breaks = seq(0,8, by = 2), limits = c(0,8)) +
  793. theme(axis.text.x = element_text(size = 16, colour = "black"), axis.text.y = element_text(size = 16, colour = "black"),
  794. axis.line = element_line(color = "black", size = 1))
  795. VENvsET_markers.cad_filt <- subset(VENvsET_markers.cad, p_val < 0.05)
  796. VENvsET_markers.cad_filt <- subset(VENvsET_markers.cad_filt, abs(avg_log2FC) > 1)
  797. write.table(VENvsET_markers.cad_filt, file = "VENvsET_markers.cad_filt.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  798. VENvsET_markers_biotype <- subset(all_genes, all_genes$gene_name %in% rownames(VENvsET_markers.cad_filt))
  799. VENvsET_markers_biotype <- as.data.frame(table(VENvsET_markers_biotype$gene_biotype))
  800. colnames(VENvsET_markers_biotype) <- c("biotype", "count")
  801. ggplot() + geom_bar(data = VENvsET_markers_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  802. theme(axis.title = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  803. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  804. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  805. scale_y_continuous(expand = c(0, 0), breaks = seq(0,1000, by = 200), limits = c(0,1000))
  806. write.table(VENvsET_markers_biotype, file = "VENvsET_markers_biotype.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  807. VENvsET_markers.cad_ETIT <- subset(VENvsET_markers.cad_filt, rownames(VENvsET_markers.cad_filt) %in% ETIT_markers)
  808. VENvsET_markers.cad_known <- subset(VENvsET_markers.cad_filt, rownames(VENvsET_markers.cad_filt) %in% VEN_known_markers)
  809. RidgePlot(VENETIT, features = c("AVPR1A", "CCK", "LINC02002", "AL512590.1", "CARD16", "RXFP2"), stack = TRUE, fill.by = "ident")
  810. RidgePlot(VENETIT, features = c("SCN4B", "ETV5", "AKAP12", "SYNJ1", "DIRAS1", "LONRF2"), stack = TRUE, fill.by = "ident")
  811. VENvsET.cad_1_chr <- subset(VENvsET.cad_1, p_val < 0.05)
  812. VENvsET.cad_1_chr <- subset(VENvsET.cad_1_chr, avg_log2FC > 1)
  813. VENvsET.cad_1_chr <- rownames(VENvsET.cad_1_chr)
  814. VENvsET.cad_1_chr.df <- bitr(VENvsET.cad_1_chr, fromType = "SYMBOL", toType = c("ENTREZID", "ENSEMBL"), OrgDb = org.Hs.eg.db)
  815. ## 21.97% of input gene IDs are fail to map...
  816. VENvsET.cad_1_ID <- unique(VENvsET.cad_1_chr.df$ENTREZID)
  817. VENvsET.cad_1_ego <- enrichGO(gene = VENvsET.cad_1_ID, OrgDb = org.Hs.eg.db, ont = "BP", readable = TRUE)
  818. VENvsET.cad_1_kegg <- enrichKEGG(gene = VENvsET.cad_1_ID, keyType = "kegg", organism = 'hsa', pAdjustMethod = "BH", pvalueCutoff = 0.05,
  819. qvalueCutoff = 0.2)
  820. ETvsVEN.cad_1_chr <- subset(ETvsVEN.cad_1, p_val < 0.05)
  821. ETvsVEN.cad_1_chr <- subset(ETvsVEN.cad_1_chr, avg_log2FC < -1)
  822. ETvsVEN.cad_1_chr <- rownames(ETvsVEN.cad_1_chr)
  823. ETvsVEN.cad_1_chr.df <- bitr(ETvsVEN.cad_1_chr, fromType = "SYMBOL", toType = c("ENTREZID", "ENSEMBL"), OrgDb = org.Hs.eg.db)
  824. ## 3.01% of input gene IDs are fail to map...
  825. ETvsVEN.cad_1_ID <- unique(ETvsVEN.cad_1_chr.df$ENTREZID)
  826. ETvsVEN.cad_1_ego <- enrichGO(gene = ETvsVEN.cad_1_ID, OrgDb = org.Hs.eg.db, ont = "BP", readable = TRUE)
  827. ETvsVEN.cad_1_ego <- clusterProfiler::simplify(ETvsVEN.cad_1_ego, cutoff = 0.7, by = "p.adjust", select_fun = min)
  828. goCls <- pairwise_termsim(ETvsVEN.cad_1_ego, method = "Resnik", semData = d)
  829. treeplot(goCls)
  830. ETvsVEN.cad_1_kegg <- enrichKEGG(gene = ETvsVEN.cad_1_ID, keyType = "kegg", organism = 'hsa', pAdjustMethod = "BH", pvalueCutoff = 0.05,
  831. qvalueCutoff = 0.2)
  832. clusterProfiler::dotplot(ETvsVEN.cad_1_kegg, title = "ETvsVEN.cad_1_kegg")
  833. ## VEN subtypes
  834. Idents(VEN4clust) <- "M_type"
  835. VEN <- subset(VEN4clust, ident = "cVEN")
  836. Idents(VEN) <- "seurat_clusters"
  837. VEN <- RenameIdents(VEN, `0` = "subtype_1", `1` = "subtype_2")
  838. VEN$subtype <- [email hidden]
  839. Idents(VEN) <- "subtype"
  840. VEN$subtype <- factor(x = VEN$subtype, levels = c("subtype_1", "subtype_2"))
  841. DimPlot(VEN, reduction = "umap", label = TRUE, pt.size = 4) + NoLegend()
  842. Idents(VEN) <- "sample_ID"
  843. DimPlot(VEN, reduction = "umap", label = TRUE, pt.size = 4, shape.by = "subtype") + NoLegend()
  844. Idents(VEN) <- "subtype"
  845. VEN_submarkers <- FindAllMarkers(VEN, only.pos = TRUE, min.pct = 1, logfc.threshold = 0.5)
  846. VEN_submarkers_1 <- subset(VEN_submarkers, cluster == "subtype_1")
  847. VEN_submarkers_2 <- subset(VEN_submarkers, cluster == "subtype_2")
  848. VEN_sub1markers <- FindMarkers(VEN, ident.1 = "subtype_1", ident.2 = "subtype_2", only.pos = FALSE, logfc.threshold = 0.5)
  849. VEN_sub1markers <- subset(VEN_sub1markers, avg_log2FC < 0)
  850. VEN_sub1markers <- subset(VEN_sub1markers, rownames(VEN_sub1markers) %in% VEN_submarkers_2$gene)
  851. VEN_sub1markers$cluster <- "subtype_2"
  852. VEN_sub1markers$gene <- rownames(VEN_sub1markers)
  853. VEN_submarkers_cosg <- cosg(VEN, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  854. expressed_pct = 1, n_genes_user = 268)
  855. VEN_submarkers_1 <- subset(VEN_submarkers_1, rownames(VEN_submarkers_1) %in% VEN_submarkers_cosg$names$subtype_1)
  856. VEN_submarkers_cosg <- cosg(VEN, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  857. expressed_pct = 1, n_genes_user = 1187)
  858. VEN_sub1markers <- subset(VEN_sub1markers, rownames(VEN_sub1markers) %in% VEN_submarkers_cosg$names$subtype_2)
  859. VEN_submarkers_1_biotype <- subset(all_genes, all_genes$gene_name %in% rownames(VEN_submarkers_1))
  860. VEN_submarkers_1_biotype <- as.data.frame(table(VEN_submarkers_1_biotype$gene_biotype))
  861. colnames(VEN_submarkers_1_biotype) <- c("biotype", "count")
  862. VEN_submarkers_2_biotype <- subset(all_genes, all_genes$gene_name %in% rownames(VEN_sub1markers))
  863. VEN_submarkers_2_biotype <- as.data.frame(table(VEN_submarkers_2_biotype$gene_biotype))
  864. colnames(VEN_submarkers_2_biotype) <- c("biotype", "count")
  865. write.table(VEN_submarkers_1_biotype, file = "VEN_submarkers_1_biotype.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  866. write.table(VEN_submarkers_2_biotype, file = "VEN_submarkers_2_biotype.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  867. VEN_submarkers_filt <- rbind(VEN_submarkers_1, VEN_sub1markers)
  868. write.table(VEN_submarkers_filt, file = "VEN_submarkers_filt.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  869. VEN_submarkers_mean <- AverageExpression(VEN, features = VEN_submarkers_filt$gene, assays = "RNA", slot = "counts")
  870. VEN_submarkers_mean <- as.data.frame(VEN_submarkers_mean)
  871. VEN_submarkers_mean$group <- VEN_submarkers_filt[match(rownames(VEN_submarkers_mean), VEN_submarkers_filt$gene), 6]
  872. VEN_submarkers_mean$L2FC <- VEN_submarkers_filt[match(rownames(VEN_submarkers_mean), VEN_submarkers_filt$gene), 2]
  873. ggplot(VEN_submarkers_mean, aes(x = RNA.subtype_1, y = RNA.subtype_2, color = L2FC)) + geom_point(size = 3) +
  874. scale_color_gradient2(low = "blue", mid = "lightgrey", high = "#d7191c", midpoint = 0, name = "L2FC") +
  875. geom_abline(intercept = -1, slope = 1, col = 'black', linetype = 'dashed', size = 0.8) +
  876. geom_abline(intercept = 1, slope = 1, col = 'black', linetype = 'dashed', size = 0.8) +
  877. geom_abline(intercept = 0, slope = 1, col = 'black', linetype = 'dashed', size = 0.8) +
  878. scale_x_continuous(expand = c(0, 0), breaks = seq(0,12, by = 3), limits = c(0,12)) +
  879. scale_y_continuous(expand = c(0, 0), breaks = seq(0,12, by = 3), limits = c(0,12)) +
  880. theme(axis.ticks.length = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.5), panel.background = element_rect(fill = "white"))
  881. RidgePlot(VEN, features = c("NEUROD6", "CACNA1H", "MIAT", "SNURF", "KCNQ5-AS1", "GRIK2"), stack = TRUE, fill.by = "ident")
  882. RidgePlot(VEN, features = c("OR7E21P", "HLX-AS1", "MIR4791", "RN7SL826P", "MIR4276", "PEX12P1"), stack = TRUE, fill.by = "ident")
  883. DoHeatmap(VEN, features = ETIT_markers, draw.lines = FALSE, hjust = 0) + scale_fill_gradientn(colors = c("#2f58a7", "lightgrey", "#FF6347"))
  884. Idents(VENETIT) <- "clust_PM"
  885. DimPlot(VENETIT, reduction = "umap", label = FALSE, pt.size = 3)
  886. VENETIT <- RenameIdents(VENETIT, `0 IT_PC` = "ITPC", `1 ET_PC` = "ETPC", `1 ET_VEN` = "S2VEN", `1 IT_VEN` = "S2VEN",
  887. `0 IT_VEN` = "S1VEN", `0 ET_VEN` = "S1VEN")
  888. [email hidden]$CM_type <- [email hidden]
  889. VENETIT$CM_type <- factor(x = VENETIT$CM_type , levels = c("ITPC", "ETPC", "S1VEN", "S2VEN"))
  890. Idents(VENETIT) <- "CM_type"
  891. DimPlot(VENETIT, reduction = "umap", pt.size = 3)
  892. RidgePlot(VENETIT, features = c("POU3F1", "SULF2", "ADRA1A", "VAT1L", "LYPD1", "AVPR1A", "CHST8", "ITGA4"), stack = TRUE, fill.by = "ident")
  893. RidgePlot(VENETIT, features = c("BMP3", "SLC18A2", "DRD3", "HTR2B", "NMB", "DISC1", "ATF3", "IL4R"), stack = TRUE, fill.by = "ident")
  894. AverageExp <- AverageExpression(VENETIT, features = VENETIT@assays$[email hidden], assays = "RNA", slot = "counts")
  895. typeof(AverageExp)
  896. head(AverageExp$RNA)
  897. coorda <- corr.test(AverageExp$RNA, AverageExp$RNA, method = "spearman")
  898. pheatmap(coorda$r, color = c("#2f58a7", "lightgrey", "#FF6347"))
  899. ## extract data for M-type feature selecting
  900. Idents(VEN4FS) <- "cell_name"
  901. M_level2_62cells <- c('PC17', 'TRI31', 'PC25', 'PC26', 'PC27', 'PC05', 'TRI09', 'TRI23', 'cVEN01', 'cVEN02', 'cVEN03', 'cVEN04',
  902. 'cVEN05', 'cVEN06', 'cVEN07', 'cVEN08', 'cVEN14', 'PC37', 'PC38', 'PC39', 'PC40', 'PC41', 'PC42', 'cVEN09',
  903. 'cVEN10', 'cVEN11', 'PC33', 'PC34', 'cVEN12', 'cVEN13', 'PC36', 'PC44', 'PC45', 'PC46', 'PC47', 'PC48',
  904. 'PC49', 'PC50', 'PC51', 'PC53', 'PC54', 'PC55', 'PC56', 'PC57', 'PC58', 'PC59', 'PC60', 'PC61', 'PC62',
  905. 'PC63', 'cVEN15', 'cVEN16', 'cVEN17', 'cVEN18', 'cVEN19', 'cVEN20', 'PC65', 'PC66', 'cVEN21', 'PC67',
  906. 'PC68', 'cVEN22')
  907. VEN4Mtype_L2 <- subset(VEN4FS, idents = M_level2_62cells)
  908. Idents(VEN4Mtype_L2) <- "M_type"
  909. VEN4Mtype_L2 <- RenameIdents(VEN4Mtype_L2, `cVEN` = "VEN", `PC` = "non_VEN", `TRI` = "non_VEN")
  910. VEN4Mtype_L2$VEN_type <- [email hidden]
  911. Idents(VEN4Mtype_L2) <- "VEN_type"
  912. Mlevel2_markers.cad_1 <- FindMarkers(VEN4Mtype_L2, ident.1 = "VEN", ident.2 = "non_VEN", only.pos = TRUE, min.pct = 1, logfc.threshold = 0.5)
  913. Mlevel2_markers.cad_1_chr <- rownames(Mlevel2_markers.cad_1)
  914. Mlevel2_markers.cad_2 <- cosg(VEN4Mtype_L2, groups = "all", assay = "RNA", slot = "data", mu = 1, remove_lowly_expressed = T,
  915. expressed_pct = 1, n_genes_user = 4200)
  916. Mlevel2_markers.cad_2_chr <- Mlevel2_markers.cad_2$names[,1]
  917. Mlevel2_markers.cad <- generics ::intersect(Mlevel2_markers.cad_1_chr, Mlevel2_markers.cad_2_chr)
  918. Mlevel2_markers <- subset(all_genes, all_genes$gene_name %in% Mlevel2_markers.cad)
  919. write.table(Mlevel2_markers, file = "62cells_Mlevel2_markers.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  920. Mlevel2_markers_biotype <- as.data.frame(table(Mlevel2_markers$gene_biotype))
  921. colnames(Mlevel2_markers_biotype) <- c("biotype", "count")
  922. ggplot() + geom_bar(data = Mlevel2_markers_biotype, aes(x = biotype, y = count), position = position_dodge2(padding = 0.3), stat = "identity") +
  923. theme(axis.title = element_blank(), axis.text.x = element_text(size = 6, angle = 45, vjust = 1, hjust = 1),
  924. axis.ticks.x = element_blank(), axis.ticks.length.y = unit(.25, "cm"), axis.line = element_line(color = "black", size = 0.4),
  925. axis.text.y = element_text(size = 10), panel.background = element_rect(fill = "white")) +
  926. scale_y_continuous(expand = c(0, 0), breaks = seq(0,2500, by = 500), limits = c(0,2500))
  927. VEN4Mtype_L2_mat <- as.data.frame(VEN4Mtype_L2@assays$[email hidden])
  928. VEN4Mtype_L2_mat <- VEN4Mtype_L2_mat[Mlevel2_markers.cad,]
  929. pheatmap(VEN4Mtype_L2_mat, fontsize_row = 1, clustering_method = "ward.D2", fontsize_col = 5)
  930. VEN4clust_mat <- as.data.frame(VEN4clust@assays$[email hidden])
  931. M_typeFS_38genes <- c("GRIA4", "SYTL2", "NPTX1", "RXFP1", "MMD", "SPOCK1", "AC025287.3", "DNAJA4", "FOS", "SLITRK1", "ATP8A1",
  932. "MAP2K1", "NUDT4", "SLC7A14", "PCDH9", "CAMK1D", "OPTN", "RNF41", "INPP5A", "FAM126B", "PLEKHB2", "MEIS2",
  933. "POU3F1", "ADRA1A", "SULF2", "COL21A1", "WNT5A", "C6orf163", "SETBP1", "FAM111A-DT", "AL512590.1",
  934. "HCG17", "PLA2G12B", "SLC27A5", "CARD16", "LINC01845", "AC092634.5", "SLC7A2")
  935. M_typeFS_38genes_mat <- VEN4clust_mat[M_typeFS_38genes,]
  936. pheatmap(M_typeFS_38genes_mat, fontsize_row = 5, clustering_method = "ward.D", fontsize_col = 5, color = c("#2f58a7", "lightgrey", "#FF6347"))
  937. # hdWGCNA and TF
  938. theme_set(theme_cowplot())
  939. VENnetwork <- SetupForWGCNA(VENETIT, gene_select = "variable", wgcna_name = "VENnetwork")
  940. length(VENnetwork@misc$VENnetwork$wgcna_genes)
  941. VENnetwork <- MetacellsByGroups(seurat_obj = VENnetwork, group.by = "VEN_M_type", reduction = "pca", ident.group = "VEN_M_type",
  942. min_cells = 22, k = 15)
  943. VENnetwork <- NormalizeMetacells(VENnetwork)
  944. VENnetwork <- SetDatExpr(VENnetwork, group_name = "VEN", group.by = "VEN_M_type", assay = "RNA", slot = "data")
  945. VENnetwork <- TestSoftPowers(VENnetwork, networkType = "signed")
  946. plot_list <- PlotSoftPowers(VENnetwork)
  947. wrap_plots(plot_list, ncol = 2)
  948. power_table <- GetPowerTable(VENnetwork)
  949. head(power_table)
  950. ## construct co-expression network
  951. VENnetwork <- ConstructNetwork(VENnetwork, soft_power = 12, setDatExpr = FALSE, tom_name = "VEN")
  952. PlotDendrogram(VENnetwork, main = "VEN hdWGCNA Dendrogram")
  953. VENnetwork@misc$VENnetwork$wgcna_modules %>% head
  954. write.table(VENnetwork@misc$VENnetwork$wgcna_modules, file = "VEN_modules.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  955. table(VENnetwork@misc$VENnetwork$wgcna_modules$module)
  956. ## green turquoise purple brown grey midnightblue black red salmon cyan
  957. ## 113 369 69 292 494 57 92 99 58 58
  958. ## grey60 blue pink yellow greenyellow lightcyan tan magenta
  959. ## 51 292 89 115 67 54 61 70
  960. Tom <- GetTOM(VENnetwork)
  961. ## Compute harmonized module eigengenes
  962. VENnetwork <- ScaleData(VENnetwork, features = VariableFeatures(VENnetwork))
  963. VENnetwork <- ModuleEigengenes(VENnetwork, reduction.use = "pca")
  964. ## harmonized module eigengenes
  965. hMEs <- GetMEs(VENnetwork)
  966. head(hMEs)
  967. MEs <- GetMEs(VENnetwork, harmonized = FALSE)
  968. head(MEs)
  969. ## Compute module connectivity
  970. VENnetwork <- ModuleConnectivity(VENnetwork, group.by = "VEN_M_type", group_name = "VEN")
  971. VENnetwork <- ResetModuleNames(VENnetwork, new_name = "VEN-M")
  972. PlotKMEs(VENnetwork, ncol = 5)
  973. modules <- GetModules(VENnetwork)
  974. hub_df <- GetHubGenes(VENnetwork, n_hubs = 10)
  975. head(hub_df)
  976. write.table(hub_df, file = "hub_genes.txt", col.names = TRUE, sep = "\t", quote = FALSE)
  977. VENnetwork <- ModuleExprScore(VENnetwork, n_genes = 25, method = "Seurat")
  978. ## Visualization
  979. plot_list <- ModuleFeaturePlot(VENnetwork, features = "hMEs", order = TRUE, point_size = 1)
  980. wrap_plots(plot_list, ncol = 5)
  981. plot_list <- ModuleFeaturePlot(VENnetwork, features = "scores", order = "shuffle", ucell = TRUE, point_size = 1)
  982. wrap_plots(plot_list, ncol = 5)
  983. MEs <- GetMEs(VENnetwork, harmonized = TRUE)
  984. mods <- colnames(MEs); mods <- mods[mods != "grey"]
  985. [email hidden] <- cbind([email hidden], MEs)
  986. P <- DotPlot(VENnetwork, features = mods, group.by = "VEN_M_type")
  987. P <- P + coord_flip() + RotatedAxis() + scale_color_gradient2(high = "red", mid = "grey95", low = "blue")
  988. P
  989. theme_set(theme_cowplot())
  990. ModuleNetworkPlot(VENnetwork)
  991. HubGeneNetworkPlot(VENnetwork, n_hubs = 3, n_other = 5, edge_prop = 0.75, mods = 'all')
  992. hubFS_genes <- intersect(hub_df$gene_name, M_typeFS_38genes)
  993. VENnetwork <- RunModuleUMAP(VENnetwork, n_hubs = 10, n_neighbors = 15, min_dist = 0.1)
  994. ModuleUMAPPlot(VENnetwork, edge.alpha = 0.5, sample_edges = TRUE, edge_prop = 0.1, label_hubs = 1,
  995. keep_grey_edges = FALSE, vertex.label.cex = 0.1, label_genes = c("ADRA1A", "SULF2"))
  996. ## Enrichment analysis
  997. set.seed(12345)
  998. dbs <- c('GO_Biological_Process_2023','GO_Cellular_Component_2023','GO_Molecular_Function_2023')
  999. VENnetwork <- RunEnrichr(VENnetwork, dbs = dbs, max_genes = Inf)
  1000. enrich_df <- GetEnrichrTable(VENnetwork)
  1001. EnrichrDotPlot(VENnetwork, mods = "all", database = "GO_Biological_Process_2023", n_terms = 2, term_size = 8, p_adj = TRUE) +
  1002. scale_color_stepsn(colors = rev(viridis::magma(256)))
  1003. EnrichrBarPlot(VENnetwork, outdir = "enrichr_plots", n_terms = 10, plot_size = c(5,7), logscale = TRUE)
  1004. ## TF
  1005. theme_set(theme_cowplot())
  1006. set.seed(12345)
  1007. pfm_core <- TFBSTools::getMatrixSet(x = JASPAR2020,
  1008. opts = list(collection = "CORE", tax_group = 'vertebrates', all_versions = FALSE))
  1009. VENnetwork <- MotifScan(VENnetwork, species_genome = 'hg38', pfm = pfm_core, EnsDb = EnsDb.Hsapiens.v86)
  1010. motif_df <- GetMotifs(VENnetwork)
  1011. tf_genes <- unique(motif_df$gene_name)
  1012. modules <- GetModules(VENnetwork)
  1013. nongrey_genes <- subset(modules, module != 'grey') %>% .$gene_name
  1014. genes_use <- c(tf_genes, nongrey_genes)
  1015. VENnetwork <- SetWGCNAGenes(VENnetwork, genes_use)
  1016. VENnetwork <- SetDatExpr(VENnetwork, group.by = 'VEN_M_type', group_name = "VEN", assay = "RNA")
  1017. model_params <- list(objective = 'reg:squarederror', max_depth = 1, eta = 0.1, nthread = 16, alpha = 0.5)
  1018. VENnetwork <- ConstructTFNetwork(VENnetwork, model_params)
  1019. results <- GetTFNetwork(VENnetwork)
  1020. head(results)
  1021. VENnetwork <- AssignTFRegulons(VENnetwork, strategy = "A", reg_thresh = 0.01, n_tfs = 10)
  1022. RegulonBarPlot(VENnetwork, selected_tf = 'TBP')
  1023. VENnetwork <- RegulonScores(VENnetwork, target_type = 'positive', ncores = 8)
  1024. VENnetwork <- RegulonScores(VENnetwork, target_type = 'negative', cor_thresh = -0.05, ncores = 8)
  1025. pos_regulon_scores <- GetRegulonScores(VENnetwork, target_type = 'positive')
  1026. neg_regulon_scores <- GetRegulonScores(VENnetwork, target_type = 'negative')
  1027. tf_regulons <- GetTFRegulons(VENnetwork)
  1028. hub_df <- GetHubGenes(VENnetwork, n_hubs = 25) %>% subset(gene_name %in% tf_regulons$tf)
  1029. Idents(VENnetwork) <- "VEN_M_type"
  1030. marker_tfs <- FindAllMarkers(VENnetwork, features = unique(tf_regulons$tf))
  1031. top_tfs <- marker_tfs %>% subset(cluster == 'VEN') %>% slice_max(n = 25, order_by = avg_log2FC)
  1032. intersect(top_tfs$gene, hub_df$gene_name)
  1033. cur_tf <- 'FOXF2'
  1034. TFNetworkPlot(VENnetwork, selected_tfs = cur_tf)
  1035. group1 <- [email hidden] %>% subset(VEN_M_type == "VEN") %>% rownames
  1036. group2 <- [email hidden] %>% subset(VEN_M_type == "ET_PC") %>% rownames
  1037. dregs <- FindDifferentialRegulons(VENnetwork, barcodes1 = group1, barcodes2 = group2)
  1038. head(dregs)
  1039. # WD ^ ^ written by Shuxuan Lyu 2025/07/17

VEN submission.R at commit ca03d5c, no license · at the source

Overview

Authors: Wei Ke1, Shuxuan Lyu1, Mengmeng Jin2, Shaoqing Jiao3, Liang Li1, Heyuan Zhang1, Kexin Ling1, Cuiping Tian4, Yiquan Song5, Liu Chen5, Quansheng He1, Yujie Xiao1, Suixin Deng6, Liu Fan7, Huawei Mu8, Hui Yang9, Hua-Tai Xu7, Hao Wang8, Ai-Hui Tang5, Jiajie Peng3, Jie He2, Hui Guo10, Yousheng Shu1
  1. Department of Neurology, Huashan Hospital, Institute for Translational Brain Research, State Key Laboratory of Brain Function and Disorders, MOE Frontiers Center for Brain Science, MOE Innovative Center for New Drug Development of Immune Inflammatory Diseases, Fudan University,Shanghai, China
  2. State Key Laboratory of Neuroscience, Institute of Neuroscience, Center for Excellence in Brain Science and Intelligence Technology, Chinese Academy of Sciences,Shanghai, China
  3. AI for Science Interdisciplinary Research Center, School of Computer Science, Northwestern Polytechnical University,Xi’an, China
  4. iHuman Institute, ShanghaiTech University,Shanghai, China
  5. Anhui Province Key Laboratory of Biomedical Imaging and Intelligent Processing, HFCNS Institute of Artificial Intelligence, Division of Life Sciences and Medicine, University of Science and Technology of China,Hefei, China
  6. Center for Medical Genetics, School of Life Sciences, MOE Key Laboratory of Rare Pediatric Diseases, Hunan Key Laboratory of Animal Models for Human Diseases, Central South University,Changsha, China
  7. Lingang Laboratory, Shanghai, China
  8. MOE Key Laboratory of Brain-Inspired Intelligent Perception and Cognition, National Engineering Laboratory for Brain-Inspired Intelligence Technology and Application, Hefei National Research Center for Physical Sciences at the Microscale, University of Science and Technology of China,Hefei, China
  9. Department of Neurosurgery, Huashan Hospital, Institute for Translational Brain Research, Shanghai Medical College, Fudan University,Shanghai, China
  10. Department of Neurosurgery, Shanghai Deji Hospital-The 9th Clinical College, Qingdao University,Shanghai, China
Journal: Nature communications, volume 17, issue 1, article 6330
Dates: received 26 July 2025; accepted 24 April 2026; published online 12 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-72935-2 · PMID 42120382 · PMCID PMC13376633 · OpenAlex W7160938575
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), intracellular / patch clamp (modality), human (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: Cellular neuroscience, Neuronal physiology
MeSH: Action Potentials*, Cerebral Cortex*, Neocortex*, Neurons*, Transcriptome*, Adult, Axons, Dendrites, Female, Gene Expression Profiling, Humans, Male, Patch-Clamp Techniques, Pyramidal Cells (* major topic)
Topic: Neuroscience and Neuropharmacology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: National Natural Science Foundation of China (National Science Foundation of China) (32200953, 32100930); Changping Laboratory (Grant Reference Number: 2025B-07-21) Brain Science and Brain-like Intelligence Technology-National Science and Technology Major Project (Grant Reference Number: 2021ZD0202500) Program of Shanghai Academic/Technology Research Leader (Grant Reference Number: 21XD1400100) Program of China Postdoctoral Science Foundation (Grant Reference Number: 2023M740657)
Citations: cited by 2 papers (Europe PMC); 68 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 16 matches between paragraphs and lines of code.

OpenGene/fastp

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 8a2397b6628ae14127efdb7566f67fc05f9aea56, 10 September 2026
Languages: C/C++ (34), C++ (29), Shell (2), Python (1)
Size: 73 files, 66 scripts
Software Heritage: not archived
Found in: the text, “RNA-seq data quantification”
Holds: README, license file, continuous integration
Not found: CITATION.cff, environment file, tests, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
68 files

Youshengshu/Human_VEN

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: ca03d5cef5b0e9e23e8b7b7c2971bd5ba5264723, 28 July 2025
Languages: MATLAB (18), Jupyter (4), R (2)
Size: 28 files, 24 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: 4 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Statistics and Machine Learning Toolbox (5 files), Curve Fitting Toolbox (4 files), Matplotlib (4 files), NumPy (4 files), pandas (4 files), Scanpy (4 files), scikit-learn (4 files), seaborn (4 files), UMAP (4 files), Violinplot-Matlab (3 files), ggplot2 (2 files), SciPy (2 files), tidyverse (2 files), clusterProfiler (1 file), cowplot (1 file), data.table (1 file), easystats (1 file), edgeR (1 file), igraph (1 file), Image Processing Toolbox (1 file), Signal Processing Toolbox (1 file), patchwork (1 file), pheatmap (1 file), psych (1 file), Seurat (1 file), shadedErrorBar (1 file), WGCNA (1 file), XGBoost (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
24 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/s41467-026-72935-2.

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;
  • 90 scripts, each with its path and the digest of its content;
  • 16 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability 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:

  • it says that the data are available on request

Read it in the paper: doi.org/10.1038/s41467-026-72935-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, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 23 authors, 2 keywords, 14 MeSH terms, 2 funders, 67 references.

Cite

This paper

Ke, W., Lyu, S., Jin, M., Jiao, S., Li, L., Zhang, H., Ling, K., Tian, C., Song, Y., Chen, L., He, Q., Xiao, Y., Deng, S., Fan, L., Mu, H., Yang, H., Xu, H.-T., Wang, H., Tang, A.-H., . . . Shu, Y. (2026). Spindle neurons in human cortex possess distinctive firing properties and transcriptomic signatures. Nature communications, 17(1), 6330. https://doi.org/10.1038/s41467-026-72935-2

BibTeX

@article{ke2026spindle,
author = {Ke, Wei and Lyu, Shuxuan and Jin, Mengmeng and Jiao, Shaoqing and Li, Liang and Zhang, Heyuan and Ling, Kexin and Tian, Cuiping and Song, Yiquan and Chen, Liu and He, Quansheng and Xiao, Yujie and Deng, Suixin and Fan, Liu and Mu, Huawei and Yang, Hui and Xu, Hua-Tai and Wang, Hao and Tang, Ai-Hui and Peng, Jiajie and He, Jie and Guo, Hui and Shu, Yousheng},
title = {{Spindle neurons in human cortex possess distinctive firing properties and transcriptomic signatures}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {6330},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-72935-2},
url = {https://doi.org/10.1038/s41467-026-72935-2},
pmid = {42120382},
pmcid = {PMC13376633}
}

RIS

TY - JOUR
AU - Ke, Wei
AU - Lyu, Shuxuan
AU - Jin, Mengmeng
AU - Jiao, Shaoqing
AU - Li, Liang
AU - Zhang, Heyuan
AU - Ling, Kexin
AU - Tian, Cuiping
AU - Song, Yiquan
AU - Chen, Liu
AU - He, Quansheng
AU - Xiao, Yujie
AU - Deng, Suixin
AU - Fan, Liu
AU - Mu, Huawei
AU - Yang, Hui
AU - Xu, Hua-Tai
AU - Wang, Hao
AU - Tang, Ai-Hui
AU - Peng, Jiajie
AU - He, Jie
AU - Guo, Hui
AU - Shu, Yousheng
TI - Spindle neurons in human cortex possess distinctive firing properties and transcriptomic signatures
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/12
VL - 17
IS - 1
SP - 6330
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-72935-2
UR - https://doi.org/10.1038/s41467-026-72935-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-72935-2",
"type": "article-journal",
"title": "Spindle neurons in human cortex possess distinctive firing properties and transcriptomic signatures",
"container-title": "Nature communications",
"author": [
{
"family": "Ke",
"given": "Wei"
},
{
"family": "Lyu",
"given": "Shuxuan"
},
{
"family": "Jin",
"given": "Mengmeng"
},
{
"family": "Jiao",
"given": "Shaoqing"
},
{
"family": "Li",
"given": "Liang"
},
{
"family": "Zhang",
"given": "Heyuan"
},
{
"family": "Ling",
"given": "Kexin"
},
{
"family": "Tian",
"given": "Cuiping"
},
{
"family": "Song",
"given": "Yiquan"
},
{
"family": "Chen",
"given": "Liu"
},
{
"family": "He",
"given": "Quansheng"
},
{
"family": "Xiao",
"given": "Yujie"
},
{
"family": "Deng",
"given": "Suixin"
},
{
"family": "Fan",
"given": "Liu"
},
{
"family": "Mu",
"given": "Huawei"
},
{
"family": "Yang",
"given": "Hui"
},
{
"family": "Xu",
"given": "Hua-Tai"
},
{
"family": "Wang",
"given": "Hao"
},
{
"family": "Tang",
"given": "Ai-Hui"
},
{
"family": "Peng",
"given": "Jiajie"
},
{
"family": "He",
"given": "Jie"
},
{
"family": "Guo",
"given": "Hui"
},
{
"family": "Shu",
"given": "Yousheng"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "6330",
"DOI": "10.1038/s41467-026-72935-2",
"PMID": "42120382",
"PMCID": "PMC13376633",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-72935-2",
"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/s41556-026-02009-4 [code]
An atlas of primate insular cortex reveals a signal-processing strategy in von Economo neurons.
Journal: Nature cell biology
In common: Scanpy, seaborn, pandas, 3 other tools, genetics / omics, cellular / molecular, 19 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: WGCNA, edgeR, UMAP, 16 other tools, genetics / omics, cellular / molecular, 3 references
[3] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: WGCNA, XGBoost, edgeR, 17 other tools, cellular / molecular
[4] doi:10.1038/s41593-026-02376-z [code]
A framework for comparative analysis of human and mouse cortical neuron dendrites in corresponding brain regions.
Journal: Nature neuroscience
In common: Curve Fitting Toolbox, UMAP, Scanpy, 12 other tools, 5 references
[5] doi:10.1016/j.celrep.2026.117500 [code]
Spatio-molecular gene expression reflects dorsal anterior cingulate cortex structure and function in the human brain.
Journal: Cell reports
In common: edgeR, easystats, igraph, 9 other tools, genetics / omics, cellular / molecular, 5 references
[6] doi:10.1126/sciadv.aeg3223 [code]
The extreme diversity of retinal amacrine cells has deep evolutionary roots.
Journal: Science advances
In common: WGCNA, XGBoost, psych, 15 other tools, genetics / omics, cellular / molecular
[7] doi:10.1093/bioinformatics/btag592 [code]
Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.
Journal: Bioinformatics (Oxford, England)
In common: WGCNA, edgeR, UMAP, 14 other tools, genetics / omics, 1 reference
[8] 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: WGCNA, edgeR, UMAP, 14 other tools, genetics / omics
[9] doi:10.1016/j.isci.2026.115573 [code]
Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways.
Journal: iScience
In common: WGCNA, edgeR, igraph, 12 other tools, cellular / molecular, 2 references
[10] doi:10.1038/s41398-026-04200-5 [code]
Postmortem brain single-nucleus and bulk gene expression analyses identify shared and distinct abnormalities in bipolar disorder and major depressive disorder.
Journal: Translational psychiatry
In common: WGCNA, XGBoost, edgeR, 10 other tools, genetics / omics, cellular / molecular, 2 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.