bracket.js | |
bbop. | Purpose: An extension of bbop.model.graph to produce a bracketed layout (like the neighborhood view in AmiGO 1.8). |
bbop. | |
Functions | |
bracket | Extension of bbop.model.graph |
bracket_layout | Largely borrowed from ChewableGraph.pm from the perl section on AmiGO 2. |
relation_weight | A GO-specific take on the relative importance of relations in a graph. |
dominant_relationship | Given a bunch of relationships, return the one that is more “dominant”. |
rich_bracket_layout | Very similar to bracket_layout, except that instead of the node id, there is a list of [node_id, node_label, predicate]. |
Purpose: An extension of bbop.model.graph to produce a bracketed layout (like the neighborhood view in AmiGO 1.8).
TODO: A work in progress...
Functions | |
bracket | Extension of bbop.model.graph |
bracket_layout | Largely borrowed from ChewableGraph.pm from the perl section on AmiGO 2. |
relation_weight | A GO-specific take on the relative importance of relations in a graph. |
dominant_relationship | Given a bunch of relationships, return the one that is more “dominant”. |
rich_bracket_layout | Very similar to bracket_layout, except that instead of the node id, there is a list of [node_id, node_label, predicate]. |
this.bracket_layout = function( term_acc )
Largely borrowed from ChewableGraph.pm from the perl section on AmiGO 2.
Produces a simple bracketed layout based on the maximum distance from the node-of-interest to all other nodes. It also includes direct children as the last row. Useful in some layout contexts.
Any node in a properly made graph should be fine, but for the usual end case, see rich_bracket_layout.
term_acc | node of interest |
list of lists or id strings [[id1, id2], ...]
this.dominant_relationship = function()
Given a bunch of relationships, return the one that is more “dominant”.
A GO-specific take on the relative importance of relations in a graph.
whatever | predicate acc, or lists of lists them...whatever |
string acc of the dominant relationship or null
<relationship_weight>
this.rich_bracket_layout = function( term_acc, transitivity_graph )
Very similar to bracket_layout, except that instead of the node id, there is a list of [node_id, node_label, predicate].
This is only reliably producable if the following two condition is met: the transitivity graph is the one made for the node of interest by the GOlr loading engine. This is easy to meet if using GOlr, but probably better to roll your own if you’re not.
Also, the relative weight of the relations used is very GO-specific--see relation_weight.
Again, heavy borrowing from ChewableGraph.pm from the perl section in AmiGO 2.
term_acc | node of interest |
transitivity_graph | the bbop.model.graph for the relations |
list of lists of lists: [[[id, label, predicate], ...], ...]
Extension of bbop.model.graph
bbop.model.bracket.graph = function()
Largely borrowed from ChewableGraph.pm from the perl section on AmiGO 2.
this.bracket_layout = function( term_acc )
A GO-specific take on the relative importance of relations in a graph.
this.relation_weight = function( predicate_acc, default_weight )
Given a bunch of relationships, return the one that is more “dominant”.
this.dominant_relationship = function()
Very similar to bracket_layout, except that instead of the node id, there is a list of [node_id, node_label, predicate].
this.rich_bracket_layout = function( term_acc, transitivity_graph )