function tripal_cv_load_obo_v1_2_file

2.x tripal_cv.obo_loader.inc tripal_cv_load_obo_v1_2_file($obo_name, $file, $jobid = NULL, $is_new = TRUE)
1.x obo_loader.inc tripal_cv_load_obo_v1_2_file($obo_name, $file, $jobid = NULL, $is_new = TRUE)

A wrapper function for importing the user specified OBO file into Chado by specifying the filename and path of the OBO. It requires that the file be in OBO v1.2 compatible format. This function is typically executed via the Tripal jobs management after a user submits a job via the Load Onotloies form.

Parameters

$obo_name: The name of the OBO (typially the ontology or controlled vocabulary name)

$file: The path on the file system where the ontology can be found

$job_id: The job_id of the job from the Tripal jobs management system.

$is_new: Set to TRUE if this is a new ontology that does not yet exist in the tripal_cv_obo table. If TRUE the OBO will be added to the table.

Related topics

1 call to tripal_cv_load_obo_v1_2_file()
tripal_cv_load_obo_v1_2_id in tripal_cv/includes/tripal_cv.obo_loader.inc
A wrapper function for importing the user specified OBO file into Chado by specifying the obo_id of the OBO. It requires that the file be in OBO v1.2 compatible format. This function is typically executed via the Tripal jobs management after a user…

File

tripal_cv/includes/tripal_cv.obo_loader.inc, line 404
Functions to aid in loading ontologies into the chado cv module

Code

function tripal_cv_load_obo_v1_2_file($obo_name, $file, $jobid = NULL, $is_new = TRUE) {
  $newcvs = array();

  if ($is_new) {
    tripal_insert_obo($obo_name, $file);
  }

  $success = tripal_cv_load_obo_v1_2($file, $jobid, $newcvs);
  if ($success) {
    // update the cvtermpath table
    tripal_cv_load_update_cvtermpath($newcvs, $jobid);
    print "\nDone\n";
  }
}