Answers.Body: <p>You can use the KEGG API:</p>
  <pre><code>ko_list=&quot;ko00010 ko00030 ko00061 ko00120 ko00121
           ko00190 ko00195 ko00230 ko00250 ko00253
           ko00270 ko00300 ko00330 ko00400 ko00401
           ko00410 ko00430 ko00450 ko00460 ko00471
           ko00472 ko00500 ko00511 ko00520 ko00521
           ko00523 ko00531 ko00550 ko00562 ko00604
           ko00620 ko00625 ko00640&quot;
  
  for i in <span class="math-container">${ko_list}
  do
      hit=$</span>(curl -# http://rest.kegg.jp/list/pathway | grep -w &quot;<span class="math-container">${i/ko/map}")
      echo -e "$</span>{i}\t${hit}&quot; | cut -f1,3 &gt;&gt; ko_pathways.txt
  done
  </code></pre>
  <p>Or if your list is too long you can change the input and use a file with a list of ids.</p>
  <pre><code>while read line
  do
      hit=<span class="math-container">$(curl -# http://rest.kegg.jp/list/pathway | grep -w "$</span>{line/ko/map}&quot;)
      echo -e &quot;<span class="math-container">${line}\t$</span>{hit}&quot; | cut -f1,3 &gt;&gt; ko_pathways.txt
  done &lt; ko_list.txt
  </code></pre>
  <p>The result will be something like:</p>
  <pre><code> ko00010    Glycolysis / Gluconeogenesis
   ko00030    Pentose phosphate pathway
   ko00061    Fatty acid biosynthesis
   ko00120    Primary bile acid biosynthesis
   ko00121    Secondary bile acid biosynthesis
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-11T15:55:52.133Z
Answers.Text: Thanks a lot Zorbax, for your answer. It works. Besides that, is there any web server or something that can be used? Just wanted to know.
Answers.UserDisplayName: deep771992
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-14T11:10:25.227Z
Answers.Text: Hi Zorbax, I have a similar query. Is there a similar way I can use to get KEGG Module names from a list of Module IDs (e.g. M00002)? Many thanks
Answers.UserDisplayName: deep771992
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-14T11:18:25.427Z
Answers.Text: I don't know anything about a web server. And yes, to your second question, I think you can use the API request for the `module` instead `pathway` list.
Answers.UserDisplayName: zorbax
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T14:32:08.490Z
Answers.Text: This doesn't work anymore
Answers.UserDisplayName: Biomage
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T18:33:14.987Z
Answers.Text: Yes, it does. Use **https** instead *http*
Answers.UserDisplayName: zorbax
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-11T08:41:08.000Z
Answers.LastActivityDate: 2021-06-11T08:41:08.000Z
Answers.UserDisplayName: zorbax
Body: <p>I have a list of ko IDs from which I want to get the pathway names. How can I get that? I have tried <a href="https://www.kegg.jp/kegg/tool/map_pathway.html" rel="nofollow noreferrer">this link</a>, but it does not give me any result. What to do?</p>
  <pre><code>  ko00010   ko00030 ko00061 ko00120 ko00121 ko00190 ko00195 ko00230 ko00250 ko00253 ko00270 ko00300 ko00330 ko00400 ko00401 ko00410 ko00430 ko00450 ko00460 ko00471 ko00472 ko00500 ko00511 ko00520 ko00521 ko00523 ko00531 ko00550 ko00562 ko00604 ko00620 ko00625 ko00640
  </code></pre>
  <p>Thanks</p>
  
Tags: <kegg>
Title: How to get KEGG pathway names from a list of 'ko' IDs?
ThreadText: # How to get KEGG pathway names from a list of 'ko' IDs?
  
  (Asked by: username_0 on 2021-06-11)
  
  I have a list of ko IDs from which I want to get the pathway names. How can I get that? I have tried [this link](https://www.kegg.jp/kegg/tool/map_pathway.html), but it does not give me any result. What to do?
  
  ```
    ko00010   ko00030 ko00061 ko00120 ko00121 ko00190 ko00195 ko00230 ko00250 ko00253 ko00270 ko00300 ko00330 ko00400 ko00401 ko00410 ko00430 ko00450 ko00460 ko00471 ko00472 ko00500 ko00511 ko00520 ko00521 ko00523 ko00531 ko00550 ko00562 ko00604 ko00620 ko00625 ko00640
  
  ```
  
  Thanks
  
  **Tags:** kegg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-11. Score: 2 | Accepted answer
  
  You can use the KEGG API:
  
  ```
  ko_list="ko00010 ko00030 ko00061 ko00120 ko00121
           ko00190 ko00195 ko00230 ko00250 ko00253
           ko00270 ko00300 ko00330 ko00400 ko00401
           ko00410 ko00430 ko00450 ko00460 ko00471
           ko00472 ko00500 ko00511 ko00520 ko00521
           ko00523 ko00531 ko00550 ko00562 ko00604
           ko00620 ko00625 ko00640"
  
  for i in ${ko_list}
  do
      hit=$(curl -# http://rest.kegg.jp/list/pathway | grep -w "${i/ko/map}")
      echo -e "${i}\t${hit}" | cut -f1,3 >> ko_pathways.txt
  done
  
  ```
  
  Or if your list is too long you can change the input and use a file with a list of ids.
  
  ```
  while read line
  do
      hit=$(curl -# http://rest.kegg.jp/list/pathway | grep -w "${line/ko/map}")
      echo -e "${line}\t${hit}" | cut -f1,3 >> ko_pathways.txt
  done < ko_list.txt
  
  ```
  
  The result will be something like:
  
  ```
   ko00010    Glycolysis / Gluconeogenesis
   ko00030    Pentose phosphate pathway
   ko00061    Fatty acid biosynthesis
   ko00120    Primary bile acid biosynthesis
   ko00121    Secondary bile acid biosynthesis
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks a lot username_1, for your answer. It works. Besides that, is there any web server or something that can be used? Just wanted to know.  
  > **username_0**: Hi username_1, I have a similar query. Is there a similar way I can use to get KEGG Module names from a list of Module IDs (e.g. M00002)? Many thanks  
  > **username_1**: I don't know anything about a web server. And yes, to your second question, I think you can use the API request for the `module` instead `pathway` list.  
  > **username_2**: This doesn't work anymore  
  > **username_1**: Yes, it does. Use **https** instead *http*  
  
  ---
  
  