Article Directory
Papers address
DAVID official website
KEGG enriched GO enrichment analysis and consistent analysis, concrete steps to see my last article DAVID online tools GO enrichment analysis , this is mainly the result of the visual display
The results obtained enriched KEGG
1. The input file for all differentially expressed genes list
2. select GO enrichment analysis results, we click on "Pathways (1 selected)" drop-down menu, select "KEGG_PATHWAY" option, and finally saved as "kegg_pathway.txt" file
Bubble FIG.
setwd("./3.DAVID_GO_KEGG/KEGG")
rt = read.table(file = 'kegg_pathway.txt',sep = '\t',header = T,quote = '')
keggSig = rt[rt$PValue < 0.05,]
library(tidyr)
keggSig = separate(keggSig, Term, sep = ":",
into = c("ID", "Term"))
library(ggplot2)
ggplot(keggSig,aes(x=Fold.Enrichment,y=Term)) +
geom_point(aes(size=Count,color=-1*log10(PValue)))+
scale_colour_gradient(low="green",high="red")+
labs(
color=expression(-log[10](P.value)),
size="Gene number",
x="Fold enrichment"
# y="Pathway name",
# title="Pathway enrichment")
)+
theme_bw()+
theme(
axis.text.y = element_text(size = rel(1.3)),
axis.title.x = element_text(size=rel(1.3)),
axis.title.y = element_blank()
)
ggsave('plot.pdf',width = 7,height = 4)
cytoscape network software to draw FIG metabolic pathways
Download software , configure the environment for java8, the software will automatically download and install java8, if installed java9 need to uninstall before installing, Cytoscape instructional videos
Prepare the input file
network data
library(tidyr)
separate_keggSig = separate_rows(keggSig,Genes)
network_data = separate_keggSig[,c('ID','Genes')]
colnames(network_data)[2] = 'Name'
write.table(network_data,
file = 'network_data.txt',
sep = '\t',
quote = F,
row.names = F,
col.names = T)
table data
uniGene = unique(network_data$Name)
allSign = read.table(file = 'allSign.xls',sep = '\t',header = T,quote = '')
pathway_gene = allSign[match(uniGene,allSign$Name),]
pathway_gene$status = ifelse(pathway_gene$logFC > 0,'up','down')
df = data.frame(Name = keggSig[,2],status = rep('id',nrow(keggSig)))
table_data = rbind(df,pathway_gene[,c(1,3)])
write.table(table_data,
file = 'table_data.txt',
sep = '\t',
quote = F,
row.names = F,
col.names = T)
Enter the network file
Enter the table file
The default setting is like
Setting style, color
Manual adjustment, save the picture
This compares to spend time, for while listening to music while painting, quite interesting, ha ha
Here is the finished product, or quite hard to see, really no art cells, the general picture is saved as a pdf format that can also be saved as a file cys, easy to open again in the cytoscape