ClusterProfiler - How to : input file, groupGo, enrichGo
Entering edit mode
Mataivic • 0
Last seen 4.3 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


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
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 • 3.4k views
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).

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.

Entering edit mode

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

Entering edit mode
Guangchuang Yu ★ 1.2k
Last seen 7 months 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.


Login before adding your answer.

Traffic: 483 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6