text: user12271: 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, 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
  
  user4282: 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
  
  
original_text: 12271: <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>
   4282: <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>
  