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

Ask Your Question

Information from the DIAGRAM-INFO slot

asked 2017-11-27 17:19:39 -0500

JW Carlson gravatar image

I'm interested in how pathway-tools lays out the reactions in the pathway diagrams. My little bit of consulting Prof. Google tells me that Grasper-CL was used in generating the layout. And I can see this in the ocelot databases concerning the DIAGRAM-INFO slot:

This slot contains an s-expression comprising a structured description of the pathway diagram. This information is a list in the following format:
(((entity-node entity-frame x y wd ht (ftr angle text)))
((rxn-node rxn-frame x y (reactant-node) (product-node) reversible?
((rct-or-prod-node (x y))) curve-left curve-right))
((control-frame controller-node controlled-node ((x y)
((membrane-shape label label-x label-y x y wd ht cco-frame)
((non-frame-node-type x y wd ht text)*)

But I'm having trouble finding information from this slot in my (limited ability) lisp queries. Is there a call to retrieve this information? Or, alternately, is Grasper-CL part of the toolkit for pathway-tools, or a separate license?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-11-28 02:44:20 -0500

Suzanne Paley gravatar image

The DIAGRAM-INFO slot is probably not what you are looking for -- it is only populated for signaling pathways, whose layout is generated manually by a curator (our automated pathway layout algorithms don't work for signaling pathways). This slot stores enough info for the software to regenerate the curator-specified layout. There are a small number of such signaling pathways (in EcoCyc, HumanCyc and I think BsubCyc) that use this slot, but the vast majority of pathways have their layouts computed without manual oversight by our automated pathway layout algorithms. This enables them to automatically adapt to changes in the database, and be displayed at varying levels of detail (neither of which are possible for the signaling pathways), but it means that because the layout is computed afresh each time, very little layout information needs to be stored in the pathway frames themselves (the LAYOUT-ADVICE slot allows curator specification of some minor points such as which compound should be displayed at the top in a circular pathway). Our automated layout algorithms are quite complex, so you are unlikely to be able to regenerate them. We do use Grasper-CL as our underlying graph toolkit, but the grasper graphs are generated on demand, and are not stored anywhere (an exception is the cellular overview diagram -- since this diagram is too time-consuming to regenerate each time, the grasper graph is stored as a file).

If you are trying to extract node/edge coordinates, labels, etc. for our diagrams, the following two options are available at this time: If you export a pathway to a pathway collage, you can save the collage to a file that contains a JSON representation of the pathway graph. Alternatively, we have a couple of unpublicized lisp functions (accessible via the Lisp API) to export one or all pathways to XGMML format files. If you request our source code, you'll find the relevant functions in the file pwy2xgmml.lisp (if you would prefer the diagram in grasper format, and are comfortable with lisp programming, there are useful functions for that in this file also).

edit flag offensive delete link more


Thank you for your detailed response! I appreciate it. I'm very interested in looking at the lisp functions. How do I request the source?

JW Carlson gravatar imageJW Carlson ( 2017-11-28 11:40:43 -0500 )edit
Suzanne Paley gravatar imageSuzanne Paley ( 2017-11-28 14:41:40 -0500 )edit

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-11-27 17:19:39 -0500

Seen: 370 times

Last updated: Nov 28 '17