Error in enrichKEGG for a model organism
1
0
Entering edit mode
@dfb033f2
Last seen 10 months ago
Finland

Hello everyone! To gain familiarity with enrichment analysis, I'm using a model organism to understand how the packages work. Then, I'll be able to conduct analyses on my non-model organism, which presents various challenges, and for which I've opened another question.

Here the code, thank you!

> #read
de <- read.table('de.txt')
de
         V1
1    PA1148
2    PA2300
3    PA3408
4    PA2386
5    PA2377
6    PA0852
7    PA2397
8    PA4739
9    PA2427
10   PA4175
11   PA3406
12   PA2127
13   PA5482
14   PA3049
15   PA2069
16   PA3724
17   PA3924
18   PA3479
19   PA0707
20   PA2366
21   PA3519
22   PA1168
23   PA2384
24   PA2393
25   PA2939
26   PA2392
27   PA1245
28   PA1934
29   PA4222
30   PA2398
31   PA3923
32   PA0572
33   PA1249
34   PA3839
35   PA3405
36   PA2165
37   PA1169
38   PA2068
39   PA3337
40   PA4306
41   PA2761
42   PA0122
43   PA4141
44   PA2365
45   PA3570
46   PA2162
47   PA1874
48   PA0818
49   PA2160
50   PA3518
51   PA3018
52   PA4142
53   PA3478
54   PA4648
55   PA2413
56   PA4218
57  PA3574a
58   PA5481
59   PA2114
60   PA3784
61   PA1137
62   PA4348
63   PA3404
64   PA5058
65   PA4139
66   PA4231
67   PA1546
68   PA4467
69   PA2403
70   PA3407
71   PA1871
72   PA3860
73   PA3785
74   PA2385
75   PA2396
76   PA3369
77   PA5440
78   PA4181
79   PA3922
80   PA2184
81   PA0996
82   PA2747
83   PA3791
84   PA4918
85   PA2367
86   PA0997
87   PA1877
88   PA0527
89   PA2161
90   PA1869
91   PA0999
92   PA3930
93   PA2394
94   PA4364
95   PA4223
96   PA1673
97   PA3523
98   PA4224
99   PA2395
100  PA2369
101  PA3786
102  PA2411
103  PA1000
104  PA2753
105  PA2412
106  PA4143
107  PA3522
108  PA2425
109  PA5208
110  PA0252
111  PA0792
112  PA2151
113  PA2592
114  PA3913
115  PA2152
116  PA3600
117  PA4296
118  PA3361
119  PA2153
120 PA2312a
121  PA2478
122  PA2570
123  PA1001
124  PA2399
125  PA2553
126  PA2476
127  PA4621
128  PA2371
129  PA3613
130  PA2424
131  PA0049
132  PA4328
133  PA0050
134  PA4610
135  PA2164
136  PA4229
137  PA5150
138  PA4468
139  PA2116
140  PA3920
141  PA4140
142  PA2144
143  PA4197
144  PA2588
145  PA2390
146  PA4365
147  PA1130
148  PA1196
149  PA1914
150  PA4228
151  PA4225
152  PA1429
153  PA2163
154  PA0051
155  PA3370
156  PA4542
157  PA3601
158  PA3929
159  PA4577
160 SPA0117
161  PA2180
162  PA2404
163  PA3569
164  PA1248
165  PA1875
166  PA5219
167  PA1076
168  PA0024
> 
> #as.character
dec <- as.character(de)
dec
[1] "c(\"PA1148\", \"PA2300\", \"PA3408\", \"PA2386\", \"PA2377\", \"PA0852\", \"PA2397\", \"PA4739\", \"PA2427\", \"PA4175\", \"PA3406\", \"PA2127\", \"PA5482\", \"PA3049\", \"PA2069\", \"PA3724\", \"PA3924\", \"PA3479\", \"PA0707\", \"PA2366\", \"PA3519\", \"PA1168\", \"PA2384\", \"PA2393\", \"PA2939\", \"PA2392\", \"PA1245\", \"PA1934\", \"PA4222\", \"PA2398\", \"PA3923\", \"PA0572\", \"PA1249\", \"PA3839\", \"PA3405\", \"PA2165\", \"PA1169\", \"PA2068\", \"PA3337\", \"PA4306\", \"PA2761\", \"PA0122\", \"PA4141\", \"PA2365\", \"PA3570\", \"PA2162\", \"PA1874\", \"PA0818\", \"PA2160\", \"PA3518\", \n\"PA3018\", \"PA4142\", \"PA3478\", \"PA4648\", \"PA2413\", \"PA4218\", \"PA3574a\", \"PA5481\", \"PA2114\", \"PA3784\", \"PA1137\", \"PA4348\", \"PA3404\", \"PA5058\", \"PA4139\", \"PA4231\", \"PA1546\", \"PA4467\", \"PA2403\", \"PA3407\", \"PA1871\", \"PA3860\", \"PA3785\", \"PA2385\", \"PA2396\", \"PA3369\", \"PA5440\", \"PA4181\", \"PA3922\", \"PA2184\", \"PA0996\", \"PA2747\", \"PA3791\", \"PA4918\", \"PA2367\", \"PA0997\", \"PA1877\", \"PA0527\", \"PA2161\", \"PA1869\", \"PA0999\", \"PA3930\", \"PA2394\", \"PA4364\", \"PA4223\", \"PA1673\", \"PA3523\", \"PA4224\", \"PA2395\", \"PA2369\", \n\"PA3786\", \"PA2411\", \"PA1000\", \"PA2753\", \"PA2412\", \"PA4143\", \"PA3522\", \"PA2425\", \"PA5208\", \"PA0252\", \"PA0792\", \"PA2151\", \"PA2592\", \"PA3913\", \"PA2152\", \"PA3600\", \"PA4296\", \"PA3361\", \"PA2153\", \"PA2312a\", \"PA2478\", \"PA2570\", \"PA1001\", \"PA2399\", \"PA2553\", \"PA2476\", \"PA4621\", \"PA2371\", \"PA3613\", \"PA2424\", \"PA0049\", \"PA4328\", \"PA0050\", \"PA4610\", \"PA2164\", \"PA4229\", \"PA5150\", \"PA4468\", \"PA2116\", \"PA3920\", \"PA4140\", \"PA2144\", \"PA4197\", \"PA2588\", \"PA2390\", \"PA4365\", \"PA1130\", \"PA1196\", \"PA1914\", \"PA4228\", \n\"PA4225\", \"PA1429\", \"PA2163\", \"PA0051\", \"PA3370\", \"PA4542\", \"PA3601\", \"PA3929\", \"PA4577\", \"SPA0117\", \"PA2180\", \"PA2404\", \"PA3569\", \"PA1248\", \"PA1875\", \"PA5219\", \"PA1076\", \"PA0024\")"
> 
> #no symbols
> decs <- gsub("[\"\n]", "", dec)
> decs
[1] "c(PA1148, PA2300, PA3408, PA2386, PA2377, PA0852, PA2397, PA4739, PA2427, PA4175, PA3406, PA2127, PA5482, PA3049, PA2069, PA3724, PA3924, PA3479, PA0707, PA2366, PA3519, PA1168, PA2384, PA2393, PA2939, PA2392, PA1245, PA1934, PA4222, PA2398, PA3923, PA0572, PA1249, PA3839, PA3405, PA2165, PA1169, PA2068, PA3337, PA4306, PA2761, PA0122, PA4141, PA2365, PA3570, PA2162, PA1874, PA0818, PA2160, PA3518, PA3018, PA4142, PA3478, PA4648, PA2413, PA4218, PA3574a, PA5481, PA2114, PA3784, PA1137, PA4348, PA3404, PA5058, PA4139, PA4231, PA1546, PA4467, PA2403, PA3407, PA1871, PA3860, PA3785, PA2385, PA2396, PA3369, PA5440, PA4181, PA3922, PA2184, PA0996, PA2747, PA3791, PA4918, PA2367, PA0997, PA1877, PA0527, PA2161, PA1869, PA0999, PA3930, PA2394, PA4364, PA4223, PA1673, PA3523, PA4224, PA2395, PA2369, PA3786, PA2411, PA1000, PA2753, PA2412, PA4143, PA3522, PA2425, PA5208, PA0252, PA0792, PA2151, PA2592, PA3913, PA2152, PA3600, PA4296, PA3361, PA2153, PA2312a, PA2478, PA2570, PA1001, PA2399, PA2553, PA2476, PA4621, PA2371, PA3613, PA2424, PA0049, PA4328, PA0050, PA4610, PA2164, PA4229, PA5150, PA4468, PA2116, PA3920, PA4140, PA2144, PA4197, PA2588, PA2390, PA4365, PA1130, PA1196, PA1914, PA4228, PA4225, PA1429, PA2163, PA0051, PA3370, PA4542, PA3601, PA3929, PA4577, SPA0117, PA2180, PA2404, PA3569, PA1248, PA1875, PA5219, PA1076, PA0024)"
> #KEGG analysis
kk <- enrichKEGG(decs, organism="pae", pvalueCutoff=0.05, pAdjustMethod="BH", qvalueCutoff=0.1)
--> No gene can be mapped....
--> Expected input gene ID: PA3896,PA2323,PA3112,PA5453,PA2023,PA1609
--> return NULL...
enrichKEGG KEGGgraph KEGG • 501 views
ADD COMMENT
0
Entering edit mode

James showed you in his post below what format decs should be in order to have it compatible with enrichKEGG, so that question is 'formally' answered.

Based on your previous posts on the support forum it is clear you are struggling with performing GO or KEGG-based enrichment analysis on your list of identifiers. Yet, the only thing I/we know is that these ids are somehow related to the bug Acinetobacter baumannii, but what ids exactly your are working with is still unclear to me. So, I strongly encourage you to be more clear on what exactly you try to achieve! You would do this by describing what type of experiment you actually did (sequencing, proteomics, ...), how your processed the output, including which method and reference genome or proteome you used for that, and by showing a summary/list of (say) 15 real identifiers your are working with.

ADD REPLY
2
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

Your 'decs' object is a long string, rather than a long vector. You could instead do

dec <- scan("de.txt","c")

Which will result in something like

> dec
  [1] "PA1148"  "PA2300"  "PA3408"  "PA2386"  "PA2377"  "PA0852"  "PA2397"  "PA4739"  "PA2427"  "PA4175"  "PA3406" 
 [12] "PA2127"  "PA5482"  "PA3049"  "PA2069"  "PA3724"  "PA3924"  "PA3479"  "PA0707"  "PA2366"  "PA3519"  "PA1168" 
 [23] "PA2384"  "PA2393"  "PA2939"  "PA2392"  "PA1245"  "PA1934"  "PA4222"  "PA2398"  "PA3923"  "PA0572"  "PA1249" 
 [34] "PA3839"  "PA3405"  "PA2165"  "PA1169"  "PA2068"  "PA3337"  "PA4306"  "PA2761"  "PA0122"  "PA4141"  "PA2365" 
 [45] "PA3570"  "PA2162"  "PA1874"  "PA0818"  "PA2160"  "PA3518"  "PA3018"  "PA4142"  "PA3478"  "PA4648"  "PA2413" 
 [56] "PA4218"  "PA3574a" "PA5481"  "PA2114"  "PA3784"  "PA1137"  "PA4348"  "PA3404"  "PA5058"  "PA4139"  "PA4231" 
 [67] "PA1546"  "PA4467"  "PA2403"  "PA3407"  "PA1871"  "PA3860"  "PA3785"  "PA2385"  "PA2396"  "PA3369"  "PA5440" 
 [78] "PA4181"  "PA3922"  "PA2184"  "PA0996"  "PA2747"  "PA3791"  "PA4918"  "PA2367"  "PA0997"  "PA1877"  "PA0527" 
 [89] "PA2161"  "PA1869"  "PA0999"  "PA3930"  "PA2394"  "PA4364"  "PA4223"  "PA1673"  "PA3523"  "PA4224"  "PA2395" 
[100] "PA2369"  "PA3786"  "PA2411"  "PA1000"  "PA2753"  "PA2412"  "PA4143"  "PA3522"  "PA2425"  "PA5208"  "PA0252" 
[111] "PA0792"  "PA2151"  "PA2592"  "PA3913"  "PA2152"  "PA3600"  "PA4296"  "PA3361"  "PA2153"  "PA2312a" "PA2478" 
[122] "PA2570"  "PA1001"  "PA2399"  "PA2553"  "PA2476"  "PA4621"  "PA2371"  "PA3613"  "PA2424"  "PA0049"  "PA4328" 
[133] "PA0050"  "PA4610"  "PA2164"  "PA4229"  "PA5150"  "PA4468"  "PA2116"  "PA3920"  "PA4140"  "PA2144"  "PA4197" 
[144] "PA2588"  "PA2390"  "PA4365"  "PA1130"  "PA1196"  "PA1914"  "PA4228"  "PA4225"  "PA1429"  "PA2163"  "PA0051" 
[155] "PA3370"  "PA4542"  "PA3601"  "PA3929"  "PA4577"  "SPA0117" "PA2180"  "PA2404"  "PA3569"  "PA1248"  "PA1875" 
[166] "PA5219"  "PA1076"  "PA0024"

which is what you want. And then

> z <- enrichKEGG(dec, "pae")
Reading KEGG annotation online: "https://rest.kegg.jp/link/pae/pathway"...
Reading KEGG annotation online: "https://rest.kegg.jp/list/pathway/pae"...

It works as expected.

ADD COMMENT

Login before adding your answer.

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