function tripal_phylogeny_get_node_types_vocab
2.x tripal_phylogeny.import_tree.inc | tripal_phylogeny_get_node_types_vocab() |
3.x tripal_chado.module.DEPRECATED.api.inc | tripal_phylogeny_get_node_types_vocab() |
Return value
boolean|multitype:Either
1 call to tripal_phylogeny_get_node_types_vocab()
- tripal_phylogeny_import_tree in tripal_phylogeny/
includes/ tripal_phylogeny.import_tree.inc - Iterates through the tree array and creates phylonodes in Chado.
File
- tripal_phylogeny/
includes/ tripal_phylogeny.import_tree.inc, line 97
Code
function tripal_phylogeny_get_node_types_vocab() {
// Get the vocabulary terms used to describe nodes in the tree
$values = array(
'name' => 'phylo_leaf',
'cv_id' => array(
'name' => 'tripal_phylogeny',
),
);
$leaf = chado_generate_var('cvterm', $values);
if (!$leaf) {
tripal_report_error('tripal_phylogeny', TRIPAL_ERROR,
"Could not find the leaf vocabulary term: 'phylo_leaf'. It should " .
"already be present as part of the tripal_phylogeny vocabulary.");
return FALSE;
}
$values['name'] = 'phylo_interior';
$internal = chado_generate_var('cvterm', $values);
if (!$internal) {
tripal_report_error('tripal_phylogeny', TRIPAL_ERROR,
"Could not find the leaf vocabulary term: 'phylo_interior'. It should " .
"already be present as part of the tripal_phylogeny vocabulary.");
return FALSE;
}
$values['name'] = 'phylo_root';
$root = chado_generate_var('cvterm', $values);
if (!$root) {
tripal_report_error('tripal_phylogeny', TRIPAL_ERROR,
"Could not find the leaf vocabulary term: 'phylo_root'. It should " .
"already be present as part of the tripal_phylogeny vocabulary.");
return FALSE;
}
$vocab = array(
'leaf' => $leaf,
'internal' => $internal,
'root' => $root,
);
return $vocab;
}