-
Notifications
You must be signed in to change notification settings - Fork 5
Graph
kltm edited this page Nov 4, 2014
·
10 revisions
This is an overview of the graph structure used in BBOP JS.
While the API is fairly abstract, there is a standard JSON object to use during construction, and can be considered the common currency at this point.
In this model–and we’re going to be talking about the JSON model for construction and storage here on out, not the underlying model which is rather more complex)– a graph is a list of nodes and edges. A trivial degenerate graph would be:
{\"nodes\":[], \"edges\": []}
Given this, let’s look at GO:0043474. The JSON that would fully define all aspects of the graph would be:
{\"nodes\":[{\"id\":\"GO:0044710\",\"lbl\":\"single-organism metabolic process\"},{\"id\":\"GO:0042440\",\"lbl\":\"pigment metabolic process\"},{\"id\":\"GO:0043475\",\"lbl\":\"pigment metabolic process involved in pigment accumulation\"},{\"id\":\"GO:0043324\",\"lbl\":\"pigment metabolic process involved in developmental pigmentation\"},{\"id\":\"GO:0044699\",\"lbl\":\"single-organism process\"},{\"id\":\"GO:0043474\",\"lbl\":\"pigment metabolic process involved in pigmentation\"},{\"id\":\"GO:0043473\",\"lbl\":\"pigmentation\"},{\"id\":\"GO:0008152\",\"lbl\":\"metabolic process\"},{\"id\":\"GO:0046158\",\"lbl\":\"ocellus pigment metabolic process\"},{\"id\":\"GO:0008150\",\"lbl\":\"biological_process\"}],\"edges\":[{\"sub\":\"GO:0043473\",\"obj\":\"GO:0044699\",\"pred\":\"is_a\"},{\"sub\":\"GO:0044710\",\"obj\":\"GO:0044699\",\"pred\":\"is_a\"},{\"sub\":\"GO:0043474\",\"obj\":\"GO:0043473\",\"pred\":\"part_of\"},{\"sub\":\"GO:0042440\",\"obj\":\"GO:0044710\",\"pred\":\"is_a\"},{\"sub\":\"GO:0043474\",\"obj\":\"GO:0042440\",\"pred\":\"is_a\"},{\"sub\":\"GO:0044710\",\"obj\":\"GO:0008152\",\"pred\":\"is_a\"},{\"sub\":\"GO:0008152\",\"obj\":\"GO:0008150\",\"pred\":\"is_a\"},{\"sub\":\"GO:0046158\",\"obj\":\"GO:0043474\",\"pred\":\"is_a\"},{\"sub\":\"GO:0043324\",\"obj\":\"GO:0043474\",\"pred\":\"is_a\"},{\"sub\":\"GO:0044699\",\"obj\":\"GO:0008150\",\"pred\":\"is_a\"},{\"sub\":\"GO:0043475\",\"obj\":\"GO:0043474\",\"pred\":\"is_a\"}]}