Tripal
|
Functions | |
chado_get_cv ($identifiers, $options=[]) | |
chado_get_cv_select_options () | |
chado_get_cvterm ($identifiers, $options=[]) | |
chado_get_cvterm_select_options ($cv_id, $rel_type=FALSE) | |
tripal_update_cvtermpath_old ($cv_id, $job_id=NULL) | |
chado_clear_cvtermpath ($cv_id) | |
chado_update_cvtermpath ($cv_id, $job=NULL) | |
_chado_update_cvtermpath_root ($cv_id, $root_id, $root_name, &$cache, $job, &$num_handled, $root_depth=0) | |
_chado_update_cvtermpath_process_children ($cv_id, $root_id, $cvterm_id, $path, &$cache, $depth=1) | |
_chado_update_cvtermpath_add_relationship ($type_id, $cvterm_id, $root_id, $cv_id, $depth) | |
chado_insert_cv ($name, $definition) | |
chado_insert_cvterm ($term, $options=[]) | |
chado_submit_obo_job ($obo) | |
chado_insert_obo ($name, $path) | |
chado_get_obo ($values) | |
chado_autocomplete_cv ($string='') | |
chado_autocomplete_cvterm ($cv_id, $string='') | |
chado_associate_cvterm ($basetable, $record_id, $cvterm, $options=[]) | |
Provides API functions specifically for managing controlled vocabulary records in Chado.
_chado_update_cvtermpath_add_relationship | ( | $type_id, | |
$cvterm_id, | |||
$root_id, | |||
$cv_id, | |||
$depth | |||
) |
Inserts values into the cvtermpath table.
After the entire tree below the current root term is traversed, this function is called and inserts all of the relationships that were found into the cvtermpath table.
$visited | The array contaiing relationships for all visited nodes in the tree. These elements will become the entries in the cvtermpath table. |
$job | The TripalJob instance. |
_chado_update_cvtermpath_process_children | ( | $cv_id, | |
$root_id, | |||
$cvterm_id, | |||
$path, | |||
& | $cache, | ||
$depth = 1 |
|||
) |
Handles a single node in the tree.
This is a recursive function which calls itself as the tree is descended. It performs a depth-first search of the tree.
$cv_id | The vocaulary Id |
$root_id | This root term's cvterm Id. |
$cvterm_id | This term's cvterm Id. |
$path | An array used for storing the current path down the tree. This is the sequence of nodes visited to this point down a single branch. |
$cache | The cache used for lookups. |
$depth | The current depth in the tree. |
_chado_update_cvtermpath_root | ( | $cv_id, | |
$root_id, | |||
$root_name, | |||
& | $cache, | ||
$job, | |||
& | $num_handled, | ||
$root_depth = 0 |
|||
) |
Treats a term within the ontology as a root.
In order to add all relationships between a term and it's descendents each term gets it's turn as a "root". The first time this function is called it should be called with the actual root's of the ontology. This function will then recursively treat each child term within the tree as a root in order to find all relationships.
$cv_id | The vocaulary Id |
$root_id | This root term's cvterm Id. |
$root_name | The name of this root term. |
$cache | The cache used for lookups. |
$job | The TripalJob instance. |
$num_handled | Used to keep track of the number of nodes that have been handled for progress reporting. |
$root_depth | The current depth in the tree of this term. |
chado_clear_cvtermpath | ( | $cv_id | ) |
unknown | $cv_id |