clusterProfiler富集分析

BiocManager::install('clusterProfiler')
BiocManager::install('org.Hs.eg.db')
BiocManager::install('DOSE')
library(clusterProfiler)
library(org.Hs.eg.db)
library(DOSE)

entrezID <- read.table("11.xls",header=F,sep="\t")
entrezID <- entrezID$V1
BP <- enrichGO(entrezID,"org.Hs.eg.db",ont="BP",keyType = "ENSEMBL",pAdjustMethod = "BH",pvalueCutoff = 0.05,qvalueCutoff = 0.1,readable = T)
dotplot(BP, x = "GeneRatio", color = "p.adjust", showCategory = 20, size = NULL, split = NULL, font.size = 12, title="Dotplot for Gene Ontology Analysis")
write.table(BP, 'go_tmp.txt', sep = '\t', row.names = FALSE, quote = FALSE)
id_with_fc <- read.table("22.xls",header=T,sep="\t")
id_with_fc2 <- id_with_fc[,2]
names(id_with_fc2) <- id_with_fc[,1]
geneList=id_with_fc2
cnetplot(BP,showCategory = 10,foldChange = geneList)