get_subset_nodes
get the subset nodes we want by whatever means, fair or foul roots will be added to the subset after determining that there are other terms in the subset
input: graph => Graph object options => option_h options may be: get_all_subsets => 1 subset => { subset_name => 1, subset_2_name => 1 }
# subset_regexp => regular expression
output: data hash or death with an appropriate error data hash will be of the form data->{subset}{subset_name}{id of node in subset} = 1 data->{roots}{node id} = 1
get_graph_relations
Get the relations and their inter-relation from a graph
input: graph => Graph object options => option_h
output: rel_h containing the relations from graph in the form { rel_node_id }{ rel_relation_id }{ rel_target_id } and rel_h->{got_graph} = 1
get_graph_links
input: input => hash of input nodes in the form node_id => 1; optional; uses all graph nodes if not specified subset => subset nodes in the form node_id => 1; optional; uses all graph nodes if not specified # roots => root nodes in the form node_id => 1 graph => Graph object inf_eng => inference engine (a new one will be created if not)
output: node data in the form {graph}{ node_id }{ relation_id }{ target_id }
remove_redundant_relationships
input: node_data => hash of node data in the form {graph}{ node_id }{ relation_id }{ target_id } rel_data => relationship data hash (structure same as node_data) graph => Graph object options => option_h
output: node_data with redundant rels carefully removed
if we have relationships between relations -- e.g. positively_regulates is_a regulates -- and two (or more) related relations are found between the same two nodes, the less specific relationships are removed.
e.g.
A positively_regulates B A regulates B
==> A regulates B will be removed
trim_graph
input: graph_data => data hash with nodes and relations specified as {graph}{ node_id }{ relation_id }{ target_id } plus various rearrangements, with a hash key specifying the ordering e.g. {node_target_rel} {target_node_rel} options => option_h # no options specified as yet
output: new data hash, slimmed down, with relations specified as {graph}{ node_id }{ relation_id }{ target_id }
For each term, finds the closest node for each relation and stores them in a hash
populate_lookup_hashes
input: data hash with nodes and relations specified as {graph}{ node_id }{ relation_id }{ target_id } output: rearrangements of the data with first key specifying the order: {node_target_rel} {target_node_rel} {node_rel_target} {target_rel_node} {rel_node_target} {rel_target_node}
write_graph_to_file
input: graph => Graph object subset => subset name options => option_h
writes out the file
get_closest_ancestral_nodes
input: graph_data => data hash with nodes and relations specified as {graph}{ node_id }{ relation_id }{ target_id } nb: must already have had all that reasoning stuff done plus various rearrangements, with a hash key specifying the ordering e.g. {node_target_rel} {target_node_rel} id => id of node to find the closest ancestral node of relation => relation id, if wanted options => option_h
output: new data hash, slimmed down, with relations specified as {graph}{ node_id }{ relation_id }{ target_id }
For a given term, finds the closest node[s]
get_furthest_ancestral_nodes
input: graph_data => data hash with nodes and relations specified as {graph}{ node_id }{ relation_id }{ target_id } nb: must already have had all that reasoning stuff done plus various rearrangements, with a hash key specifying the ordering e.g. {node_target_rel} {target_node_rel} id => id of node to find the closest ancestral node of relation => relation id, if wanted options => option_h
output: new data hash, slimmed down, with relations specified as {graph}{ node_id }{ relation_id }{ target_id }
For a given term, finds the furthest node[s]
topological_sort
input: graph_data => data hash with nodes and relations specified as {graph}{ node_id }{ relation_id }{ target_id } nb: must already have had all that reasoning stuff done plus various rearrangements, with a hash key specifying the ordering e.g. {node_target_rel} {target_node_rel} id => id of node to do the topological sort on relation => relation id, if wanted options => option_h
output: topo sorted list
For a given term, finds the furthest node[s]
add_all_relations_to_graph
input: old_g => old Graph object new_g => new Graph object (created if does not exist) no_rel_links => 1 if links should be NOT added (default is to add them)
output: new graph with relations from the old graph added
add_all_terms_to_graph
input: old_g => old Graph object new_g => new Graph object (created if does not exist) no_term_links => 1 if links between terms should NOT be added (default is to add them) no_rel_links => 1 if links between relations should NOT be added (default is to add them; only matters if no_term_links has been specified)
output: new graph with terms from the old graph added
add_extra_stuff_to_graph
input: old_g => old Graph object new_g => new Graph object (created if does not exist)
output: new graph with various attributes from the old graph added
add_nodes_and_links_to_graph
input: graph_data => data hash with nodes and relations specified as { node_id }{ relation_id }{ target_id } old_g => old graph, containing nodes and relations specified in the data hash new_g => preferably the new graph, containing relations (created if does not exist)
output: new graph, containing all the nodes and relations specified in
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 933:
=cut found outside a pod block. Skipping to next block.