7

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

  • 4
    Hi astrika, thanks for your question and welcome to Bioinformatics Stack Exchange. I've had a glance over this question, and it looks like it has the potential to get good answers: it is well-researched, with a good story, and a specific question. I look forward to seeing more questions from you in the future. – gringer Jun 09 '17 at 21:23

2 Answers2

3

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)

Djinnome
  • 31
  • 1
3

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.

Iakov Davydov
  • 2,695
  • 1
  • 13
  • 34
  • I have tried 'L-valine' in the script above and it has also gave me the same error. I am aware it is possible to search in the site, however for my purpose I must write a query. My purpose is to obtain possible pathway networks for a given metabolics dataset – astridmarilyn Jun 12 '17 at 23:33
  • @astrika maybe the name is Protein-L-valine, or VAL. One thing is how they store things an another is how they show them. Sorry I didn't test how to search using python – llrs Jul 13 '17 at 07:31