Giter Site home page Giter Site logo

guokai8 / richr Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 4.0 3.13 MB

Function Enrichment analysis and Network construction

Home Page: https://guokai8.github.io/richR/

License: GNU General Public License v3.0

R 97.16% C++ 2.84%
enrichment-analysis kegg gsea enrichment plot

richr's Introduction

richR Project Status: DOI

Description

richR provide functions richGO, richKEGG,and enrich to do functional enrichment analysis.

Installation

library(devtools)
install_github("guokai8/richR")

Quick tour

set.seed(123)   
library(richR)   
# To check the available species !!!
showData()   
# Make the GO and KEGG Pathway data for your analysis
# find suitable species name by using showensemble()    
hsago <- buildAnnot(species="human",keytype="SYMBOL",anntype = "GO")
hsako <- buildAnnot(species = "human",keytype="SYMBOL", anntype = "KEGG")

Support KEGG Module and MSIGDB anntation

hsamgi <- buildMSIGDB(species="human",keytype="SYMBOL",anntype="GO")
hsakom <- buildAnnot(species = "human",keytype="SYMBOL", anntype = "KEGGM")

You can make annotation data for all species from bioAnno package

  • If had bioAnno installed, you can build annotation package with it
# 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

Simple example for enrichment analysis

gene <- sample(unique(hsago$GeneID),1000)
resgo <- richGO(gene,godata = hsago,ontology ="BP")
head(resgo)
ggbar(resgo,top = 20,usePadj = F)
###extract gene and related term
head(detail(resgo))

cluster GO enrichment result

resc<-richCluster(resgo)
ggdot(resc)
resko<-richKEGG(gene,hsako,pvalue=0.05)
head(resko)
ggdot(resko,top=10,usePadj = F)
##GSEA
set.seed(123)
hsako <- buildAnnot(species="human",keytype="SYMBOL",anntype = "KEGG")
name <- sample(unique(hsako$GeneID),1000)
gene<-rnorm(1000)
names(gene) <- name
res <- richGSEA(gene,object = hsako)

Support DAVID analysis (Online)

gene <- sample(unique(hsako$GeneID),1000)
res <- richDAVID(gene,keytype="ENTREZID",species="human")

You can also get network graphic for any type of enrichment analysis result and also combine different enrichment result

ggnetplot(resko,top=20)
ggnetwork(resgo,top=20,weightcut = 0.01)

Directly support dplyr filter, select, mutate,group_by ... functions

library(dplyr)
filter(resko,Padj<0.05)%>%head()
select(resko,Term)

Generate figures with mutiple enrichment results for groups

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)

Generate figures with different enrichment results

ggnetmap(list(resgo,resko),top=50,visNet=TRUE,smooth=FALSE)

Contact information

For any questions please contact [email protected]

richr's People

Contributors

guokai8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

richr's Issues

featureRequest: ordering of items in bar/dot plots

Hi,

It would be great if users can specify how ggbar and ggdot order the items in the plots. Currently, the default is ordering by the name of the items (pathways, etc) or Rich factor (% in genome). It would be great if we can order by Padj as well.

Thanks,
Junguk

Intallation error

Hi,

I am unable to load the package. Here is the error: install_github("hurlab/richR") Downloading GitHub repo hurlab/richR@HEAD Error: Failed to install 'richR' from GitHub: (converted from warning) restarting interrupted promise evaluation

Could you please look into this? Thank in advance.

Best,
Aastha

Update is neede regarding distinct_()

Warning message:
distinct_() was deprecated in dplyr 0.7.0.
ℹ Please use distinct() instead.
ℹ See vignette('programming') for more help
ℹ The deprecated feature was likely used in the richR package.
Please report the issue to the authors.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.