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.

  • $\begingroup$ I've updated your question with that information. What gene IDs do you currently have (e.g., Ensembl, refseq, etc.)? $\endgroup$
    – Devon Ryan
    Commented Jun 12, 2017 at 19:02
  • $\begingroup$ 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? $\endgroup$
    – llrs
    Commented Jun 12, 2017 at 19:31
  • $\begingroup$ @J0HN_TIT0R to answer a commenter use @ nickname. Please edit the question to include this new information. $\endgroup$
    – llrs
    Commented Jun 13, 2017 at 6:55
  • $\begingroup$ 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. $\endgroup$ Commented Jun 13, 2017 at 15:41

3 Answers 3


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 or reactome. 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 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, which can produce easily interpretable plots related to pathway enrichment.

  • 2
    $\begingroup$ 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. $\endgroup$
    – benn
    Commented Jan 11, 2018 at 8:27

You requested a tool similar to PANTHER 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 (A bit hard to use but useful to get insights on the biology) which test over representations of a term in a given list.


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.