This document describes how to use the richR package. Below is a simple manual for using the package
You can do enrichment analysis for different type of annotation data (GO,KEGG,Reactome(may need reactome.db if you work with Human). If you had bioAnno installed, you can do enrichment with all types of annotation data.
set.seed(123) library(richR) # To check if your the current species if supported !!! showData() # Make the GO and KEGG Pathway data for your analysis # find suitable species name by using showensemble() hsa_go<-buildAnnot(species="human",keytype="SYMBOL",anntype = "GO") hsa_ko<-buildAnnot(species = "human",keytype="SYMBOL", anntype = "KEGG")
hsamgi <- buildMSIGDB(species="human",keytype="SYMBOL",anntype="GO") hsakom <- buildAnnot(species = "human",keytype="SYMBOL", anntype = "KEGGM")
# library(bioAnno) # fromKEGG(species="ath") # athgo<-buildOwn(dbname="org.ath.eg.db",anntype="GO") # athko<-buildOwn(dbname="org.ath.eg.db",anntype="KEGG") # Please go over the bioAnno package webpage ("https://github.com/guokai8/bioAnno") to learn more
gene <- sample(unique(hsa_go$GeneID),1000) res <- richGO(gene,godata = hsa_go,ontology ="BP") head(res) ggbar(res,top = 20,usePadj = F)
resko<-richKEGG(gene,hsa_ko,pvalue=0.05) head(resko) ggdot(resko,top=10,usePadj = F)
gene <- sample(unique(hsako$GeneID),1000) res <- richDAVID(gene,keytype="ENTREZID",species="human")
ggnetplot(res,top=20) ggnetwork(res,top=20,weightcut = 0.01)
filter(resko,Padj<0.05)%>%head() select(resko,Term)
gene1 <- sample(unique(hsako$GeneID),1000) gene2 <- sample(unique(hsako$GeneID),1000) resko1 <- richKEGG(gene1,kodata = hsako) resko2 <- richKEGG(gene2,kodata = hsako) res <- compareResult(list(S1=resko1,S2=resko2)) comparedot(res)
ggnetmap(list(res,resko),top=50,visNet=TRUE,smooth=FALSE)
For any questions please contact guokai8@gmail.com
Congratulations ! You just done all Enrichment analysis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.