1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| library(ggplot2) library(stats) library(dplyr) setwd("F:/Taogroup/People/HSY/MM/Gly/FullandGlycombine/addfulltogly/20210728/") data=read.table('BPforBubble.txt',header=T,sep="\t")
pdf("BPGO.pdf",width = 10,height = 6) ggplot(data, aes(x=-log2(PValue), y=Term, size=Count, color=SampleGroup)) + geom_point(alpha=0.8) + scale_size(range = c(3, 15), name="Count") + scale_color_manual(values=c('#00BA38','#F8766D','#619CFF'))+ xlab("-log2(PValue)") theme(axis.text=element_text(size=7.5),axis.title=element_text(size=12)) dev.off()
pdf("GO.pdf") ggplot(data, aes(x=ProbabilitySet, y=Sample, size=PhosProtein, color=SearchMethod)) + geom_point(alpha=0.8) + scale_size(range = c(5, 15), name="PhosProtein") + xlab("ProbabilitySet") + ylab("Sample") + theme(axis.text=element_text(size=8),axis.title=element_text(size=12)) dev.off()
library(ggplot2) library(stats) library(dplyr) setwd("E:/Datasetlocalize/People/ZGY/20210817_new_version/Result/") data=read.table('81Protein.txt',header=T,sep="\t")
pdf("GO.pdf",width = 10,height = 8) ggplot(data, aes(x=ProbabilitySet, y=Sample, size=PhosProtein, color=SearchMethod)) + geom_point(alpha=0.8) + scale_size(range = c(5, 15), name="PhosProtein") + xlab("ProbabilitySet") + ylab("Sample") + theme(axis.text=element_text(size=8),axis.title=element_text(size=12))+ theme(panel.grid = element_blank())+
dev.off()
pdf("KEGG.pdf",width = 8,height = 6) data<-read.table('KEGG.txt',header=TRUE,sep="\t") data$Term<-factor(data$Term,levels = c(data$Term)) ggplot(data, aes(x=Count, y=Term,fill=PValue)) + geom_col(alpha=0.7)+ scale_size(range = c(5, 15)) + scale_fill_gradient(low = "#FA8072", high="white")+ scale_x_continuous(breaks = scales::pretty_breaks()) + theme(axis.text=element_text(size=15,face='bold'),axis.title=element_text(size=12,face='bold')) dev.off()
|