Information

Pathway Tools Overview Pathway Tools Testimonials
Publications
Release Note History
Contributions
Pathway Tools Blog
Technical Datasheet
Fact Sheet
Pathway Tools Testimonials
Contact Us

Licensing

Academic Licenses Commercial Licenses

Technical Specs

Web Services
Pathway Tools APIs
Installation Guide
Ontologies
Operations
File Formats

Support

Submitting Bug Reports
Tutorials
FAQs
Webinars
Commonly Used GFP Functions

Commonly Used GFP Functions

GFP (Generic Frame Protocol) is the API used to access Pathway Tools databases (also known as knowledge bases, kbs, and PGDBs) that are stored in the Ocelot object-oriented database system. Many additional GFP operations are described in the full GFP specification.

For all functions that have a kb argument, that argument defaults to the currently selected KB, and allows the programmer to operate on a KB other than the currently selected KB. Function select-organism can be used to change the currently selected KB to the KB for a different organism.

The frame argument to most GFP functions can be either a symbol frame name, a string frame name, or a frame object.

Retrieval Functions

Functions described in this section retrieve data from a KB, but do not modify a KB.

Function: get-slot-values(frame slot kb)
Returns: A list of all values of Slot of Frame in KB.
Arguments: Frame: A frame id or object. Slot: A slot name (symbol).
Example:
(get-slot-values 'trp 'synonyms)

Function: get-slot-value(frame slot kb)
Returns: The first value of Slot of Frame.
Arguments: Frame: A frame id or object. Slot: A slot name (symbol).
Example:
(get-slot-value 'trp 'common-name)

Function: get-class-all-instances(class kb)
Returns: A list of all frames that are direct or indirect instances of Class.
Arguments: Class: A class frame.
Example:
(get-class-all-instances '|Reactions|)

Function: instance-all-instance-of-p(instance class kb)
Returns: T if Instance is a direct or an indirect child of Class.
Arguments: Class: A class frame.
Instance: An instance frame.
Example:
(instance-all-instance-of-p 'PM338 '|Promoters|)

Function: member-slot-value-p(frame slot value kb)
Returns: T if Value is one of the values of Slot of Frame.
Arguments: Frame: A frame id or object. Slot: A slot name (symbol). Value: A slot value such as an integer, symbol, or string.
Example:
(member-slot-value-p 'trp 'common-name "L-tryptophan")

Function: fequal(frame1 frame2)
Returns: T if Frame1 and Frame2 are the same frame. Must be used as the test function for operations that compare frames.
Arguments: Frame1: A frame id or object. Frame2: A frame id or object.
Example:
(loop for x in (get-class-all-instances '|Reactions|)
   when (member-slot-value-p x 'left 'trp :test #'fequal)
   collect x)

Function: get-frame-labeled(label kb)
Returns: A list of frames whose name or synonym matches label
Arguments: Label: a string
Example:
(get-frame-labeled "tryptophan")

Update Functions

Functions described in this section modify the data within a KB. To save those modifications, a call to save-kb must be performed.

Function: put-slot-values(frame slot values kb)
Actions: Discards the current value(s) of Slot of Frame; the new value(s) of Slot of Frame become the list Values.
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).
Values: A list of values of the appropriate datatype (e.g., a list of integers or a list of strings).
Example:
(put-slot-values 'trp 'synonyms '("L-trp" "tryptophan"))

Function: put-slot-value(frame slot value kb)
Actions: Discards the current value(s) of Slot of Frame; the new value of Slot of Frame becomes the single value, Value.
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).
Value: A value of the appropriate datatype (e.g., an integer or a string).
Example:
(put-slot-value 'trp 'synonyms "L-trp")

Function: replace-slot-value(frame slot old new kb test)
Actions: Removes Old as a value of Slot of Frame, replacing it with the value New. Function Test is used to compare Old to the existing slot value(s).
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).
Example:
(put-slot-values 'trp 'synonyms '("L-trp" "tryptophan"))

Function: add-slot-value(frame slot new kb test)
Actions: Adds the value New as a new value of Slot of Frame.
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).
Old: A value of the appropriate datatype (e.g., an integer or a string). New: A value of the appropriate datatype (e.g., an integer or a string).

Function: remove-slot-value(frame slot value kb test)
Actions: Removes the value Value as a value of Slot of Frame.
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).
Value: A value of the appropriate datatype (e.g., an integer or a string).

Function: remove-local-slot-values(frame slot kb)
Actions: Removes all values of Slot of Frame, leaving the slot devoid of values.
Arguments: Frame: A frame id or object.
Slot: A slot name (symbol).

Miscellaneous Functions

Function: current-kb ()
Returns: The currently selected KB.
Arguments: None.

Function: print-frame (frame kb)
Side Effects: Prints a description of Frame to standard output.
Arguments: Frame: A frame id or object.