Entering edit mode
prp291
•
0
@prp291-9622
Last seen 6.8 years ago
I am trying to use clusterprofiler to enrich the pathways in my datasets. But I am getting the error "No gene can be mapped". Any insight will be really helpful. Thanks
> require(clusterProfiler) Loading required package: clusterProfiler Loading required package: DOSE > rawdata<- read.delim("tobacco",header=TRUE,check.names=FALSE) > head(rawdata) Pathway Gene 1 map00010 K00001 2 map00010 K00016 3 map00010 K00121 4 map00010 K00128 5 map00010 K00131 6 map00010 K00134 > deg<- read.delim("deg",header=FALSE) > head(deg) V1 1 K00001 2 K00016 3 K00121 4 K00128 5 K00131 6 K00134 > disease2gene=rawdata[, c("Pathway","Gene")] > x = enricher(deg, TERM2GENE=disease2gene) No gene can be mapped.... --> return NULL...
Thanks for your answer. I have already pointed out the problem and changed it with package varhandle. But your solution is more elegant. :)
hello,
I am also getting same error.
Can you please explain how to resolve?
>kegg_enrich <- enrichKEGG(gene = names(log_counts),
+ organism = 'uma')
No gene can be mapped....
--> Expected input gene ID: UMAG_02508,UMAG_04159,UMAG_03306,UMAG_05130,UMAG_04797,UMAG_01604--> return NULL..
>head(log_counts)
axenic_1 axenic_2 axenic_3 hpi12_1 hpi12_2 hpi12_3 hpi24_1 hpi24_2 hpi24_3 dpi2_1
UMAG_00001 11.00352 9.459432 9.350939 4.247928 4.321928 4.857981 4.459432 4.584963 4.643856 4.087463
UMAG_00002 11.65553 11.663558 11.904258 4.807355 5.044394 5.857981 4.700440 3.700440 4.247928 6.491853
UMAG_00003 11.15102 10.675957 10.954196 5.700440 5.781360 5.832890 5.426265 5.000000 5.321928 6.584963
UMAG_00005 11.91064 11.043711 12.130249 8.164907 7.800900 9.169925 7.459432 7.434628 7.982994 9.027906
UMAG_00006 11.41574 11.131857 10.406205 4.954196 5.357552 5.727920 5.209453 4.000000 4.754888 5.459432
UMAG_00007 12.07180 11.971184 12.109831 5.700440 5.129283 5.727920 5.044394 4.754888 4.906891 6.491853
dpi2_2 dpi2_3 dpi4_1 dpi4_2 dpi4_3 dpi6_1 dpi6_2 dpi6_3 dpi8_1
UMAG_00001 4.247928 3.459432 4.087463 4.247928 4.754888 5.169925 5.554589 5.392317 5.169925
UMAG_00002 6.794416 6.209453 5.882643 5.832890 5.807355 7.076816 7.066089 7.129283 6.727920
UMAG_00003 6.870365 6.700440 6.357552 6.426265 6.357552 7.257388 7.321928 7.022368 7.044394
UMAG_00005 8.744834 8.353147 10.250298 9.917372 9.965784 11.469133 11.467606 11.639793 11.651500
UMAG_00006 5.554589 5.491853 5.523562 5.584963 5.491853 6.857981 6.459432 6.658211 6.357552
UMAG_00007 6.491853 6.247928 5.169925 5.285402 5.169925 6.442943 6.189825 6.228819 5.523562
dpi8_2 dpi8_3 dpi12_1 dpi12_2 dpi12_3
UMAG_00001 5.832890 5.930737 6.672425 6.228819 7.139551
UMAG_00002 7.139551 6.554589 7.409391 6.870365 8.471675
UMAG_00003 7.826548 6.965784 7.876517 7.665336 8.682995
UMAG_00005 12.395802 11.747773 12.177420 12.038576 12.241089
UMAG_00006 7.285402 6.442943 7.787903 7.475733 8.262095
UMAG_00007 6.285402 5.614710 7.303781 7.348728 8.280771
description symbol entrez
UMAG_00001 hypothetical protein UMAG_00001 23561423
UMAG_00002 hypothetical protein UMAG_00002 23561424
UMAG_00003 hypothetical protein UMAG_00003 23561425
UMAG_00005 putative Benzoate 4-monooxygenase cytochrome P450 UMAG_00005 23561426
UMAG_00006 hypothetical protein UMAG_00006 23561427
UMAG_00007 hypothetical protein UMAG_00007 23561428
Your code is working for me. I used as input the 12 UMA IDs above.
Although not directly related to the problem your reported, please note that the function
enrichKEGG()
is used to check which KEGG pathways are over-represented in a list of selected genes, e.g. identified by an differential gene expression analysis. In other words, you should NOT 'feed' it your whole data set as you do in your code, but only a subset (e.g. the significant ones). If needed, you can use all genes in your data set to define the background genes (using the argumentuniverse
).Thanks, it worked for me too.