ClusterProfiler - How to : input file, groupGo, enrichGo
1
0
Entering edit mode
Mataivic • 0
@mataivic-12506
Last seen 6.8 years ago

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 !

 

clusterprofiler input files error help • 5.8k views
ADD COMMENT
0
Entering edit mode

The last error tells you to use ENTREZID, so convert your ensemble gene annotation to ENTREZIDs first (see manual, like Guangchuang Yu said already).

ADD REPLY
1
Entering edit mode

ENSEMBL ID is also supported if user specify keytype = 'ENSEMBL', which is documented in vignette.

Vignette already answered all the issues posted here.

ADD REPLY
0
Entering edit mode

Great! I wasn't aware of the keytype argument, yet!

ADD REPLY
0
Entering edit mode
Guangchuang Yu ★ 1.2k
@guangchuang-yu-5419
Last seen 5 days ago
China/Guangzhou/Southern Medical Univer…

First of all, you are using an out-dated version of clusterProfiler, see the output of rvcheck::check_bioc('clusterProfiler').

You need to upgrade it to latest release version.

Please read the vignette of latest release version, you will find the answer of your question.

ADD COMMENT

Login before adding your answer.

Traffic: 781 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