Entering edit mode
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
The error suggests that your OrgDb
org.Aaltissimus.eg.db
doesn't contain a 'key' namedGOALL
.Does
keytypes(org.Aaltissimus.eg.db)
return such column? Like the 13th column when using the human database?<<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, thusont="ALL"
?!I tried it and it returns as bellow:
is it right?
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 ?
For the archive: 'self-made'
OrgDbs
do apparently not contain theGOALL
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 functionenricher()
).I tried it and it returns as bellow:
is it right?
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) yourkeytypes
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 thekeytypes
. It is OK to link to this thread to provide further context. Be sure to post all code you applied to create theOrgDb
, 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 thatclusterProfiler
includes a generic function for GO category over-representation analysis, namedenricher()
. This functionenricher()
uses as input adata.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 functionbuildGOmap()
(to infer indirect annotations) before using it withenricher()
. Also adata.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; objectsGO.annotation
andGO.df
.OKļ¼thanks very much, i will try it again
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
...and, the KEGG enrichment works normally.