Commonly Used GFP Functions
Commonly Used GFP Functions
GFP (Generic Frame Protocol) is the API used to access Pathway Tools
databases that are stored in the Ocelot object-oriented database
system. Many additional GFP operations are described in the full GFP
specification.
Note that for all functions we omit the kb argument that
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.
Retrieval Functions
Functions described in this section retrieve data from a KB, but do not
modify a KB.
Function: |
get-slot-values(frame slot) |
Returns: |
A list of all values of Slot of Frame.
|
Arguments: |
Frame: A frame id or object.
Slot: A slot name (symbol).
|
Example: |
(get-slot-values 'trp 'synonyms)
|
Function: |
get-slot-value(frame slot) |
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) |
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) |
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) |
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) |
Returns: |
A list of frames whose name or synonym matches label
|
Arguments: |
Label: a string
|
Example: |
(get-frame-labeled "tryptophan")
|
Miscellaneous Functions
Function: |
current-kb () |
Returns: |
The currently selected KB.
|
Arguments: |
None.
|
Function: |
print-frame (frame) |
Side Effects: |
Prints a description of Frame to standard output.
|
Arguments: |
Frame: A frame id or object.
|
|