text: user803: I am using PythonCyc API in order to write a query for metabolites in BioCyc. The purpose of this API is to communicate with the database software of BioCyc- Pathway Tools. Pathway Tools is in lisp therefore, PythonCyc creates a bridge between python and common lisp. To use this this API one must first create a PGDB object with a specified organism ID (orgid). In the example below I create a PGDB with orgid "meta". After this, I am able to call methods from PythonCyc with this object:
  import sys
  import pythoncyc
  #this creates PGDB object associated with meta(MetaCyc)
  meta = pythoncyc.select_organism('meta')
  #lists pathways of specified compound
  pathways = meta.pathways_of_compound('sucrose')
  print pathways
  
  The query for the metabolite above, 'sucrose', provides a list a pathways:
  [u'|PWY-7347|', u'|SUCSYN-PWY|', u'|PWY-7238|', u'|PWY-6527|', u'|PWY-5343|', u'|PWY-3801|', u'|PWY-7345|', u'|PWY-862|', u'|SUCUTIL-PWY|', u'|PWY66-373|', u'|PWY-621|', u'|PWY-822|', u'|SUCROSEUTIL2-PWY|', u'|PWY-6525|', u'|PWY-6524|', u'|PWY-5337|', u'|PWY-5384|']
  
  However if I switch this metabolite name to a common amino acid name, such as 'valine':
  import sys
  import pythoncyc
  #this creates PGDB object associated with meta(MetaCyc)
  meta = pythoncyc.select_organism('meta')
  #lists pathways of specified compound
  pathways = meta.pathways_of_compound('valine')
  print pathways
  
  The query provides an error message that states "non coercible frame", which means it cannot find this ID. This is a common metabolite, just as sucrose, which should very well have pathway entries in database, however there are none found with this method. I have also tried synonyms of valine and other methods such as "all_pathways(cpds)" stated in API, which give me the same error message.
  What is the reason for this? Does BioCyc not list any pathways for amino acids? Or am I using an incorrect method to access amino acid information?
  Link to PythonCyc API
  
  user191: UPD: As suggested by Llopis, maybe the correct identifier is VAL?
  I think there is no metabolite with such name in the database. I tried their search, the correct name seems to be L-valine. I expect that they use similar naming for other amino acids. If you cannot find something, you can use their compound search through the website. 
  
  user1131: Pathway-tools has a unique identifier (called a Frame-ID) for each metabolite in its database.  You can get the list of all compounds with this api call:
  all_cpds = meta.get_class_all_instances('|Compounds|')
  for each compound, you can also get its common name, or all its synonyms:
  
  cpd_names = {}
  for cpd_frame_id in all_cpds:
        cpd_names[cpd_frame_id] = meta.get_name_string(cpd_frame_id)
  
  
original_text: 803: <p>I am using <strong>PythonCyc</strong> API in order to write a query for metabolites in <strong>BioCyc</strong>. The purpose of this API is to communicate with the database software of BioCyc- Pathway Tools. Pathway Tools is in lisp therefore, PythonCyc creates a bridge between python and common lisp. To use this this API one must first create a PGDB object with a specified organism ID (orgid). In the example below I create a PGDB with orgid "meta". After this, I am able to call methods from PythonCyc with this object:</p>
  
  <pre><code>import sys
  import pythoncyc
  #this creates PGDB object associated with meta(MetaCyc)
  meta = pythoncyc.select_organism('meta')
  #lists pathways of specified compound
  pathways = meta.pathways_of_compound('sucrose')
  print pathways
  </code></pre>
  
  <p>The query for the metabolite above, 'sucrose', provides a list a pathways:</p>
  
  <pre><code>[u'|PWY-7347|', u'|SUCSYN-PWY|', u'|PWY-7238|', u'|PWY-6527|', u'|PWY-5343|', u'|PWY-3801|', u'|PWY-7345|', u'|PWY-862|', u'|SUCUTIL-PWY|', u'|PWY66-373|', u'|PWY-621|', u'|PWY-822|', u'|SUCROSEUTIL2-PWY|', u'|PWY-6525|', u'|PWY-6524|', u'|PWY-5337|', u'|PWY-5384|']
  </code></pre>
  
  <p>However if I switch this metabolite name to a common amino acid name, such as 'valine':</p>
  
  <pre><code>import sys
  import pythoncyc
  #this creates PGDB object associated with meta(MetaCyc)
  meta = pythoncyc.select_organism('meta')
  #lists pathways of specified compound
  pathways = meta.pathways_of_compound('valine')
  print pathways
  </code></pre>
  
  <p>The query provides an error message that states "non coercible frame", which means it cannot find this ID. This is a common metabolite, just as sucrose, which should very well have pathway entries in database, however there are none found with this method. I have also tried synonyms of valine and other methods such as "all_pathways(cpds)" stated in API, which give me the same error message.
  What is the reason for this? Does BioCyc not list any pathways for amino acids? Or am I using an incorrect method to access amino acid information?</p>
  
  <p><a href="http://pythoncyc.readthedocs.io/en/latest/" rel="noreferrer">Link to PythonCyc API</a></p>
   191: <p><strong>UPD</strong>: As <a href="https://bioinformatics.stackexchange.com/questions/623/what-methods-should-i-use-from-pythoncyc-api-to-query-metabolites-in-biocyc-data/651?noredirect=1#comment3035_651">suggested</a> by Llopis, maybe the correct identifier is VAL?</p>
  
  <p>I think there is no metabolite with such name in the database. I tried <a href="https://biocyc.org/ECOLI/search-query?type=COMPOUND&amp;name=Valine" rel="nofollow noreferrer">their search</a>, the correct name seems to be <code>L-valine</code>. I expect that they use similar naming for other amino acids. If you cannot find something, you can use their compound search through the website. </p>
   1131: <p>Pathway-tools has a unique identifier (called a Frame-ID) for each metabolite in its database.  You can get the list of all compounds with this api call:</p>
  
  <p><code>all_cpds = meta.get_class_all_instances('|Compounds|')</code></p>
  
  <p>for each compound, you can also get its common name, or all its synonyms:</p>
  
  <p><code>
  cpd_names = {}
  for cpd_frame_id in all_cpds:
        cpd_names[cpd_frame_id] = meta.get_name_string(cpd_frame_id)
  </code></p>
  