1.数据txt文件中的PValue列的数据,要事先用Excel做好-log10的运算后,将值替换。
2.在R中加载ggplot包后执行以下代码:
library(“ggplot2”)
data = read.table(file.choose(),header=T,sep="\t")
GO_term_names=factor(as.integer(rownames(data)),labels=data$Term)
ggplot(data=data,aes(x=GO_term_names,y=PValue,fill=Category))+geom_bar(stat=“identity”,width=0.8)+coord_flip()+xlab(“GO Term”)+ylab(expression(-log[10](“P Value”)))+theme_bw()
3.保存图片为PDF格式。
注:图片上数据的先后顺序取决于txt文件中数据顺序。
获得BPCCMF数据后笨办法完成GO富集
最新推荐文章于 2021-08-08 16:38:00 发布