1、进入DAVID网站https://david.ncifcrf.gov/summary.jsp
2、下面实战开始
①,点击“Upload”,准备上传所感兴趣的基因集
②,复制粘贴所感兴趣的gene set,,也可以选择文件
③,这个一般都是官方标准的gene symbol
④,选择Gene list
⑤,点击Submit List
接下来就可以开始看富集的结果了
点击每个结果的后面的Chart,然后会弹出一个页面框,如下,,接着点击Download File下载富集结果,把这几个结果都下载好
接下就是结果展示了,我这里用到的是R软件,代码现成,直接复制粘贴就可行
只要是DAVID下载下来的格式就都直接复制代码
####装包
install.packages('stringi')
install.packages('ggplot2')
install.packages('dplyr')
library(stringi)
library(ggplot2)
library(dplyr)
##读取和整理KEGG的结果
downgokegg<-read.delim('./DEG_KEGG.txt')
enrich<-downgokegg
enrich_signif=enrich[which(enrich$PValue<0.05),]
enrich_signif=enrich_signif[,c(1:3,5)]
head(enrich_signif)
enrich_signif=data.frame(enrich_signif)
KEGG=enrich_signif
KEGG$Term<-stri_sub(KEGG$Term,10,100)
ggplot(KEGG,aes(x=Count,y=Term))+geom_point(aes(color=PValue,size=Count))+scale_color_gradient(low='green',high='red')+theme_bw()+theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())
###读取和整理GO富集的结果
GO_CC<-read.delim('./DEG_CC.txt')
GO_CC_signif=GO_CC[which(GO_CC$PValue<0.05),]
GO_CC_signif=GO_CC[,c(1:3,5)]
head(GO_CC_signif)
GO_CC_signif=data.frame(GO_CC_signif)
GO_CC_signif$Term<-stri_sub(GO_CC_signif$Term,12,100)
GO_BP<-read.delim('./DEG_BP.txt')
GO_BP_signif=GO_BP[which(GO_BP$PValue<0.05),]
GO_BP_signif=GO_BP_signif[,c(1:3,5)]
head(GO_BP_signif)
GO_BP_signif=data.frame(GO_BP_signif)
GO_BP_signif$Term<-stri_sub(GO_BP_signif$Term,12,100)
GO_MF<-read.delim('./DEG_MF.txt')
GO_MF_signif=GO_MF[which(GO_MF$PValue<0.05),]
GO_MF_signif=GO_MF_signif[,c(1:3,5)]
head(GO_MF_signif)
GO_MF_signif=data.frame(GO_MF_signif)
GO_MF_signif$Term<-stri_sub(GO_MF_signif$Term,12,100)
enrich_signif=rbind(GO_BP_signif,rbind(GO_CC_signif,GO_MF_signif))
go=enrich_signif
go=arrange(go,go$Category,go$PValue)
##图例名称设置
m=go$Category
m=gsub("TERM","",m)
m=gsub("_DIRECT","",m)
go$Category=m
GO_term_order=factor(as.integer(rownames(go)),labels = go$Term)
COLS<-c("#66C3A5","#8DA1CB","#FD8D62")
###开始画图
ggplot(data=go,aes(x=GO_term_order,y=Count,fill=Category))+
geom_bar(stat = "identity",width = 0.8)+
scale_fill_manual(values = COLS)+
theme_bw()+
xlab("Terms")+
ylab("Gene_counts")+
labs()+
theme(axis.text.x = element_text(face = "bold",color = "black",angle = 90,vjust = 1,hjust = 1))
感谢大家!如有错误多多指出