<p>You requested a tool similar to <a href="http://pantherdb.org/" rel="nofollow noreferrer">PANTHER</a> but in R. First, the PANTHER (Protein ANalysis THrough Evolutionary Relationships) tool does a classification  based on evolutionarily related proteins, gene ontologies ( molecular function, and biological process) and pathways.</p>

<p>AFAIK there isn't a tool in R that integrates all these into one, but several packages do pieces of it. However, my observations after using it a couple of times is that is based a lot in gene ontologies. Gene Ontologies (GO) are not pathways, but the best tool I found for GO are <a href="http://bioconductor.org/packages/topGO" rel="nofollow noreferrer">topGO</a> (A bit hard to use but useful to get insights on the biology) which test over representations of a term in a given list. </p>

CC BY-SA 3.0
2017-06-13T15:23:02.040Z
2018-01-11T07:45:34.283Z
2018-01-11T07:45:34.283Z
llrs
<p>N.B., I'm avoiding discussion of "best", since that's more or less impossible to answer.</p>

<p>Your question can actually be divided into two:</p>

<ol>
<li>What's a good tool for pathways analysis (ideally in R)?</li>
<li>What are good sources of pathway information?</li>
</ol>

<p>For (1), there are a few different possibilities, but I prefer either roast or camera from limma or goseq (a stand-alone bioconductor package). Of those, I expect what roast or goseq are doing are the most similar to what panther is doing in the sense that they're not competitive. However, since genes do correlate with each other, I prefer competitive tests like that offered by camera.</p>

<p>For (2), your options are basically <a href="http://bioconductor.org/packages/release/data/annotation/html/KEGG.db.html" rel="noreferrer">KEGG</a> or <a href="http://bioconductor.org/packages/release/data/annotation/html/KEGG.db.html" rel="noreferrer">reactome</a>. KEGG is problematic, since you need a license for anything remotely recent (there are some R packages to get around this, but I haven't a clue how kosher they are legally). Given that, reactome might be your best bet.</p>

<p>Having written all of that, the best database out there is what <a href="https://www.qiagenbioinformatics.com/products/ingenuity-pathway-analysis/" rel="noreferrer">IPA</a> uses. This is a commercial product (I have no affiliation), but you can get a demo license that will work for a couple weeks at least. If you're doing analyses relatively often then it makes sense to spend a bit of cash on a license (maybe share with neighboring groups).</p>

<p>Regardless of what you use, you might also want to use <a href="https://bioconductor.org/packages/release/bioc/html/pathview.html" rel="noreferrer">pathview</a>, which can produce easily interpretable plots related to pathway enrichment.</p>

CC BY-SA 3.0
2018-01-11T08:27:38.430Z
I kindly disagree with IPA being best (I thought you wanted to avoid 'best' in your answer). IPA is commercial and is not transparent, but a black box. You have to trust that the company did a good job making this database behind scenes, which is not really how science should be. Just my thoughts.
benn
CC BY-SA 3.0
2017-06-12T21:52:41.197Z
2017-06-12T21:52:41.197Z
Devon Ryan
<p>I would go for the topGO package. The logical steps in your pipeline would be:</p>

<p>1) Build a matrix with the following variables:</p>

<p>|gene_ID|GO_ID|GO_term_description|
You can enter a list of uniprot IDs to uniprotkb and retrieve the GO annotations for each gene in your list/file</p>

<p>2) filter that list for the genes that were captured in your differential expression analysis even tho they are not differentially expressed. This filter is defined by DESeq/Sleuth by "at least 4 read counts in at least 49% of the libraries"</p>

<p>3)Define this gene list as gene_universe</p>

<p>4) define your gene set and get the gene_IDs and if possible, also a ranked score (p-val/FDR) of the genes you are interested in</p>

<p>5) plot the graphs and get tables of enriched GO terms (these would be ranked by p-value without need of performing correction analysis</p>

<p>Note: you are going to need some data manipulation functions; I would read the "tidyverse" documentation</p>

CC BY-SA 4.0
2018-05-03T22:28:29.710Z
2018-05-03T22:28:29.710Z
Erik
<p>From an RNA-seq experiment I have about 17000 gene ids for 2 sample conditions arranged according to their log2 fold changes when compared to a control. I need to annotate these, but I've never done annotation before and am wondering how to do this in R.</p>

<p>I'm interested in up and down regulation of the pathways of the involved genes. I'd love to get enrichment and p-value analysis too. I'm interested in whether or not a package similar to PANTHER exists in R for this analysis. I've been reading how different annotation programs can be better or worse; it seems PANTHER is much better than DAVID, so I was wondering if there is a package that provides PANTHER-like analyses in R.</p>

<p>There seems to be multiple packages available, are there any that stand out as being the best?</p>

<p>I'm primarily interested in human samples and annotated pathways.</p>

CC BY-SA 3.0
2017-06-12T19:02:45.517Z
I've updated your question with that information. What gene IDs do you currently have (e.g., Ensembl, refseq, etc.)?
Devon Ryan
CC BY-SA 3.0
2017-06-12T19:31:59.533Z
How do you define best? What do you want to know, the genes that are coordinated, the pathways that are down-regulated or up-regulated? You want a GSEA single-sample or whole sample, competitive or non-competitive? For me this question is like I have a list of number I want to do some operation to get the most important ones, which method is available?
llrs
CC BY-SA 3.0
2017-06-13T06:55:48.117Z
@J0HN_TIT0R to answer a commenter use @ nickname. Please [edit] the question to include this new information.
llrs
CC BY-SA 3.0
2017-06-13T15:41:07.237Z
As it stands, this question is not answerable. @J0HN_TIT0R you don't provide enough background information as to *which function* you are interested in and why.: this very much decides which enrichment and enrichment tool we can recommend. Also, questions about "the best tool" are discouraged on SE because they are primarily opinion-based.
Michael Schubert
<r><sequence-annotation>
How to perform functional analysis on a gene list in R?
# How to perform functional analysis on a gene list in R?

(Asked by: username_0 on 2017-06-12)

From an RNA-seq experiment I have about 17000 gene ids for 2 sample conditions arranged according to their log2 fold changes when compared to a control. I need to annotate these, but I've never done annotation before and am wondering how to do this in R.

I'm interested in up and down regulation of the pathways of the involved genes. I'd love to get enrichment and p-value analysis too. I'm interested in whether or not a package similar to PANTHER exists in R for this analysis. I've been reading how different annotation programs can be better or worse; it seems PANTHER is much better than DAVID, so I was wondering if there is a package that provides PANTHER-like analyses in R.

There seems to be multiple packages available, are there any that stand out as being the best?

I'm primarily interested in human samples and annotated pathways.

**Tags:** r, sequence-annotation
> **Comments:**
> **username_1**: I've updated your question with that information. What gene IDs do you currently have (e.g., Ensembl, refseq, etc.)?  
> **username_2**: How do you define best? What do you want to know, the genes that are coordinated, the pathways that are down-regulated or up-regulated? You want a GSEA single-sample or whole sample, competitive or non-competitive? For me this question is like I have a list of number I want to do some operation to get the most important ones, which method is available?  
> **username_2**: @J0HN_TIT0R to answer a commenter use @ nickname. Please [edit] the question to include this new information.  
> **username_3**: As it stands, this question is not answerable. @J0HN_TIT0R you don't provide enough background information as to *which function* you are interested in and why.: this very much decides which enrichment and enrichment tool we can recommend. Also, questions about "the best tool" are discouraged on SE because they are primarily opinion-based.  

---

## 3 answers

### Answer by username_1 on 2017-06-12. Score: 7

N.B., I'm avoiding discussion of "best", since that's more or less impossible to answer.

Your question can actually be divided into two:

1. What's a good tool for pathways analysis (ideally in R)?
2. What are good sources of pathway information?

For (1), there are a few different possibilities, but I prefer either roast or camera from limma or goseq (a stand-alone bioconductor package). Of those, I expect what roast or goseq are doing are the most similar to what panther is doing in the sense that they're not competitive. However, since genes do correlate with each other, I prefer competitive tests like that offered by camera.

For (2), your options are basically [KEGG](http://bioconductor.org/packages/release/data/annotation/html/KEGG.db.html) or [reactome](http://bioconductor.org/packages/release/data/annotation/html/KEGG.db.html). KEGG is problematic, since you need a license for anything remotely recent (there are some R packages to get around this, but I haven't a clue how kosher they are legally). Given that, reactome might be your best bet.

Having written all of that, the best database out there is what [IPA](https://www.qiagenbioinformatics.com/products/ingenuity-pathway-analysis/) uses. This is a commercial product (I have no affiliation), but you can get a demo license that will work for a couple weeks at least. If you're doing analyses relatively often then it makes sense to spend a bit of cash on a license (maybe share with neighboring groups).

Regardless of what you use, you might also want to use [pathview](https://bioconductor.org/packages/release/bioc/html/pathview.html), which can produce easily interpretable plots related to pathway enrichment.

> **Comments:**
> **username_4**: I kindly disagree with IPA being best (I thought you wanted to avoid 'best' in your answer). IPA is commercial and is not transparent, but a black box. You have to trust that the company did a good job making this database behind scenes, which is not really how science should be. Just my thoughts.  

---

### Answer by username_2 on 2017-06-13. Score: 4

You requested a tool similar to [PANTHER](http://pantherdb.org/) but in R. First, the PANTHER (Protein ANalysis THrough Evolutionary Relationships) tool does a classification based on evolutionarily related proteins, gene ontologies ( molecular function, and biological process) and pathways.

AFAIK there isn't a tool in R that integrates all these into one, but several packages do pieces of it. However, my observations after using it a couple of times is that is based a lot in gene ontologies. Gene Ontologies (GO) are not pathways, but the best tool I found for GO are [topGO](http://bioconductor.org/packages/topGO) (A bit hard to use but useful to get insights on the biology) which test over representations of a term in a given list.


---

### Answer by username_5 on 2018-05-03. Score: 1

I would go for the topGO package. The logical steps in your pipeline would be:

1) Build a matrix with the following variables:

|gene\_ID|GO\_ID|GO\_term\_description|
You can enter a list of uniprot IDs to uniprotkb and retrieve the GO annotations for each gene in your list/file

2) filter that list for the genes that were captured in your differential expression analysis even tho they are not differentially expressed. This filter is defined by DESeq/Sleuth by "at least 4 read counts in at least 49% of the libraries"

3)Define this gene list as gene\_universe

4) define your gene set and get the gene\_IDs and if possible, also a ranked score (p-val/FDR) of the genes you are interested in

5) plot the graphs and get tables of enriched GO terms (these would be ranked by p-value without need of performing correction analysis

Note: you are going to need some data manipulation functions; I would read the "tidyverse" documentation


---

