OSCR

Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC.

Code ↔ Paper

40 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 40 matches
  1. [1] § 2. Results › 2.5. Identifying the Driver Mutation Specific Prognostic Signature (DMSP.sig) with Immune Characteristics ↔ code/FigureS5/FigureS5.R, lines 233–261 · score 0.96 · PAX6 ITGB1, USF2 IGF1, PPARG RARRES2, SNAI1 ITGB4, NR1H4, CEBPB IGF1
  2. [2] § 2. Results › 2.5. Identifying the Driver Mutation Specific Prognostic Signature (DMSP.sig) with Immune Characteristics ↔ code/Figure5/Figure5.R, lines 994–1061 · score 0.96 · PAX6 ITGB1, USF2 IGF1, PPARG RARRES2, SNAI1 ITGB4, NR1H4, CEBPB IGF1
  3. [3] § 2. Results › 2.4. Potential Mediators Underlying the Poor-Prognosis CM2 and CM5 ↔ code/Figure4/Figure4.R, lines 319–359 · score 0.81 · Astrocyte_05_HLA, Ligand receptor, ANGPTL, CCL, GALECTIN, MIF
  4. [4] § 4. Materials and Methods › 4.19. Immune Infiltration Analysis ↔ code/Figure5/Figure5.R, lines 813–892 · score 0.81 · get_immu_ratio, corr.test, Immune infiltration, Pearson, GSVA, matched
  5. [5] § 2. Results › 2.5. Identifying the Driver Mutation Specific Prognostic Signature (DMSP.sig) with Immune Characteristics ↔ code/FigureS5/FigureS5.R, lines 233–261 · score 0.80 · SNAI1 ITGB4, RELA IGF1, SP1 ITGA6, risk scores, S5D, ROC
  6. [6] § 4. Materials and Methods › 4.12. Cellular Interaction Analysis ↔ code/FigureS4/FigureS4.R, lines 179–244 · score 0.79 · netAnalysis_signalingRole_heatmap, CellChatDB, netAnalysis_computeCentrality, Network centrality, probabilities, database
  7. [7] § 4. Materials and Methods › 4.12. Cellular Interaction Analysis ↔ code/Figure4/Figure4.R, lines 234–274 · score 0.78 · CellChat, netAnalysis_signalingRole_heatmap, netAnalysis_computeCentrality, Network centrality, weights, interactions
  8. [8] § 2. Results › 2.4. Potential Mediators Underlying the Poor-Prognosis CM2 and CM5 ↔ code/Figure1/Figure1.R, lines 1105–1150 · score 0.75 · Macrophage_06_C3, mast cells, Astrocyte_05_HLA, stromal cells, CHIT1, MS4A7
  9. [9] § 4. Materials and Methods › 4.16. Prognostic Model Construction ↔ code/Figure5/Figure5.R, lines 412–486 · score 0.72 · Cox regression, prognostic model, glmnet, LASSO, split, GSVA
  10. [10] § 4. Materials and Methods › 4.9. Cancer Cell State Identification ↔ code/Figure3/Figure3.R, lines 1–86 · score 0.70 · CopyKat, Euclidean, chromosome, distance, cancer cell, v2
  11. [11] § 2. Results › 2.5. Identifying the Driver Mutation Specific Prognostic Signature (DMSP.sig) with Immune Characteristics ↔ code/Figure5/Figure5.R, lines 994–1061 · score 0.70 · SNAI1 ITGB4, RELA IGF1, SP1 ITGA6, longer, RS, regulons
  12. [12] § 2. Results › 2.1. A Single-Cell Atlas in Non-Small Cell Lung Cancer (NSCLC) Harboring Driver Mutations ↔ code/Figure1/Figure1.R, lines 478–528 · score 0.68 · cell proportions, NK cells, EGFR co mutation, KRAS co mutation, EGFR BM, driver mutation
  13. [13] § 4. Materials and Methods › 4.13. Metabolic Analysis ↔ code/Figure4/Figure4.R, lines 687–703 · score 0.68 · scMetabolism, KEGG metabolic, AUCell, scores
  14. [14] § 4. Materials and Methods › 4.13. Metabolic Analysis ↔ code/FigureS4/FigureS4.R, lines 245–269 · score 0.68 · scMetabolism, KEGG metabolic, AUCell, scores
  15. [15] § 2. Results › 2.1. A Single-Cell Atlas in Non-Small Cell Lung Cancer (NSCLC) Harboring Driver Mutations ↔ code/Figure1/Figure1.R, lines 1105–1150 · score 0.66 · HLA DQB1, stromal cells, NK cells, plasma, DRA, myeloid
  16. [16] § 4. Materials and Methods › 4.1. Sample Characteristics ↔ code/FigureS1/FigureS1.R, lines 30–107 · score 0.64 · EGFR co mutation, KRAS co mutation, MET BM, S1, EGFR BM, tissue
  17. [17] § 4. Materials and Methods › 4.6. Differential Gene Expression and Pathway Enrichment Analysis ↔ code/FigureS2/FigureS2.R, lines 20–57 · score 0.64 · qvalueCutoff, pvalueCutoff, BP, GO, enrichment, enriched
  18. [18] § 2. Results › 2.4. Potential Mediators Underlying the Poor-Prognosis CM2 and CM5 ↔ code/Figure4/Figure4.R, lines 319–359 · score 0.63 · Macrophage_06_C3, Astrocyte_05_HLA, pro, CHIT1, MS4A7, CD68
  19. [19] § 4. Materials and Methods › 4.15. TF Identification ↔ code/Figure5/Figure5.R, lines 176–233 · score 0.63 · Chi square, chisq.test, TFs
  20. [20] § 2. Results › 2.4. Potential Mediators Underlying the Poor-Prognosis CM2 and CM5 ↔ code/Figure4/Figure4.R, lines 181–232 · score 0.62 · communication networks, cell communication, signaling pathways, incoming, outgoing, identity
  21. [21] § 4. Materials and Methods › 4.14. HR Analysis ↔ code/Figure2/Figure2.R, lines 75–162 · score 0.62 · Worse survival, Better survival, age, Cox, GSVA, HR
  22. [22] § 4. Materials and Methods › 4.14. HR Analysis ↔ code/Figure4/Figure4.R, lines 422–503 · score 0.62 · Worse survival, Better survival, age, TCGA, Cox, GSVA
  23. [23] § 4. Materials and Methods › 4.19. Immune Infiltration Analysis ↔ code/Figure2/Figure2.R, lines 1–73 · score 0.62 · corr.test, TCGAplot, Pearson, GSVA, LUSC, LUAD
  24. [24] § 2. Results › 2.2. Cellular Module Analyses Reveal Five Tumor Immune Microenvironment (TIME) Subtypes ↔ code/Figure2/Figure2.R, lines 364–432 · score 0.62 · MHC class, co inhibition, APC, proliferation, antigen, pathways
  25. [25] § 4. Materials and Methods › 4.6. Differential Gene Expression and Pathway Enrichment Analysis ↔ code/Figure3/Figure3.R, lines 403–453 · score 0.61 · qvalueCutoff, pvalueCutoff, BP, GO, enriched, genes
  26. [26] § 2. Results › 2.1. A Single-Cell Atlas in Non-Small Cell Lung Cancer (NSCLC) Harboring Driver Mutations ↔ code/Figure2/Figure2.R, lines 463–546 · score 0.60 · HLA DRA, HLA DQB1, EGFR BM, plasma, NK, astrocytes
  27. [27] § 4. Materials and Methods › 4.6. Differential Gene Expression and Pathway Enrichment Analysis ↔ code/Figure2/Figure2.R, lines 243–293 · score 0.60 · compareCluster, enrichKEGG, fun, enrichment, Gene
  28. [28] § 4. Materials and Methods › 4.17. Spatial Transcriptomics-Based Regulon Co-Localization Analysis ↔ code/FigureS7/FigureS7.R, lines 58–88 · score 0.59 · SpaGene_LR, co localization, tissue
  29. [29] § 4. Materials and Methods › 4.1. Sample Characteristics ↔ code/Figure1/Figure1.R, lines 313–355 · score 0.59 · EGFR co mutation, KRAS co mutation, MET BM, EGFR BM, driver mutation, HER2
  30. [30] § 4. Materials and Methods › 4.16. Prognostic Model Construction ↔ code/Figure5/Figure5.R, lines 412–486 · score 0.58 · Cox regression, prognostic model, GSVA, coefficient, regulons, sig
  31. [31] § 2. Results › 2.5. Identifying the Driver Mutation Specific Prognostic Signature (DMSP.sig) with Immune Characteristics ↔ code/FigureS5/FigureS5.R, lines 188–231 · score 0.58 · regulatory network, gene associated, cancer cells, CNV, HR, risk
  32. [32] § 4. Materials and Methods › 4.6. Differential Gene Expression and Pathway Enrichment Analysis ↔ code/Figure3/Figure3.R, lines 475–511 · score 0.58 · compareCluster, enrichKEGG, fun, Gene
  33. [33] § 2. Results › 2.2. Cellular Module Analyses Reveal Five Tumor Immune Microenvironment (TIME) Subtypes ↔ code/Figure2/Figure2.R, lines 243–293 · score 0.58 · CC chemokines, functional enrichment, antigen, enriched, receptor, Figure 2
  34. [34] § 2. Results › 2.4. Potential Mediators Underlying the Poor-Prognosis CM2 and CM5 ↔ code/FigureS4/FigureS4.R, lines 1–41 · score 0.56 · Astrocyte_05_HLA, S4A, intensity, COL10A1, HIGD1B, MKI67
  35. [35] § 2. Results › 2.3. Cellular Module (CM)2 and CM5 Are Associated with Poor Prognosis ↔ code/Figure3/Figure3.R, lines 567–607 · score 0.55 · KRAS co mutations, GE3, GE6, GE7, GE13, GE2
  36. [36] § 4. Materials and Methods › 4.20. Drug Sensitivity Prediction and Molecular Docking of Core Targets ↔ code/Figure7/Figure7.R, lines 15–62 · score 0.54 · calcPhenotype, GDSC2, Drug, sensitivity, predicted, trained
  37. [37] § 2. Results › 2.6. Identification of Potential Therapeutic Agents Targeting Prognostic Biomarkers ↔ code/Figure7/Figure7.R, lines 15–62 · score 0.53 · FSC231, JW, LY, drug, sensitivity, RELA
  38. [38] § 4. Materials and Methods › 4.5. Cell Module Identification ↔ code/FigureS3/FigureS3.R, lines 1–67 · score 0.51 · ward.D2, v2, corr, v1, matrix, modules
  39. [39] § 2. Results › 2.1. A Single-Cell Atlas in Non-Small Cell Lung Cancer (NSCLC) Harboring Driver Mutations ↔ code/Figure1/Figure1.R, lines 478–528 · score 0.51 · NK cells, EGFR BM, driver mutations, innate, immunity, stromal
  40. [40] § 2. Results › 2.2. Cellular Module Analyses Reveal Five Tumor Immune Microenvironment (TIME) Subtypes ↔ code/Figure2/Figure2.R, lines 748–799 · score 0.51 · PI3K, pathway activity, MAPK, CM1, Figure 2, NSCLC

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 · 895 lines · 44 KB · MIT · 7 matches

  1. # ------------- Figure 2 --------------
  2. #----Figure 2A----
  3. #co-occurrence analyses
  4. library(Seurat)
  5. library(dplyr)
  6. library(ggplot2)
  7. library(tidyverse)
  8. setwd("./NSCLC/Figure/figure2/")
  9. rm(list = ls())
  10. TIME <- readRDS(file = "./NSCLC/Figure/figure1/TIME.rds")
  11. sce <- TIME
  12. #remove cell populations with low cell counts, low frequencies, or unidentified cell populations
  13. length(table(sce$subcluster))
  14. freq.low <- c("Unidentified")
  15. freq.high <- sce$subcluster[!sce$subcluster %in% freq.low]
  16. sce <- sce[,!sce$subcluster %in% freq.low]
  17. #Calculate the frequency of cell subsets; the row labels are the samples, and the column labels are the cell subsets
  18. write.csv(prop.table(table(sce$orig.ident,sce$subcluster),1),file = "./cell frequency cor.csv")
  19. data.freq <- data.frame(read.csv(file="./cell frequency cor.csv"),row.names = 1)
  20. data.freq <- data.freq[,!colnames(data.freq) %in% freq.low]#Remove cell clusters with low cell counts or frequencies
  21. rowSums(data.freq)#Determine the proportion of the cell population in the sample
  22. #Calculating Correlation
  23. library(corrplot)
  24. library(psych)
  25. library(pheatmap)
  26. #①corr.test(pearson)
  27. data_test <- corr.test(data.freq, method= "pearson")#spearman/kendall
  28. data_cor <- data_test[["r"]]
  29. write.csv(data_cor,file = "./correlation of TIME cells.csv")
  30. #pheatmap
  31. library(circlize)
  32. col_fun <- colorRamp2(
  33. c( -0.5,0, 1),
  34. c("#638fa9","white","#b10928")
  35. #c("#01665e","white", "#8c510a")
  36. )
  37. pheatmap(data_cor,cluster_rows = T,cluster_cols = T,fontsize = 7,main = "correlation of TIME cells",border_color = NA,color = col_fun)
  38. #Perform HR analysis on the various cell subsets in TIME
  39. library(GSVA)
  40. library(TCGAplot)
  41. library(tidyverse)
  42. library(survival)
  43. library(meta)
  44. library(doParallel)
  45. #Set the number of parallel processing cores
  46. registerDoParallel(cores = 15)
  47. subcluster.marker <- read.csv(file="./yang/wang/TIME.markers1_TOP10.csv",row.names = 1)
  48. tpm <- get_all_tpm()
  49. meta <- get_all_meta()
  50. cancers <- c("LUAD","LUSC")
  51. genelist <- split(subcluster.marker$gene, subcluster.marker$cluster)
  52. genelist <- genelist[-c(16,60)]
  53. # Use a `foreach` loop to parallelize the outer loop
  54. final_pan <- foreach(geneset_name = names(genelist),
  55. .combine = bind_rows,
  56. .packages = c("GSVA", "tidyverse", "survival", "meta", "TCGAplot"),
  57. .export = c("tpm", "meta", "cancers")) %dopar% {
  58. current_geneset <- genelist[[geneset_name]]
  59. current_genelist <- list(current_geneset)
  60. names(current_genelist) <- geneset_name
  61. cox_results <- list()
  62. for (cancer in cancers) {
  63. exprSet <- subset(tpm, Group == "Tumor" & Cancer == cancer) %>%
  64. tibble::add_column(ID = stringr::str_sub(rownames(.), 1, 12), .before = "Cancer") %>%
  65. dplyr::filter(!duplicated(ID)) %>%
  66. tibble::remove_rownames() %>%
  67. tibble::column_to_rownames("ID") %>%
  68. dplyr::filter(rownames(.) %in% rownames(subset(meta, Cancer == cancer)))
  69. exprSet <- exprSet[, -(1:2)] %>% as.matrix() %>% t()
  70. # GSVA
  71. gsvapar <- gsvaParam(exprData = exprSet,
  72. geneSets = current_genelist,
  73. kcdf = "Gaussian")
  74. exprSet_gsva <- gsva(gsvapar)
  75. # Survival Analysis
  76. cl <- meta[colnames(exprSet_gsva), ]
  77. cl$symbol <- exprSet_gsva[geneset_name, ]
  78. if (sum(!is.na(cl$time) & !is.na(cl$event)) > 0) {
  79. m <- tryCatch(
  80. coxph(Surv(time, event) ~ symbol + age, data = cl),
  81. error = function(e) NULL
  82. )
  83. if (!is.null(m)) {
  84. beta <- coef(m)
  85. se <- sqrt(diag(vcov(m)))
  86. tmp <- round(cbind(
  87. HR = exp(beta),
  88. se = se,
  89. lower = exp(beta - 1.96 * se),
  90. upper = exp(beta + 1.96 * se),
  91. p = 1 - pchisq((beta/se)^2, 1)
  92. ), 3)
  93. cox_results[[cancer]] <- tmp["symbol", ]
  94. }
  95. }
  96. }
  97. if (length(cox_results) > 0) {
  98. a <- do.call(rbind, cox_results) %>%
  99. as.data.frame() %>%
  100. rownames_to_column("cancer") %>%
  101. select(cancer, HR, se, lower, upper, p)
  102. # Pan-cancer meta analysis
  103. meta_res <- metagen(log(a$HR), a$se, sm = "HR")
  104. pan_row <- data.frame(
  105. cancer = "Pan cancer",
  106. HR = exp(meta_res$TE.random),
  107. lower = exp(meta_res$lower.random),
  108. upper = exp(meta_res$upper.random),
  109. p = meta_res$pval.random,
  110. stringsAsFactors = FALSE
  111. )
  112. a <- a %>% select(cancer, HR, lower, upper, p)
  113. pan <- bind_rows(a, pan_row) %>%
  114. mutate(
  115. celltype = geneset_name,
  116. significance = case_when(
  117. p <= 0.0001 ~ "****",
  118. p <= 0.001 ~ "***",
  119. p <= 0.01 ~ "**",
  120. p <= 0.05 ~ "*",
  121. TRUE ~ ""
  122. ),
  123. color = case_when(
  124. HR > 1 ~ "Worse survival",
  125. HR < 1 ~ "Better survival",
  126. TRUE ~ "Neutral"
  127. )
  128. )
  129. pan
  130. } else {
  131. NULL
  132. }
  133. }
  134. stopImplicitCluster()
  135. subcluster.hr <- subset(final_pan,cancer %in%c("LUAD","LUSC"))
  136. subcluster.hr <- subcluster.hr %>% mutate(cellmodule = case_when(
  137. celltype %in% c("Bn_06_GZMB","pDC_03_GZMB","Plasma_09_IGHG_RRM2","Plasma_05_IGHG_IGHGP","Plasma_01_IGHA_MZB1","Plasma_02_IGHA_IGLC3","CD8T_02_GZMB",
  138. "CD8T_03_MKI67","CD8T_01_CCL5","Treg_FOXP3","B_02_HLA.DQB1","CD4T_02_GNB2L1","CD4T_06_ACSL5","CD8T_04_HLA-B") ~ "module1",
  139. celltype %in% c("Astrocyte_03_ROM1","Endothelial_02_PTMAP2","Fibroblast_01_Myo_HIGD1B","Fibroblast_02_Myo_COL10A1","Fibroblast_03_Myo_MKI67","B_04_PTMAP2","CD4T_04_SNORD3A","Astrocyte_05_HLA-DRB5","Neurophil_01_GOS2","Astrocyte_04_SCGB3A1","Macrophage_06_C3","Astrocyte_01_CAV1","Astrocyte_02_MALAT1","Astrocyte_06_CCL5") ~ "module2",
  140. celltype %in% c("NK_01_FGFBP2","CD4T_03_SCGB3A1","Endothelial_05_IL1RL1","Mast_01_GNB2L1","Mast_03_PBK","cDC_01_CLEC10A","cDC_02_CD207","Macrophage_02_FCN1","Macrophage_04_SPP1",
  141. "Macrophage_09_MKI67","CD4T_05_SFTPB","Plasma_06_IGHG_SFTPB","Endothelial_09_S100A14","Macrophage_08_SCGB3A2","Fibroblast_04_Alveolar_DPT","Macrophage_07_IGKC") ~ "module3",
  142. celltype %in% c("CD4T_01_IL7R","B_03_CD3E","B_05_FYN","Fibroblast_05_Alveolar_MYH11","Endothelial_07_NOTCH3","B_01_HLA-DRA","Plasma_07_IGHG_GRIFIN","Plasma_08_IGHG_GUSBP11","Plasma_03_IGHA_GUSBP11","Plasma_04_IGHA_VPS13D") ~ "module4",
  143. celltype %in% c("Endothelial_03_VCAM1","Endothelial_08_CCL21","Endothelial_01_FCN3","Endothelial_04_DKK2","Fibroblast_06_Alveolar_MS4A7","Endothelial_06_CD68","Mast_02_CHIT1","Macrophage_03_MARCO","Macrophage_01_LGMN","Macrophage_05_CSTB") ~ "module5",
  144. ))
  145. subcluster.hr$cellmodule <- factor(subcluster.hr$cellmodule,levels = c("module1","module2","module3",'module4','module5'))
  146. subcluster.hr <- subcluster.hr[order(subcluster.hr$cellmodule),]
  147. write.csv(subcluster.hr,file = "/data/yang/wang//subcluster.hr.csv")
  148. #----Figure 2B----
  149. #Analysis of Gene Differential Expression Across Cell Modules
  150. #Remove cell clusters that are less relevant and lie outside the module
  151. rm(list = ls())
  152. TIME <- readRDS(file = "./NSCLC/Figure/figure1/TIME.rds")
  153. subsce.corr <- TIME
  154. #corlow <- c("")
  155. #subsce.corr <- subsce.corr[,!subsce.corr$subcluster %in% freq.low]
  156. [email hidden] <- [email hidden] %>% mutate(cellmodule = case_when(
  157. subcluster %in% c("Bn_06_GZMB","pDC_03_GZMB","Plasma_09_IGHG_RRM2","Plasma_05_IGHG_IGHGP","Plasma_01_IGHA_MZB1","Plasma_02_IGHA_IGLC3","CD8T_02_GZMB",
  158. "CD8T_03_MKI67","CD8T_01_CCL5","Treg_FOXP3","B_02_HLA.DQB1","CD4T_02_GNB2L1","CD4T_06_ACSL5","CD8T_04_HLA-B") ~ "module1",
  159. subcluster %in% c("Astrocyte_03_ROM1","Endothelial_02_PTMAP2","Fibroblast_01_Myo_HIGD1B","Fibroblast_02_Myo_COL10A1","Fibroblast_03_Myo_MKI67","B_04_PTMAP2","CD4T_04_SNORD3A","Astrocyte_05_HLA-DRB5","Neurophil_01_GOS2","Astrocyte_04_SCGB3A1","Macrophage_06_C3","Astrocyte_01_CAV1","Astrocyte_02_MALAT1","Astrocyte_06_CCL5") ~ "module2",
  160. subcluster %in% c("NK_01_FGFBP2","CD4T_03_SCGB3A1","Endothelial_05_IL1RL1","Mast_01_GNB2L1","Mast_03_PBK","cDC_01_CLEC10A","cDC_02_CD207","Macrophage_02_FCN1","Macrophage_04_SPP1",
  161. "Macrophage_09_MKI67","CD4T_05_SFTPB","Plasma_06_IGHG_SFTPB","Endothelial_09_S100A14","Macrophage_08_SCGB3A2","Fibroblast_04_Alveolar_DPT","Macrophage_07_IGKC") ~ "module3",
  162. subcluster %in% c("CD4T_01_IL7R","B_03_CD3E","B_05_FYN","Fibroblast_05_Alveolar_MYH11","Endothelial_07_NOTCH3","B_01_HLA-DRA","Plasma_07_IGHG_GRIFIN","Plasma_08_IGHG_GUSBP11","Plasma_03_IGHA_GUSBP11","Plasma_04_IGHA_VPS13D") ~ "module4",
  163. subcluster %in% c("Endothelial_03_VCAM1","Endothelial_08_CCL21","Endothelial_01_FCN3","Endothelial_04_DKK2","Fibroblast_06_Alveolar_MS4A7","Endothelial_06_CD68","Mast_02_CHIT1","Macrophage_03_MARCO","Macrophage_01_LGMN","Macrophage_05_CSTB") ~ "module5",
  164. ))
  165. table(subsce.corr$cellmodule)
  166. getwd()
  167. saveRDS(subsce.corr,file = "./NSCLC/Figure/figure2/subsce.corr.rds")
  168. subsce.corr <- readRDS("./subsce.corr.rds")
  169. #Identify the differentially upregulated genes in each cell module
  170. DefaultAssay(subsce.corr) <- "RNA"
  171. Idents(subsce.corr) <- "cellmodule"
  172. subsce.corr.markers.up <- FindAllMarkers(subsce.corr,
  173. min.pct = 0.25,
  174. only.pos = T,
  175. logfc.threshold = 0.25)
  176. subsce.corr.markers1.up <- subsce.corr.markers.up [subsce.corr.markers.up $p_val_adj < 0.05, ]
  177. subsce.corr.markers1.up_TOP5 <- subsce.corr.markers1.up %>% group_by(cluster) %>% top_n(n = 5, wt = avg_log2FC)
  178. write.csv(subsce.corr.markers1.up,file = "./subsce.corr.markers1.up.csv")
  179. subsce.corr.markers1.up <- read.csv("./subsce.corr.markers1.up.csv",row.names = 1,header = T)
  180. subsce.corr.markers1.up$cluster <- factor(subsce.corr.markers1.up$cluster,levels = c("module1","module2","module3",'module4','module5'))
  181. subsce.corr.markers1.top30 <- subsce.corr.markers1.up %>% group_by(cluster) %>% top_n(n = 30, wt = avg_log2FC)
  182. subsce.corr.markers1.top30 <- subsce.corr.markers1.top30[order(subsce.corr.markers1.top30$cluster), ]
  183. write.csv(subsce.corr.markers1.top30,file = "./NSCLC/Figure/figure2/subsce.corr.markers1.top30.csv")
  184. #install.packages('devtools')
  185. #devtools::install_github('junjunlab/scRNAtoolVis')
  186. library(scRNAtoolVis)
  187. #DEG
  188. DefaultAssay(subsce.corr) <- "RNA"
  189. subsce.corr.markers <- FindAllMarkers(subsce.corr,
  190. min.pct = 0.25,
  191. only.pos = F,
  192. logfc.threshold = 0.25)
  193. subsce.corr.markers1 <- subsce.corr.markers [subsce.corr.markers $p_val_adj < 0.05, ]
  194. subsce.corr.markers1_TOP5 <- subsce.corr.markers1 %>% group_by(cluster) %>% top_n(n = 5, wt = avg_log2FC)
  195. write.csv(subsce.corr.markers1,file = "./subsce.corr.markers1.csv")
  196. #subsce.corr.markers1 <- read.csv("./subsce.corr.markers1.csv",row.names = 1)
  197. subsce.corr.markers1$cluster <- factor(subsce.corr.markers1$cluster,levels = c("module1","module2","module3",'module4','module5'))
  198. #save(subsce.corr,file = "F:/subsce.corr.RData")
  199. mycolors <- c("#f9b3ad","#80C1D7","#70cdbe","#f1dba6","#CEB6E0")
  200. mycolors <- c("#B1C1E3","#92D3EB","#C9E5D5","#E2EDBC","#FAE7F1")
  201. mycolors <- c("#9B7EBD","#70cdbe","#46aec8","#6fc08d","#457baa")
  202. mycolors <- c("#d72e2d","#ea9740","#316339","#7dbcd1","#313663")
  203. mycolors <- c("#a5c469","#d586b3","#8ea1c9","#dd9f85","#88bdaa")
  204. mycolors <- c("#70cdbe","#80C1D7","#968ab7","#d586b3","#eb7e60")
  205. jjVolcano(diffData = subsce.corr.markers1,
  206. log2FC.cutoff = 0.25,
  207. size = 2.5,
  208. fontface = 'italic',
  209. aesCol = c('#8fb4dc','#eb7e60'),
  210. tile.col = mycolors,
  211. #col.type = "adjustP",
  212. topGeneN = 5,
  213. fontface = 'italic',
  214. polar = T)+ ylim(-7,12)
  215. color = colorRampPalette(c("white","#e6573f", "#d23229"))(100)
  216. jjVolcano(diffData = subsce.corr.markers1,
  217. tile.col = mycolors,
  218. size = 3.5,
  219. pSize = 0.9,
  220. topGeneN = 5,
  221. base_size = 20,
  222. fontface = 'italic',
  223. aesCol = c('#8fb4dc','#d23229'),
  224. polar = T) + ylim(-12,10)#+xlim(-10,10)
  225. #----Figure 2C----
  226. #Functional enrichment analysis
  227. library(clusterProfiler)
  228. library(org.Hs.eg.db)
  229. library(dplyr)
  230. library(enrichplot)
  231. group <- data.frame(
  232. gene = subsce.corr.markers.up$gene,
  233. module = subsce.corr.markers.up$cluster
  234. )
  235. #SYMBOL → ENTREZID
  236. gene_id <- bitr(group$gene,
  237. fromType = "SYMBOL",
  238. toType = "ENTREZID",
  239. OrgDb = org.Hs.eg.db)
  240. mydf <- merge(gene_id, group, by.x = "SYMBOL", by.y = "gene")
  241. #KEGG
  242. kk <- compareCluster(
  243. ENTREZID ~ module,
  244. data = mydf,
  245. fun = "enrichKEGG",
  246. organism = "hsa",
  247. pAdjustMethod = "BH",
  248. pvalueCutoff = 0.05
  249. )
  250. dotplot(kk, showCategory = 10) +
  251. scale_shape_manual(values = 18)
  252. #----Figure 2D----
  253. #Gene set scoring
  254. subsce.corr <- readRDS("./subsce.corr.rds")
  255. DefaultAssay(subsce.corr) <- "RNA"
  256. #Antigen-presenting cell co-inhibitory genes
  257. APC_co_inhibition <- list(c("C10orf54","CD274","LGALS9","PDCD1LG2","PVRL3"))
  258. #Co-stimulatory genes of antigen-presenting cells
  259. APC_co_stimulation <- list(c("CD40","CD58","CD70","ICOSLG","SLAMF1","TNFSF14","TNFSF15","TNFSF18","TNFSF4","TNFSF8","TNFSF9"))
  260. #CC chemokine receptor genes
  261. CCR <- list(c("CCL16","TPO","TGFBR2","CXCL2","CCL14","TGFBR3","IL11RA","CCL11","IL4I1","IL33","CXCL12","CXCL10","BMPER","BMP8A","CXCL11","IL21R","IL17B","TNFRSF9","ILF2","CX3CR1","CCR8","TNFSF12","CSF3","TNFSF4","BMP3","CX3CL1","BMP5","CXCR2","TNFRSF10D","BMP2","CXCL14",
  262. "CCL28","CXCL3","BMP6","CCL21","CXCL9","CCL23","IL6","TNFRSF18","IL17RD","IL17D","IL27","CCL7","IL1R1","CXCR4","CXCR2P1","TGFB1I1","IFNGR1","IL9R","IL1RAPL1","IL11","CSF1","IL20RA","IL25","TNFRSF4","IL18","ILF3","CCL20","TNFRSF12A","IL6ST","CXCL13","IL12B","TNFRSF8",
  263. "IL6R","BMPR2","IFNE","IL1RAPL2","IL3RA","BMP4","CCL24","TNFSF13B","CCR4","IL2RA","IL32","TNFRSF10C","IL22RA1","BMPR1A","CXCR5","CXCR3","IFNA8","IL17REL","IFNB1","IFNAR1","TNFRSF1B","CCL17","IFNL1","IL16","IL1RL1","ILK","CCL25","ILDR2","CXCR1","IL36RN","IL34","TGFB1","IFNG",
  264. "IL19","ILKAP","BMP2K","CCR10","ILDR1","EPO","CCR7","IL17C","IL23A","CCR5","IL7","EPOR","CCL13","IL2RG","IL31RA","TNFAIP6","IFNL2","BMP1","IL12RB1","TNFAIP8","IL4R","TNFRSF6B","TNFAIP8L1","TNFRSF10B","IFNL3","CCL5","CXCL6","CXCL1","CCR3","TNFSF11","CSF1R","IL21","IL1RAP","IL12RB2",
  265. "CCL1","IL17RA","CCR1","IL1RN","TNFRSF11B","TNFRSF14","IL13","IL2RB","BMP8B","CCL2","IL24","IL18RAP","TGFBI","TNFSF10","TNFRSF11A","CXCL5","IL5RA","TNFSF9","IL1RL2","TNFRSF13C","IL36G","IL15RA","TNFRSF21","CXCL8","IL22RA2","TNFAIP8L2","IL18R1","IFNLR1","CXCR6","CCL3L3","TNFRSF1A","IL17RE","IFNGR2",
  266. "IL17RC","TNFAIP8L3","ILVBL","TGFBRAP1","CCL4L1","CSF2RA","CCRN4L","CCL26","TNFAIP1","CCRL2","IFNA10","TNFRSF17","IFNA13","IL20","IL18BP",'CCL3L1',"TNFSF12-TNFSF13","IL5","IL23R","IL26","TNF","TGFA","CSF2","IL1F10","CXCL17","TNFSF13","IFNA4","IL37","IL12A","IL7R","IFNA1","IL1A","IL4","IL2",
  267. "CCL22","CSF3R","IL10","IFNK","TGFB2","IL1R2","IL1B","IL17F","IL27RA","IL15","TNFSF8","IL36B","XCL1","CXCL16","TNFRSF19","IL3","CCL3","IFNA2","BMPR1B","IFNA21","TNFSF18","CCL8","IL17RB","TNFRSF25","IL22","IL10RB","IFNAR2","CCL18","IFNA16","CSF2RB","IL36A","TNFAIP3","IL13RA2","IL13RA1","CCR9","TNFRSF10A",
  268. "IFNA7","IFNW1","XCL2","TNFSF14","CCR2","BMP15","BMP10","CCL15-CCL14","TGFBR1","IFNA5","BMP7","IFNA14","IL20RB","IL10RA","IFNA17","CCR6","TGFB3","CCL15","CCL4","CCL27","TNFRSF13B","TNFAIP2","IL31","IL17A","TNFSF15","CCL19","IFNA6","IL9"))
  269. #Checkpoint genes
  270. Check_point <- list(c("IDO1","LAG3","CTLA4","TNFRSF9","ICOS","CD80","PDCD1LG2","TIGIT","CD70","TNFSF9","ICOSLG","KIR3DL1","CD86","PDCD1","LAIR1","TNFRSF8","TNFSF15","TNFRSF14","IDO2","CD276","CD40","TNFRSF4","TNFSF14","HHLA2","CD244",
  271. "CD274","HAVCR2","CD27","BTLA","LGALS9","TMIGD2","CD28","CD48","TNFRSF25","CD40LG","ADORA2A","VTCN1","CD160","CD44","TNFSF18","TNFRSF18","BTNL2","C10orf54","CD200R1","TNFSF4","CD200","NRP1"))
  272. #Genes encoding cell lysis activity
  273. Cytolytic_activity <- list(c("PRF1","GZMA"))
  274. #Human leukocyte antigen genes
  275. HLA <- list(c("HLA-E","HLA-DPB2","HLA-C","HLA-J","HLA-DQB1","HLA-DQB2","HLA-DQA2","HLA-DQA1","HLA-A","HLA-DMA","HLA-DOB","HLA-DRB1","HLA-H","HLA-B","HLA-DRB5","HLA-DOA","HLA-DPB1","HLA-DRA","HLA-DRB6","HLA-L","HLA-F","HLA-G","HLA-DMB","HLA-DPA1"))
  276. #pro-inflammatory genes
  277. Inflammation_promoting <- list(c("CCL5","CD19","CD8B","CXCL10","CXCL13","CXCL9","GNLY","GZMB","IFNG","IL12A","IL12B","IRF1","PRF1","STAT1","TBX21"))
  278. #Major Histocompatibility Complex Class I Gene
  279. MHC_class_I <- list(c("B2M","HLA-A","TAP1"))
  280. #anti-inflammatory genes
  281. Parainflammation <- list(c("CXCL10","PLAT","CCND1","LGMN","PLAUR","AIM2","MMP7","ICAM1","MX2","CXCL9","ANXA1","TLR2","PLA2G2D","ITGA2","MX1","HMOX1",
  282. "CD276","TIRAP","IL33","PTGES","TNFRSF12A","SCARB1","CD14","BLNK","IFIT3",'RETNLB',"IFIT2","ISG15","OAS2","REL","OAS3","CD44","PPARG","BST2","OAS1","NOX1","PLA2G2A","IFIT1",'IFITM3',"IL1RN"))
  283. #T-cell co-inhibitory genes
  284. T_cell_co_inhibition <- list(c("CD160","CD244","CD274","CTLA4","HAVCR2","LAG3","LAIR1","TIGIT"))
  285. #T-cell costimulation
  286. T_cell_co_stimulation <- list(c("CD2","CD226","CD27","CD28","CD40LG","ICOS","SLAMF1","TNFRSF18","TNFRSF25","TNFRSF4","TNFRSF8","TNFRSF9","TNFSF14"))
  287. #Type I interferon
  288. Type_I_IFN_Reponse <- list(c("DDX4","IFIT1","IFIT2","IFIT3","IRF7","ISG20","MX1","MX2","RSAD2","TNFSF10"))
  289. #Type II interferon
  290. Type_II_IFN_Reponse <- list(c("GPR146","SELP","AHR"))
  291. #T-cell status genes
  292. T_naiveness <- list(c("CCR6","CCR7","TCF7","SELL","LEF1","IL7R"))
  293. T_cytotoxicity <- list(c("GZMA","GZMB","GZMH","GZMK","PRF1","CXCL13","GNLY","IFNG","NKG7"))
  294. T_exhaustion <- list(c("PDCD1","CTLA4","HAVCR2","LAG3","TIGIT","LAYN"))
  295. T_proliferation <- list(c("MKI67","TOP2A","CD3D","CD3E"))
  296. #gene list
  297. library(readxl)
  298. genelist <- "./GeneList1.xlsX"
  299. genes <- read_excel(genelist)
  300. #Antigen Presentation and Processing Gene Set
  301. Antigen_Processing_and_Presentation <- subset(genes,Category=="Antigen_Processing_and_Presentation")
  302. Antigen_Processing_and_Presentation <- list(Antigen_Processing_and_Presentation$Symbol)
  303. #TCR signaling
  304. TCRsignalingPathway <- subset(genes,Category=="TCRsignalingPathway")
  305. TCRsignalingPathway <- list(TCRsignalingPathway$Symbol)
  306. #TNF (Tumor Necrosis Factor) gene set
  307. TNF_Family_Members <- subset(genes,Category==c("TNF_Family_Members"))
  308. TNF_Family_Members_Receptors <- subset(genes,Category==c("TNF_Family_Members_Receptors"))
  309. TNF_Family <- rbind(TNF_Family_Members,TNF_Family_Members_Receptors)
  310. TNF_Family <- list(TNF_Family)
  311. #Natural killer cell cytotoxicity
  312. NaturalKiller_Cell_Cytotoxicity <- subset(genes,Category=="NaturalKiller_Cell_Cytotoxicity")
  313. NaturalKiller_Cell_Cytotoxicity <- list(NaturalKiller_Cell_Cytotoxicity)
  314. #Cytokines
  315. Cytokines <- subset(genes,Category=="Cytokines")
  316. Cytokines <- list(Cytokines)
  317. #BCRSignalingPathway
  318. BCRSignalingPathway <- subset(genes,Category=="BCRSignalingPathway")
  319. BCRSignalingPathway <- list(BCRSignalingPathway)
  320. #Interleukins
  321. Interleukins <- subset(genes,Category=="Interleukins")
  322. Interleukins <- list(Interleukins)
  323. #TGFb_Family_Member
  324. TGFb_Family_Member <- subset(genes,Category=="TGFb_Family_Member")
  325. TGFb_Family_Member <- list(TGFb_Family_Member)
  326. #TIMELASER_marker
  327. TIMELASER_marker <- read.csv(file = "./TIMELASER_marker.csv")
  328. TIME_IA <- subset(TIMELASER_marker, TIMELASER.subtype=="TIME-IA")
  329. IA.gene <- list(TIME_IA$Gene)
  330. TIME_ISM <- subset(TIMELASER_marker, TIMELASER.subtype=="TIME-ISM")
  331. ISM.gene <- list(TIME_ISM$Gene)
  332. TIME_ISS <- subset(TIMELASER_marker, TIMELASER.subtype=="TIME-ISS")
  333. ISS.gene <- list(TIME_ISS$Gene)
  334. TIME_IE <- subset(TIMELASER_marker, TIMELASER.subtype=="TIME-IE")
  335. IE.gene <- list(TIME_IE$Gene)
  336. TIME_IR <- subset(TIMELASER_marker, TIMELASER.subtype=="TIME-IR")
  337. IR.gene <- list(TIME_IR$Gene)
  338. library(Seurat)
  339. library(ggplot2)
  340. library(dplyr)
  341. library(ggpubr)
  342. DefaultAssay(subsce.corr) <- "RNA"
  343. gene_sets <- list(
  344. IA = IA.gene,
  345. ISM = ISM.gene,
  346. ISS = ISS.gene,
  347. IE = IE.gene,
  348. IR = IR.gene,
  349. APC_co_inhibition = APC_co_inhibition,
  350. APC_co_stimulation = APC_co_stimulation,
  351. CCR = CCR,
  352. Check_point = Check_point,
  353. Cytolytic_activity = Cytolytic_activity,
  354. HLA = HLA,
  355. Inflammation_promoting = Inflammation_promoting,
  356. MHC_class_I = MHC_class_I,
  357. Parainflammation = Parainflammation,
  358. T_cell_co_inhibition = T_cell_co_inhibition,
  359. T_cell_co_stimulation = T_cell_co_stimulation,
  360. Type_I_IFN_Reponse = Type_I_IFN_Reponse,
  361. Type_II_IFN_Reponse = Type_II_IFN_Reponse,
  362. T_naiveness = T_naiveness,
  363. T_cytotoxicity = T_cytotoxicity,
  364. T_exhaustion = T_exhaustion,
  365. T_proliferation = T_proliferation,
  366. Antigen_Processing_and_Presentation = Antigen_Processing_and_Presentation,
  367. TCRsignalingPathway = TCRsignalingPathway,
  368. TNF_Family = TNF_Family,
  369. NaturalKiller_Cell_Cytotoxicity = NaturalKiller_Cell_Cytotoxicity,
  370. Cytokines = Cytokines,
  371. BCRSignalingPathway = BCRSignalingPathway,
  372. Interleukins = Interleukins,
  373. TGFb_Family_Member = TGFb_Family_Member
  374. )
  375. #AddModuleScore
  376. for (nm in names(gene_sets)) {
  377. subsce.corr <- AddModuleScore(
  378. subsce.corr,
  379. features = gene_sets[[nm]],
  380. ctrl = 100,
  381. name = "score"
  382. )
  383. }
  384. # score1~scoreN
  385. score_cols <- grep("^score", colnames([email hidden]), value = TRUE)
  386. colnames([email hidden])[match(score_cols, colnames([email hidden]))] <- names(gene_sets)
  387. plot_list <- list()
  388. mycolors <- c("#70cdbe","#80C1D7","#968ab7","#d586b3","#eb7e60")
  389. for (nm in names(gene_sets)) {
  390. df <- [email hidden] %>%
  391. mutate(cellmodule = factor(cellmodule))
  392. # Kruskal-Wallis
  393. kw <- kruskal.test(df[[nm]] ~ df$cellmodule)
  394. p_label <- paste0(
  395. "Kruskal-Wallis: χ²(", kw$parameter, ") = ",
  396. format(kw$statistic, digits = 3),
  397. ifelse(kw$p.value < 0.001,
  398. ", p < 0.001",
  399. paste0(", p = ", format(kw$p.value, digits = 3)))
  400. )
  401. p <- ggplot(df, aes(x = cellmodule, y = .data[[nm]], fill = cellmodule)) +
  402. geom_violin(width = 0.8, alpha = 0.85, scale = "width") +
  403. geom_boxplot(width = 0.15, fill = "white", outlier.size = 1) +
  404. scale_fill_manual(values = mycolors) +
  405. theme_bw() +
  406. annotate(
  407. "text",
  408. x = 3,
  409. y = Inf,
  410. label = p_label,
  411. vjust = 1.5,
  412. size = 4,
  413. fontface = "italic"
  414. ) +
  415. labs(title = nm)
  416. plot_list[[nm]] <- p
  417. }
  418. #----Figure 2E----
  419. #Determine the TIME subtype for each patient
  420. write.csv(prop.table(table(subsce.corr$subcluster,subsce.corr$orig.ident),1),file = "./patient.type.csv")
  421. ALL <- data.frame(read.csv(file="./NSCLC/Figure/figure2/patient.type.csv"))#,row.names = 1))
  422. ALL <- ALL %>% mutate(cellmodule = case_when(
  423. X %in% c("Bn_06_GZMB","pDC_03_GZMB","Plasma_09_IGHG_RRM2","Plasma_05_IGHG_IGHGP","Plasma_01_IGHA_MZB1","Plasma_02_IGHA_IGLC3","CD8T_02_GZMB",
  424. "CD8T_03_MKI67","CD8T_01_CCL5","Treg_FOXP3","B_02_HLA.DQB1","CD4T_02_GNB2L1","CD4T_06_ACSL5","CD8T_04_HLA.B") ~ "module1",
  425. X %in% c("Astrocyte_03_ROM1","Endothelial_02_PTMAP2","Fibroblast_01_Myo_HIGD1B","Fibroblast_02_Myo_COL10A1","Fibroblast_03_Myo_MKI67","B_04_PTMAP2","CD4T_04_SNORD3A",
  426. "Astrocyte_05_HLA.DRB5","Neurophil_01_GOS2","Astrocyte_04_SCGB3A1","Macrophage_06_C3","Astrocyte_01_CAV1","Astrocyte_02_MALAT1","Astrocyte_06_CCL5") ~ "module2",
  427. X %in% c("NK_01_FGFBP2","CD4T_03_SCGB3A1","Endothelial_05_IL1RL1","Mast_01_GNB2L1","Mast_03_PBK","cDC_01_CLEC10A","cDC_02_CD207","cDC_02_CD207","Macrophage_02_FCN1","Macrophage_04_SPP1",
  428. "Macrophage_09_MKI67","CD4T_05_SFTPB","Plasma_06_IGHG_SFTPB","Endothelial_09_S100A14","Macrophage_08_SCGB3A2","Fibroblast_04_Alveolar_DPT","Macrophage_07_IGKC") ~ "module3",
  429. X %in% c("CD4T_01_IL7R","B_03_CD3E","B_05_FYN","Fibroblast_05_Alveolar_MYH11","Endothelial_07_NOTCH3","B_01_HLA.DRA","Plasma_07_IGHG_GRIFIN","Plasma_08_IGHG_GUSBP11","Plasma_03_IGHA_GUSBP11","Plasma_04_IGHA_VPS13D") ~ "module4",
  430. X %in% c("Endothelial_03_VCAM1","Endothelial_08_CCL21","Endothelial_01_FCN3","Endothelial_04_DKK2","Fibroblast_06_Alveolar_MS4A7","Endothelial_06_CD68","Mast_02_CHIT1","Macrophage_03_MARCO","Macrophage_01_LGMN","Macrophage_05_CSTB") ~ "module5",
  431. ))
  432. which.max ()
  433. rownames(ALL) <- ALL$X
  434. ALL$X <-NULL
  435. library(stringr)
  436. module1 <- subset(ALL,cellmodule=="module1")
  437. module1$cellmodule <- NULL
  438. module_freq <- data.frame(colSums(module1))
  439. module2 <- subset(ALL,cellmodule=="module2")
  440. module2$cellmodule <- NULL
  441. module_freq[[2]] <- data.frame(colSums(module2))
  442. module3 <- subset(ALL,cellmodule=="module3")
  443. module3$cellmodule <- NULL
  444. module_freq[[3]] <- data.frame(colSums(module3))
  445. module4 <- subset(ALL,cellmodule=="module4")
  446. module4$cellmodule <- NULL
  447. module_freq[[4]] <- data.frame(colSums(module4))
  448. module5 <- subset(ALL,cellmodule=="module5")
  449. module5$cellmodule <- NULL
  450. module_freq[[5]] <- data.frame(colSums(module5))
  451. module_freq[[6]] <- data.frame(rowSums(module_freq))
  452. colnames(module_freq) <- c("module1","module2","module3","module4","module5","sum_freq")
  453. module_freq$module1 <- module_freq$module1/module_freq$sum_freq
  454. module_freq$module2 <- module_freq$module2/module_freq$sum_freq
  455. module_freq$module3 <- module_freq$module3/module_freq$sum_freq
  456. module_freq$module4 <- module_freq$module4/module_freq$sum_freq
  457. module_freq$module5 <- module_freq$module5/module_freq$sum_freq
  458. module_freq[[6]] <- NULL
  459. module_freq$patient <- rownames(module_freq)
  460. row_anno <- module_freq$patient
  461. row_anno <- data.frame(row_anno)
  462. colnames(row_anno) <- "patient"
  463. #row_anno$patient <- rownames(row_anno)
  464. #row_anno$patient <- NULL
  465. row_anno <- row_anno %>% mutate(mutation = case_when(
  466. patient %in% c("P1","P2","P3","P4","P5","P6","P7","P8","P9","P10","P11") ~ "EGFR",
  467. patient %in% c("P12","P13","P14","P15","P16","P17","P18","P19","P20","P21") ~ "EGFR-BM",
  468. patient %in% c("P22","P23") ~ "EGFR-co-mutation",
  469. patient %in% c("P24","P25","P26","P27","P28","P29","P30","P31","P32","P33","P34","P35") ~ "KRAS",
  470. patient %in% c("P36","P37","P38") ~ "KRAS-co-mutation",
  471. patient %in% c("P39") ~ "ALK",
  472. patient %in% c("P40","P41","P42") ~ "ROS1",
  473. patient %in% c("P43") ~ "TP53",
  474. patient %in% c("P44") ~ "MET-BM",
  475. patient %in% c("P45") ~ "HER2"))
  476. rownames(row_anno) <- row_anno$patient
  477. row_anno$mutation<- factor(row_anno$mutation)
  478. rownames(module_freq) <- module_freq$patient
  479. row_anno$patient <- NULL
  480. module_freq$patient <- NULL
  481. #factor(row_anno$mutation)
  482. row_anno <- data.frame(t(row_anno))
  483. module_freq <- data.frame(t(module_freq))
  484. #row_anno$mutation = list(c("EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR","EGFR-co-mutation","EGFR-co-mutation","EGFR-co-mutation","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS","KRAS-co-mutation","KRAS-co-mutation","KRAS-co-mutation","ALK","ROS1","ROS1","ROS1","TP53","MET","BRAF"))
  485. module_freq
  486. colSums(module_freq)
  487. row_anno <- data.frame(t(row_anno))
  488. row_anno$mutation <- factor(row_anno$mutation,levels = c("EGFR","EGFR-BM","EGFR-co-mutation","KRAS","KRAS-co-mutation","ALK","ROS1","TP53","MET-BM","HER2"))
  489. library("pheatmap")
  490. ann_colors=list(class=c(L='#009933',R='#CC33CC',F='#FDDCA9'))
  491. mycol2 = list(mutation = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  492. #names(mycol2) <- unique(row_anno$mutation)
  493. module_freq <- data.frame(t(module_freq))
  494. patientorder <- c("P22","P43","P9","P1","P4","P25","P10","P27",
  495. "P18","P15","P38","P14","P44","P12","P13","P3",
  496. "P16","P42","P2","P23","P8","P41","P26","P20","P17","P45","P21","P36","P7","P11","P19","P39","P34","P5",
  497. "P31","P28","P30","P29","P35","P32",
  498. "P24","P40","P37","P33","P6")
  499. df_sorted <- module_freq[patientorder,]
  500. df_sorted <- data.frame(t(df_sorted))
  501. #color = colorRampPalette(c("white","#e6573f", "#d23229"))(100)
  502. color = colorRampPalette(c("white","#0172be"))(100)
  503. pheatmap(df_sorted,
  504. color = color,
  505. annotation_col = row_anno,
  506. annotation_colors = mycol2,
  507. display_numbers = F,
  508. border="white",
  509. cluster_cols = F,
  510. cluster_rows = F,
  511. treeheight_col = 40,
  512. treeheight_row = 45,
  513. border_color = NA)
  514. #----Figure 2F----
  515. #Plotting the Organizational Preference Map for the TIME Subtype
  516. subsce.corr <- readRDS(file = "./NSCLC/Figure/figure2/subsce.corr.rds")
  517. ROIE <- function(crosstab){
  518. ## Calculate the Ro/e value from the given crosstab
  519. ##
  520. ## Args:
  521. #' @crosstab: the contingency table of given distribution
  522. ##
  523. ## Return:
  524. ## The Ro/e matrix
  525. rowsum.matrix <- matrix(0, nrow = nrow(crosstab), ncol = ncol(crosstab))
  526. rowsum.matrix[,1] <- rowSums(crosstab)
  527. colsum.matrix <- matrix(0, nrow = ncol(crosstab), ncol = ncol(crosstab))
  528. colsum.matrix[1,] <- colSums(crosstab)
  529. allsum <- sum(crosstab)
  530. roie <- divMatrix(crosstab, rowsum.matrix %*% colsum.matrix / allsum)
  531. row.names(roie) <- row.names(crosstab)
  532. colnames(roie) <- colnames(crosstab)
  533. return(roie)
  534. }
  535. divMatrix <- function(m1, m2){
  536. ## Divide each element in turn in two same dimension matrixes
  537. ##
  538. ## Args:
  539. #' @m1: the first matrix
  540. #' @m2: the second matrix
  541. ##
  542. ## Returns:
  543. ## a matrix with the same dimension, row names and column names as m1.
  544. ## result[i,j] = m1[i,j] / m2[i,j]
  545. dim_m1 <- dim(m1)
  546. dim_m2 <- dim(m2)
  547. if( sum(dim_m1 == dim_m2) == 2 ){
  548. div.result <- matrix( rep(0,dim_m1[1] * dim_m1[2]) , nrow = dim_m1[1] )
  549. row.names(div.result) <- row.names(m1)
  550. colnames(div.result) <- colnames(m1)
  551. for(i in 1:dim_m1[1]){
  552. for(j in 1:dim_m1[2]){
  553. div.result[i,j] <- m1[i,j] / m2[i,j]
  554. }
  555. }
  556. return(div.result)
  557. }
  558. else{
  559. warning("The dimensions of m1 and m2 are different")
  560. }
  561. }
  562. metadata <- [email hidden]
  563. meta_filt <- metadata[metadata$mutation %in% c("ALK","EGFR","EGFR-BM","EGFR-co-mutation","HER2","KRAS","KRAS-co-mutation","MET-BM","ROS1","TP53"),]
  564. meta_filt$mutation <- factor(as.vector(meta_filt$mutation),levels=c("ALK","EGFR","EGFR-BM","EGFR-co-mutation","HER2","KRAS","KRAS-co-mutation","MET-BM","ROS1","TP53"))
  565. summary <- table(meta_filt[,c('cellmodule','mutation')])
  566. # ro/e
  567. roe <- as.data.frame(ROIE(summary))
  568. library("pheatmap")
  569. pheatmap(roe, display_numbers = TRUE,number_color = "black",cluster_row = FALSE,cluster_col = FALSE,
  570. color = colorRampPalette(c("#e7eb8e","#cd782d","firebrick3"))(50))
  571. #Create a lollipop chart showing organizational preferences for the TIME subtype
  572. roe0 <- as.data.frame(t(roe))
  573. roe0$group <- rownames(roe0)
  574. library(ggpubr)
  575. mycol2 = c("#c6b7d4","#d44e26","#e3a264","#6fc2d0","#6f9abf","#a5c49b","#7266ac","#FF9966","#d84986","#2d588e")
  576. #module1
  577. ggdotchart(roe0, x = "group", y = "module1",
  578. color = "group", # Color by groups
  579. sorting = "descending", # Sort value in descending order
  580. add = "segments", # Add segments from y = 0 to dots
  581. add.params = list(color = "lightgray", size = 2), # Change segment color and size
  582. dot.size = 11, # Large dot size
  583. label = round(roe0$module1,2), # Add mpg values as dot labels
  584. font.label = list(color = "black", size = 9,
  585. vjust = 0.5), # Adjust label parameters
  586. ggtheme = theme_pubr())+
  587. geom_hline(yintercept = 1, linetype = 2, color = "black")+
  588. theme(legend.position='none')+ylab("Ro/e")+ggtitle("Ro/e-module1")+
  589. theme(axis.text.x = element_text(angle = 45,vjust = 1))+
  590. scale_color_manual(values = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  591. #module2
  592. ggdotchart(roe0, x = "group", y = "module2",
  593. color = "group", # Color by groups
  594. sorting = "descending", # Sort value in descending order
  595. add = "segments", # Add segments from y = 0 to dots
  596. add.params = list(color = "lightgray", size = 2), # Change segment color and size
  597. dot.size = 11, # Large dot size
  598. label = round(roe0$module2,2), # Add mpg values as dot labels
  599. font.label = list(color = "black", size = 9,
  600. vjust = 0.5), # Adjust label parameters
  601. ggtheme = theme_pubr())+
  602. geom_hline(yintercept = 1, linetype = 2, color = "black")+
  603. theme(legend.position='none')+ylab("Ro/e")+ggtitle("Ro/e-module2")+
  604. theme(axis.text.x = element_text(angle = 45,vjust = 1))+
  605. scale_color_manual(values = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  606. #module3
  607. ggdotchart(roe0, x = "group", y = "module3",
  608. color = "group", # Color by groups
  609. sorting = "descending", # Sort value in descending order
  610. add = "segments", # Add segments from y = 0 to dots
  611. add.params = list(color = "lightgray", size = 2), # Change segment color and size
  612. dot.size = 11, # Large dot size
  613. label = round(roe0$module3,2), # Add mpg values as dot labels
  614. font.label = list(color = "black", size = 9,
  615. vjust = 0.5), # Adjust label parameters
  616. ggtheme = theme_pubr())+
  617. geom_hline(yintercept = 1, linetype = 2, color = "black")+
  618. theme(legend.position='none')+ylab("Ro/e")+ggtitle("Ro/e-module3")+
  619. theme(axis.text.x = element_text(angle = 45,vjust = 1))+
  620. scale_color_manual(values = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  621. #module4
  622. ggdotchart(roe0, x = "group", y = "module4",
  623. color = "group", # Color by groups
  624. sorting = "descending", # Sort value in descending order
  625. add = "segments", # Add segments from y = 0 to dots
  626. add.params = list(color = "lightgray", size = 2), # Change segment color and size
  627. dot.size = 11, # Large dot size
  628. label = round(roe0$module4,2), # Add mpg values as dot labels
  629. font.label = list(color = "black", size = 9,
  630. vjust = 0.5), # Adjust label parameters
  631. ggtheme = theme_pubr())+
  632. geom_hline(yintercept = 1, linetype = 2, color = "black")+
  633. theme(legend.position='none')+ylab("Ro/e")+ggtitle("Ro/e-module4")+
  634. theme(axis.text.x = element_text(angle = 45,vjust = 1))+
  635. scale_color_manual(values = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  636. #module5
  637. ggdotchart(roe0, x = "group", y = "module5",
  638. color = "group", # Color by groups
  639. sorting = "descending", # Sort value in descending order
  640. add = "segments", # Add segments from y = 0 to dots
  641. add.params = list(color = "lightgray", size = 2), # Change segment color and size
  642. dot.size = 11, # Large dot size
  643. label = round(roe0$module5,2), # Add mpg values as dot labels
  644. font.label = list(color = "black", size = 9,
  645. vjust = 0.5), # Adjust label parameters
  646. ggtheme = theme_pubr())+
  647. geom_hline(yintercept = 1, linetype = 2, color = "black")+
  648. theme(legend.position='none')+ylab("Ro/e")+ggtitle("Ro/e-module5")+
  649. theme(axis.text.x = element_text(angle = 45,vjust = 1))+
  650. scale_color_manual(values = c("EGFR"="#c6b7d4","EGFR-BM"="#d44e26","EGFR-co-mutation"="#e3a264","KRAS"="#6fc2d0","KRAS-co-mutation"="#6f9abf","ALK"="#a5c49b","ROS1"="#7266ac","TP53"="#FF9966","MET-BM"="#d84986","HER2"="#2d588e"))
  651. #Plotting a scatter plot of gene set scores
  652. library(ggplot2)
  653. library(ggsankey)
  654. subsce.corr <- readRDS("./NSCLC/Figure/figure2/subsce.corr.rds")
  655. DefaultAssay(subsce.corr) <- "RNA"
  656. immune.inhibitor <- list(c("ADORA2A","BTLA","CD160","CD244","CD274","CD96","CSF1R","CTLA4","HAVCR2","IDO1","IL10","IL10RB","KDR","KIR2DL1","KIR2DL3","LAG3","LGALS9","PDCD1","PDCD1LG2","TGFB1","TGFBR1","TIGIT","VTCN1"))
  657. Inscore <- AddModuleScore(subsce.corr,
  658. features = immune.inhibitor,
  659. ctrl = 100,
  660. name = "AUCELL")
  661. colnames([email hidden])
  662. colnames([email hidden])[28] <- 'immune.inhibitor'
  663. immune.stimulator <- list(c("CD27","CD276","CD28","CD40","CD40LG","CD48","CD70","CD80","CD86","CXCL12","CXCR4","ENTPD1","HHLA2","ICOS","ICOSLG","IL2RA","IL6","IL6R","KLRC1","KLRK1","LTA","MICB","NT5E","PVR","RAET1E","TMIGD2","TNFRSF13B","TNFRSF13C","TNFRSF14","TNFRSF17","TNFRSF18","TNFRSF25","TNFRSF4","TNFRSF8","TNFRSF9","TNFSF13","TNFSF13B","TNFSF14","TNFSF15","TNFSF18","TNFSF4","TNFSF9","ULBP1"))
  664. Inscore <- AddModuleScore(Inscore,
  665. features = immune.stimulator,
  666. ctrl = 100,
  667. name = "AUCELL")
  668. colnames([email hidden])
  669. colnames([email hidden])[29] <- 'immune.stimulator'
  670. Chemokine.receptor <- list(c("CCR1","CCR2","CCR3","CCR4","CCR5","CCR6","CCR7","CCR8","CCR9","CCR10", "CXCR1","CXCR2","CXCR3","CXCR4","CXCR5","CXCR6","XCR1","CX3R1"))
  671. Inscore <- AddModuleScore(Inscore,
  672. features = Chemokine.receptor,
  673. ctrl = 100,
  674. name = "AUCELL")
  675. colnames([email hidden])
  676. colnames([email hidden])[30] <- 'Chemokine.receptor'
  677. Chemokine <- list(c("CCL1","CCL2","CCL3","CCL4","CCL5","CCL7","CCL8","CCL11","CCL13","CCL14","CCL15","CCL16","CCL17","CCL18","CCL19","CCL20","CCL21","CCL22","CCL23","CCL24","CCL25","CCL26","CCL28","CX3CL1","CXCL1","CXCL2","CXCL3","CXCL5","CXCL6","CXCL8","CXCL9","CXCL10","CXCL11","CXCL12","CXCL13","CXCL14","CXCL16","CXCL17"))
  678. Inscore <- AddModuleScore(Inscore,
  679. features = Chemokine,
  680. ctrl = 100,
  681. name = "AUCELL")
  682. colnames([email hidden])
  683. colnames([email hidden])[31] <- 'Chemokine'
  684. #----Figure 2G----
  685. #The 14 malicious pathways in the decouple package are scored on CM1-CM5
  686. library(Seurat)
  687. library(decoupleR)
  688. library(dplyr)
  689. library(tibble)
  690. library(tidyverse)
  691. corsce <- readRDS("./yang/wang/NSCLC/subsce.corr.rds")
  692. net <- get_progeny(organism = 'human', top = 500)
  693. mat <- as.matrix(corsce@assays$RNA@layers$data)
  694. rownames(mat) <- rownames(corsce)
  695. colnames(mat) <- colnames(corsce)
  696. acts <- run_mlm(mat=mat, net=net, .source='source', .target='target',
  697. .mor='weight', minsize = 5)
  698. acts
  699. corsce[['pathwaysmlm']] <- acts %>%
  700. pivot_wider(id_cols = 'source', names_from = 'condition', values_from = 'score') %>%
  701. column_to_rownames('source') %>%
  702. Seurat::CreateAssayObject()
  703. DefaultAssay(corsce) <- 'pathwaysmlm'
  704. corsce <- ScaleData(corsce)
  705. corsce@assays$pathwaysmlm@data <- corsce@assays$[email hidden]
  706. #module
  707. Idents(corsce) <- "cellmodule"
  708. df <- t(as.matrix(corsce@assays$pathwaysmlm@data)) %>%
  709. as.data.frame() %>%
  710. mutate(cellmodule = Idents(corsce)) %>%
  711. pivot_longer(cols = -cellmodule, names_to = "pathway", values_to = "score") %>%
  712. group_by(cellmodule, pathway) %>%
  713. summarise(mean_score = mean(score), .groups = "drop")
  714. selected_pathways <- c("Androgen","EGFR","Estrogen","Hypoxia","JAK-STAT","MAPK","NFkB","p53","PI3K","TGFb","TNFa","Trail","VEGF","WNT")
  715. df_filtered <- df %>%
  716. filter(pathway %in% selected_pathways)
  717. top_acts_mat <- df_filtered %>%
  718. pivot_wider(names_from = pathway, values_from = mean_score) %>%
  719. column_to_rownames('cellmodule') %>%
  720. as.matrix()
  721. library(pheatmap)
  722. module.top_acts_mat <- top_acts_mat
  723. pheatmap(module.top_acts_mat,
  724. scale = "row",
  725. cluster_rows = TRUE,
  726. cluster_cols = TRUE,
  727. color = colorRampPalette(c("#A5CCE0", "white", "#d66c61"))(100),
  728. main = "Pathway Activity across Cell Modules")
  729. #mutation
  730. Idents(corsce) <- "mutation"
  731. df <- t(as.matrix(corsce@assays$pathwaysmlm@data)) %>%
  732. as.data.frame() %>%
  733. mutate(mutation = Idents(corsce)) %>%
  734. pivot_longer(cols = -mutation, names_to = "pathway", values_to = "score") %>%
  735. group_by(mutation, pathway) %>%
  736. summarise(mean_score = mean(score), .groups = "drop")
  737. selected_pathways <- c("Androgen","EGFR","Estrogen","Hypoxia","JAK-STAT","MAPK","NFkB","p53","PI3K","TGFb","TNFa","Trail","VEGF","WNT")
  738. df_filtered <- df %>%
  739. filter(pathway %in% selected_pathways)
  740. top_acts_mat <- df_filtered %>%
  741. pivot_wider(names_from = pathway, values_from = mean_score) %>%
  742. column_to_rownames('mutation') %>%
  743. as.matrix()
  744. library(pheatmap)
  745. pheatmap(top_acts_mat,
  746. scale = "row",
  747. cluster_rows = TRUE,
  748. cluster_cols = TRUE,
  749. border="white",
  750. border_color = NA,
  751. color = colorRampPalette(c("#A5CCE0", "white", "#d66c61"))(100),
  752. main = "Pathway Activity across Cell Modules")
  753. df.module <- data.frame(module.top_acts_mat)
  754. df.mutation <- data.frame(top_acts_mat)
  755. write.csv(df.module,file = "/data/yang/wang/NSCLC/df.module.csv")
  756. write.csv(df.mutation,file = "/data/yang/wang/NSCLC/df.mutation.csv")
  757. #----Figure 2H----
  758. #Drawing Sankey
  759. #Classify regulon_group expression values into high and low categories
  760. df <- [email hidden][,c(4,27:31)]
  761. df$score <- ifelse(df$immune.inhibitor >= median(df$immune.inhibitor, na.rm = TRUE), "High", "Low")
  762. df$score <- ifelse(df$immune.stimulator >= median(df$immune.stimulator, na.rm = TRUE), "High", "Low")
  763. df$score <- ifelse(df$Chemokine.receptor >= median(df$Chemokine.receptor, na.rm = TRUE), "High", "Low")
  764. df$score <- ifelse(df$Chemokine >= median(df$Chemokine, na.rm = TRUE), "High", "Low")
  765. write.csv(df,file = "./NSCLC/Figure/figure2/df.csv")
  766. library(ggsankey)
  767. library(tidyverse)
  768. level <- unique(df$score)
  769. mutation <- unique(df$mutation)
  770. module <- unique(df$cellmodule)
  771. level_colors <- c(
  772. "Low" = "#ADD4A5",
  773. "High" = "#C9B8DA"
  774. )
  775. mutation_colors <- c(
  776. "EGFR" = "#c6b7d4",
  777. "EGFR-BM" = "#d44e26",
  778. "EGFR-co-mutation" = "#e3a264",
  779. "KRAS" = "#6fc2d0",
  780. "KRAS-co-mutation" = "#6f9abf",
  781. "ALK" = "#a5c49b",
  782. "ROS1" = "#7266ac",
  783. "TP53" = "#FF9966",
  784. "MET-BM" = "#d84986",
  785. "HER2" = "#2d588e"
  786. )
  787. module_colors <- c(
  788. "module1" = "#70cdbe",
  789. "module2" = "#80C1D7",
  790. "module3" = "#968ab7",
  791. "module4" = "#d586b3",
  792. "module5" = "#eb7e60")
  793. level <- names(level_colors)
  794. mutation <- names(mutation_colors)
  795. module <- names(module_colors)
  796. color_palette <- c(module_colors,level_colors,mutation_colors)
  797. df$cellmodule <- factor(df$cellmodule,levels = c("module1","module2","module3","module4","module5"))
  798. df_sankey <- df %>%
  799. select(cellmodule,score, mutation) %>%
  800. make_long(cellmodule,score, mutation)
  801. ggplot(df_sankey, aes(x = x,
  802. next_x = next_x,
  803. node = node,
  804. next_node = next_node,
  805. fill = node,
  806. label = node)) +
  807. scale_fill_manual(values = color_palette) +
  808. geom_sankey(flow.alpha = 0.6, smooth = 6, width = 0.15) +
  809. geom_sankey_text(size = 3, color = "black") +
  810. theme_void() +
  811. theme(legend.position = "none")

Figure2.R at commit 44ddfe7, under MIT · at the source

Overview

Authors: Kuan Yang1, Kaiyue Yang1, Jiasi Wang1, Hang Zhao1, Wenqi Jiang1, Depeng Mu1, Xiao Peng1, Yiming Yan1, Xing Gao1, Jing Bai1, Congxue Hu1, Yunpeng Zhang1,2, Xia Li1,2
  1. College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, China; (K.Y.); (K.Y.); (J.W.); (H.Z.); (W.J.); (D.M.); (X.P.); (Y.Y.); (X.G.); (J.B.); (C.H.)
  2. School of Intelligent Medicine and Technology, Big Data Research Center, Hainan Medical University, No. 3 Xueyuan Road, Longhua District, Haikou 571199, China
Journal: International journal of molecular sciences, volume 27, issue 9, article 3997
Dates: received 30 March 2026; accepted 27 April 2026; published online 29 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3390/ijms27093997 · PMID 42123577 · PMCID PMC13163347 · OpenAlex W7160146146
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), other condition (population)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning, Connectivity
Keywords: driver mutated, immune coordination, malignant regulatory network, prognostic biomarkers, single-cell transcriptomics
MeSH: Carcinoma, Non-Small-Cell Lung*, Lung Neoplasms*, Mutation*, Single-Cell Analysis*, Brain Neoplasms, Gene Expression Regulation, Neoplastic, Humans, Prognosis, Signal Transduction, Tumor Microenvironment (* major topic)
Topic: Cancer Immunotherapy and Biomarkers (Oncology, Medicine), according to OpenAlex
Funding: National Natural Science Foundation of China (62502128, 32570792, U23A20166, 62472131); National Science and Technology Major Program (2024ZD0530500); Heilongjiang Postdoctoral Fund (LBH-Z24210); China Postdoctoral Science Foundation (2024M760709); Longjiang New Era Outstanding Doctoral Dissertation Project Grant (LJYXL2024-069); Key Research and Development Program of Heilongjiang Province (2024ZX12C27); Harbin Medical University (2025-KYYWF-ZR0297)
Citations: not cited yet (Europe PMC); 94 references in the paper

Abstract

Oncogenic driver mutations in non-small cell lung cancer (NSCLC) activate defined signaling pathways that sustain tumor growth and influence the immune landscape. Yet, how coordinated interactions among diverse cell populations within the tumor immune microenvironment (TIME) contribute to this process remains largely unresolved. To address this, we profiled approximately 200,000 single cells from 45 treatment-naïve NSCLC patients representing seven major driver mutations. This analysis uncovered five multicellular modules (CM1–5) with distinct functional properties, each linked to specific malignant regulatory programs. Among them, CM2 and CM5 exhibited pronounced invasive features and were associated with unfavorable clinical outcomes. CM2 was predominantly observed in EGFR- and MET-driven brain metastases and was defined by strong crosstalk between astrocytes and myofibroblasts. Factors such as SPP1, PTN, and PSAP, together with metabolic alterations, contributed to a microenvironment supportive of metastatic colonization in the brain. By contrast, CM5 was enriched in ROS1-, KRAS-, and EGFR-mutant tumors and consisted of diverse myeloid and endothelial subsets characterized by immunosuppressive and pro-angiogenic signaling, including MIF, GALECTIN, and RETN, collectively facilitating immune escape and vascular remodeling. We further constructed and validated a driver mutation-specific prognostic signature (DMSP.sig) model integrating receptor–ligand interactions and core transcription factors, which effectively stratified patient survival. Leveraging this model, we also identified potential therapeutic candidates linked to these prognostic features, highlighting opportunities for clinical intervention. In summary, our study delineates how oncogenic drivers give rise to distinct TIME architectures, providing a framework for prognostic assessment and precision immunotherapy in high-risk NSCLC.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

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

Zhangyunpeng1987/NSCLC-DMSPsig

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 44ddfe7e75bb24418c7eab6299ec053583865f57, 5 May 2026
Languages: R (13)
Size: 28 files, 13 scripts
Software Heritage: not archived
Found in: “Code Availability Statement”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: ggplot2 (11 files), tidyverse (11 files), Seurat (9 files), ggpubr (7 files), pheatmap (7 files), survival (6 files), clusterProfiler (4 files), patchwork (4 files), circlize (3 files), ComplexHeatmap (3 files), cowplot (2 files), data.table (2 files), psych (2 files), reshape2 (2 files), rstatix (2 files), DESeq2 (1 file), glmnet (1 file), Harmony (1 file), igraph (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
15 files

Code Availability Statement

The R scripts used for data processing, analysis, and visualization in this study are publicly available at: https://github.com/Zhangyunpeng1987/NSCLC-DMSPsig (accessed on 24 April 2026). The repository includes scripts corresponding to all figures presented in the manuscript and is organized by figure to facilitate reproducibility. A session information file is also provided to ensure transparency of the computational environment.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 13 scripts, each with its path and the digest of its content;
  • 40 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

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

Data

Datasets cited

Data Availability Statement

All data used in this study are publicly available from GEO and TCGA. The datasets analyzed are existing publicly accessible datasets, and detailed information is provided in Table S1. The scRNA-seq datasets used in this study include GSE171145 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE171145), GSE131907 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE131907), GSE148071 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE148071), GSE202371 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE202371), and GSE136246 (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE136246). In addition, we included scRNA-seq data from the study with PMID: 35027529, as well as data from the Code Ocean capsule (CO.0121060.V1). Spatial transcriptomics data were obtained from the publicly available EMBL-EBI database, including dataset E-MTAB-13530.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 13 authors, 5 keywords, 10 MeSH terms, 7 funders, 94 references.

Cite

This paper

Yang, K., Yang, K., Wang, J., Zhao, H., Jiang, W., Mu, D., Peng, X., Yan, Y., Gao, X., Bai, J., Hu, C., Zhang, Y., & Li, X. (2026). Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC. International journal of molecular sciences, 27(9), 3997. https://doi.org/10.3390/ijms27093997

BibTeX

@article{yang2026coordinated,
author = {Yang, Kuan and Yang, Kaiyue and Wang, Jiasi and Zhao, Hang and Jiang, Wenqi and Mu, Depeng and Peng, Xiao and Yan, Yiming and Gao, Xing and Bai, Jing and Hu, Congxue and Zhang, Yunpeng and Li, Xia},
title = {{Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC}},
journal = {International journal of molecular sciences},
year = {2026},
month = apr,
volume = {27},
number = {9},
pages = {3997},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {1422-0067},
doi = {10.3390/ijms27093997},
url = {https://doi.org/10.3390/ijms27093997},
pmid = {42123577},
pmcid = {PMC13163347}
}

RIS

TY - JOUR
AU - Yang, Kuan
AU - Yang, Kaiyue
AU - Wang, Jiasi
AU - Zhao, Hang
AU - Jiang, Wenqi
AU - Mu, Depeng
AU - Peng, Xiao
AU - Yan, Yiming
AU - Gao, Xing
AU - Bai, Jing
AU - Hu, Congxue
AU - Zhang, Yunpeng
AU - Li, Xia
TI - Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC
T2 - International journal of molecular sciences
J2 - Int J Mol Sci
PY - 2026
DA - 2026/04/29
VL - 27
IS - 9
SP - 3997
SN - 1422-0067
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/ijms27093997
UR - https://doi.org/10.3390/ijms27093997
LA - en
ER -

CSL-JSON

{
"id": "10.3390/ijms27093997",
"type": "article-journal",
"title": "Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC",
"container-title": "International journal of molecular sciences",
"author": [
{
"family": "Yang",
"given": "Kuan"
},
{
"family": "Yang",
"given": "Kaiyue"
},
{
"family": "Wang",
"given": "Jiasi"
},
{
"family": "Zhao",
"given": "Hang"
},
{
"family": "Jiang",
"given": "Wenqi"
},
{
"family": "Mu",
"given": "Depeng"
},
{
"family": "Peng",
"given": "Xiao"
},
{
"family": "Yan",
"given": "Yiming"
},
{
"family": "Gao",
"given": "Xing"
},
{
"family": "Bai",
"given": "Jing"
},
{
"family": "Hu",
"given": "Congxue"
},
{
"family": "Zhang",
"given": "Yunpeng"
},
{
"family": "Li",
"given": "Xia"
}
],
"container-title-short": "Int J Mol Sci",
"volume": "27",
"issue": "9",
"page": "3997",
"DOI": "10.3390/ijms27093997",
"PMID": "42123577",
"PMCID": "PMC13163347",
"ISSN": "1422-0067",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://doi.org/10.3390/ijms27093997",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
29
]
]
}
}

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.3390/ijms27104466 [code]
Uncovering the Key Circuit FOSL2/FOS/EGR3/EGR1, Contributing to the Hyperexcitability of Excitatory Neurons in the Epileptic Temporal Cortex and Hippocampus.
Journal: International journal of molecular sciences
In common: glmnet, igraph, circlize, 11 other tools, genetics / omics, 2 authors
[2] doi:10.1016/j.isci.2026.115657 [code]
Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.
Journal: iScience
In common: glmnet, survival, Harmony, 15 other tools, other condition
[3] doi:10.1002/imt2.70163 [code]
Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.
Journal: iMeta
In common: Harmony, rstatix, igraph, 13 other tools, genetics / omics
[4] doi:10.1016/j.xcrm.2026.102682 [code]
TET CpG sequence-context-specific DNA demethylation shapes progression of IDH-mutant gliomas.
Journal: Cell reports. Medicine
In common: glmnet, survival, circlize, 12 other tools, genetics / omics, other condition
[5] doi:10.1126/sciadv.aeg3223 [code]
The extreme diversity of retinal amacrine cells has deep evolutionary roots.
Journal: Science advances
In common: glmnet, psych, rstatix, 12 other tools, genetics / omics
[6] 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: survival, rstatix, igraph, 12 other tools, genetics / omics, other condition
[7] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: glmnet, survival, igraph, 12 other tools
[8] 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: Harmony, igraph, circlize, 12 other tools, genetics / omics, other condition
[9] doi:10.1038/s41586-026-10214-2 [code]
Multidimensional profiling of heterogeneity in supratentorial ependymomas.
Journal: Nature
In common: Harmony, igraph, circlize, 12 other tools, genetics / omics, other condition
[10] doi:10.1038/s41593-026-02367-0 [code]
A reproducible three-dimensional model of human brain tissue to investigate physiological and disease-associated microglia phenotypes.
Journal: Nature neuroscience
In common: Harmony, igraph, circlize, 12 other tools

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.