AmiGO 2 Manual: Services
Warning: This is a proposal and should not be treated as documentation.
REST interfaces
Some of the offered interfaces are self-consumed by AmiGO 2. For example, RESTful graphing component is used by the Term Enrichment tool and Term Details pages (not the main QuickGO generated image). In the case of the Term Enrichment tool, it adds a p-value annotation to each node as well as changing its color in relation to the p-value.
JSON data
Terms
The supported format for getting term data is:
http://amigo.geneontology.org/term/GO:XXXXXXX/json
For example:
http://amigo.geneontology.org/term/GO:0022008/json
Gene products
The supported format for getting gene product data is:
http://amigo.geneontology.org/gene_product/AAA:ZZZZZZZ/json
For example:
http://amigo.geneontology.org/gene_product/MGI:MGI:2177178/json
Annotations
???
Image generation
The AmiGO 2 "Visualize" page is essentially a light wrapper around this RESTful graphing component. The API for it, such as it is, should be fairly stable (at least it hasn't changed in a while), but it may be changed later on. If you're writing an application to use this, please keep it flexable.
This section aims to describe the current RESTful calls as they exist now. The base URL will always be assumed to be production:
http://amigo.geneontology.org/visualize
or labs:
http://amigo2.berkeleybop.org/cgi-bin/amigo2/visualize
with the arguments described below.
mode
This is the most fundamental argument and must always be specified. This argument specifies what the API will be and what engine will be used to return the results.
quickgo
Use AmiGO as a proxy to get (and cache) QuickGO images. This mode always returns PNGs.
amigo
Allow a richer API to view multiple terms at the same time, as well as have the ability to specify elements in the graph. Currently, "basic", "multi", and "advanced" are synonyms, but different functionality may be put in in the future.
term
This variable is available only for the "quickgo" and "single" modes. It is a single GO id (e.g. "GO:0022008").
inline
This variable is available for all modes.
It specifies whether the returned image is intended for inline use (i.e. embedded in a web page) or standalone use (i.e. download or separate viewing). This is only really intended to be used with a "format" of "png".
true
The image is intended to be view by itself.
false
The image is intended to be embedded into another page.
format
This variable is available only for the "advanced" mode.
svg
Results as an interactive SVG (SVG+XML and JavaScript).
svg_raw
Results as raw SVG as returned my GraphViz.
png
Results as a PNG image. This is the default if "format" is not otherwise specified.
dot
Results in the GraphViz dot format.
term_data
This variable is available only for the "advanced" mode.
It is data input variable (i.e. list of GO ids or JSON). See "term_data_type" below for details on how to use it.
term_data_type
This variable is available only for the "advanced" mode.
string
This is the default.
When "string" is specified, "term_data" is interpreted as a whitespace separated list of GO ids; no further formatting information is sought.
This is useful for viewing multiple terms in the graph.
json
When "json" is specified, "term_data" will be parsed as JSON (see the AmiGO_2_Manual:_JSON#Node_Description_Format for the format). This can be fiddly, but powerful.