error running enricher from clusterprofiler
1
0
Entering edit mode
Yael • 0
@ccb6ce01
Last seen 11 days ago
Israel

Hi, im trying to run enricher() from clusterprofiler and in getting an error "--> No gene can be mapped.... --> Expected input gene ID: GO:0002831,GO:0045184,GO:1901698,GO:0007017,GO:0017076,GO:0033365 --> return NULL..."

this is the code im using and my data.tables:


enrichment_results <- enricher(
  gene = gene_list_inv,
  TERM2GENE = genes2go,
  TERM2NAME = NULL,
  universe = NULL,  # Optionally specify the universe of genes if not using the entire genome
  pvalueCutoff = 0.05,
  pAdjustMethod = "BH")

sessionInfo( )

> enrichment_results <- enricher(
+   gene = gene_list_inv,
+   TERM2GENE = genes2go_2,
+   TERM2NAME = NULL,
+   universe = NULL,  # Optionally specify the universe of genes if not using the entire genome
+   pvalueCutoff = 0.05,
+   pAdjustMethod = "BH"
+ )
--> No gene can be mapped....
--> Expected input gene ID: GO:0002831,GO:0045184,GO:1901698,GO:0007017,GO:0017076,GO:0033365
--> return NULL...

these are the input data.tables:

> print(gene_list_inv)
             GID
          <char>
 1: LOC119360363
 2: LOC119360381
 3: LOC119361995
 4: LOC119361997
 5: LOC119362003
 6: LOC119362007
 7: LOC119362023
 8: LOC119367010
 9: LOC119367016
10: LOC119367018
11: LOC119367024
12: LOC119367043
13: LOC119367043
> print(genes2go_2)
                  GID         GO
               <char>     <char>
      1: LOC119357312 GO:0043229
      2: LOC119357312 GO:0005198
      3: LOC119357312 GO:0044434
      4: LOC119357312 GO:0043226
      5: LOC119357312 GO:0044238
     ---                        
2003725: LOC119348655 GO:0072593
2003726: LOC119348655 GO:0097159
2003727: LOC119348655 GO:0048037
2003728: LOC119348655 GO:0055114
2003729: LOC119348655 GO:0016684

the genes in gene_list_inv do appear in the genes2go_2, there are no space characters either...

can anyone assist?

Thanks

clusterProfiler cluster • 199 views
ADD COMMENT
0
Entering edit mode
Guido Hooiveld ★ 4.0k
@guido-hooiveld-2020
Last seen 2 days ago
Wageningen University, Wageningen, the …

You should swap the column order in your genes2go_2 data frame; first column should be the GOID (your column GO), the second should be the gene id (your column GID).

Thus: TERM2GENE = genes2go_2[ ,c(2,1) ]

ADD COMMENT
0
Entering edit mode

Thanks Guido, I tried that too, unfortunately it still isn't working

ADD REPLY
0
Entering edit mode

It does for me! Please check that the inputs are in the proper format!

Note that when creating the gene2go input I incorrectly assigned the first 2 genes in your input list gene_list_inv to the genes2go data frame (so that some input genes have a GO annotation). Still an error is reported, but that has to do with the very limited sized input I used (and not with the input not being recognized).

> library(clusterProfiler)
> 
> gene_list_inv <- c("LOC119360363","LOC119360381","LOC119361995","LOC119361997","LOC119362003","LOC119362007","LOC119362023",
+                     "LOC119367010","LOC119367016","LOC119367018","LOC119367024","LOC119367043","LOC119367043")
> 
> ## make FAKE gene-to=GO mapping; use 1st two input LOCs
> genes2go <- data.frame("GID" = c("LOC119360363","LOC119360363","LOC119360363","LOC119360363","LOC119360363",
+                                  "LOC119360381","LOC119360381","LOC119360381","LOC119360381","LOC119360381"),
+                        "GO" = c("GO:0043229","GO:0005198","GO:0044434","GO:0043226","GO:0044238",
+                                 "GO:0072593","GO:0097159","GO:0048037","GO:0055114","GO:0016684") )
> 
>                                 
> enrichment_results <- enricher(
+   gene = gene_list_inv,
+   TERM2GENE = genes2go[ ,c(2,1)],
+   TERM2NAME = NULL,
+   universe = NULL, 
+   pvalueCutoff = 0.05,
+   pAdjustMethod = "BH")
No gene sets have size between 10 and 500 ...
--> return NULL...
>
ADD REPLY
0
Entering edit mode

It worked!!! Thanks alot, i think something in the gene_list wasnt right...

Thanks agian

ADD REPLY

Login before adding your answer.

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