Ask Pathway Tools logo   Pathway Tools Question & Answer forum for SRI's Pathway Tools

Ask Your Question

Accessing the pathway hierarchy

asked 2017-07-14 08:01:28 -0500

jo gravatar image

I'm wondering if there is a way to read out the metacyc pathway hierarchy?

More precisely, I want to get e.g. all pathways from class Detoxification->Acid Resistance. Could this be done via the API or somehow else?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-07-17 13:24:43 -0500

Suzanne Paley gravatar image

The answer is yes, but the how depends on what you mean by "get" all the pathways. We don't provide a complete expanded tree showing all pathway classes and their instances, but you can browse the pathway hierarchy interactively at If you create a SmartTable containing the class(es) you are interested in, there is a transform operation to show the children of each class (this includes both subclasses and pathway instances, however many levels deep). If you're looking to extract this information via our web services, you can construct a biovelo query to do this. For example:

retrieves info about all 3 pathways in the Acid-Resistance class, and

retrieves info about all 57 pathways in the Detoxification class and its subclasses (other available detail levels are "none" or "full").

Alternatively, if you download the MetaCyc flat files, there is a file that lists all the classes in MetaCyc (not just pathway classes) and their sub- and super-classes, and another file that lists all the pathway instances and their parent classes, so with a little effort you could reconstruct the pathway hierarchy from that.

I hope this helps.

edit flag offensive delete link more


Thanks your answer helped a lot!

jo gravatar imagejo ( 2017-08-15 05:10:58 -0500 )edit

answered 2017-08-15 05:34:05 -0500

jo gravatar image

In addition to this, I tried the API to get informations about the hierarchy. Using PythonCyc in the following:

import pythoncyc
meta = pythoncyc.select_organism('meta')
test = meta.get_class_data("Acid-Resistance")
for i in test.instances:
    print i.common_name

To get all classes:


The first classes are the major classes (biosynthesis, energy metabolism). Using the classes you can get the subclases

bio = meta.get_class_all_subs("|Biosynthesis|")

And for the subclasses all the instances can be retrieved:

meta.get_class_data(bio[0]).instances # instances for the first subclass in biosynthesis pathways
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-07-14 08:01:28 -0500

Seen: 21,894 times

Last updated: Aug 15 '17