Question: ClusterProfiler - How to : input file, groupGo, enrichGo
0
gravatar for Mataivic
2.7 years ago by
Mataivic0
Mataivic0 wrote:

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 !

 

ADD COMMENTlink modified 2.7 years ago by Guangchuang Yu1.1k • written 2.7 years ago by Mataivic0

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 REPLYlink written 2.7 years ago by b.nota340
1

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

Vignette already answered all the issues posted here.

ADD REPLYlink written 2.7 years ago by Guangchuang Yu1.1k

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

ADD REPLYlink written 2.7 years ago by b.nota340
Answer: ClusterProfiler - How to : input file, groupGo, enrichGo
0
gravatar for Guangchuang Yu
2.7 years ago by
Guangchuang Yu1.1k
China/Guangzhou/Southern Medical University
Guangchuang Yu1.1k wrote:

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 COMMENTlink written 2.7 years ago by Guangchuang Yu1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 270 users visited in the last hour