file="diffgene_down.txt"
sn=gsub(".txt","",file)
gene <- read.delim(file,header = T,row.names = 1)
kk <- enrichKEGG(gene= gene$GenBank.Gene,organism= 'zma',
pvalueCutoff = 1,
qvalueCutoff = 1,
use_internal_data =T)
head(kk)
write.csv(kk@result,file = paste0(sn,".pathway.csv"),row.names = F)
##只展示过阈值的pathway
kkp <- enrichKEGG(gene= gene$GenBank.Gene,organism= 'zma',qvalueCutoff = 0.05,use_internal_data =T)
head(kkp)
p=dotplot(kkp);p
ggsave(p,filename = paste0(sn,".pathway.png"),width = 8,height = 7,dpi = 300)
ggsave(p,filename = paste0(sn,".pathway.pdf"),width = 8,height = 7,dpi = 300)