Hello everybody,
I am a student currenty trying to learn how to use clusterProfiler. I figured out a few things but I still have many issues, (I apologize, I know that usually its' better to ask only one question), since I also have a lack of knowledge in this field of biology.
First, I am not sure about the format of the input file : I'm trying with a txt file shaped like this :
Ensembl_Gene_ID Gene_Symbol log2FC_DeSeq p_DeSeq padj_DeSeq
ENSG00000090339 ICAM1 6,5146051234 0 0
ENSG00000108691 CCL2 6,3686974669 0 0
ENSG00000118503 TNFAIP3 4,142184042 0 0
etc...
I'm still not sure if I'm using the good table of data, because the groupGo and enrichGo functions do not work.
I did :
data <- read.table("human_retine.txt", header=TRUE, dec=",") # Gene Ontology classification genes <- data$Ensembl_Gene_ID genes <- as.character(genes) ggo <- groupGO(gene = genes, organism = "human", ont = "BP", level = 3, readable = TRUE) # Enrich GO genes<-data$Ensembl_Gene_ID[abs(data$log2FC_DeSeq)>2] ego <- enrichGO(genes , organism= "human", ont= "CC", pAdjustMethod="BH", pvalueCutoff=0.1, qvalueCutoff=0.5, readable= TRUE)
First, I had the following error when launching groupGo :
Error in validObject(.Object) : invalid class “groupGOResult” object: invalid object for slot "gene" in class "groupGOResult": got class "factor", should be or extend class "character"
So I add the as.character line, which gave me :
Error in .testForValidKeys(x, keys, keytype) : None of the keys entered are valid keys for 'ENTREZID'. Please use the keys method to see a listing of valid arguments.
Then, when I launch enrichGo, the result is [NA], wheter or not the as.character function has been called.
So, it is really messy for me ... what am I doing wrong ? I am reading the docs but I don't understand all of it.
Thanks !
The last error tells you to use ENTREZID, so convert your ensemble gene annotation to ENTREZIDs first (see manual, like Guangchuang Yu said already).
ENSEMBL
ID is also supported if user specifykeytype = 'ENSEMBL'
, which is documented in vignette.Vignette already answered all the issues posted here.
Great! I wasn't aware of the keytype argument, yet!