clusterProfiler-GO enrichment Error
0
0
Entering edit mode
SongW • 0
@b27e9125
Last seen 2.0 years ago
China

hello, i have manually made a non-model plant orgdb library using the package AnnotationForge, and when i enrich the GO annotation there is an error as bellow: Error in testForValidKeytype(x, keytype) : Invalid keytype: GOALL. Please use the keytypes method to see a listing of valid arguments.

here are my codes: '''ego <- enrichGO(gene = gene_list,
keyType = "GID",
OrgDb = org.Aaltissimus.eg.db,
ont = "all",
pvalueCutoff = 1,
qvalueCutoff = 1,
readable = FALSE)'''

thanks for your apply

Aaltissimus • 2.8k views
ADD COMMENT
0
Entering edit mode

The error suggests that your OrgDb org.Aaltissimus.eg.db doesn't contain a 'key' named GOALL.

Does keytypes(org.Aaltissimus.eg.db) return such column? Like the 13th column when using the human database?

> library(org.Hs.eg.db)
> keytypes(org.Hs.eg.db)
 [1] "ACCNUM"       "ALIAS"        "ENSEMBL"      "ENSEMBLPROT"  "ENSEMBLTRANS"
 [6] "ENTREZID"     "ENZYME"       "EVIDENCE"     "EVIDENCEALL"  "GENENAME"    
[11] "GENETYPE"     "GO"           "GOALL"        "IPI"          "MAP"         
[16] "OMIM"         "ONTOLOGY"     "ONTOLOGYALL"  "PATH"         "PFAM"        
[21] "PMID"         "PROSITE"      "REFSEQ"       "SYMBOL"       "UCSCKG"      
[26] "UNIPROT"     
>

<<added>>

... and does it work when you analyze a subset of the GO ontologies, e.g. ont="MF"?

Also, according to the help pages, all should be in capitals, thus ont="ALL"?!

ADD REPLY
0
Entering edit mode

I tried it and it returns as bellow:

keytypes(org.Aaltissimus.eg.db) [1] "EVIDENCE" "GENENAME" "GID" "GO" "Ko" "Pathway"

is it right?

ADD REPLY
0
Entering edit mode

Clearly no, because as suggested by Guido you need a keytype "GOALL" in your database. Which one should correspond to this in your custom keytypes ?

ADD REPLY
0
Entering edit mode

For the archive: 'self-made' OrgDbs do apparently not contain the GOALL column (see: Use of clusterProfiler : Error in testForValidKeytype(x, keytype)), but 'option 2' in my answer below will allow you to perform GO overrepresentation analyses (thus using the generic function enricher()).

ADD REPLY
0
Entering edit mode

I tried it and it returns as bellow:

keytypes(org.Aaltissimus.eg.db) [1] "EVIDENCE" "GENENAME" "GID" "GO" "Ko" "Pathway"

is it right?

ADD REPLY
0
Entering edit mode

No, as Basti also indicated, this shows that your OrgDb isn't either containing the required information, or it does but then (the names of) your keytypes don't match with what is expected.

I would like to suggest 2 options:

1): open a new post in which you focus on the creation of the OrgDb, and that you experience problems with the keytypes. It is OK to link to this thread to provide further context. Be sure to post all code you applied to create the OrgDb, and also provide insights on the exact contents of the input files you used (and how these were made/obtained from. --> I assume you work with this species: Artocarpus altissimus?? According to the NCBI it seems indeed no publicly available annotation info is available [Entrez records]).

2): Apparently you do have mappings between your gene ids and GO annotation information (otherwise you would not have been able to make an OrgDb...) .Please note that clusterProfiler includes a generic function for GO category over-representation analysis, named enricher(). This function enricher() uses as input a data.frame (consisting of 2 columns; TERM2GENE) in which the GOIDs (terms) are 'linked' to Gene IDs. See the section on 'Supported organisms' and/ or this chapter for more info. You likely will need to process your mapping by the function buildGOmap() (to infer indirect annotations) before using it with enricher(). Also a data.frame (TERM2NAME), that links the GOIDs with the term (and definition), may be useful (but AFAIK not required). In this context this post of mine may also be useful to check; objects GO.annotation and GO.df.

ADD REPLY
0
Entering edit mode

OKļ¼Œthanks very much, i will try it again

ADD REPLY
0
Entering edit mode

it doesn't work when i analyze a subset of the GO ontologies, when i use the single ont "MF", "CC" and "BP" and ont="ALL", it still doesn't work

ADD REPLY
0
Entering edit mode

...and, the KEGG enrichment works normally.

ADD REPLY

Login before adding your answer.

Traffic: 842 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6