library(dplyr)
library(ggplot2)
library(ggrepel)
BP <- read.table(file ="CC.txt",header = TRUE, sep = "\t")
View(BP)
objects(BP)
BP <- arrange(BP,desc(BP[,2]))
BP$Biological.Processes.Term <- factor(BP$Biological.Processes.Term,levels = rev(BP$Biological.Processes.Term))
p <- ggplot(BP,aes(x=Fold_Enrichment,y=Biological.Processes.Term,
colour=p.value,size=Count))+geom_point()+
scale_size(range=c(2, 8))+
scale_colour_gradient(low = "blue",high = "red")+
theme_bw()+
ylab("Biological.Processes.Term")+
xlab("Fold Enrichment")+
labs(color=expression(-log[10](PValue)))+
theme(legend.title=element_text(size=14), legend.text = element_text(size=14))+
theme(axis.title.y = element_text(margin = margin(r = 50)),axis.title.x = element_text(margin = margin(t = 20)))+
theme(axis.text.x = element_text(face ="bold",color="black",angle=0,vjust=1))
p
CC <- read.table(file ="CC.txt",header = TRUE, sep = "\t")
CC <- arrange(CC,desc(CC[,2]))
CC$Cellular.Components.Term <- factor(CC$Cellular.Components.Term,levels = rev(CC$Cellular.Components.Term))
p1 <- ggplot(CC,aes(x=Fold_Enrichment,y=Cellular.Components.Term,
colour=p.value,size=Count))+geom_point()+
scale_size(range=c(2, 8))+
scale_colour_gradient(low = "blue",high = "red")+
theme_bw()+
ylab("Cellular.Components.Term")+
xlab("Fold Enrichment")+
labs(color=expression(-log[10](PValue)))+
theme(legend.title=element_text(size=14), legend.text = element_text(size=14))+
theme(axis.title.y = element_text(margin = margin(r = 50)),axis.title.x = element_text(margin = margin(t = 20)))+
theme(axis.text.x = element_text(face ="bold",color="black",angle=0,vjust=1))
MF <- read.table(file ="MF.txt",header = TRUE, sep = "\t")
MF <- arrange(MF,desc(MF[,2]))
MF$Molecular.Function.Term <- factor(MF$Molecular.Function.Term,levels = rev(MF$Molecular.Function.Term))
p2 <- ggplot(MF,aes(x=Fold_Enrichment,y=Molecular.Function.Term,
colour=p.value,size=Count))+geom_point()+
scale_size(range=c(2, 8))+
scale_colour_gradient(low = "blue",high = "red")+
theme_bw()+
ylab("Molecular.Function.Term")+
xlab("Fold Enrichment")+
labs(color=expression(-log[10](PValue)))+
theme(legend.title=element_text(size=14), legend.text = element_text(size=14))+
theme(axis.title.y = element_text(margin = margin(r = 50)),axis.title.x = element_text(margin = margin(t = 20)))+
theme(axis.text.x = element_text(face ="bold",color="black",angle=0,vjust=1))
KEGG <- read.table(file ="KEGG.txt",header = TRUE, sep = "\t")
View(KEGG)
objects(KEGG)
KEGG <- arrange(KEGG,desc(KEGG[,2]))
KEGG$KEGG.Pathway.Term <- factor(KEGG$KEGG.Pathway.Term,levels = rev(KEGG$KEGG.Pathway.Term))
p3 <- ggplot(KEGG,aes(x=Fold_Enrichment,y=KEGG.Pathway.Term,
colour=p.value,size=Count))+geom_point()+
scale_size(range=c(2, 8))+
scale_colour_gradient(low = "blue",high = "red")+
theme_bw()+
ylab("KEGG.Pathway.Term")+
xlab("Fold Enrichment")+
labs(color=expression(-log[10](PValue)))+
theme(legend.title=element_text(size=14), legend.text = element_text(size=14))+
theme(axis.title.y = element_text(margin = margin(r = 50)),axis.title.x = element_text(margin = margin(t = 20)))+
theme(axis.text.x = element_text(face ="bold",color="black",angle=0,vjust=1))
allgokegg <- read.table(file ="allgokegg.txt",header = TRUE, sep = "\t")
View(allgokegg)
objects(allgokegg)
allgokegg <- arrange(allgokegg,desc(allgokegg[,2]))
allgokegg$all.Term <- factor(allgokegg$all.Term,levels = rev(allgokegg$all.Term))
p4 <- ggplot(allgokegg,aes(x=Fold_Enrichment,y=all.Term,
colour=p.value,size=Count))+geom_point()+
scale_size(range=c(2, 8))+
scale_colour_gradient(low = "blue",high = "red")+
theme_bw()+
ylab("all.Term")+
xlab("Fold Enrichment")+
labs(color=expression(-log[10](PValue)))+
theme(legend.title=element_text(size=14), legend.text = element_text(size=14))+
theme(axis.title.y = element_text(margin = margin(r = 50)),axis.title.x = element_text(margin = margin(t = 20)))+
theme(axis.text.x = element_text(face ="bold",color="black",angle=0,vjust=1))
go 和KEGG
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...