打开Rstudio,依次输入以下脚本
Module_GO文件:
#setwd("C:/Users/86176/Desktop")
#library(grid)
#library(ggplot2)
#data <- read.table("Module_GO",header=T,sep="\t")
#data$Module<- factor(data$Module,levels = c("Cellular Component", "Molecular Function","Biological Process"))
#qplot(GO,number,colour = p_value, data = data,ylab="gene_number", xlab="GO enrichment",geom="jitter")+scale_colour_gradient2( low="red",mid="yellow", high="blue",midpoint=0.003)+theme_bw()+facet_wrap(~Module,scales="free_x",nrow=1)+theme(axis.text.x=element_text(angle=45,color="black",vjust=1,hjust=1),panel.grid.major.x = element_blank(),panel.grid.major.y = element_blank(),panel.grid.minor.y = element_blank(),strip.background = element_rect(fill = "#00CC33"))+theme(plot.margin=unit(c(30,0,20,20),"mm"))
网友评论