Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.
The 27 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
- [1] § STAR★Methods › Method details › Unsupervised clustering analysis ↔ workline2.R, lines 606–650 · score 0.94 · ConsensusClusterPlus, clusterAlg, pFeature, pItem, maxK, inner
- [2] § Results › Immune infiltration differences in gliomas with different disulfidptosis patterns ↔ workline2.R, lines 1546–1581 · score 0.90 · innate immunity, immune infiltration, tumor cells, NK cells, granulocytes, priming
- [3] § STAR★Methods › Method details › Immune microenvironment analysis ↔ R/deconvo_tme.R, lines 1–48 · score 0.87 · MCP counter, quanTIseq, xCell, IOBR package, immune cell, EPIC
- [4] § STAR★Methods › Method details › Single-cell RNA-seq and in silico perturbation analysis ↔ R/scTenifoldKnk.R, lines 1–110 · score 0.86 · silico knockout, gene regulatory networks, Quality control, scTenifoldKnk, single cell, mitochondrial
- [5] § STAR★Methods › Method details › Data collection and preprocessing ↔ workline2.R, lines 418–502 · score 0.83 · CD2AP, SLC7A11, ACTB, DSTN, TLN1, MYL6
- [6] § Results › Transcriptional and genetic characteristics of 15 disulfidptosis genes ↔ workline2.R, lines 2–40 · score 0.81 · Missense mutations, CD2AP, SLC7A11, ACTB, DSTN, TLN1
- [7] § STAR★Methods › Quantification and statistical analysis ↔ R/batch_kruskal.R, lines 1–60 · score 0.80 · Kruskal Wallis, Benjamini Hochberg, chi squared, rank sum, variables, validation
- [8] § STAR★Methods › Method details › Single-cell RNA-seq and in silico perturbation analysis ↔ Supplementary analysis.R, lines 94–134 · score 0.78 · Cell cycle scoring, variable feature, Seurat, Quality control, Harmony, RNA
- [9] § Results › Immune infiltration characteristics associated with DisulfidpScore scores in gliomas ↔ R/data_doc.R, lines 51–116 · score 0.74 · epithelial mesenchymal transition, immune checkpoint, immune microenvironment, stromal, activity, cycle
- [10] § Results › Deciphering disulfidptosis and IQGAP1-driven networks in gliomas at single-cell resolution ↔ R/scTenifoldKnk.R, lines 1–110 · score 0.73 · silico knockout, gene regulatory network, perturbed genes, scTenifoldKnk, cell
- [11] § STAR★Methods › Method details › Construction and validation of the prognostic model ↔ R/BinomialModel.R, lines 1–115 · score 0.72 · cross validation, Model Construction, 0–1, LASSO, splitting, Ridge
- [12] § Results › Deciphering disulfidptosis and IQGAP1-driven networks in gliomas at single-cell resolution ↔ Supplementary analysis.R, lines 136–184 · score 0.70 · cell cycle phases, SingleR, UMAP, atlas, LGG, IQGAP1
- [13] § STAR★Methods › Method details › Pathway enrichment analysis ↔ workline2.R, lines 1269–1341 · score 0.65 · c2 cp kegg, v2023, MSigDB, Hs, GSEA, symbols
- [14] § STAR★Methods › Method details › Construction and validation of the prognostic model ↔ R/PrognosticModel.R, lines 1–117 · score 0.64 · cross validation, LASSO, splitting, Ridge, CV, fold
- [15] § Results › Unsupervised clustering to identify different disulfidptosis patterns in gliomas ↔ workline2.R, lines 606–650 · score 0.64 · CD2AP, remove batch, MYL6, ACTN4, CAPZB, INF2
- [16] § Results › Signaling pathway differences in gliomas with different disulfidptosis patterns ↔ R/data_doc.R, lines 51–116 · score 0.64 · epithelial mesenchymal transition, Cell cycle, checkpoint, pathways, tumor, regulation
- [17] § STAR★Methods › Method details › Pathway enrichment analysis ↔ R/sig_gsea.R, lines 245–295 · score 0.62 · MSigDB, clusterProfiler, Hs, GSEA, database, symbols
- [18] § Results › Transcriptional and genetic characteristics of 15 disulfidptosis genes ↔ workline2.R, lines 2–40 · score 0.61 · Missense mutations, SLC7A11, COAD, SNVs, FLNB, FLNA
- [19] § STAR★Methods › Quantification and statistical analysis ↔ R/batch_wilcoxon.R, lines 1–59 · score 0.58 · Benjamini Hochberg, Wilcoxon rank sum, variables, validation
- [20] § STAR★Methods › Method details › Immune microenvironment analysis ↔ R/iobr_deconvo_pipeline.R, the whole file · a weak match · score 0.58 · IOBR, MCP, xCELL, EPIC, IPS, QuantiSeq
- [21] § Results › Model construction based on the disulfidptosis patterns ↔ R/BinomialModel.R, lines 1–115 · score 0.57 · cross validation, model construction, LASSO, Ridge, fold, training
- [22] § Results › Predictive ability of DisulfidpScore for chemotherapy drug sensitivity in gliomas ↔ pRRophetic/R/predict_from_cgp.R, lines 146–181 · score 0.56 · drug response, drug sensitivity, AUY922, bortezomib, elesclomol, IC50
- [23] § Results › Immune infiltration characteristics associated with DisulfidpScore scores in gliomas ↔ workline2.R, lines 2196–2272 · score 0.55 · cancer immunity cycle, immune functions, DisulfidpScore score, cell
- [24] § Results › Predictive ability of DisulfidpScore ↔ R/PrognosticModel.R, lines 239–292 · score 0.53 · dependent ROC curves, predictive accuracy, AUC, prognostic
- [25] § STAR★Methods › Method details › Immunotherapy prediction analysis ↔ R/batch_wilcoxon.R, lines 1–59 · score 0.53 · Benjamini Hochberg, Wilcoxon rank sum, validate
- [26] § Results › Signaling pathway differences in gliomas with different disulfidptosis patterns ↔ R/sig_gsea.R, lines 1–113 · score 0.53 · conducted gene, Cell cycle, KRAS, hallmark, pathways, regulation
- [27] § STAR★Methods › Method details › Construction and validation of the prognostic model ↔ R/PrognosticModel.R, lines 1–117 · score 0.50 · predictive accuracy, ROC, prognostic, curves, regression, Cox
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 · 3,168 lines · 101 KB · no license · 8 matches
- #1.1 15个DRG的SNV分析####
- library(maftools)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.1 genomic")
- load("TCGA-LGG_maf.rdata")
- barcode=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode)="sample"
- data1=data
- load("TCGA-GBM_maf.rdata")
- barcode2=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode2)="sample"
- data2=data
- #合并lgg和gbm
- data <- rbind(data1,data2)
- maf.coad <- data
- class(maf.coad) #data.frame
- dim(maf.coad) #87957 141
- #匹配结果
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/1.1 SNV&CNV/snv")
- clin <- read.csv("Grade_SNV_barcode.csv",header=TRUE) #660
- clin <- clin[-c(434,514),] #去除2个异常样本 TCGA-06-5416-01A-01D-1486-08,TCGA-DU-6392-01A-11D-1705-08
- maf.coad=merge(data,clin,by="Tumor_Sample_Barcode") #59090 142
- sample=unique(maf.coad$Tumor_Sample_Barcode)
- maf <- read.maf(maf.coad,clinicalData = clin)
- #瀑布图
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- vc_cols = c("#8DD3C7","#80B1D3","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00",'#CAB2D6')
- names(vc_cols) = c('Multi_Hit','Missense_Mutation','Frame_Shift_Del','Nonsense_Mutation',
- 'Frame_Shift_Ins','In_Frame_Ins','Splice_Site','In_Frame_Del','Translation_Start_Site')
- oncoplot(maf = maf, genes=gene,
- draw_titv = F,fontSize = 0.75 ,
- colors = vc_cols,bgCol = "transparent")
- #互斥/共现
- par(oma = c(3, 4, 5, 1))
- somaticInteractions(maf = maf,
- genes=gene,
- pvalue = c(0.05, 0.5),
- colPal = "PiYG")
- #1.2 15个DRG的CNV分析####
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/1.1 SNV&CNV/cnv")
- lgg=fread("TCGA-LGG.gistic.tsv",header = T, sep = '\t',data.table = F)
- gbm=fread("TCGA-GBM.gistic.tsv",header = T, sep = '\t',data.table = F)
- a=unique(colnames(gbm))
- gbm=gbm[,a] #614
- #基因注释
- LGG <- fread('gencode.v22.annotation.gene.probeMap',data.table = F)%>%
- select(id,gene)%>%
- inner_join(lgg,by=c('id'='Gene Symbol'))%>%
- select(-id)%>%
- group_by(gene)%>%
- summarise_all(mean)%>%
- column_to_rownames('gene')
- GBM <- fread('gencode.v22.annotation.gene.probeMap',data.table = F)%>%
- select(id,gene)%>%
- inner_join(gbm,by=c('id'='Gene Symbol'))%>%
- select(-id)%>%
- group_by(gene)%>%
- summarise_all(mean)%>%
- column_to_rownames('gene')
- #合并
- identical(rownames(LGG),rownames(GBM))
- gliomas=cbind(LGG,GBM)
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- cnvdat <- gliomas[rownames(gliomas) %in% gene,]
- #替换为字符串
- cnvdat[cnvdat ==1] <- "gain"
- cnvdat[cnvdat ==-1] <- "loss"
- cnvdat[cnvdat ==0] <- "neutral"
- #统计gain和loss
- cnvdat <- as.data.frame(t(cnvdat))
- cnv <- as.data.frame(t(apply(cnvdat,2,table)))
- #绘图
- dat <- cnv
- dat$Gene <- rownames(dat)
- library(ggalt)
- #method1
- p <- ggplot(aes(x=loss,xend=gain,y=Gene),data=dat)+
- geom_dumbbell(colour_x = "green",colour_xend = "red",size_x = 2,size_xend = 2,size=0.5,color="gray",dot_guide = T)+
- theme_light()+theme(panel.grid.minor.x =element_blank(),
- panel.grid = element_blank(),
- legend.position = c("top")
- )+ xlab("CNV.frequency(%)")
- p
- #1.3 15个DRG的染色体圈图####
- library(RCircos)
- #导入人类染色体数据
- data(UCSC.HG38.Human.CytoBandIdeogram)
- head(UCSC.HG38.Human.CytoBandIdeogram)
- #构建RCircos的core components
- cyto.info <- UCSC.HG38.Human.CytoBandIdeogram
- RCircos.Set.Core.Components(cyto.info, chr.exclude=NULL,tracks.inside=6, tracks.outside=0)
- #染色体图
- RCircos.Set.Plot.Area()
- RCircos.Chromosome.Ideogram.Plot()
- #染色体位置信息在genemap22
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/1.3 circos")
- data=read.table("15DRG-cricos.txt", head = T)
- #将基因与染色体连接
- name.col <- 4
- side <- "in"
- track.num <- 1
- RCircos.Gene.Connector.Plot(data, track.num, side)
- track.num <- 2
- RCircos.Gene.Name.Plot(data, name.col,track.num, side)
- #1.4 15个DRG的共表达网络####
- library(tidyverse)
- library(ggplot2)
- library(igraph)
- library(ggraph)
- library(RColorBrewer)
- library(tidygraph)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- gene=TCGA[gene,]
- gene=as.data.frame(t(gene)) #691
- M = cor(gene)
- #计算r和p
- data=gene
- m1=data[,c(1:15)]
- m2=data[,c(1:15)]
- cor_2_matrix <- function(m1,m2){
- apply(m2 , 2, function(x){
- unlist(apply(m1, 2,function(y){
- cor(as.numeric(x),
- as.numeric(y))
- }))
- })
- }
- rdf=cor_2_matrix( m1 , m2 ) %>% as.data.frame()
- rdf$gene=rownames(rdf)
- rdf <- rdf %>% gather(key = 'soure',value = 'r',-gene)
- corP_2_matrix <- function(m1,m2){
- apply(m2 , 2, function(x){
- unlist(apply(m1, 2,function(y){
- cor.test(as.numeric(x),
- as.numeric(y))$p.value
- }))
- })
- }
- pdf=corP_2_matrix( m1 , m2 ) %>% as.data.frame()
- pdf$gene=rownames(pdf)
- pdf <- pdf %>% gather(key = 'source',value = 'p',-gene)
- Toal <- bind_cols(pdf,rdf) %>%.[-c(4,5)]
- Toal2 <- filter(Toal,p<0.0001)
- colnames(Toal2) <- c('to','from','pvalue','corr')
- #加上相关性信息
- Toal2$relation=ifelse(Toal2$corr>0,'Positive correlation with P < 0.0001','Negative correlation with P < 0.0001')
- #去除相关性为1的行
- Toal3 = filter(Toal2, Toal2$corr !='1')
- table(Toal3$relation)
- #Negative correlation with P < 0.0001 Positive correlation with P < 0.0001
- #22 130
- #加载cox回归结果
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/1.4 co-network")
- Toal4 = read.table(file="15DRG-cor-network.txt",header=T)
- m_data=Toal3
- #节点数据
- nodes <- data.frame(name = unique(union(m_data$from, m_data$to)))
- identical(Toal4$Gene,nodes$name)
- nodes$survival_impact <- Toal4$Cox_test_pvalue
- nodes$cluster <- c(rep("Disulfidptosis",15))
- nodes$role_type <- Toal4$type
- #边数据
- edges <- m_data[c("from","to","corr")]
- colnames(edges)[3]="Pearson_R"
- edges$class <- ifelse(edges$Pearson_R>0, "Positive correlation with P < 0.0001",
- "Negative correlation with P < 0.0001")
- g <- tbl_graph(nodes = nodes, edges = edges)
- class(g)
- #绘制图形
- colors <- "white"
- ggraph(g,layout='linear',circular = TRUE) +
- geom_node_point(aes(size=survival_impact,colour = role_type),
- alpha = 0.8) +
- geom_node_text(aes(x = x*1.15, y=y*1.15, label=name,color=role_type),
- angle=0,hjust=0, fontface="bold",size=2.5,family="Times") +
- scale_size_continuous(range = c(16, 8)) +
- geom_node_point(size = 4,aes(colour = cluster))+
- scale_color_manual(values = c(colors,"#0088FF","#FF0033")) +
- geom_edge_arc(mapping = aes(edge_width = abs(Pearson_R),
- edge_color = class),
- strength = 0.02,alpha = 0.6) +
- scale_edge_colour_manual(values = c("#abd9e9", "#fec8c9")) +
- scale_edge_width_continuous(range = c(0.5,3)) +
- theme_graph()
- #1.5 15个DRG的单因素cox回归####
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- library(forestplot)
- library(grid)
- library(magrittr)
- library(checkmate)
- library(data.table)
- library(survival)
- library(survminer)
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- #TCGA
- load(file="TCGA.RData")
- dat=TCGA[gene,]
- dat=as.data.frame(t(dat))
- identical(rownames(dat),rownames(OS))
- data=cbind(OS,dat)
- univar_out = data.frame(matrix(NA,15,5))
- rownames(univar_out) = colnames(data)[-(1:2)]
- colnames(univar_out) = c("Coeffcient","HR","lower .95","upper .95","P-value")
- cox_data = data[,c(3:ncol(data))]
- cox_data = cbind(data[,c(1:2)],cox_data)
- str(cox_data)
- for(i in colnames(cox_data)[-(1:2)]){
- cox = coxph(Surv(OS.time, OS) ~ cox_data[,i], data = cox_data)
- cox_summ = summary(cox)
- univar_out[i,1] = cox_summ$coefficients[,1]
- univar_out[i,2] = cox_summ$coefficients[,2]
- univar_out[i,3] = cox_summ$conf.int[,3]
- univar_out[i,4] = cox_summ$conf.int[,4]
- univar_out[i,5] = cox_summ$coefficients[,5]
- }
- univar_out_0.05 = univar_out[univar_out[,5] < 0.05,]
- univar_out_TCGA=univar_out[,c(2,5)]
- #可视化
- uni <- univar_out
- uni[,1:4] <- round(uni[,1:4],digits = 3)
- uni_tabletext <- data.frame(matrix(NA,(nrow(uni)),3))
- for(i in 1 : nrow(uni)){
- uni_tabletext[i,1] = rownames(uni)[i]
- uni_tabletext[i,2] = paste(uni[i,2],"(",uni[i,3],"-",uni[i,4],")",sep = "")
- ifelse(uni[i,5]<0.001,
- uni_tabletext[i,3]<-"<0.001",
- uni_tabletext[i,3]<-round(uni[i,5],digits = 3))}
- uni_tabletext_title <- rbind(c("","HR","P-value"),uni_tabletext)
- #森林图
- forestplot(uni_tabletext_title,
- mean = c(NA,univar_out[,2]),
- graph.pos=4,
- upper = c(NA,univar_out[,4]),
- lower = c(NA,univar_out[,3]),
- align = "c",
- boxsize=0.4,
- zero=1,
- lineheight = "auto",
- colgap=unit(8,"mm"),
- ci.vertices=TRUE,
- xticks = c(0,1,2,4,8),
- title="Univariate analysis",
- col = fpColors(box = "#7FBC41",lines = "black",zero = "grey"))
- #1.6 15个DRG的表达水平####
- #总体
- library(ggpubr)
- library(ggplot2)
- library(ggsignif)
- library(ggdist)
- #1.加载数并处理
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("GTEx-f-t.RData")
- load("TCGA.RData")
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- gene <- as.vector(gene)
- #合并
- normal=tpm[gene,]
- gliomas=TCGA[gene,]
- Exp=cbind(normal,gliomas)
- Exp_plot <- as.data.frame(t(Exp))
- #2.加载样本信息
- sample=rownames(Exp_plot)
- group=c(rep("normal",290),rep("LGG",524),rep("GBM",167))
- info <- as.data.frame(cbind(sample,group))
- colnames(info)=c("Sample","Type")
- Exp_plot$sam=info$Type
- Exp_plot$sam <- factor(Exp_plot$sam, levels = c("normal","LGG","GBM"))
- expr_use <- na.omit(Exp_plot)
- expr_use <-as.data.frame(expr_use)
- expr_use_long <- gather(expr_use, gene, Expression, -sam)
- table(expr_use_long$gene)
- colnames(expr_use_long) <- c("Group","gene","Expression")
- #3.绘图
- p=ggboxplot(expr_use_long, x="gene", y="Expression", color = "black", fill="Group",
- ylab="Gene expression",
- xlab="",
- legend.title=NULL,
- palette = c("#FF0033","#009934","#0088FF"),
- width=0.6, add = "none")
- p1=p+stat_compare_means(aes(group=Group),
- method="wilcox.test",
- symnum.args=list(cutpoints = c(0, 0.001, 0.01, 0.05, 1), symbols = c("***", "**", "*", " ")),
- label = "p.signif")
- p1
- #疾病分期
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- table(pheno$grade)
- #G2 G3 G4
- #214 236 167
- a=pheno[,c(1,3)]
- a=na.omit(a)
- sample=a$sample #617
- #1.加载数并处理
- Exp <- as.data.frame(t(TCGA[,sample]))
- #gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- # "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- gene="TLN1"
- gene <- as.vector(gene)
- Exp_plot <- as.data.frame(Exp[,gene])
- colnames(Exp_plot) = "TLN1"
- rownames(Exp_plot) = rownames(Exp)
- #2.加载样本信息
- info <- a
- colnames(info)=c("Sample","Type")
- Exp_plot$sam=info$Type
- Exp_plot$sam <- factor(Exp_plot$sam, levels = c("G2","G3","G4"))
- expr_use <- na.omit(Exp_plot)
- expr_use <-as.data.frame(expr_use)
- expr_use_long <- gather(expr_use, gene, Expression, -sam)
- table(expr_use_long$gene)
- colnames(expr_use_long) <- c("Group","gene","Expression")
- #设置比较组
- my_comparisons <- list(c("G2", "G3"), c("G3", "G4"), c("G2", "G4"))
- Custom.color <- c("#FF0033","#009934","#0088FF")
- ggplot(expr_use_long, aes(x = Group, y = Expression, fill=Group)) +
- geom_boxplot(position = position_nudge(x = 0.14),width=0.1,outlier.size = 0,outlier.alpha =0)+
- stat_halfeye(mapping = aes(fill=Group),width = 0.2, .width = 0, justification = -1.2, point_colour = NA,alpha=0.6) +
- scale_fill_manual(values = Custom.color)+
- scale_color_manual(values = Custom.color)+
- xlab(" ") +
- ylab("Expression") +
- ggtitle("TLN1")+
- theme_classic() +
- theme(
- legend.position = "none",
- axis.title.x = element_text(size = 13),
- axis.title.y = element_text(size = 13),
- axis.text.x = element_text(size = 12,hjust = 0.3),
- axis.text.y = element_text(size = 12),
- plot.title = element_text(hjust = 0.5)
- )+
- geom_signif(comparisons = my_comparisons,step_increase = .1,map_signif_level = TRUE,vjust = 0.5,hjust= 0)
- #2.1 DRG的多队列单因素cox回归分析####
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- library(forestplot)
- library(grid)
- library(magrittr)
- library(checkmate)
- library(data.table)
- library(survival)
- library(survminer)
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- #TCGA(8个胶质瘤列队)
- load(file="TCGA.RData")
- dat=TCGA[gene,]
- dat=as.data.frame(t(dat))
- identical(rownames(dat),rownames(OS))
- data=cbind(OS,dat)
- univar_out = data.frame(matrix(NA,15,5))
- rownames(univar_out) = colnames(data)[-(1:2)]
- colnames(univar_out) = c("Coeffcient","HR","lower .95","upper .95","P-value")
- cox_data = data[,c(3:ncol(data))]
- cox_data = cbind(data[,c(1:2)],cox_data)
- str(cox_data)
- for(i in colnames(cox_data)[-(1:2)]){
- cox = coxph(Surv(OS.time, OS) ~ cox_data[,i], data = cox_data)
- cox_summ = summary(cox)
- univar_out[i,1] = cox_summ$coefficients[,1]
- univar_out[i,2] = cox_summ$coefficients[,2]
- univar_out[i,3] = cox_summ$conf.int[,3]
- univar_out[i,4] = cox_summ$conf.int[,4]
- univar_out[i,5] = cox_summ$coefficients[,5]
- }
- univar_out_0.05 = univar_out[univar_out[,5] < 0.05,]
- univar_out_TCGA=univar_out[,c(2,5)]
- #汇总
- sum=cbind(univar_out_TCGA,univar_out_CGGA325,univar_out_CGGA693,univar_out_GSE16011,
- univar_out_GSE108474,univar_out_EMTAB3892,univar_out_GSE4271,univar_out_GSE4412)
- colnames(sum)=c("TCGA_HR","TCGA_pvalue","CGGA325_HR","CGGA325_pvalue",
- "CGGA693_HR","CGGA693_pvalue","GSE16011_HR","GSE16011_pvalue",
- "GSE108474_HR","GSE108474_pvalue","EMTAB3892_HR","EMTAB3892_pvalue",
- "GSE4271_HR","GSE4271_pvalue","GSE4412_HR","GSE4412_pvalue")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.1 cox")
- write.table(sum,file="cox_result.txt",quote=F,sep="\t")
- #可视化
- library(pheatmap)
- library(RColorBrewer)
- results=read.table(file="heatmap.txt")
- datacol<-read.table("anno_col.txt",sep = "\t",header=T,row.names=1)
- rownames(datacol)
- datarowcolor = list(cohort=c(TCGA = "#F1B6DA", CGGA325 = "#8DD3C7",CGGA693 = "#BC80BD", GSE16011 = "#80B1D3",
- GSE108474 = "#FB8072",EMTAB3892 = "#BEBADA",GSE4271 = "#FDB462",GSE4412 = "#B3DE69"))
- pheatmap(results,color = colorRampPalette(c("#719dc9", "grey90", "#b595bf"))(25),
- border_color="grey30",
- cluster_rows = F,cluster_cols = F,shown_colnames=F,
- annotation_col = datacol,annotation_colors = datarowcolor,
- gaps_col = c(1,2,3,4,5,6,7))
- #在超过5个队列中cox.test pvalue < 0.05的基因有9个
- #ACTN4、CAPZB、CD2AP、FLNA、INF2、IQGAP1、MYH9、MYL6、PDLIM1
- #2.2 8个队列数据合并和去批-meta####
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- load(file="CGGA325.RData")
- load(file="CGGA693.RData")
- load(file="GSE16011.RData")
- GSE16011=as.data.frame(t(GSE16011))
- load(file="GSE108474.RData")
- GSE108474=as.data.frame(t(GSE108474))
- load(file="E-MATE-3892.RData")
- E_MATE_3892=as.data.frame(t(E_MATE_3892))
- load(file="GSE4271.RData")
- GSE4271=as.data.frame(t(GSE4271))
- load(file="GSE4412.RData")
- GSE4412=as.data.frame(t(GSE4412))
- #取symbol交集(10495)
- intersects <- function (...) {
- Reduce(intersect, list(...))
- }
- a=intersects(rownames(TCGA),rownames(CGGA325),rownames(CGGA693),rownames(GSE16011),
- rownames(GSE108474),rownames(E_MATE_3892),rownames(GSE4271),rownames(GSE4412))
- TCGA=TCGA[a,]
- CGGA325=CGGA325[a,]
- CGGA693=CGGA693[a,]
- GSE16011=GSE16011[a,]
- GSE108474=GSE108474[a,]
- E_MATE_3892=E_MATE_3892[a,]
- GSE4271=GSE4271[a,]
- GSE4412=GSE4412[a,]
- identical(rownames(GSE16011),rownames(E_MATE_3892))
- meta=cbind(TCGA,CGGA325,CGGA693,GSE16011,
- GSE108474,E_MATE_3892,GSE4271,GSE4412) #2522
- meta_pheno=rbind(pheno,CGGA325_pheno,CGGA693_pheno,GSE16011_pheno,
- GSE108474_pheno,E_MATE_3892_pheno,GSE4271_pheno,GSE4412_pheno)
- group=c(rep("TCGA",691),rep("CGGA325",313),rep("CGGA693",657),rep("GSE16011",264),
- rep("GSE108474",284),rep("E_MATE_3892",151),rep("GSE4271",77),rep("GSE4412",85))
- save(meta,meta_pheno,group,file="meta.RData")
- #PCA(去批前)
- load(file="meta.RData")
- meta=cbind(meta,group)
- pca1 <- prcomp(meta[,-ncol(meta)],center = TRUE,scale. = TRUE)
- #提取PC score
- df1 <- pca1$x
- df1 <- as.data.frame(df1)
- #提取主成分的方差贡献率,生成坐标轴标题
- summ1 <- summary(pca1)
- xlab1 <- paste0("PC1(",round(summ1$importance[2,1]*100,2),"%)")
- ylab1 <- paste0("PC2(",round(summ1$importance[2,2]*100,2),"%)")
- library(ggplot2)
- ggplot(data = df1,aes(x = PC1,y = PC2,color = meta$group))+
- geom_point(size = 3)+
- labs(x = xlab1,y = ylab1,color = "Cohort",title = "Remove Batch Before")+
- guides(fill = "none")+
- theme_bw()+
- scale_colour_manual(values = c("#8DD3C7","#BC80BD","#BEBADA","#FB8072",
- "#80B1D3","#FDB462","#B3DE69","#F1B6DA"))+
- theme(plot.title = element_text(hjust = 0.5,size = 15),
- axis.text = element_text(size = 11),axis.title = element_text(size = 13),
- legend.text = element_text(size = 11),legend.title = element_text(size = 13),
- plot.margin = unit(c(0.4,0.4,0.4,0.4),'cm'))
- #去除批次效应
- library(sva)
- load(file="meta.RData")
- meta=as.data.frame(t(meta))
- Batch=group
- combat <- ComBat(dat = meta, batch = Batch)
- meta=as.data.frame(combat)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- identical(rownames(meta_pheno),colnames(meta))
- save(meta,meta_pheno,group,file="meta.RData")
- table(meta_pheno$Grade)
- #G2 G3 G4
- #599 816 947
- gliomas=meta_pheno %>% filter(!is.na(Grade)) #2362
- lgg=gliomas[gliomas$Grade=="G2"|gliomas$Grade=="G3",] #1451
- gbm=gliomas[gliomas$Grade=="G4",] #947
- LGG=meta[,rownames(lgg)]
- GBM=meta[,rownames(gbm)]
- save(LGG,lgg,file="LGG.RData")
- save(GBM,gbm,file="GBM.RData")
- #PCA(去批后)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load(file="meta.RData")
- meta=as.data.frame(t(meta))
- meta=cbind(meta,group)
- pca1 <- prcomp(meta[,-ncol(meta)],center = TRUE,scale. = TRUE)
- #提取PC score
- df1 <- pca1$x
- df1 <- as.data.frame(df1)
- #提取主成分的方差贡献率,生成坐标轴标题
- summ1 <- summary(pca1)
- xlab1 <- paste0("PC1(",round(summ1$importance[2,1]*100,2),"%)")
- ylab1 <- paste0("PC2(",round(summ1$importance[2,2]*100,2),"%)")
- library(ggplot2)
- ggplot(data = df1,aes(x = PC1,y = PC2,color = meta$group))+
- geom_point(size = 3)+
- labs(x = xlab1,y = ylab1,color = "Cohort",title = "Remove Batch After")+
- guides(fill = "none")+
- theme_bw()+
- scale_colour_manual(values = c("#8DD3C7","#BC80BD","#BEBADA","#FB8072",
- "#80B1D3","#FDB462","#B3DE69","#F1B6DA"))+
- theme(plot.title = element_text(hjust = 0.5,size = 15),
- axis.text = element_text(size = 11),axis.title = element_text(size = 13),
- legend.text = element_text(size = 11),legend.title = element_text(size = 13),
- plot.margin = unit(c(0.4,0.4,0.4,0.4),'cm'))
- #2.3 无监督聚类(PCA,K-M,pheatmap)####
- library(ConsensusClusterPlus)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load(file="meta.RData")
- gene=c("ACTN4","CAPZB","CD2AP","FLNA","INF2","IQGAP1","MYH9","MYL6","PDLIM1")
- mydata=meta[gene,]
- mydata=as.matrix(mydata)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas")
- result_km <- ConsensusClusterPlus(mydata,
- maxK = 6,
- reps = 1000,
- pItem = 0.8,
- pFeature = 1,
- clusterAlg = "km",
- distance="euclidean",
- innerLinkage="complete",
- finalLinkage = "complete",
- title="consensus",
- plot="png",
- seed = 1234,
- writeTable=TRUE)
- save(result_km,file="meta-km.RData")
- load("meta-km.RData")
- #选择K值
- maxK = 6
- Kvec = 2:maxK
- x1 = 0.1; x2 = 0.9
- PAC = rep(NA,length(Kvec))
- names(PAC) = paste("K=",Kvec,sep="")
- for(i in Kvec){
- M = result_km[[i]]$consensusMatrix
- Fn = ecdf(M[lower.tri(M)])
- PAC[i-1] = Fn(x2) - Fn(x1)}
- #The optimal K
- optK = Kvec[which.min(PAC)]
- optK #[2]
- #查看分簇
- clusterNum=2
- cluster=result_km[[clusterNum]][["consensusClass"]]
- cluster=as.data.frame(cbind(sample=colnames(meta),group=cluster))
- table(cluster$group) #1-1341,2-1118
- cluster$group=ifelse(cluster$group=="1","Cluster1","Cluster2")
- write.csv(cluster,file="cluster.csv",row.names=F)
- #PCA可视化
- dat=mydata
- dat=as.data.frame(t(dat))
- dat=cbind(dat,group=cluster$group)
- pca1 <- prcomp(dat[,-ncol(dat)],center = TRUE,scale. = TRUE)
- #提取PC score
- df1 <- pca1$x
- df1 <- as.data.frame(df1)
- #提取主成分的方差贡献率,生成坐标轴标题
- summ1 <- summary(pca1)
- xlab1 <- paste0("PC1(",round(summ1$importance[2,1]*100,2),"%)")
- ylab1 <- paste0("PC2(",round(summ1$importance[2,2]*100,2),"%)")
- library(ggplot2)
- ggplot(data = df1,aes(x = PC1,y = PC2,color = dat$group))+
- stat_ellipse(aes(fill = dat$group),type = "norm",geom = "polygon",alpha = 0,color = "grey")+
- geom_point(size = 3,alpha=0.8)+
- labs(x = xlab1,y = ylab1,color = "Cohort",title = "Meta-cohort")+
- guides(fill = "none")+
- theme_bw()+
- scale_colour_manual(values = c("#F1B6DA","#BC80BD"))+
- theme(plot.title = element_text(hjust = 0.5,size = 15),
- axis.text = element_text(size = 11),axis.title = element_text(size = 13),
- legend.text = element_text(size = 11),legend.title = element_text(size = 13),
- plot.margin = unit(c(0.4,0.4,0.4,0.4),'cm'))
- #生存分析
- library(survival)
- library(survminer)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load(file="meta.RData")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas")
- cluster=read.csv("cluster.csv",header=T)
- identical(rownames(meta_pheno),cluster$sample)
- rt=cbind(meta_pheno[,c(1:2)],Type=cluster$group)
- diff=survdiff(Surv(OS.time, OS) ~ Type, data=rt)
- pValue=1-pchisq(diff$chisq, df=1)
- if(pValue<0.001){
- pValue="p<0.001"
- }else{
- pValue=paste0("p=", sprintf("%.03f",pValue))
- }
- fit <- survfit(Surv(OS.time, OS) ~ Type, data = rt)
- surPlot=ggsurvplot(fit,
- data=rt,
- conf.int=F,
- pval=pValue,
- pval.size=6,
- xlab="Time(years)",
- #ylab="Overall survival",
- legend.title="Cluster",
- break.time.by = 5,
- palette=c("#F1B6DA","#BC80BD"))
- #临床相关性热图
- library(pheatmap)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load("meta.RData")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas")
- cluster=read.csv("cluster.csv",header=T)
- identical(colnames(meta),cluster$sample)
- gene=c("ACTB","ACTN4","CAPZB","CD2AP","DSTN","FLNA","FLNB","INF2",
- "IQGAP1","MYH10","MYH9","MYL6","PDLIM1","SLC7A11","TLN1")
- data=cbind(meta_pheno[,c(1,3,4,5)],Cohort=group,Cluster=cluster$group,t(meta[gene,]))
- data$OS=ifelse(data$OS=="1","Dead","Alive")
- data$Age=ifelse(data$Age>47,">47","≤47")
- data$Gender=ifelse(data$Gender=="Male","Male","Female")
- #表达显著性验证
- library(tidyr)
- library(ggpubr)
- Exp_plot <- as.data.frame(data[,7:21])
- info <- as.data.frame(cbind(sample=rownames(data),group=data$Cluster))
- colnames(info)=c("Sample","Type")
- Exp_plot$sam=info$Type
- Exp_plot$sam <- factor(Exp_plot$sam, levels = c("Cluster1","Cluster2"))
- expr_use <- na.omit(Exp_plot)
- expr_use <-as.data.frame(expr_use)
- expr_use_long <- gather(expr_use, gene, Expression, -sam)
- table(expr_use_long$gene)
- colnames(expr_use_long) <- c("Group","gene","Expression")
- #绘图
- p=ggboxplot(expr_use_long, x="gene", y="Expression", color = "black", fill="Group",
- ylab="Gene expression",
- xlab="",
- legend.title=NULL,
- palette = c("#FF0033","#009934","#0088FF"),
- width=0.6, add = "none")
- p1=p+stat_compare_means(aes(group=Group),
- method="wilcox.test",
- symnum.args=list(cutpoints = c(0, 0.001, 0.01, 0.05, 1), symbols = c("***", "**", "*", " ")),
- label = "p.signif")
- p1
- #表达显著性验证
- data=na.omit(data) #2294
- data = data[order(data[,"Cluster"]),]
- str(data)
- table(data$Cluster)
- rt=as.data.frame(t(data[,c(7:21)]))
- Type=data[,c(1:6)]
- anno_col=list(OS=c("Alive"="#A6D854","Dead"="#54b345"),
- Age=c("≤47"="#ff7f00",">47"="#FFBE7A"),
- Gender=c("Female"="#82B0D2","Male"="#a6cee3"),
- Grade=c("G2"="#C7E9B4","G3"="#7FCDBB","G4"="#41B6C4"),
- Cohort=c("TCGA"="#8DD3C7","CGGA325"="#FFFFB3","CGGA693"="#BEBADA","GSE16011"="#FB8072",
- "GSE108474"="#80B1D3","GSE4412"="#FDB462","GSE4271"="#B3DE69","E_MATE_3892"="#FCCDE5"),
- Cluster=c("Cluster1"="#F1B6DA","Cluster2"="#BC80BD"))
- pheatmap(rt, annotation=Type,
- main="Meta-cohort",
- color = colorRampPalette(colors = c("#313695","#4575B4","#74ADD1","#ABD9E9","white",
- "#F1B6DA","#DE77AE","#C51B7D","#8E0152"))(50),
- cluster_cols =F,
- cluster_rows = F,
- scale="row",
- show_colnames=F,
- annotation_colors = anno_col,
- fontsize=7.5,
- fontsize_row=8,
- gaps_col = 1250)
- #2.4 分簇的差异分析####
- library(limma)
- library(edgeR)
- library(dplyr)
- #RNAseq部分
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="meta.RData")
- meta=as.data.frame(t(meta))
- meta=meta[,c(1768:2459)] #TCGA
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- cluster=read.csv("tcga_cluster.csv")
- sample=cluster$sample
- meta=meta[,sample]
- identical(colnames(meta),cluster$sample)
- Group = factor(cluster$group,levels = c("Cluster1","Cluster2"))
- table(Group)
- #构建 DGEList 对象
- design = model.matrix(~0+Group)
- colnames(design)=levels(Group)
- rownames(design)=colnames(meta)
- dge = DGEList(counts=meta)
- #计算标准化因子
- dge = calcNormFactors(dge)
- #将矩阵进行voom转化,即计数数据转换为log2-counts per million (logCPM),生成Elist对象
- v = voom(dge,design,normalize="quantile")
- #转化后数据用于构建linear model
- fit = lmFit(v,design)
- #定义比较分组的信息
- constrasts = paste(rev(levels(Group)),collapse = "-")
- cont.matrix = makeContrasts(contrasts=constrasts,levels = design)
- #比较每个基因计算出标准差,使用经验贝叶斯方法进行校正并生成其他统计量
- fit3 = contrasts.fit(fit,cont.matrix)
- fit3 = eBayes(fit3)
- #提取差异分析数据
- DEG_limma = topTable(fit3, coef=constrasts, n=Inf)
- DEG_limma = na.omit(DEG_limma)
- #生成显著上下调gene标签列
- DEG_limma$group <- case_when(DEG_limma$logFC > 0.5 & DEG_limma$P.Value < 0.05 ~ "Up",
- DEG_limma$logFC < -0.5 & DEG_limma$P.Value < 0.05 ~ "Down",
- abs(DEG_limma$logFC) <= 0.5 ~ "None",
- DEG_limma$P.Value >= 0.05 ~ "None")
- table(DEG_limma$group)
- #CGGA325, d,519,u,516
- #CGGA693, d,499,u,465
- #TCGA, d,527,u,574
- #提取差异表达基因
- gene=DEG_limma[DEG_limma$group=="Up"|DEG_limma$group=="Down",]
- gene=as.data.frame(rownames(gene))
- colnames(gene)="tcga"
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.4 DEG")
- write.csv(gene,file="tcga.csv",row.names = F)
- #microarray部分
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="meta.RData")
- meta=as.data.frame(t(meta))
- meta=meta[,c(1662:1925)] #GSE16011
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- cluster=read.csv("emate3892_cluster.csv")
- sample=cluster$sample
- meta=meta[,sample]
- identical(colnames(meta),cluster$sample)
- Group = factor(cluster$group,levels = c("Cluster1","Cluster2"))
- table(Group)
- #构建design
- design = model.matrix(~0+Group)
- colnames(design)=levels(Group)
- rownames(design)=colnames(meta)
- #非线性最小二乘分析
- fit = lmFit(meta,design)
- #定义比较分组的信息
- constrasts = paste(rev(levels(Group)),collapse = "-")
- cont.matrix = makeContrasts(contrasts=constrasts,levels = design)
- #比较每个基因计算出标准差,使用经验贝叶斯方法进行校正并生成其他统计量
- fit3 = contrasts.fit(fit,cont.matrix)
- fit3 = eBayes(fit3)
- #提取差异分析数据
- DEG_limma = topTable(fit3, coef=constrasts, n=Inf)
- DEG_limma = na.omit(DEG_limma)
- #生成显著上下调gene标签列
- DEG_limma$group <- case_when(DEG_limma$logFC > 0.5 & DEG_limma$P.Value < 0.05 ~ "Up",
- DEG_limma$logFC < -0.5 & DEG_limma$P.Value < 0.05 ~ "Down",
- abs(DEG_limma$logFC) <= 0.5 ~ "None",
- DEG_limma$P.Value >= 0.05 ~ "None")
- table(DEG_limma$group)
- #E-MATE-3892, d,385,u,693
- #GSE108474, d,634,u,1102
- #GSE16011, d,501,u,1701
- #GSE4271, d,404,u,435
- #GSE4412, d,571,u,772
- #提取差异表达基因
- gene=DEG_limma[DEG_limma$group=="Up"|DEG_limma$group=="Down",]
- gene=as.data.frame(rownames(gene))
- colnames(gene)="emate3892"
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.4 DEG")
- write.csv(gene,file="emate3892.csv",row.names = F)
- #差异基因的单因素cox分析
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.4 DEG/co-gene")
- DEG=read.table("DEG_in_7_cohort.txt")
- a=DEG$V1
- #8个队列单因素cox回归分析
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- library(forestplot)
- library(grid)
- library(magrittr)
- library(checkmate)
- library(data.table)
- library(survival)
- library(survminer)
- gene=a
- #TCGA
- load(file="TCGA.RData")
- dat=TCGA[gene,]
- dat=as.data.frame(t(dat))
- identical(rownames(dat),rownames(OS))
- data=cbind(OS,dat)
- univar_out = data.frame(matrix(NA,294,5))
- rownames(univar_out) = colnames(data)[-(1:2)]
- colnames(univar_out) = c("Coeffcient","HR","lower .95","upper .95","P-value")
- cox_data = data[,c(3:ncol(data))]
- cox_data = cbind(data[,c(1:2)],cox_data)
- str(cox_data)
- for(i in colnames(cox_data)[-(1:2)]){
- cox = coxph(Surv(OS.time, OS) ~ cox_data[,i], data = cox_data)
- cox_summ = summary(cox)
- univar_out[i,1] = cox_summ$coefficients[,1]
- univar_out[i,2] = cox_summ$coefficients[,2]
- univar_out[i,3] = cox_summ$conf.int[,3]
- univar_out[i,4] = cox_summ$conf.int[,4]
- univar_out[i,5] = cox_summ$coefficients[,5]
- }
- univar_out_0.05 = univar_out[univar_out[,5] < 0.05,]
- univar_out_TCGA=univar_out_0.05[,c(2,5)]
- #取交集
- intersects <- function (...) {
- Reduce(intersect, list(...))
- }
- b=intersects(rownames(univar_out_TCGA),rownames(univar_out_CGGA325),rownames(univar_out_CGGA693),rownames(univar_out_GSE16011),
- rownames(univar_out_GSE108474),rownames(univar_out_EMTAB3892),rownames(univar_out_GSE4271),rownames(univar_out_GSE4412))
- univar_out_TCGA=univar_out_TCGA[b,]
- univar_out_CGGA325=univar_out_CGGA325[b,]
- univar_out_CGGA693=univar_out_CGGA693[b,]
- univar_out_GSE16011=univar_out_GSE16011[b,]
- univar_out_GSE108474=univar_out_GSE108474[b,]
- univar_out_EMTAB3892=univar_out_EMTAB3892[b,]
- univar_out_GSE4271=univar_out_GSE4271[b,]
- univar_out_GSE4412=univar_out_GSE4412[b,]
- #汇总
- sum=cbind(univar_out_TCGA,univar_out_CGGA325,univar_out_CGGA693,univar_out_GSE16011,
- univar_out_GSE108474,univar_out_EMTAB3892,univar_out_GSE4271,univar_out_GSE4412)
- colnames(sum)=c("TCGA_HR","TCGA_pvalue","CGGA325_HR","CGGA325_pvalue",
- "CGGA693_HR","CGGA693_pvalue","GSE16011_HR","GSE16011_pvalue",
- "GSE108474_HR","GSE108474_pvalue","EMTAB3892_HR","EMTAB3892_pvalue",
- "GSE4271_HR","GSE4271_pvalue","GSE4412_HR","GSE4412_pvalue")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.4 DEG/co-gene")
- write.table(sum,file="cox_result.txt",quote=F,sep="\t")
- #可视化
- library(pheatmap)
- library(RColorBrewer)
- results=read.table(file="heatmap.txt")
- datacol<-read.table("anno_col.txt",sep = "\t",header=T,row.names=1)
- rownames(datacol)
- datarowcolor = list(cohort=c(TCGA = "#A6CEE3", CGGA325 = "#1F78B4",CGGA693 = "#B2DF8A", GSE16011 = "#33A02C",
- GSE108474 = "#FB9A99",EMTAB3892 = "#E31A1C",GSE4271 = "#FDBF6F",GSE4412 = "#FF7F00"))
- pheatmap(results,
- color = colorRampPalette(c("#B3DE69", "grey90", "#FF82A8"))(25),
- border_color="grey30",
- fontsize = 6,
- cluster_rows = F,cluster_cols = F,shown_colnames=F,
- annotation_col = datacol,annotation_colors = datarowcolor,
- gaps_col = c(1,2,3,4,5,6,7))
- #2.5 分簇的通路富集分析####
- library(limma)
- library(edgeR)
- library(dplyr)
- library(GSVA)
- library(clusterProfiler)
- library(tidyverse)
- library(msigdbr)
- library(GSEABase)
- library(pheatmap)
- library(BiocParallel)
- library(ggplot2)
- library(ggridges)
- library(RColorBrewer)
- library(org.Hs.eg.db)
- library(enrichplot)
- library(ggraph)
- library(ggrepel)
- library(qusage)
- library(tibble)
- library(stringr)
- #GSVA-hallmark(error)
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- gsva_data=TCGA
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- cluster=read.csv("tcga_cluster.csv")
- rownames(cluster)=cluster$sample
- cluster=cluster[colnames(TCGA),]
- #gsva
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 function")
- hallmark_gmt <- read.gmt("h.all.v2023.2.Hs.symbols.gmt")
- gene_set<-split(hallmark_gmt$gene,hallmark_gmt$term)
- gsva_result <- gsva(as.matrix(gsva_data), gene_set, method = "gsva",min.sz=1,
- max.sz=Inf,kcdf="Gaussian",parallel.sz=11)
- #通路的差异分析
- gl
- Cluster1="Cluster1"
- Cluster2="Cluster2"
- group_list = cluster$group
- design <- model.matrix(~0+factor(group_list))
- colnames(design) <- levels(factor(group_list))
- rownames(design) <- colnames(gsva_result)
- contrast.matrix <- makeContrasts(contrasts=paste0(Cluster2,'-',Cluster1),
- levels = design)
- fit1 <- lmFit(gsva_result,design)
- fit2 <- contrasts.fit(fit1, contrast.matrix)
- efit <- eBayes(fit2)
- summary(decideTests(efit,lfc=0.5, p.value=0.05))
- tempOutput <- topTable(efit, coef=paste0(Cluster2,'-',Cluster1), n=Inf)
- degs <- na.omit(tempOutput)
- #火山图
- degs1 <- degs %>%
- rownames_to_column("pathway") %>%
- mutate(Type = if_else(P.Value > 0.05,"ns",if_else(logFC >= 0, "up", "down"))) %>%
- arrange(desc(abs(logFC)))
- deg_path <- degs1
- deg_path$pathway <- str_split_fixed(deg_path$pathway,"_",n=2)[,2]
- deg_path$pathway <- gsub(pattern = "_"," ",deg_path$pathway)
- dat_draw <- deg_path[,c(1,2)]
- dat_draw$group <- ifelse(dat_draw$logFC>0 ,1,-1)
- dat_draw$log <- -log10(deg_path$P.Value)*dat_draw$group
- dat_draw$Type <- deg_path$Type
- p <-ggplot(data = deg_path,
- aes(x = logFC,
- y = -log10(P.Value)
- ))+
- geom_point(alpha=0.7, size=4,
- aes(color=Type))+
- ylab("-log10(adj.p.Val)")+
- scale_color_manual(values=c("#56a902", "grey","#d62a9d"))+
- geom_vline(xintercept=0,lty=2,col="grey50",lwd=0.8)+
- geom_hline(yintercept = -log10(0.05),lty=2,col="grey50",lwd=0.8)+
- theme_bw()
- p
- #添加通路名称
- deg_path$symbol=deg_path$pathway
- deg_path=read.csv("deg_path.csv")
- p1 <- p+geom_text_repel(data = deg_path, aes(x = logFC ,
- y = -log10(P.Value),
- label = label),
- size = 3,box.padding = unit(0.5, "lines"),
- point.padding = unit(0.8, "lines"),
- segment.color = "black",
- show.legend = FALSE)
- p1
- #ssGSEA-10条经典癌症通路
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- gsva_data=TCGA
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- cluster=read.csv("tcga_cluster.csv")
- rownames(cluster)=cluster$sample
- cluster=cluster[colnames(TCGA),]
- #基因集信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 function")
- cancer_pathway=read.csv("10_cancer_pathway_PMID30837276.csv")
- cancer_pathway <- separate(cancer_pathway, Pathway, into = c("Pathway", "Type"), sep = "_")
- activated=cancer_pathway[cancer_pathway$Type=="activated",]
- activated <- split(activated$Symbol, activated$Pathway)
- repressed=cancer_pathway[cancer_pathway$Type=="repressed",]
- repressed <- split(repressed$Symbol, repressed$Pathway)
- #ssgsea
- gsva_result_a <- gsva(as.matrix(gsva_data), activated, method = "ssgsea",min.sz=1,
- max.sz=Inf,kcdf="Gaussian",parallel.sz=11)
- gsva_result_r <- gsva(as.matrix(gsva_data), repressed, method = "ssgsea",min.sz=1,
- max.sz=Inf,kcdf="Gaussian",parallel.sz=11)
- #结果处理
- identical(colnames(gsva_result_a),colnames(gsva_result_r))
- original_row_names <- rownames(gsva_result_a)
- new_row_names <- paste(original_row_names, "_a", sep = "")
- rownames(gsva_result_a) <- new_row_names
- data=rbind(gsva_result_a,gsva_result_r)
- write.csv(data,file="dat.csv")
- #富集分数=激活分数-抑制分数
- result=read.csv(file="dat_result.csv",row.names = 1)
- identical(rownames(result),cluster$sample)
- result$group=cluster$group
- result_long <- gather(result, pathway, scores, -group)
- #山峦图
- ggplot(result_long, aes(x = scores, y = pathway, color = group, point_color = group, fill = group)) +
- geom_density_ridges(jittered_points = TRUE, scale = 0.95, rel_min_height = 0.01,
- point_shape = "|", point_size = 3, size = 0.25, position = position_points_jitter(height = 0)) +
- scale_y_discrete(expand = c(0, 0)) + scale_x_continuous(expand = c(0, 0), name = " ") +
- scale_fill_manual(values = c("#D55E0050", "#0072B250"), labels = c("Cluster1",
- "Cluster2")) +
- scale_color_manual(values = c("#D55E00", "#0072B2"), guide = "none") +
- scale_discrete_manual("point_color", values = c("#D55E00", "#0072B2"), guide = "none") +
- coord_cartesian(clip = "off") + guides(fill = guide_legend(override.aes = list(fill = c("#D55E00A0",
- "#0072B2A0"), color = NA, point_color = NA))) + ggtitle(" ") +
- theme_ridges(center = TRUE)+
- theme(legend.position = "top")
- #GSEA
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- cluster=read.csv("tcga_cluster.csv")
- rownames(cluster)=cluster$sample
- cluster=cluster[colnames(TCGA),]
- Group = factor(cluster$group,levels = c("Cluster1","Cluster2"))
- table(Group)
- design = model.matrix(~0+Group)
- colnames(design)=levels(Group)
- rownames(design)=colnames(TCGA)
- dge = DGEList(counts=TCGA)
- dge = calcNormFactors(dge)
- v = voom(dge,design,normalize="quantile")
- fit = lmFit(v,design)
- constrasts = paste(rev(levels(Group)),collapse = "-")
- cont.matrix = makeContrasts(contrasts=constrasts,levels = design)
- fit3 = contrasts.fit(fit,cont.matrix)
- fit3 = eBayes(fit3)
- DEG_limma = topTable(fit3, coef=constrasts, n=Inf)
- DEG_limma = na.omit(DEG_limma)
- DEG_limma$group <- case_when(DEG_limma$logFC > 0.5 & DEG_limma$adj.P.Val < 0.01 ~ "Up",
- DEG_limma$logFC < -0.5 & DEG_limma$adj.P.Val < 0.01 ~ "Down",
- abs(DEG_limma$logFC) <= 0.5 ~ "None",
- DEG_limma$adj.P.Val >= 0.01 ~ "None")
- table(DEG_limma$group)
- #Down None Up
- #1828 54433 2126
- gene=DEG_limma[DEG_limma$group=="Up"|DEG_limma$group=="Down",]
- DEGfilter=rownames(gene)
- eg <- bitr(DEGfilter, fromType = "SYMBOL",
- toType = c("ENTREZID", "ENSEMBL", "SYMBOL"),
- OrgDb = "org.Hs.eg.db")
- gene_info <- gene[DEGfilter, ] %>%
- rownames_to_column(var = "SYMBOL") %>%
- inner_join(., eg[, 1:2], by = "SYMBOL") %>%
- arrange(desc(logFC))
- gene_info <- unique(gene_info)
- geneList <- gene_info$logFC
- names(geneList) <- as.character(gene_info$SYMBOL)
- head(geneList)
- #msigdb C2
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 function")
- kegg_gmt <- read.gmt("c2.cp.kegg_legacy.v2023.2.Hs.symbols.gmt")
- kegg_gmt_df <- data.frame(
- TERM = rep(names(kegg_gmt), sapply(kegg_gmt, length)),
- GENE = unlist(kegg_gmt))
- #gsea
- gsea <- GSEA(geneList, TERM2GENE = kegg_gmt)
- gsea_result=gsea@result
- rownames(gsea_result)=NULL
- #Cluster1
- gseaplot2(gsea, geneSetID = c(1,2,6,9,11,14),pvalue_table = F,
- color = c("#E495A5", "#86B875", "#7DB0DD","#FF7F00","#C51B7D","#FF0033"),
- base_size = 11)
- #Cluster2
- gseaplot2(gsea, geneSetID = c(3,4,7,8,10,12,15),pvalue_table = F,
- color = c("#FFCC33", "#86B875", "#7DB0DD","#FF7F00","#C51B7D","#377EB8",
- "#FF0033"),base_size = 11)
- #2.6 分簇的免疫浸润分析####
- library(tidyverse)
- library(IOBR)
- library(reshape2)
- library(ggplot2)
- library(ggpubr)
- library(ggsci)
- library(pheatmap)
- library(cowplot)
- library(ComplexHeatmap)
- library(circlize)
- library(scales)
- library(RColorBrewer)
- library(ggh4x)
- library(GSVA)
- library(tinyarray)
- #IOBR的6种算法免疫浸润
- #与4.0immune区别是分组不同
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- load(file="tme_combine.RData")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- data = TCGA
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- sample=colnames(TCGA)
- rownames(group)=group$sample
- group=group[sample,]
- identical(group$sample,colnames(TCGA))
- #准备可视化
- #合并数据
- immune=cbind(cibersort[,c(1:26)],quantiseq[,2:12],mcp[,c(2:11)],xcell[,c(2:68)],
- epic[,c(2:9)],ips[,c(2:7)])
- rownames(immune)=immune$ID
- immune=immune[,-1]
- immune=t(immune)
- #构建列分组文件
- library(stringr)
- Methods=c(rep('CIBERSORT',25),rep('Quantiseq',11),rep('MCP-counter',10),
- rep('xCELL',67),rep('EPIC',8),rep('IPS',6))
- type=data.frame(Methods=Methods)
- rownames(type)=rownames(immune)
- #标准化函数
- standarize.fun <- function(indata=NULL, halfwidth=NULL, centerFlag=T, scaleFlag=T) {
- outdata=t(scale(t(indata), center=centerFlag, scale=scaleFlag))
- if (!is.null(halfwidth)) {
- outdata[outdata>halfwidth]=halfwidth
- outdata[outdata<(-halfwidth)]= -halfwidth
- }
- return(outdata)
- }
- #标准化免疫浸润数据,便于绘制热图
- plotdata <- standarize.fun(immune,halfwidth = 2)
- type$Methods=factor(type$Methods,levels = c('CIBERSORT','Quantiseq','MCP-counter',
- 'xCELL','EPIC','IPS'))
- #分组信息
- my2=group[order(group$group),]
- rownames(my2)=my2$sample
- #排序
- order2=rownames(my2)
- table(my2$group)
- Method=c('#66C2A5','#FC8D62','#8DA0CB','#E78AC3','#A6D854',"#FFD92F","#E5C494")
- names(Method)=c('CIBERSORT','Quantiseq','MCP-counter','xCELL','EPIC','IPS')
- #绘图
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 immu")
- pdf('6IOBR_heatmap.pdf',height = 14,width = 8)
- Heatmap(plotdata[,order2],name='Z-score',
- top_annotation = HeatmapAnnotation(foo=anno_block(gp=gpar(fill= c('#F1B6DA','#BC80BD')),
- labels=c('Cluster1','Cluster2'),
- labels_gp = gpar(col='white',fontsize=10,fontface='bold'))),
- cluster_rows = F,
- col=colorRamp2(c(-2,0,2),c('#47b8e0','white','#FDAE61')),
- color_space = "RGB",
- cluster_columns = FALSE,border = T,
- row_order=NULL,
- row_names_side = 'left',
- column_order=NULL,
- show_column_names = FALSE,
- row_names_gp = gpar(fontsize = 9),
- column_split = c(rep(1,428),rep(2,263)),
- row_split = type$Methods,
- left_annotation = rowAnnotation(foo=anno_block(gp=gpar(fill= c('#F46D43','#FDAE61','#FEE090','#ABD9E9','#74ADD1',"#4575B4")),
- labels=c('CIBERSORT','Quantiseq','MCP-counter','xCELL','EPIC','IPS'),
- labels_gp = gpar(col='white',fontsize=8,fontface='bold'))),
- gap = unit(1, "mm"),
- column_title = NULL,
- column_title_gp = gpar(fontsize = 10),
- show_heatmap_legend =T,
- heatmap_legend_param=list(labels_gp = gpar(fontsize = 10), border = T,
- title_gp = gpar(fontsize = 10, fontface = "bold")),
- column_gap = unit(2,'mm'),
- row_title = NULL
- )
- dev.off()
- #estimate
- estimate=column_to_rownames(estimate,"ID")
- estimate=estimate[,1:3]
- a <- estimate
- identical(rownames(a),rownames(group))
- a$group=as.factor(group$group)
- a <- a %>% rownames_to_column("sample")
- b <- gather(a,key=category,value = score,-c(group,sample))
- b1=as.data.frame(lapply(b$score,as.numeric)) %>% t() %>% as.data.frame()
- b$score <- b1$V1
- library(ggpubr)
- library(reshape2)
- p=ggviolin(b, x="category", y="score",
- fill="group",#填充
- palette =c("#F1B6DA","#6A3D9A"),
- alpha=0.3,
- add ="boxplot",
- xlab = F,
- legend = "right",
- size = 0.5)
- p+stat_compare_means(aes(group = group),
- method = "wilcox.test",
- label = "p.signif",
- label.y = 4500,
- symnum.args=list(cutpoints = c(0, 0.001, 0.01, 0.05, 1),
- symbols = c("***", "**", "*", "ns")))+
- theme(text = element_text(size=10),axis.text.x = element_text(angle=0, hjust=0.5))
- #CIBERSORT免疫细胞
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- load(file="tme_combine.RData")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- data = TCGA
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- rownames(group)=group$sample
- group=group[colnames(TCGA),]
- cibersort=cibersort[,1:23]
- cibersort=column_to_rownames(cibersort,"ID")
- cibersort=t(cibersort)
- rownames_original <- rownames(cibersort)
- rownames_cleaned <- sub("_CIBERSORT", "", rownames_original)
- rownames(cibersort) <- rownames_cleaned
- draw_boxplot(cibersort,group$group,color = c("#F1B6DA","#BC80BD"),
- xlab = " ",ylab = "Scores")
- #免疫周期
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- exp=as.matrix(TCGA)
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- rownames(group)=group$sample
- group=group[colnames(TCGA),]
- #immu cycle
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- geneset=read.csv("IOBR_TIME.csv")
- geneset=geneset[1:7,]
- split_genes <- strsplit(geneset$genes, ",")
- new_geneset <- data.frame(
- genesymbol = unlist(split_genes),
- cell = rep(geneset$cell, lengths(split_genes)))
- geneset = split(new_geneset$genesymbol,new_geneset$cell)
- #ssgsea
- re <- gsva(exp, geneset, method="ssgsea",mx.diff=FALSE, verbose=FALSE,
- kcdf="Gaussian")
- draw_boxplot(re,group$group,color = c("#F1B6DA","#BC80BD"),
- xlab = " ",ylab = "Scores")
- #免疫功能
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- exp=as.matrix(TCGA)
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- rownames(group)=group$sample
- group=group[colnames(TCGA),]
- #immu function
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/TISIDB")
- geneset = rio::import("ssGSEA-PMID30594216-Signature-13.xlsx",skip = 1)
- geneset <- apply(geneset,2,function(x){return(as.character(na.omit(as.character(x))))})
- #ssgsea
- re <- gsva(exp, geneset, method="ssgsea",mx.diff=FALSE, verbose=FALSE,kcdf="Gaussian")
- draw_boxplot(re,group$group,color = c("#F1B6DA","#BC80BD"),
- xlab = " ",ylab = "Scores")
- #TIME-Kobayashi/Bagaev
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- exp=as.matrix(TCGA)
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- rownames(group)=group$sample
- group=group[colnames(TCGA),]
- #免疫细胞基因集
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/TISIDB")
- dat=read.csv("TIME-Kobayashi.csv") #TIME-Kobayashi.csv/TIME-Bagaev.csv
- geneset = split(dat$gene,dat$type)
- #ssgsea
- re <- gsva(exp, geneset, method="ssgsea",mx.diff=FALSE, verbose=FALSE,kcdf="Gaussian")
- identical(colnames(TCGA),colnames(re))
- re=rbind(re,group=group$group)
- re=as.data.frame(t(re))
- re=re[order(re$group),]
- Cluster1 <- subset(re, group == "Cluster1")
- Cluster2 <- subset(re, group == "Cluster2")
- #Kobayashi
- features <- c("Glycolysis", "IFNG response", "Inhibitory cells MDSCs", "Inhibitory cells Tregs", "Inhibitory molecules",
- "Innate immunity", "Priming & activation", "Proliferation", "Recognition of tumor cells", "T cells")
- #Bagaev
- features <- c("Angiogenesis", "Anti tumor microenvironment", "Antigen presentation", "B cells", "CAF",
- "Checkpoint inhibition", "Cytotoxic T and NK cells", "Granulocytes", "MDSC", "Treg",
- "Tumor features","Tumor promotive immune infiltrate")
- Cluster1_means <- sapply(Cluster1[, features], function(x) mean(as.numeric(x)))
- Cluster2_means <- sapply(Cluster2[, features], function(x) mean(as.numeric(x)))
- group_means <- data.frame(Cluster1 = Cluster1_means, Cluster2 = Cluster2_means)
- rownames(group_means) <- features
- #雷达图
- library(fmsb)
- library(ggradar)
- library(cols4all)
- library(ggplot2)
- data=as.data.frame(t(group_means))
- range(data)
- data=rownames_to_column(data,'group')
- mycol2=c("#F1B6DA","#6A3D9A")
- ggradar(data,
- grid.min = 0,grid.mid = 0.6,grid.max = 1.2,
- gridline.mid.colour = 'grey',
- values.radar = NA,
- axis.label.size = 2.5,
- legend.text.size = 8,
- legend.position = 'bottom',
- group.point.size = 1.5,group.line.width = 1,
- fill = TRUE,fill.alpha = 0.3,
- group.colours = mycol2,
- background.circle.colour = 'white',background.circle.transparency = 0.2)
- #2.7 分簇的突变分析####
- #SNV
- #SNV样本信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.1 genomic")
- load("TCGA-LGG_maf.rdata")
- barcode=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode)="sample"
- data1=data
- load("TCGA-GBM_maf.rdata")
- barcode2=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode2)="sample"
- data2=data
- #合并lgg和gbm
- data <- rbind(data1,data2)
- maf.coad <- data
- class(maf.coad) #data.frame
- dim(maf.coad) #87957 141
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- #匹配结果
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/snv")
- clin <- read.csv("SNV_barcode-group.csv",header=TRUE) #987
- del <- which(clin$group=="#N/A")
- clin <- clin[-del,] #732
- colnames(clin)=c("Tumor_Sample_Barcode","sample")
- maf.coad=merge(data,clin,by="Tumor_Sample_Barcode") #63987 142
- sample=unique(maf.coad$Tumor_Sample_Barcode)
- #maf文件
- maf <- read.maf(maf.coad,clinicalData = clin)
- #tmb计算
- tmb_table_wt_log = tmb(maf = maf)
- #合并分组信息
- dat=as.data.frame(tmb_table_wt_log[,c(1,4)])
- rownames(dat)=dat$Tumor_Sample_Barcode
- rownames(clin)=clin$Tumor_Sample_Barcode
- dat2=merge(dat,clin,by=0)
- #更新分组名称
- dat2$sample <- factor(dat2$sample, levels = c("Cluster1","Cluster2"))
- p=ggviolin(dat2, x="sample", y="total_perMB_log", fill="sample",
- palette =c("#1F78B4","#E31A1C"),alpha = 0.5,
- add ="boxplot",size = 0.5,
- xlab = "TMB",
- legend = "none")
- p+stat_compare_means(aes(group = sample),
- method = "wilcox.test",label = "p.signif",
- label.x = 1.5,label.y = 1.5,
- symnum.args=list(cutpoints = c(0, 0.001, 0.01, 0.05, 1),
- symbols = c("***", "**", "*", "ns")))
- #CNV
- library(data.table)
- #segment数据准备
- #cnv数据
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/cnv")
- load("TCGA-LGG_CNV.Rdata")
- lgg=data[2:7]
- load("TCGA-GBM_CNV.Rdata")
- gbm=data[2:7]
- gliomas=rbind(lgg,gbm)
- gliomas = gliomas[,c('Sample','Chromosome','Start','End','Num_Probes','Segment_Mean')]
- write.csv(gliomas,file="gliomas.csv")
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.3 K-meas/cohort")
- group=read.csv("tcga_cluster.csv")
- write.csv(group,file="group.csv")
- #匹配分组的数据
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/cnv")
- gliomas=read.csv(file="gliomas-group.csv")
- del <- which(gliomas$group=="#N/A")
- gliomas <- gliomas[-del,]
- colnames(gliomas)=c('Sample','Chromosome','Start','End','Num_Probes','Segment_Mean','group')
- #cluster1
- cluster1=gliomas[gliomas$group=="Cluster1",]
- cluster1=cluster1[,1:6]
- write.table(cluster1,file="Cluster1 segment file.txt",sep="\t",quote=F,row.names=F)
- #cluster2
- cluster2=gliomas[gliomas$group=="Cluster2",]
- cluster2=cluster2[,1:6]
- write.table(cluster2,file="Cluster2 segment file.txt",sep="\t",quote=F,row.names=F)
- #markfile数据准备
- marker_file = read.delim("snp6.na35.remap.hg38.subset.txt")
- marker_file=marker_file[marker_file$freqcnv=="FALSE",]
- marker_file = marker_file[,c(1,2,3)]
- colnames(marker_file)=c("Marker Name", "Chromosome", "Marker Position")
- write.table(marker_file,"marker file.txt",sep="\t",col.names=TRUE,row.name=FALSE)
- #可视化
- library(BSgenome.Hsapiens.UCSC.hg38)
- library(ggplot2)
- library(ggsci)
- library(ggprism)
- #染色体信息
- df <- data.frame(chromName = seqnames(BSgenome.Hsapiens.UCSC.hg38),
- chromlength = seqlengths(BSgenome.Hsapiens.UCSC.hg38)
- )
- df$chromNum <- 1:length(df$chromName)
- df <- df[1:22,]
- df$chromlengthCumsum <- cumsum(as.numeric(df$chromlength))
- df$chormStartPosFrom0 <- c(0,df$chromlengthCumsum[-nrow(df)])
- tmp_middle <- diff(c(0,df$chromlengthCumsum)) / 2
- df$chromMidelePosFrom0 <- df$chormStartPosFrom0 + tmp_middle
- #读取结果
- scores <- read.table("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/cnv/578326-Cluster1/scores.gistic",
- sep="\t",header=T,stringsAsFactors = F)
- chromID <- scores$Chromosome
- scores$StartPos <- scores$Start + df$chormStartPosFrom0[chromID]
- scores$EndPos <- scores$End + df$chormStartPosFrom0[chromID]
- range(scores$frequency)
- scores[scores$Type == "Del", "frequency"] <- scores[scores$Type == "Del", "frequency"] * -1
- range(scores$frequency)
- df$ypos <- rep(c(0.15,0.18),11)
- df$rect_col=ifelse(df$chromNum %% 2 == 0,"grey","white")
- p1=ggplot(scores, aes(x = StartPos,y = frequency))+
- geom_area(aes(group=Type, fill=factor(Type,levels = c("Del","Amp"))))+
- scale_fill_manual(values = c("#1F78B4","#E31A1C"), guide=guide_legend(reverse = T, position = "top"), name="Type")+
- geom_vline(data = df ,mapping=aes(xintercept=chromlengthCumsum),linetype=2)+
- geom_text(data = df,aes(x=chromMidelePosFrom0,y=ypos,label=chromName))+
- scale_x_continuous(expand = c(0,0),limits = c(0,2.9e9),name = NULL,labels = NULL)+
- scale_y_continuous(expand = c(0.02,0.02),limits = c(-1,1),guide = "prism_offset")+
- theme_prism()+
- theme( axis.ticks.x = element_blank(),
- axis.line.x = element_blank())
- p1
- #Frequency的比较
- cluster1 <- read.table("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/cnv/578326-Cluster1/scores.gistic",
- sep="\t",header=T,stringsAsFactors = F)
- cluster1$group=c(rep("cluster1",17374))
- cluster2 <- read.table("/home/data/t060432/HRT/Disulfidptosis/data/2.5 mutation/cnv/578337-Cluster2/scores.gistic",
- sep="\t",header=T,stringsAsFactors = F)
- cluster2$group=c(rep("cluster2",18047))
- gliomas=rbind(cluster1,cluster2)
- ggviolin(gliomas, x = 'group', y = 'Frequency', fill = 'group',palette = c("#1F78B4","#E31A1C"),
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(aes(group=group), label = "p.signif", bracket.size=0.5,
- tip.length = 0.01, method = 'wilcox.test')
- #3.0 模型的构建和验证 DisulfidpScore####
- #见ML.R
- #3.1 与其他模型的比较 Compared####
- #见COM.R
- #3.2 临床特征圈图####
- library(cols4all)
- library(ggplot2)
- #TCGA
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=ifelse(RS_mat2>median(RS_mat2),"High","Low")
- #临床信息
- data=cbind(pheno[,c(3,5,6,8,9,10)],group)
- colnames(data)[1:5]=c("Grade","Age","Gender","IDH","1P19Q")
- dt=na.omit(data)
- dt$Age=as.numeric(dt$Age)
- dt$Age=ifelse(dt$Age > 47,">47","≤47")
- dt$grade=ifelse(dt$Grade=="G2","2",
- ifelse(dt$Grade=="G2","3","4"))
- dt$gender=ifelse(dt$Gender=="male","1","2")
- dt$age=ifelse(dt$Age==">47","2","1")
- dt$idh=ifelse(dt$IDH=="WT","1","2")
- dt$`1p19q`=ifelse(dt$`1P19Q`=="non-codel","1","2")
- dt$mgmtp=ifelse(dt$MGMTp=="Unmethylated","1","2")
- str(dt)
- dt[,8:13] <- apply(dt[,8:13],2,as.numeric)
- #计算p值
- #分组计算百分比
- mydata=dt
- mydata_summary <- mydata %>%
- group_by(group, MGMTp) %>%
- summarise(count = n()) %>%
- group_by(group) %>%
- mutate(percent = count / sum(count) * 100)
- #卡方检验
- chi_square <- chisq.test(table(mydata$group, mydata$MGMTp))
- p_value <- chi_square$p.value
- p_value
- #圆圈图可视化
- #分成高风险组和低风险组
- high_group <- subset(dt, group == "High")
- low_group <- subset(dt, group == "Low")
- #计算百分比
- high_group$fraction = high_group$mgmtp / sum(high_group$mgmtp)
- low_group$fraction = low_group$`1p19q` / sum(low_group$`1p19q`)
- #颜色
- mycol <- c("#F1B6DA","#E78AC3","#C51B7D") #grade
- mycol <- c("#f28147","#fac074") #age
- mycol <- c("#9EBCDA","#377EB8") #gender
- mycol <- c("#4DAF4A","#B8E186") #idh
- mycol <- c("#D73027","#F1766D") #1p19q
- mycol <- c("#88419D","#DECBE4") #mgmtp
- #绘图
- p5=ggplot(low_group, aes(x = 3,
- y = fraction,
- fill = `1P19Q` )) +
- geom_col(width = 1.5) +
- facet_grid(. ~ group) +
- coord_polar(theta = "y") +
- xlim(c(0.2, 3.8)) +
- scale_fill_manual(values = mycol) +
- theme_void() +
- theme(
- strip.text.x = element_text(size = 14),
- legend.title = element_text(size = 15),
- legend.text = element_text(size = 14))
- #3.3 不同评分组的免疫分析#####
- #IOBR(免疫浸润TCGA)
- library(tidyverse)
- library(IOBR)
- library(reshape2)
- library(ggplot2)
- library(ggpubr)
- library(ggsci)
- library(pheatmap)
- library(cowplot)
- library(ComplexHeatmap)
- library(circlize)
- library(scales)
- library(RColorBrewer)
- library(ggh4x)
- library(tidyr)
- library(dplyr)
- library(tibble)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- data = TCGA
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- #CIBERSORT
- cibersort <- deconvo_tme(eset = data, method = "cibersort",
- arrays = FALSE, perm = 1000)
- #quantiseq
- quantiseq <- deconvo_tme(eset = data,tumor = TRUE,arrays = FALSE,
- scale_mrna = TRUE, method = "quantiseq")
- #epic
- epic <- deconvo_tme(eset = data, method = "epic", tumor = T, arrays = FALSE)
- #mcp
- mcp <- deconvo_tme(eset = data, method = "mcpcounter")
- #xcell
- xcell <- deconvo_tme(eset = data, method = "xcell", arrays = FALSE)
- #estimate
- estimate <- deconvo_tme(eset = data, method = "estimate")
- #ips
- ips<-deconvo_tme(eset = data, method = "ips", plot= FALSE)
- #timer
- timer <- deconvo_tme(eset = data, method = "timer", group_list = rep("glioma", dim(data)[2]))
- #合并所有分析结果
- tme_combine <- cibersort %>%
- inner_join(quantiseq, "ID") %>%
- inner_join(mcp, "ID") %>%
- inner_join(xcell, "ID") %>%
- inner_join(epic, "ID") %>%
- inner_join(estimate, "ID") %>%
- inner_join(ips, "ID")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- save(cibersort,quantiseq,epic,mcp,xcell,estimate,ips,
- tme_combine,file = 'tme_combine.RData')
- load(file="tme_combine.RData")
- #提取cibersort前22列数据
- cibersort_data <- as.data.frame(cibersort[,1:23])
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=ifelse(RS_mat2>median(RS_mat2),"High","Low")
- group=as.data.frame(cbind(ID=colnames(TCGA),group=group))
- cibersort <- left_join(cibersort_data,group,by="ID")
- cibersort <- melt(cibersort,id.vars=c("ID","group"))
- colnames(cibersort)=c("sample","status1","variable","value")
- cibersort=cibersort[order(cibersort$status1),]
- cibersort$variable <- gsub("_CIBERSORT", "", cibersort$variable)
- cols = c(brewer.pal(12, "Paired"),brewer.pal(8, "Dark2"),brewer.pal(12, "Set3"))
- cols <- IOBR::palettes(category = "random", palette = 4,show_col = F,show_message = F)
- cols=c("#FD8D3C","#FEB24C","#FED976","#FFED6F","#FFFF99","#EDF8B1","#C7E9B4","#A1D99B",
- "#74C476","#7BCCC4","#4EB3D3","#4292C6","#2B8CBE","#9ECAE1","#C6DBEF","#9EBCDA",
- "#8C96C6","#7570B3","#BEBADA","#DECBE4","#FCC5C0","#F768A1","#E7298A","#DD3497")
- plot_tme = function(meltdf){
- p_stack_df = ggplot(meltdf,aes(x = sample, y = value, fill = variable)) +
- geom_bar(stat = "identity")+ theme_test() +
- scale_fill_manual(values = cols) +
- theme(legend.position = 'bottom')+
- theme(plot.title = element_text(size = rel(2),hjust = 0.5),
- axis.text.x = element_blank())+
- theme(axis.ticks =element_blank() )+
- scale_y_continuous(expand = c(0,0))+
- facet_nested(.~status1,drop=T,scale="free",space="free",switch="x",
- strip =strip_nested(background_x = elem_list_rect(fill =c('#C51B7D','#377EB8')),by_layer_x = F))
- # p_stack_df
- p_box_df = ggplot(meltdf,aes(x = variable, y = value,
- fill = variable)) +
- geom_boxplot(width=0.4,lwd=0.2,color='black',outlier.shape=NA,
- position = position_dodge(width = 0.8))+
- theme_bw()+
- theme(axis.text.x = element_text(angle = 90,hjust = 1,vjust = .5))+
- theme(legend.position = 'none')+
- scale_fill_manual(values = cols)
- # p_box_df
- p_box_comp = ggplot(meltdf,aes(x = variable, y = value,
- fill = status1,color = status1)) +
- geom_boxplot(width=0.5,lwd=0.2,color='black',outlier.shape=NA,
- position = position_dodge(width = 0.8))+
- theme_bw()+
- theme(legend.position = 'top')+
- theme(axis.text.x = element_text(angle = 90,hjust = 1,vjust = .5))+
- stat_compare_means(aes(group=status1,label = after_stat(p.signif)),hide.ns = FALSE,
- method = "t.test")+
- scale_fill_manual(values = c('#C51B7D','#377EB8'))
- # p_box_comp
- p_heat = ggplot(meltdf,aes(x = sample, y =variable ,fill=value))+
- geom_tile()+
- scale_fill_gradientn(colors = c('white','#C51B7D','#377EB8'))+
- theme(axis.text.x = element_blank(),
- axis.ticks.x = element_blank(),
- panel.border = element_rect(fill = 'NA',color = 'black'))+
- labs(fill="Z score", x = NULL, y = NULL)
- # p_heat
- #plot_comb = (p_stack_df)/(p_box_df|p_box_comp)/p_heat
- plot_comb = (p_box_comp)
- return(plot_comb)
- }
- plot_exist_cib = plot_tme(cibersort)
- print(plot_exist_cib)
- #TME signature(TCGA)
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- exp=as.matrix(TCGA)
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=ifelse(RS_mat2>median(RS_mat2),"High","Low")
- group=as.data.frame(cbind(sample=colnames(TCGA),group=group))
- group=group[order(group$group),]
- rownames(group)=group$sample
- #IOBR中的TME特征
- library(IOBR)
- library(tidyr)
- data=signature_collection
- data2=signature_tme
- #提取需要的特征
- expr_matrix <- matrix(nrow = 119, ncol = 2)
- for (i in 1:length(data2)) {
- expr_matrix[i, 1] <- names(data2)[i]
- expr_matrix[i, 2] <- paste(data2[[i]], collapse = ",") )
- }
- expr_df <- as.data.frame(expr_matrix)
- colnames(expr_df) <- c("cell", "genes")
- needata=expr_df[c(1,2,3,4,5,6,8,9,10,13,14,15,16,17,18,19,20,
- 29,30,31,32,33,34,35,36,37,38,39,40,
- 41,42,43,55,56,57,58,59,60,
- 61,62,63,64,65,66,
- 94,97,98,99,100,101,102,103,104,
- 111,112,113,114,115,116,117),]
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR_TIME")
- write.csv(needata,file="TIME.csv")
- #获得geneset
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR_TIME")
- geneset=read.csv("IOBR_TIME.csv")
- split_genes <- strsplit(geneset$genes, ",")
- new_geneset <- data.frame(
- genesymbol = unlist(split_genes),
- cell = rep(geneset$cell, lengths(split_genes)))
- geneset = split(new_geneset$genesymbol,new_geneset$cell)
- #ssgsea
- re <- gsva(exp, geneset, method="ssgsea",mx.diff=FALSE, verbose=FALSE)
- re=as.data.frame(re)
- type=unique(new_geneset$cell)
- re=re[type,]
- write.csv(re,file="TIMEresult.csv")
- identical(colnames(re),colnames(TCGA))
- #IOBR免疫浸润(meta-LGG-GBM)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load("GBM.RData")
- data = GBM
- #CIBERSORT
- cibersort <- deconvo_tme(eset = data, method = "cibersort",
- arrays = FALSE, perm = 1000)
- #quantiseq
- quantiseq <- deconvo_tme(eset = data,tumor = TRUE,arrays = FALSE,
- scale_mrna = TRUE, method = "quantiseq")
- #epic
- epic <- deconvo_tme(eset = data, method = "epic", tumor = T, arrays = FALSE)
- #mcp
- mcp <- deconvo_tme(eset = data, method = "mcpcounter")
- #xcell
- xcell <- deconvo_tme(eset = data, method = "xcell", arrays = FALSE)
- #estimate
- estimate <- deconvo_tme(eset = data, method = "estimate")
- #ips
- ips<-deconvo_tme(eset = data, method = "ips", plot= FALSE)
- #合并所有分析结果
- tme_combine <- cibersort %>%
- inner_join(quantiseq, "ID") %>%
- inner_join(mcp, "ID") %>%
- inner_join(xcell, "ID") %>%
- inner_join(epic, "ID") %>%
- inner_join(estimate, "ID") %>%
- inner_join(ips, "ID")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- save(cibersort,quantiseq,epic,mcp,xcell,estimate,ips,
- tme_combine,file = 'tme_combine_GBM.RData')
- #TME signature(meta-LGG-GBM)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load("GBM.RData")
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- sample=read.table("sample.txt")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- group=RS_mat2
- group_list=as.data.frame(cbind(sample=sample$sample,group=group))
- rownames(group_list)=group_list$sample
- sample=colnames(GBM)
- group_list=group_list[sample,]
- group_list$group=as.numeric(group_list$group)
- group_list=na.omit(group_list)
- group_list$group=ifelse(group_list$group>median(group_list$group),"High","Low")
- sample=rownames(group_list)
- GBM=GBM[,sample]
- exp=as.matrix(GBM)
- #IOBR中的TME特征
- library(IOBR)
- library(tidyr)
- library(GSVA)
- #获得geneset
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- geneset=read.csv("IOBR_TIME.csv")
- split_genes <- strsplit(geneset$genes, ",")
- new_geneset <- data.frame(
- genesymbol = unlist(split_genes),
- cell = rep(geneset$cell, lengths(split_genes)))
- geneset = split(new_geneset$genesymbol,new_geneset$cell)
- #ssgsea
- re <- gsva(exp, geneset, method="ssgsea",mx.diff=FALSE, verbose=FALSE)
- re=as.data.frame(re)
- type=unique(new_geneset$cell)
- re=re[type,]
- write.csv(re,file="TIMEresult_meta.csv")
- identical(colnames(re),colnames(meta))
- #结果整合(meta-LGG-GBM)
- #cibersort&estimate
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- load("tme_combine_GBM.RData")
- cibersort=cibersort[,1:23]
- cibersort=column_to_rownames(cibersort,"ID")
- cibersort=cibersort[sample,]
- estimate=estimate[,1:4]
- estimate=column_to_rownames(estimate,"ID")
- estimate=estimate[sample,]
- #TIME
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- TIME=read.csv("TIMEresult_GBM.csv",check.names=F,row.names = 1)
- TIME=as.data.frame(t(TIME))
- identical(rownames(estimate),rownames(cibersort))
- identical(rownames(TIME),rownames(cibersort))
- #合并
- data=as.data.frame(t(cbind(cibersort,estimate,TIME)))
- data=as.data.frame(t(data))
- data$group=group_list$group
- library(dplyr)
- #高低风险组组的平均值
- grouped_data <- data %>%
- group_by(group) %>%
- summarize(across(everything(), mean, na.rm = TRUE))
- grouped_data=t(grouped_data)
- write.csv(grouped_data,"heatmap_GBM.csv")
- #总体可视化
- #cibersort&estimate
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- load("tme_combine.RData")
- cibersort=cibersort[,1:23]
- cibersort=column_to_rownames(cibersort,"ID")
- estimate=estimate[,1:4]
- estimate=column_to_rownames(estimate,"ID")
- #TIME
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- TIME=read.csv("TIMEresult.csv",check.names=F,row.names = 1)
- TIME=as.data.frame(t(TIME))
- identical(rownames(cibersort),rownames(estimate))
- identical(rownames(TIME),rownames(cibersort))
- data=as.data.frame(t(cbind(cibersort,estimate,TIME)))
- standarize.fun <- function(indata=NULL, halfwidth=NULL, centerFlag=T, scaleFlag=T) {
- outdata=t(scale(t(indata), center=centerFlag, scale=scaleFlag))
- if (!is.null(halfwidth)) {
- outdata[outdata>halfwidth]=halfwidth
- outdata[outdata<(-halfwidth)]= -halfwidth}
- return(outdata)}
- data <- standarize.fun(data,halfwidth = 2)
- types=read.csv("type.csv",check.names = F)
- rownames(types)=types$celltype
- table(types$type)
- types$type=factor(types$type,levels = c('cibersort','estimate','cancer immunity cycle',
- 'immune functions','TME signatures'))
- order2=rownames(group)
- table(group$group)
- type=c('#E64B35FF','#4DBBD5FF','#00A087FF','#3C5488FF','#F39B7FFF',"orange","yellow")
- names(type)=c('cibersort','estimate','cancer immunity cycle','immune functions',
- 'TME signatures')
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune")
- pdf('TIME_heatmap.pdf',height = 8,width = 6)
- Heatmap(data[,order2],name='Z-score',
- top_annotation = HeatmapAnnotation(foo=anno_block(gp=gpar(fill= c('lightgreen','#FB9A99')),
- labels=c('High','Low'),
- labels_gp = gpar(col='white',fontsize=10,fontface='bold'))),
- cluster_rows = F,
- col=colorRamp2(c(-2,0,2),c('lightblue','white','pink')),
- color_space = "RGB",
- cluster_columns = FALSE,border = T,
- row_order=NULL,
- row_names_side = 'left',
- column_order=NULL,
- show_column_names = FALSE,
- row_names_gp = gpar(fontsize = 9),
- column_split = c(rep(1,345),rep(2,346)),
- row_split = types$type,
- left_annotation = rowAnnotation(foo=anno_block(gp=gpar(fill= c("#FF7F00",'#FDAE61','#FED976','#74ADD1',"#4575B4")),
- labels=c('cibersort','estimate','cancer immunity cycle','immune functions',
- 'TME signatures'),
- labels_gp = gpar(col='white',fontsize=8,fontface='bold'))),
- gap = unit(1, "mm"),
- column_title = NULL,
- column_title_gp = gpar(fontsize = 10),
- show_heatmap_legend =T,
- heatmap_legend_param=list(labels_gp = gpar(fontsize = 10), border = T,
- title_gp = gpar(fontsize = 10, fontface = "bold")),
- column_gap = unit(2,'mm'),
- row_title = NULL)
- dev.off()
- #免疫细胞相关性
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/IOBR")
- load("tme_combine.RData")
- immu_data=column_to_rownames(cibersort,"ID")
- immu_data=immu_data[,1:22]
- #去除cibersort后缀
- col_names <- colnames(immu_data)
- new_col_names <- gsub("_CIBERSORT", "", col_names)
- colnames(immu_data) <- new_col_names
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- y=RS_mat2[1:691]
- correlation <- data.frame()
- for(i in 1:length(colnames(immu_data))){
- print(i)
- dd = cor.test(as.numeric(immu_data[,i]),y,method="spearman")
- correlation[i,1] = colnames(immu_data)[i]
- correlation[i,2] = dd$estimate
- correlation[i,3] = dd$p.value}
- colnames(correlation) <- c("Cell","cor","pvalue")
- #定义圆圈颜色的函数
- p.col = c('pink','gold','orange','LimeGreen','darkgreen')
- fcolor = function(x,p.col){
- color = ifelse(x>0.8,p.col[1],ifelse(x>0.6,p.col[2],ifelse(x>0.4,p.col[3],
- ifelse(x>0.2,p.col[4], p.col[5])
- )))
- return(color)
- }
- #定义设置圆圈大小的函数
- p.cex = seq(2.5, 5.5, length=5)
- fcex = function(x){
- x=abs(x)
- cex = ifelse(x<0.1,p.cex[1],ifelse(x<0.2,p.cex[2],ifelse(x<0.3,p.cex[3],
- ifelse(x<0.4,p.cex[4],p.cex[5]))))
- return(cex)
- }
- data=correlation
- #根据pvalue定义圆圈的颜色
- points.color = fcolor(x=data$pvalue,p.col=p.col)
- data$points.color = points.color
- points.cex = fcex(x=data$cor)
- data$points.cex = points.cex
- data=data[order(data$cor),]
- #可视化
- xlim = ceiling(max(abs(data$cor))*10)/10
- layout(mat=matrix(c(1,1,1,1,1,0,2,0,3,0),nc=2),width=c(8,2.2),heights=c(1,2,1,2,1))
- par(bg="white",las=1,mar=c(5,18,2,4),cex.axis=1.5,cex.lab=2)
- plot(1,type="n",xlim=c(-xlim,xlim),ylim=c(0.5,nrow(data)+0.5),xlab="Correlation Coefficient",ylab="",yaxt="n",yaxs="i",axes=F)
- rect(par('usr')[1],par('usr')[3],par('usr')[2],par('usr')[4],col="#F5F5F5",border="#F5F5F5")
- grid(ny=nrow(data),col="white",lty=1,lwd=2)
- #绘制图形的线段
- segments(x0=data$cor,y0=1:nrow(data),x1=0,y1=1:nrow(data),lwd=4)
- #绘制图形的圆圈
- points(x=data$cor,y = 1:nrow(data),col = data$points.color,pch=16,cex=data$points.cex)
- #展示免疫细胞的名称
- text(par('usr')[1],1:nrow(data),data$Cell,adj=1,xpd=T,cex=1.5)
- #展示pvalue
- pvalue.text=ifelse(data$pvalue<0.001,'<0.001',sprintf("%.03f",data$pvalue))
- redcutoff_cor=0
- redcutoff_pvalue=0.05
- text(par('usr')[2],1:nrow(data),pvalue.text,adj=0,xpd=T,col=ifelse(abs(data$cor)>redcutoff_cor & data$pvalue<redcutoff_pvalue,"red","black"),cex=1.5)
- axis(1,tick=F)
- #绘制圆圈大小的图例
- par(mar=c(0,4,3,4))
- plot(1,type="n",axes=F,xlab="",ylab="")
- legend("left",legend=c(0.1,0.2,0.3,0.4,0.5),col="black",pt.cex=p.cex,pch=16,bty="n",cex=2,title="abs(cor)")
- #绘制圆圈颜色的图例
- par(mar=c(0,6,4,6),cex.axis=1.5,cex.main=2)
- barplot(rep(1,5),horiz=T,space=0,border=NA,col=p.col,xaxt="n",yaxt="n",xlab="",ylab="",main="pvalue")
- axis(4,at=0:5,c(1,0.8,0.6,0.4,0.2,0),tick=F)
- #免疫表型比例(TCGA-meta-LGG-GBM)
- library(ImmuneSubtypeClassifier)
- library(dplyr)
- #表达矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- tpm=TCGA
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=ifelse(RS_mat2>median(RS_mat2),"High","Low")
- group_list=as.data.frame(cbind(sample=colnames(TCGA),group=group))
- rownames(group_list)=group_list$sample
- Isubtype <- callEnsemble(X = tpm, geneids = 'symbol')[,1:2]
- Isubtype=column_to_rownames(Isubtype,"SampleIDs")
- Isubtype$BestCall=paste0('C',Isubtype$BestCall)
- #查看为匹配的基因有多少
- geneMatchErrorReport(X=tpm, geneid='symbol')
- #可视化
- df=cbind(group_list[rownames(Isubtype),],Isubtype)%>%
- select(ncol(.)-1,ncol(.))%>%
- group_by(group,BestCall)%>%
- summarise(count=n())
- df$group <- factor(df$group, levels = c("Low","High"))
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/immuphenotype")
- save(df,file="df.RData")
- load("df.RData")
- library(ggplot2)
- library(paletteer)
- ggplot()+
- geom_bar(data =df, aes(x = group, y = count, fill = BestCall),
- stat = "identity",
- position = "fill")+
- theme_classic()+
- scale_fill_paletteer_d("RColorBrewer::Paired")
- #3.4 不同评分组的突变分析####
- library(broom)
- library(maftools)
- library(ggpubr)
- library(stringr)
- #SNV样本信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.1 genomic")
- load("TCGA-LGG_maf.rdata")
- barcode=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode)="sample"
- data1=data
- load("TCGA-GBM_maf.rdata")
- barcode2=as.data.frame(unique(data$Tumor_Sample_Barcode))
- colnames(barcode2)="sample"
- data2=data
- #合并lgg和gbm
- data <- rbind(data1,data2)
- maf.coad <- data
- class(maf.coad) #data.frame
- dim(maf.coad) #87957 141
- #匹配结果
- clin <- read.csv("TCGA_SNV_barcode.csv",header=TRUE) #732
- clin <- clin[-c(499,586),] #去除2个异常样本 TCGA-06-5416-01A-01D-1486-08,TCGA-DU-6392-01A-11D-1705-08
- maf.coad=merge(data,clin,by="Tumor_Sample_Barcode") #36059 142
- sample=unique(maf.coad$Tumor_Sample_Barcode)
- #提取low risk组
- low=maf.coad[maf.coad$sample=="Low",]
- maf <- read.maf(low,clinicalData = clin)
- #提取high risk组
- high=maf.coad[maf.coad$sample=="High",]
- maf <- read.maf(high,clinicalData = clin)
- #瀑布图
- vc_cols = c("#8DD3C7","#80B1D3","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00",'#CAB2D6')
- names(vc_cols) = c('Multi_Hit','Missense_Mutation','Frame_Shift_Del','Nonsense_Mutation',
- 'Frame_Shift_Ins','In_Frame_Ins','Splice_Site','In_Frame_Del','Translation_Start_Site')
- col = c("#E31A1C","#1F78B4")
- names(col) = c('High','Low')
- oncoplot(maf = maf, top=30, draw_titv = F,fontSize = 0.75 ,
- clinicalFeatures = 'sample',annotationColor = list(sample=col),
- colors = vc_cols,bgCol = "transparent",annoBorderCol = "white",
- sortByAnnotation = TRUE,borderCol=NULL)
- #合并lgg和gbm
- maf <- read.maf(maf.coad,clinicalData = clin)
- #突变数目与risk的相关性
- mutation_count=[email hidden]
- #TCGA分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load(file="TCGA.RData")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=RS_mat2
- group=as.data.frame(cbind(ID=colnames(TCGA),group=group))
- clin$ID <- substr(clin$Tumor_Sample_Barcode, 1, 16)
- #匹配好risk的clin
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.1 genomic")
- clin_new=read.csv("clin_new.csv")
- clin_new=clin_new[order(clin_new$Tumor_Sample_Barcode),]
- mutation_count=mutation_count[order(mutation_count$Tumor_Sample_Barcode),]
- identical(mutation_count$Tumor_Sample_Barcode,clin_new$Tumor_Sample_Barcode)
- mutation_count$risk=clin_new$X
- #相关性分析
- ggscatter(mutation_count, x = 'risk', y = 'total', size = 4,add = "reg.line",
- color="lightblue",
- add.params = list(color = "#77C034", fill = "#C5E99B", size = 1),
- conf.int = TRUE)+
- stat_cor(method = "spearman", label.x = 0, label.y = 1300, label.sep = "\n") +
- ggtitle("")+
- xlab("DisulfidpScore") +
- ylab("Total mutation count")+
- theme_classic()+
- theme(legend.position = "none")
- #risk组在TMB中的差异
- tmb_table_wt_log = tmb(maf = maf)
- head(tmb_table_wt_log)
- #合并分组信息
- dat=as.data.frame(tmb_table_wt_log[,c(1,4)])
- rownames(dat)=dat$Tumor_Sample_Barcode
- rownames(clin_new)=clin_new$Tumor_Sample_Barcode
- dat2=merge(dat,clin_new,by=0)
- #更新分组名称
- dat2$sample=ifelse(dat2$X>median(dat2$X),"High","Low")
- dat2$sample <- factor(dat2$sample, levels = c("Low","High"))
- p=ggviolin(dat2, x="sample", y="total_perMB_log", fill="sample",
- palette =c("#1F78B4","#E31A1C"),alpha = 0.5,
- add ="boxplot",size = 0.5,
- xlab = "TMB",
- legend = "none")
- p+stat_compare_means(aes(group = sample),
- method = "wilcox.test",label = "p.signif",
- label.x = 1.5,label.y = 1.5,
- symnum.args=list(cutpoints = c(0, 0.001, 0.01, 0.05, 1),
- symbols = c("***", "**", "*", "ns")))
- #TMB的生存分析
- library(data.table)
- clinical=OS
- clinical=rownames_to_column(clinical,"patient")
- surv.df <- tmb_table_wt_log %>%
- mutate(patient = str_sub(as.character(.$Tumor_Sample_Barcode),1,16)) %>%
- distinct(patient, .keep_all = T) %>%
- inner_join(clinical, by = "patient") %>%
- mutate(group = if_else(total_perMB > median(total_perMB), "H-TMB","L-TMB")) %>%
- select(patient,OS.time,OS,group)
- colnames(surv.df)[2:3]=c(" times","status")
- library(survival)
- library(survminer)
- times=surv.df$` times`
- f <- survfit(Surv(times,status) ~ group, data = surv.df)
- col=c("#E31A1C","#1F78B4")
- ggsurvplot(f,pval=T,conf.int=F,xlab="Time(years)",palette=col,
- legend.labs = c("H-TMB", "L-TMB"),legend=c(0.8,0.8))
- #TMB结合risk的生存分析
- clinical=OS
- clinical=rownames_to_column(clinical,"patient")
- surv.df <- tmb_table_wt_log %>%
- mutate(patient = str_sub(as.character(.$Tumor_Sample_Barcode),1,16)) %>%
- distinct(patient, .keep_all = T) %>%
- inner_join(clinical, by = "patient") %>%
- select(patient,OS.time,OS,total_perMB)
- sample=surv.df$patient
- group=group[group$ID %in% sample,]
- surv.df$risk=group$group
- colnames(surv.df)[4]="TMB"
- rt=surv.df
- #根据基因表达,对数据分组
- a=if_else(surv.df$TMB > median(surv.df$TMB), "H-TMB","L-TMB")
- b=ifelse(surv.df$risk >median(surv.df$risk), "High-risk", "Low-risk")
- Type=paste(a,"+",b)
- rt=cbind(rt,Type)
- head(rt)
- #生存差异统计
- length=length(levels(factor(Type)))
- diff=survdiff(Surv(OS.time, OS) ~Type,data = rt)
- pValue=1-pchisq(diff$chisq,df=length-1)
- if(pValue<0.001){
- pValue="p<0.001"
- }else{
- pValue=paste0("p=",sprintf("%.03f",pValue))
- }
- fit <- survfit(Surv(OS.time, OS) ~ Type, data = rt)
- head(fit)
- #绘制生存曲线
- col=c("#E31A1C","#FA9FB5","#1F78B4","lightblue")
- surPlot=ggsurvplot(fit,
- data=rt,
- conf.int=F,
- pval=pValue,pval.size=5,
- palette=col,
- legend = c(0.75,0.75),
- xlab="Time(years)",
- break.time.by = 1,
- risk.table.title="",
- risk.table=F,
- risk.table.height=.25)
- surPlot
- #关键基因的互斥/共现
- #High/Low
- par(oma = c(3, 4, 5, 1))
- somaticInteractions(maf = maf, top = 25,
- genes=c("IDH1","TP53","EGFR","PTEN","TTN","ATRX","CIC","FUBP1"),
- pvalue = c(0.01, 0.05),
- colPal = "PiYG")
- #关键基因的突变数量比较
- gene=c("IDH1","TP53","EGFR","PTEN","TTN","ATRX","CIC","FUBP1")
- #提取low risk组
- low=maf.coad[maf.coad$sample=="Low",]
- low=low[low$Hugo_Symbol %in% gene,]
- low <- read.maf(low,clinicalData = clin)
- #提取high risk组
- high=maf.coad[maf.coad$sample=="High",]
- high=high[high$Hugo_Symbol %in% gene,]
- high <- read.maf(high,clinicalData = clin)
- High.vs.Low <- mafCompare(m1 = high, m2 = low, m1Name = 'High',m2Name = 'Low', minMut = 5)
- a=High.vs.Low[[1]]
- forestPlot(mafCompareRes = High.vs.Low, pVal = 1, color = c('royalblue', 'maroon'), geneFontSize = 0.8)
- #3.5 不同评分组的免疫治疗反应预测####
- library(tidyverse)
- library(ggplot2)
- library(ggsci)
- library(ggpubr)
- library(ggsignif)
- #基因矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- identical(colnames(TCGA),rownames(OS))
- dat = TCGA
- #标准化
- exp<-t(apply(dat,1,function(x){x-(mean(x))}))
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/TIDE")
- write.table(exp,file="TIDE.txt",sep="\t",quote=F)
- #读取TIDE结果文件
- TIDE<-read.csv("export.csv",header=T,check.names=F)
- rownames(TIDE)=TIDE$Patient
- sample=colnames(TCGA)
- TIDE=TIDE[sample,]
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- RS_mat2=RS_mat2[1:691]
- group=ifelse(RS_mat2>median(RS_mat2),"High","Low")
- TIDE$group=group
- result=TIDE
- #小提琴图展示结果
- #1.TIDE小提琴图
- my_comparisons <- list( c("Low", "High"))
- p1 <- ggviolin(result, x = 'group', y = 'TIDE', fill = 'group',
- palette = c("#A6D854","#FF1493"),alpha = 0.8,
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(comparisons = my_comparisons, label = "p.signif", bracket.size=0.5, tip.length = 0.01, method = 'wilcox.test')
- p1
- #2.Dysfunction小提琴图
- p2 <- ggviolin(result, x = 'group', y = 'Dysfunction', fill = 'group',
- palette = c("#A6D854","#FF1493"),alpha = 0.8,
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(comparisons = my_comparisons, label = "p.signif", bracket.size=0.5, tip.length = 0.02, method = 'wilcox.test')
- p2
- #3.Exclusion小提琴图
- p3 <- ggviolin(result, x = 'group', y = 'Exclusion', fill = 'group',
- palette = c("#A6D854","#FF1493"),alpha = 0.8,
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(comparisons = my_comparisons, label = "p.signif", bracket.size=0.5, tip.length = 0.02, method = 'wilcox.test')
- p3
- #4.MSI小提琴图
- colnames(result)[6]
- colnames(result)[6] <- c('MSI')
- p4 <- ggviolin(result, x = 'group', y = 'MSI', fill = 'group',
- palette = c("#A6D854","#FF1493"),alpha = 0.8,
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(comparisons = my_comparisons, label = "p.signif", bracket.size=0.5, tip.length = 0.02, method = 'wilcox.test')
- p4
- #百分比图
- #分组计算百分比
- mydata_summary <- TIDE %>%
- group_by(group, Responder) %>%
- summarise(count = n()) %>%
- group_by(group) %>%
- mutate(percent = count / sum(count) * 100)
- #卡方检验
- chi_square <- chisq.test(table(TIDE$group, TIDE$Responder))
- p_value <- chi_square$p.value
- p_value
- #绘制百分比柱状堆叠图
- mydata_summary$group <- factor(mydata_summary$group, levels = c("Low","High"))
- ggplot(mydata_summary, aes(x = group, y = percent, fill = Responder)) +
- geom_bar(stat = "identity", position = "stack",color = "#f3f4f4") +
- annotate("text", x = 1.5, y = 105, label=expression(""~italic("P=1.204292e-29")), size = 4)+
- geom_text(data = subset(mydata_summary, group == "High"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- geom_text(data = subset(mydata_summary, group == "Low"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- labs(title = "TCGA",x = "",y = "Percentage(%)") +
- scale_fill_manual(values = c("True" = "#FF1493", "False" = "#A6D854")) +
- theme_bw()+
- theme(panel.grid = element_blank(),
- plot.title = element_text(hjust = 0.5, face = "bold"),
- plot.subtitle = element_text(hjust = 0.5, face = "italic"))+
- guides(fill=guide_legend(reverse=TRUE))
- #生存曲线
- rt=cbind(OS,Responder=TIDE$Responder)
- colnames(rt)[1:2]=c("fustat","futime")
- diff=survdiff(Surv(futime, as.numeric(fustat)) ~ Responder, data=rt)
- pValue=1-pchisq(diff$chisq, df=1)
- if(pValue<0.001){
- pValue="p<0.001"
- }else{
- pValue=paste0("p=", sprintf("%.03f",pValue))
- }
- fit <- survfit(Surv(futime, fustat) ~ Responder, data = rt)
- surPlot=ggsurvplot(fit,
- data=rt,
- conf.int=F,
- pval=pValue,
- pval.size=6,
- xlab="Time(years)",
- legend.title="Cluster",
- break.time.by = 5,
- palette=c("#DECBE4", "#B3CDE3"))
- #风险评分与Response
- result$risk=RS_mat2
- my_comparisons <- list( c("True", "False"))
- #风险评分小提琴图
- p12 <- ggviolin(result, x = 'Responder', y = 'risk', fill = 'Responder',
- palette = c("#FF1493","#A6D854"),alpha = 0.8,
- add = 'boxplot', add.params = list(fill = "white")) +
- stat_compare_means(comparisons = my_comparisons, label = "p.signif", bracket.size=0.5, tip.length = 0.02, method = 'wilcox.test')
- p12
- #TIDE分析(meta-LGG-GBM)
- library(tidyverse)
- library(ggplot2)
- library(ggsci)
- library(ggpubr)
- library(ggsignif)
- #基因矩阵
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/2.2 meta")
- load("meta.RData")
- identical(colnames(meta),rownames(meta_pheno))
- dat = meta
- #标准化
- exp<-t(apply(dat,1,function(x){x-(mean(x))}))
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.0 immune/TIDE")
- write.table(exp,file="TIDE_LGG.txt",sep="\t",quote=F)
- #读取TIDE结果文件
- TIDE<-read.csv("TIDEresult_meta.csv",header=T,check.names=F)
- rownames(TIDE)=TIDE$Patient
- sample=colnames(meta)
- TIDE=TIDE[sample,]
- #分组信息
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- sample=read.table("sample.txt")
- RS_mat <- read.table("RS_mat.txt",sep = "\t",header = T,stringsAsFactors = F,check.names = F,row.names=1)
- bestmodel="Enet[alpha=0.3]"
- RS_mat2=RS_mat[,bestmodel]
- group=RS_mat2
- group_list=as.data.frame(cbind(sample=sample$sample,group=group))
- rownames(group_list)=group_list$sample
- sample=colnames(meta)
- group_list=group_list[sample,]
- group_list$group=as.numeric(group_list$group)
- group_list=na.omit(group_list)
- group_list$group=ifelse(group_list$group>median(group_list$group),"High","Low")
- sample=rownames(group_list)
- TIDE=TIDE[sample,]
- TIDE$group=group_list$group
- result=TIDE
- #免疫治疗队列
- library(dplyr)
- library(tidyr)
- library(ggpubr)
- library(ggplot2)
- library(survivalsvm)
- library(survminer)
- library(survival)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.2 immutherapy")
- load("GBM-PRJNA482620.RData")
- risk=read.table("GBM-PRJNA482620_risk.txt",header=T)
- identical(rownames(pdata),rownames(risk))
- #有无响应百分堆叠图
- mydata=as.data.frame(cbind(risk=risk,type=pdata$response))
- mydata$group=ifelse(mydata[,1]>median(mydata[,1]), "High risk", "Low risk")
- #分组计算百分比
- mydata_summary <- mydata %>%
- group_by(group, type) %>%
- summarise(count = n()) %>%
- group_by(group) %>%
- mutate(percent = count / sum(count) * 100)
- str(mydata_summary)
- #卡方检验
- chi_square <- chisq.test(table(mydata$group, mydata$type))
- p_value <- chi_square$p.value
- p_value
- #绘制百分比柱状堆叠图
- mydata_summary$group <- factor(mydata_summary$group, levels = c("Low risk","High risk"))
- ggplot(mydata_summary, aes(x = group, y = percent, fill = type)) +
- geom_bar(stat = "identity", position = "stack",color = "#f3f4f4") +
- annotate("text", x = 1.5, y = 105, label=expression(""~italic("P=0.03288")), size = 4)+
- geom_text(data = subset(mydata_summary, group == "High risk"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- geom_text(data = subset(mydata_summary, group == "Low risk"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- labs(title = "GBM-PRJNA482620",x = "",y = "Percentage(%)") +
- scale_fill_manual(values = c("R" = "#FF1493", "N" = "#A6D854")) +
- theme_bw()+
- theme(panel.grid = element_blank(),
- plot.title = element_text(hjust = 0.5, face = "bold"),
- plot.subtitle = element_text(hjust = 0.5, face = "italic"))+
- guides(fill=guide_legend(reverse=TRUE))
- #生存曲线
- rt=cbind(pdata[,c(1:2)],risk)
- colnames(rt)[1:2]=c("fustat","futime")
- Type=ifelse(rt$risk>median(rt$risk), "High", "Low")
- rt=cbind(as.data.frame(rt), Type)
- diff=survdiff(Surv(futime, as.numeric(fustat)) ~ Type, data=rt)
- pValue=1-pchisq(diff$chisq, df=1)
- if(pValue<0.001){
- pValue="p<0.001"
- }else{
- pValue=paste0("p=", sprintf("%.03f",pValue))
- }
- fit <- survfit(Surv(futime, fustat) ~ Type, data = rt)
- surPlot=ggsurvplot(fit,
- data=rt,
- conf.int=F,
- pval=pValue,
- pval.size=6,
- xlab="Time(years)",
- #ylab="Overall survival",
- legend.title="Cluster",
- break.time.by = 5,
- palette=c("#FF1493", "#A6D854"))
- #密度分布图
- #计算中位数
- median_risk_N <- median(mydata$risk[mydata$type == "N"])
- median_risk_R <- median(mydata$risk[mydata$type == "R"])
- type=c("N","R")
- grp.mean=c(0.13,-0.095)
- mu=as.data.frame(cbind(type,grp.mean))
- p=ggplot(data=mydata, aes(x=risk, group=type, fill=type)) +
- geom_density(#adjust=1.5,
- alpha=0.5) +
- ggprism::theme_prism(border = T)
- p+scale_fill_manual(values=c("#A6D854","#FF1493"))
- #3.6 不同评分组的药物敏感性预测####
- #CGGA队列化疗比例
- library(dplyr)
- library(tidyr)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("CGGA693.RData")
- pheno=CGGA693_pheno[,9:10]
- colnames(pheno)=c("Radio_status","Chemo_status")
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat=read.table("RS_mat.txt",sep = "\t", row.names = 1,header = T,check.names = F)
- best_mod = "Enet[alpha=0.3]"
- RS_mat2=data.frame(RS_mat[,best_mod])
- rownames(RS_mat2)=rownames(RS_mat)
- colnames(RS_mat2)="risk"
- pheno2 <- pheno %>% filter(!is.na(Chemo_status)) #Chemo_status/Radio_status
- sample=rownames(pheno2)
- mydata=as.data.frame(cbind(risk=RS_mat2[sample,],type=pheno2[,2]))
- rownames(mydata)=sample
- mydata$group=ifelse(mydata[,1]>median(mydata[,1]), "High risk", "Low risk")
- mydata$type=ifelse(mydata$type=="0","No","Yes")
- #分组计算百分比
- mydata_summary <- mydata %>%
- group_by(group, type) %>%
- summarise(count = n()) %>%
- group_by(group) %>%
- mutate(percent = count / sum(count) * 100)
- #卡方检验
- chi_square <- chisq.test(table(mydata$group, mydata$type))
- p_value <- chi_square$p.value
- p_value
- #绘制百分比柱状堆叠图
- mydata_summary$group <- factor(mydata_summary$group, levels = c("Low risk","High risk"))
- ggplot(mydata_summary, aes(x = group, y = percent, fill = type)) +
- geom_bar(stat = "identity", position = "stack",color = "#f3f4f4") +
- annotate("text", x = 1.5, y = 105, label=expression(""~italic("P=6.305645e-06")), size = 4)+
- geom_text(data = subset(mydata_summary, group == "High risk"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- geom_text(data = subset(mydata_summary, group == "Low risk"), aes(label = paste0(round(percent), "%")),
- position = position_stack(vjust = 0.5), color = "black", size = 3) +
- labs(title = "CGGA693 Chemo_treated",x = "",y = "Percentage%") +
- scale_fill_manual(values = c("Yes" = "#FF1493", "No" = "#A6D854")) +
- theme_bw()+
- theme(panel.grid = element_blank(),
- plot.title = element_text(hjust = 0.5, face = "bold"),
- plot.subtitle = element_text(hjust = 0.5, face = "italic"))+
- guides(fill=guide_legend(reverse=TRUE))
- library(pRRophetic)
- library(ggplot2)
- library(cowplot)
- library(ggsignif)
- library(ggsci)
- library(tidyr)
- library(dplyr)
- library(ggpubr)
- library(ggsci)
- library(ggforce)
- library(tidyverse)
- library(ggpubr)
- library(ggprism)
- library(paletteer)
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/0. RData")
- load("TCGA.RData")
- dat=TCGA
- data(PANCANCER_IC_Tue_Aug_9_15_28_57_2016)
- GCP.drug <- unique(drugData2016$Drug.name)
- #利用pRRopheticPredict函数进行药物敏感性分析
- drug_list <- GCP.drug
- results <- list()
- for (drug in drug_list) {
- tryCatch({
- predictedPtype <- pRRopheticPredict(
- testMatrix = as.matrix(dat),
- drug = drug,
- tissueType = "nervous_system",
- selection = 1,
- batchCorrect = "eb",
- powerTransformPhenotype = T,
- dataset = "cgp2016")
- results[[drug]] <- predictedPtype
- }, error = function(e) {
- cat("Skipping drug:", drug, "\n")
- })
- }
- #保存
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.3 drug sensitivity")
- save(results,file="pRRophetic.RData")
- load("pRRophetic.RData")
- #整合结果
- res.df <- do.call('rbind',results)
- #提取风险评分分组
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/3.0 DisulfidpScore/Results")
- RS_mat=read.table("RS_mat.txt",check.names = F)
- best_mod = "Enet[alpha=0.3]"
- RS_mat2 = RS_mat[,best_mod][1:691]
- group=ifelse(RS_mat2>median(RS_mat2), "High", "Low")
- data=rbind(res.df,group)
- data=as.data.frame(t(data))
- data[, 1:237] <- apply(data[, 1:237], 2, as.numeric)
- #可视化
- #Temozolomide\Cisplatin
- ggboxplot(data, x = "group", y = "Vinblastine",
- color = "group", notch = TRUE,
- palette = c("#A6D854", "#FF1493"),alpha = 0.75,
- legend = "none",size = 1,fill = "group")+
- stat_compare_means(aes(group=group),label = "p.signif") +
- labs(title = " ", x = NULL, y = "Vinblastine") +
- theme(plot.title = element_text(hjust = 0.5))
- #循环237个药物
- drug <- colnames(data)[1:237]
- p_value_results <- data.frame(drug = character(), p_value = numeric(),
- group = character(), high_mean = numeric(),
- low_mean = numeric(), stringsAsFactors = FALSE)
- for (i in drug) {
- ic50_high <- data[data$group == "High", i]
- ic50_low <- data[data$group == "Low", i]
- high_mean <- mean(ic50_high)
- low_mean <- mean(ic50_low)
- t_test_result <- t.test(ic50_high, ic50_low)
- p_value <- t_test_result$p.value
- if (high_mean > low_mean) {
- group <- "High"} else {
- group <- "Low"}
- p_value_results <- rbind(p_value_results, data.frame(drug = i, p_value = p_value,
- group = group, high_mean = high_mean,
- low_mean = low_mean))}
- #提取p<0.01的结果
- significant_results <- p_value_results[p_value_results$p_value < 0.01, ] #199/209(交集后结果一致)
- #相关性分析
- data=rbind(res.df,risk=RS_mat2)
- data=as.data.frame(t(data))
- data_use=data
- target_gene <- 'risk'
- target_column <- data_use[,target_gene]
- #单基因
- cor_R <- cor(x = target_column,y = data_use[,1],method = 'pearson')
- cor_P <- cor.test(x = target_column,y = data_use[,1])$p.value
- result_1 <- data.frame(target_gene = target_gene,
- gene_symbol = 'risk', #对应基因名
- cor_R = cor_R,
- cor_P = cor_P)
- #批量计算基因间的相关性
- result <- data.frame("target_gene" = character(),
- "gene_symbol" = character(),
- "cor_R" = numeric(),
- "cor_P" = numeric())
- gene_list <- colnames(data_use)[1:237]
- for (gene in gene_list) {
- print(gene)
- cor_R <- cor(x = target_column,y = data_use[,gene],method = 'pearson')
- cor_P <- cor.test(x = target_column,y = data_use[,gene])$p.value
- temp_result <- data.frame(target_gene = target_gene,
- gene_symbol = gene,
- cor_R = cor_R,
- cor_P = cor_P)
- result <- rbind(result, temp_result)
- }
- resCor <- na.omit(result[(result$cor_R > 0.5|result$cor_R < -0.5 & result$cor_P < 0.01), ]) #95
- drugnames=resCor$gene_symbol
- selected_drugs <- significant_results[significant_results$drug %in% drugnames, ] #95
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.3 drug sensitivity")
- write.table(selected_drugs,file="ic50.txt",quote=F,sep="\t")
- #相关性散点图
- ggscatter(data, x = 'risk', y = 'Vinblastine', size = 4,add = "reg.line",
- color="lightblue",
- add.params = list(color = "#77C034", fill = "#C5E99B", size = 1),
- conf.int = TRUE)+
- stat_cor(method = "spearman", label.x = 0, label.y = -3.5, label.sep = "\n") +
- ggtitle("")+
- xlab("DisulfidpScore") +
- ylab("IC50(Vinblastine)")+
- theme_classic()+
- theme(legend.position = "none")
- #可视化
- setwd("/home/data/t060432/HRT/Disulfidptosis/data/4.3 drug sensitivity")
- dat=read.table("ic50plot.txt",sep = "\t", header = TRUE)
- dat_sorted <- arrange(dat, group, ic50)
- ggplot(dat_sorted, aes(x = reorder(drug, ic50), y = ic50, fill = group)) +
- geom_col() +
- labs(y="IC50(H)/IC50(L)-1",x="")+
- scale_fill_manual(values = c("High" = "#FF1493", "Low" = "#A6D854"))+
- theme_classic() +
- theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
- #筛选IC50最低的10个药物(差异箱式图)
- needata=selected_drugs[order(selected_drugs$low_mean),]
- top10drug=needata$drug[1:10]
- top10data=data[,top10drug]
- group=ifelse(RS_mat2>median(RS_mat2), "High", "Low")
- info=as.data.frame(cbind(sample=rownames(data),group))
- colnames(info)=c("Sample","Type")
- Exp_plot=top10data
- Exp_plot$sam=info$Type
- Exp_plot$sam <- factor(Exp_plot$sam, levels = c("Low","High"))
- expr_use <- na.omit(Exp_plot)
- expr_use <-as.data.frame(expr_use)
- expr_use_long <- gather(expr_use, gene, Expression, -sam)
- table(expr_use_long$gene)
- colnames(expr_use_long) <- c("Group","gene","Expression")
- my_comparisons <- list(c("Low","High"))
- #可视化
- ggboxplot(expr_use_long, x = "gene", y = "Expression",
- color = "Group",
- palette = c("#A6D854", "#FF1493"),alpha = 0.7,notch = TRUE,
- #legend = "top",
- size = 1,fill = NULL)+
- stat_compare_means(aes(group=Group),label = "p.signif") +
- labs(title = " ", x = NULL, y = "IC50") +
- theme(plot.title = element_text(hjust = 0.5)) +
- theme_bw() +
- theme(panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- axis.title.x = element_blank(),
- legend.position = "top")
- #筛选IC50最低的10个药物(相关性)
- cordata=resCor[resCor$gene_symbol %in% top10drug,]
- cordata=cordata[,c(2:4)]
- cordata$cor_P=-log10(cordata$cor_P)
- ggplot(cordata, aes(x = gene_symbol, y = cor_R)) +
- geom_col(width = 0.04, fill = '#FF1493') +
- geom_point(aes(size = abs(cor_P)), color = '#FF1493') +
- theme_bw() +
- theme(panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- axis.title.x = element_blank(),
- legend.position = "top") +
- scale_fill_manual(values = unique(cordata$gene_symbol)) +
- geom_hline(yintercept = 0, linetype = "dashed", color = "gray") +
- labs(size = "-log10(pvalue)")
workline2.R at commit 64e79df, no license · at the source
Overview
- School of Biology and Biological Engineering, South China University of Technology, Guangzhou, Guangdong 510006, China
- The First Clinical School of Gannan Medical University, Ganzhou, Jiangxi 341000, China
- Gannan Medical University, Ganzhou, Jiangxi province 341000, China
- Department of Urology, First Affiliated Hospital of Gannan Medical University, Ganzhou, Jiangxi 341000, China
- Longnan First People's Hospital, Longnan, Jiangxi 341700, China
Abstract
Glioma prognosis is challenged by tumor heterogeneity and lack of biomarkers. Disulfidptosis, a novel cell death mechanism induced by disulfide stress, remains poorly understood in gliomas. This study analyzed eight glioma cohorts, identifying two disulfidptosis patterns with distinct genomic alterations, immune microenvironments, and clinical outcomes. A prognostic model—DisulfidpScore—was
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 27 matches between paragraphs and lines of code.
clarozhong/Rdata
64e79df796231c4bb8b95430241efb84860dd453, 29 January 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
5 files
- Machine learning compare.R, R, 190 lines
- Machine learning model.R, R, 332 lines
- Supplementary analysis.R, R, 622 lines, 2 matches
- workline2.R, R, 3,168 lines, 8 matches
- README.md, Text, 6 lines
IOBR/IOBR
635effe4d05f37a244c04f2d5cf2a5e73c38a798, 23 July 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
99 files
- R/
BinomialModel.R , R, 537 lines, 2 matches - R/
CIBERSORT.R , R, 517 lines - R/
EPIC_helper.R , R, 568 lines - R/
IPS_calculation.R , R, 265 lines - R/
IPS_helper.R , R, 96 lines - R/
LR_cal.R , R, 75 lines - R/
PrognosticModel.R , R, 393 lines, 3 matches - R/
add_riskscore.R , R, 101 lines - R/
anno_eset.R , R, 166 lines - R/
assimilate_data.R , R, 71 lines - R/
batch_cor.R , R, 177 lines - R/
batch_kruskal.R , R, 187 lines, 1 match - R/
batch_pcc.R , R, 156 lines - R/
batch_sig_surv_plot.R , R, 133 lines - R/
batch_surv.R , R, 109 lines - R/
batch_wilcoxon.R , R, 183 lines, 2 matches - R/
best_cutoff.R , R, 123 lines - R/
best_cutoff2.R , R, 119 lines - R/
calculate_sig_score.R , R, 650 lines - R/
cell_bar_plot.R , R, 129 lines - R/
check_eset.R , R, 104 lines - R/
combine_pd_eset.R , R, 107 lines - R/
count2tpm.R , R, 356 lines - R/
creat_folder.R , R, 53 lines - R/
data_doc.R , R, 254 lines, 2 matches - R/
deconvo_tme.R , R, 785 lines, 1 match - R/
design_mytheme.R , R, 89 lines - R/
download_data.R , R, 457 lines - R/
enrichment_barplot.R , R, 102 lines - R/
eset_distribution.R , R, 118 lines - R/
estimate_helper.R , R, 467 lines - R/
extract_sc_data.R , R, 100 lines - R/
feature_manipulation.R , R, 147 lines - R/
feature_selection.R , R, 168 lines - R/
find_marker_in_bulk.R , R, 137 lines - R/
find_mutations.R , R, 577 lines - R/
find_outlier_samples.R , R, 124 lines - R/
find_variable_genes.R , R, 92 lines - R/
format_msigdb.R , R, 47 lines - R/
format_signatures.R , R, 59 lines - R/
generateRef.R , R, 58 lines - R/
generateRef_DEseq2.R , R, 142 lines - R/
generateRef_limma.R , R, 118 lines - R/
generateRef_rnaseq.R , R, 134 lines - R/
generateRef_seurat.R , R, 135 lines - R/
getHRandCIfromCoxph.R , R, 39 lines - R/
get_cols.R , R, 108 lines - R/
get_cor.R , R, 373 lines - R/
get_cor_matrix.R , R, 235 lines - R/
get_sig_sc.R , R, 61 lines - R/
globalVariables.R , R, 43 lines - R/
high_var_fea.R , R, 98 lines - R/
imports.R , R, 7 lines - R/
internal.R , R, 135 lines - R/
iobr_cor_plot.R , R, 565 lines - R/
iobr_deconvo_pipeline.R , R, 140 lines, 1 match - R/
iobr_deg.R , R, 311 lines - R/
iobr_pca.R , R, 86 lines - R/
lasso_select.R , R, 62 lines - R/
log2eset.R , R, 75 lines - R/
make_mut_matrix.R , R, 152 lines - R/
mcpcounter.R , R, 187 lines - R/
merge_duplicate.R , R, 91 lines - R/
merge_eset.R , R, 101 lines - R/
mouse2human_eset.R , R, 112 lines - R/
output_sig.R , R, 62 lines - R/
palettes.R , R, 285 lines - R/
percent_bar.R , R, 265 lines - R/
quantiseq.R , R, 163 lines - R/
quantiseq_helper.R , R, 245 lines - R/
random_strata_cells.R , R, 183 lines - R/
rbind_iobr.R , R, 49 lines - R/
remove_batcheffect.R , R, 257 lines - R/
remove_duplicate_genes.R , R, 98 lines - R/
remove_names.R , R, 84 lines - R/
roc_time.R , R, 295 lines - R/
scale_matrix.R , R, 71 lines - R/
select_method.R , R, 58 lines - R/
sigScore.R , R, 68 lines - R/
sig_box.R , R, 234 lines - R/
sig_box_batch.R , R, 229 lines - R/
sig_forest.R , R, 166 lines - R/
sig_gsea.R , R, 406 lines, 2 matches - R/
sig_heatmap.R , R, 321 lines - R/
sig_pheatmap.R , R, 269 lines - R/
sig_roc.R , R, 180 lines - R/
sig_surv_plot.R , R, 369 lines - R/
subgroup_survival.R , R, 102 lines - R/
surv_group.R , R, 311 lines - R/
tcga_rna_preps.R , R, 105 lines - R/
timer.R , R, 550 lines - R/
tme_cluster.R , R, 99 lines - R/
transform_data.R , R, 98 lines - R/
xCell.R , R, 432 lines - R/
zzz.R , R, 68 lines - README.Rmd, R, 342 lines
- data-raw/
null_models.R , R, 3 lines - vignettes/
IOBR-user-manual.Rmd , R, 76 lines - README.md, Text, 451 lines
paulgeeleher/pRRophetic
0be5ac3c49e4f34ea563e12a79572e7460423c4f, 16 December 2023Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
9 files
- pRRophetic/
R/ , R, 43 linesclassification_function. R - pRRophetic/
R/ , R, 332 linescompute_phenotype_functi on.R - pRRophetic/
R/ , R, 24 linesdo_variable_selection.R - pRRophetic/
R/ , R, 117 lineshomogenize_data.R - pRRophetic/
R/ , R, 185 lines, 1 matchpredict_from_cgp.R - pRRophetic/
R/ , R, 46 linessummarizeGenesByMean.R - pRRophetic/
vignettes/ , R, 60 linesprepareData.R - pRRophetic/
vignettes/ , R, 119 linesvignetteOutline.R - README, Text, 5 lines
cailab-tamu/scTenifoldKnk
e46221bc988b9db878c84df979fd636b55b59861, 24 September 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
58 files
- R/
dRegulation.R , R, 198 lines - R/
plotKO.R , R, 196 lines - R/
qFilter.R , R, 6 lines - R/
restoreSeed.R , R, 11 lines - R/
scQC.R , R, 105 lines - R/
scTenifoldKnk.R , R, 274 lines, 2 matches - R/
strictDirection.R , R, 7 lines - inst/
benchmark/ , Python, 95 linesSERGIO/ gene.py - inst/
benchmark/ , Python, 5 linesSERGIO/ regFile.py - inst/
benchmark/ , Python, 15 linesSERGIO/ runSERGIO.py - inst/
benchmark/ , Python, 1,015 linesSERGIO/ sergio.py - inst/
benchmark/ , Python, 95 linesSERGIO/ targetFile.py - inst/
benchmark/ , R, 158 linesbenchmarkDataProcessing. R - inst/
benchmark/ , R, 134 linesbenchmarkDataProcessing2 .R - inst/
benchmark/ , R, 62 linesbenchmarkDataProcessing_ sim.R - inst/
benchmark/ , R, 103 linesbenchmarkDataProcessing_ yan.R - inst/
benchmark/ , R, 62 linesbenchmarkDirection.R - inst/
benchmark/ , R, 13 linestestLambda.R - inst/
manuscript/ , R, 48 linesAHR/ Code/ Preenterocytes_DataPrePr ocessing.R - inst/
manuscript/ , R, 238 linesAHR/ Code/ Preenterocytes_DataProce ssing.R - inst/
manuscript/ , R, 36 linesAHR/ Code/ compareList.R - inst/
manuscript/ , R, 16 linesAHR/ Results/ to_be_deleted/ enrichmentComparison.R - inst/
manuscript/ , R, 15 linesAHR/ Results/ to_be_deleted/ newManifoldC.R - inst/
manuscript/ , R, 33 linesCFTR/ Code/ CFTR_dataPreparation.R - inst/
manuscript/ , R, 117 linesCFTR/ Code/ CFTR_dataProcessing.R - inst/
manuscript/ , R, 161 linesDMD/ Code/ DMD_DataProcessing.R - inst/
manuscript/ , Shell, 8 linesDMD/ Data/ runStability.sh - inst/
manuscript/ , R, 16 linesDMD/ Data/ testStability.R - inst/
manuscript/ , R, 166 linesHNF4A-HNF4G/ Code/ HNF4A_HNF4G_DataProcessi ng.R - inst/
manuscript/ , R, 46 linesHNF4A-SMAD4/ Code/ HNF4A_SMAD4_DataProcessi ng.R - inst/
manuscript/ , R, 43 linesMALAT1/ Code/ malat1_DataPreprocessing .R - inst/
manuscript/ , R, 197 linesMALAT1/ Code/ malat1_DataProcessing.R - inst/
manuscript/ , R, 50 linesMALAT1/ Code/ malat1_umapPlot.R - inst/
manuscript/ , MATLAB, 56 linesMALAT1/ Results/ remove_red_gsea.m - inst/
manuscript/ , R, 33 linesMECP2/ Code/ MECP2_dataPreparation.R - inst/
manuscript/ , R, 281 linesMECP2/ Code/ MECP2_dataProcessing.R - inst/
manuscript/ , R, 402 linesMICROGLIA/ dataMerging.R - inst/
manuscript/ , R, 54 linesNEGCONTROL/ negControls.R - inst/
manuscript/ , R, 185 linesNKX2-1/ Code/ NKX21_DataProcessing.R - inst/
manuscript/ , R, 15 linesSTABILITY/ S1/ trem2Stability.R - inst/
manuscript/ , R, 105 linesSTABILITY/ stabilityAnalysis.R - inst/
manuscript/ , R, 94 linesSTABILITY/ stabilityProcessing.R - inst/
manuscript/ , R, 33 linesTREM2/ Code/ TREM2_DataPreparation.R - inst/
manuscript/ , R, 161 linesTREM2/ Code/ TREM2_DataProcessing.R - inst/
manuscript/ , R, 143 linesTREM2/ Code/ TREM2_dirDataProcessing_ col.R - inst/
manuscript/ , R, 143 linesTREM2/ Code/ TREM2_dirDataProcessing_ coltranspose.R - inst/
manuscript/ , R, 129 linesTREM2/ Code/ TREM2_dirDataProcessing_ row.R - inst/
manuscript/ , R, 106 linesTREM2/ Code/ TREM2_tfDirection.R - inst/
manuscript/ , Shell, 8 linesTREM2/ Data/ runTrem2Stability.sh - inst/
manuscript/ , R, 15 linesTREM2/ Data/ trem2Stability.R - inst/
manuscript/ , R, 178 linesWD/ weightComparison.R - inst/
manuscript/ , R, 53 linesnrEnrichment.R - inst/
manuscript/ , R, 79 linesreviewer1_comment2.R - inst/
manuscript/ , R, 326 linesreviewer1_comment4.R - inst/
manuscript/ , R, 43 linesreviewer1_comment5.R - inst/
manuscript/ , R, 147 linesreviewer1_comment6.R - inst/
manuscript/ , R, 62 linesreviewer3_comment2.R - README.md, Text, 297 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 167 scripts, each with its path and the digest of its content;
- 27 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
- geo:GSE16011, at NCBI GEO; found in “Data and code availability”
Data and code availability
This paper analyzes existing, publicly available data, accessible at TCGA: TCGA-Gliomas; GTEx: Normal brain; CGGA: CGGA325, CGGA693; GlioVis: GSE16011 (https://
The code supporting the findings of this study is available in GitHub at https://
Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 3 keywords, 2 funders, 45 references.
Cite
This paper
Huang, R., Li, H., Zhong, Y., Zhuo, P., Wang, Y., Yang, A., Zhang, Y., Li, J., Xu, R., & Li, Q. (2026). Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug. iScience, 29(5), 115657. https://
BibTeX
@article{huang2026integr
author = {Huang, Ruiting and Li, Hailin and Zhong, Yijing and Zhuo, Paimin and Wang, Yibei and Yang, Aoting and Zhang, Yu and Li, Jiao and Xu, Ruiquan and Li, Quhuan},
title = {{Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug}},
journal = {iScience},
year = {2026},
month = apr,
volume = {29},
number = {5},
pages = {115657},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/
url = {https://
pmid = {42164521},
pmcid = {PMC13185775}
}
RIS
TY - JOUR
AU - Huang, Ruiting
AU - Li, Hailin
AU - Zhong, Yijing
AU - Zhuo, Paimin
AU - Wang, Yibei
AU - Yang, Aoting
AU - Zhang, Yu
AU - Li, Jiao
AU - Xu, Ruiquan
AU - Li, Quhuan
TI - Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/
VL - 29
IS - 5
SP - 115657
SN - 2589-0042
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug",
"container-title": "iScience",
"author": [
{
"family": "Huang",
"given": "Ruiting"
},
{
"family": "Li",
"given": "Hailin"
},
{
"family": "Zhong",
"given": "Yijing"
},
{
"family": "Zhuo",
"given": "Paimin"
},
{
"family": "Wang",
"given": "Yibei"
},
{
"family": "Yang",
"given": "Aoting"
},
{
"family": "Zhang",
"given": "Yu"
},
{
"family": "Li",
"given": "Jiao"
},
{
"family": "Xu",
"given": "Ruiquan"
},
{
"family": "Li",
"given": "Quhuan"
}
],
"container-title-short":
"volume": "29",
"issue": "5",
"page": "115657",
"DOI": "10.1016/
"PMID": "42164521",
"PMCID": "PMC13185775",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
8
]
]
}
}
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.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: pROC, survival, WGCNA, 20 other tools, other condition
- [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. MedicineIn common: pROC, WGCNA, Harmony, 20 other tools, other condition
- [3] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: glmnet, survival, WGCNA, 19 other tools
- [4] doi:10.1016/j.xcrm.2026.102682 [code]
- TET CpG sequence-context-specifi
c DNA demethylation shapes progression of IDH-mutant gliomas. Journal: Cell reports. MedicineIn common: glmnet, pROC, survival, 17 other tools, other condition - [5] doi:10.3390/ijms27093997 [code]
- Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC.Journal: International journal of molecular sciencesIn common: glmnet, survival, Harmony, 15 other tools, other condition
- [6] 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 neuroscienceIn common: WGCNA, Harmony, edgeR, 15 other tools
- [7] doi:10.1038/s41586-026-10214-2 [code]
- Multidimensional profiling of heterogeneity in supratentorial ependymomas.Journal: NatureIn common: Harmony, edgeR, car, 16 other tools, other condition
- [8] doi:10.1002/imt2.70163 [code]
- Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.Journal: iMetaIn common: Harmony, edgeR, limma, 16 other tools
- [9] doi:10.1016/j.isci.2026.115573 [code]
- Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways.Journal: iScienceIn common: WGCNA, edgeR, limma, 15 other tools
- [10] doi:10.1038/s41593-026-02300-5 [code]
- Integrated single-cell and spatial transcriptomic profiling in ALS uncovers peripheral-to-central immune infiltration and reprogramming.Journal: Nature neuroscienceIn common: Harmony, edgeR, car, 15 other tools, other condition
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 167 scripts, and 27 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:35361943d669824e…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
