Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An R interface to enrichR

NotificationsYou must be signed in to change notification settings

wjawaid/enrichR

Repository files navigation

Wajid Jawaid2025-02-02

CRAN_Status_BadgeProject Status: Active - The project has reached a stable, usable state and is being actively developed.CRAN mirror downloads

Installation

enrichR can be installed from Github or from CRAN.

Github

library(devtools)install_github("wjawaid/enrichR")

CRAN

The package can be downloaded from CRAN using:

install.packages("enrichR")

Usage example

enrichR provides an interface to the Enrichr database (Kuleshov etal. 2016) hosted athttps://maayanlab.cloud/Enrichr/.

By default human genes are selected otherwise select your organism ofchoice. (This functionality was contributed by Alexander Blume)

Initialising connection to Enrichr website

library(enrichR)#> Welcome to enrichR#> Checking connections ...#> Enrichr ... Connection is Live!#> FlyEnrichr ... Connection is Live!#> WormEnrichr ... Connection is Live!#> YeastEnrichr ... Connection is Live!#> FishEnrichr ... Connection is Live!#> OxEnrichr ... Connection is Live!listEnrichrSites()#> Enrichr ... Connection is Live!#> FlyEnrichr ... Connection is Live!#> WormEnrichr ... Connection is Live!#> YeastEnrichr ... Connection is Live!#> FishEnrichr ... Connection is Live!#> OxEnrichr ... Connection is Live!setEnrichrSite("Enrichr")# Human genes#> Connection changed to https://maayanlab.cloud/Enrichr/#> Connection is Live!

Select gene-set libraries

List all available databases from Enrichr.

dbs<- listEnrichrDbs()
head(dbs)
geneCoveragegenesPerTermlibraryNamenumTermsappytercategoryId
13362275Genome_Browser_PWMs615ea115789fcbf12797fd692cec6df0ab4dbc79c6a1
278841284TRANSFAC_and_JASPAR_PWMs3267d42eb43a64a4e3b20d721fc7148f685b53b6b301
600277Transcription_Factor_PPIs290849f222220618e2599d925b6b51868cf1dab37631
471721370ChEA_20133537ebe772afb55b63b41b79dd8d06ea0fdd9fa26307
47107509Drug_Perturbations_from_GEO_2014701ad270a6876534b7cb063e004289dcd4d3164f3427
214933713ENCODE_TF_ChIP-seq_2014498497787ebc418d308045efb63b8586f10c526af517

Select the 2023 GO databases.

dbs<- c("GO_Molecular_Function_2023","GO_Cellular_Component_2023","GO_Biological_Process_2023")

Perform analysis

Without background

Query withenrichr() using example genes available from the package.

# Load example input genesdata(input)length(input)#> [1] 375head(input)#> [1] "Nsun3"    "Polrmt"   "Nlrx1"    "Sfxn5"    "Zc3h12c"  "Slc25a39"enriched<- enrichr(input,dbs)#> Uploading data to Enrichr... Done.#>   Querying GO_Molecular_Function_2023... Done.#>   Querying GO_Cellular_Component_2023... Done.#>   Querying GO_Biological_Process_2023... Done.#> Parsing results... Done.

Now view the"GO_Biological_Process_2023" results from theenrichedobject.

head(enriched[["GO_Biological_Process_2023"]])
TermOverlapP.valueAdjusted.P.valueOld.P.valueOld.Adjusted.P.valueOdds.RatioCombined.ScoreGenes
Mitochondrial Transcription (GO:0006390)3/120.00126850.71239250017.577061117.23788TFAM;POLRMT;TFB1M
Alpha-Amino Acid Metabolic Process (GO:1901605)4/290.00199370.7123925008.45283052.55773SRR;ALDH6A1;KMO;GNMT
Protein Transmembrane Import Into Intracellular Organelle (GO:0044743)4/320.00288820.7123925007.54601544.12249DNAJC19;TIMM44;TRIM37;PEX1
Neutrophil Degranulation (GO:0043312)2/50.00337740.71239250035.070599199.57464VAMP8;STXBP2
Medium-Chain Fatty Acid Biosynthetic Process (GO:0051792)2/50.00337740.71239250035.070599199.57464ABHD3;OXSM
Mitochondrial RNA Metabolic Process (GO:0000959)3/200.00588190.7123925009.30170847.77237TFAM;POLRMT;TFB1M

With background

You can now add background genes when usingenrichr().

# Load example backgrounddata(background)length(background)#> [1] 20625head(background)#> [1] "A1BG"     "A2M"      "NAT1"     "NAT2"     "SERPINA3" "AADAC"enriched2<- enrichr(input,dbs,background=background)#> Uploading data to Speedrichr...#>  - Your gene set... Done.#>  - Your background... Done.#> Getting enrichment results...#>  - GO_Molecular_Function_2023... Done.#>  - GO_Cellular_Component_2023... Done.#>  - GO_Biological_Process_2023... Done.#> Parsing results... Done.

Now view the"GO_Biological_Process_2023" results from theenriched2object.

head(enriched2[["GO_Biological_Process_2023"]])
TermRankP.valueAdjusted.P.valueOld.P.valueOld.Adjusted.P.valueOdds.RatioCombined.ScoreGenes
Mitochondrial Transcription (GO:0006390)10.00037110.2405150027.116000214.19193TFAM;POLRMT;TFB1M
Alpha-Amino Acid Metabolic Process (GO:1901605)20.00041450.2405150013.057671101.69976SRR;ALDH6A1;KMO;GNMT
Protein Transmembrane Import Into Intracellular Organelle (GO:0044743)30.00060970.2405150011.65691386.29136DNAJC19;TIMM44;TRIM37;PEX1
Monocarboxylic Acid Biosynthetic Process (GO:0072330)40.00121760.240515006.81653245.74506ALDH1A3;SRR;SCP2;OXSM;MCAT
Neutrophil Degranulation (GO:0043312)50.00146630.2405150054.031872352.55862VAMP8;STXBP2
Medium-Chain Fatty Acid Biosynthetic Process (GO:0051792)60.00146630.2405150054.031872352.55862ABHD3;OXSM

By default, the results table from analysis with a background does nothave the ‘Overlap’ column. We can calculate the annotated genes in eachterm from GMT files and replace the ‘Rank’ column with ‘Overlap’ bysettinginclude_overlap = TRUE.

enriched3<- enrichr(input,dbs,background=background,include_overlap=TRUE)#> Uploading data to Speedrichr...#>  - Your gene set... Done.#>  - Your background... Done.#> Getting enrichment results...#>  - GO_Molecular_Function_2023... Done.#>    - Download GMT file... Done.#>  - GO_Cellular_Component_2023... Done.#>    - Download GMT file... Done.#>  - GO_Biological_Process_2023... Done.#>    - Download GMT file... Done.#> Parsing results... Done.

Now view the"GO_Biological_Process_2023" results from theenriched3object.

head(enriched3[["GO_Biological_Process_2023"]])
TermOverlapP.valueAdjusted.P.valueOld.P.valueOld.Adjusted.P.valueOdds.RatioCombined.ScoreGenes
Mitochondrial Transcription (GO:0006390)3/120.00037110.2405150027.116000214.19193TFAM;POLRMT;TFB1M
Alpha-Amino Acid Metabolic Process (GO:1901605)4/290.00041450.2405150013.057671101.69976SRR;ALDH6A1;KMO;GNMT
Protein Transmembrane Import Into Intracellular Organelle (GO:0044743)4/320.00060970.2405150011.65691386.29136DNAJC19;TIMM44;TRIM37;PEX1
Monocarboxylic Acid Biosynthetic Process (GO:0072330)5/650.00121760.240515006.81653245.74506ALDH1A3;SRR;SCP2;OXSM;MCAT
Neutrophil Degranulation (GO:0043312)2/50.00146630.2405150054.031872352.55862VAMP8;STXBP2
Medium-Chain Fatty Acid Biosynthetic Process (GO:0051792)2/50.00146630.2405150054.031872352.55862ABHD3;OXSM

Visualise results

Plot the"GO_Biological_Process_2023" results. (Plotting functioncontributed by I-Hsuan Lin)

plotEnrich(enriched[["GO_Biological_Process_2023"]],showTerms=20,numChar=40,y="Count",orderBy="P.value")

Export results

Export Enrichr results as text or Excel files. By default(i.e. outFile = "txt"), the results from all the selected databasesare saved into individual text files. When usingoutFile = "excel",the results are saved into worksheets in a single Excel 2007 (XLSX)file. (Print function contributed by I-Hsuan Lin and Kai Hu)

# To text filesprintEnrich(enriched)# To ExcelprintEnrich(enriched,outFile="excel")

UsingenrichR behind a proxy

If your computer is behind an HTTP or HTTPS proxy, you can set the RCurlProxy options explicitly usingRCurlOptions and enrichR will use theprovided settings to connect to the Enrichr database viahttr::use_proxy().

For example:

options(RCurlOptions=list(proxy='http://ip_or_url',proxyusername='myuser',proxypassword='mypwd',proxyport='port_num',proxyauth='basic'))

References

Kuleshov, Maxim V., Matthew R. Jones, Andrew D. Rouillard, Nicolas F.Fernandez, Qiaonan Duan, Zichen Wang, Simon Koplev, et al. 2016.“Enrichr: A Comprehensive Gene Set Enrichment Analysis Web Server 2016Update.”Nucleic Acids Res 44 (Web Server issue): W90–97.https://doi.org/10.1093/nar/gkw377.

About

An R interface to enrichR

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors7

Languages


[8]ページ先頭

©2009-2025 Movatter.jp