Browse Source

Fixed a bug where ontologies loading during preparing don't get the cvtermpath updated and a field being added for the pub.pub_id field (same problem as the analysis fix previously committed

Stephen Ficklin 6 years ago
parent
commit
0ca00c8031

+ 2 - 1
tripal_chado/includes/setup/tripal_chado.setup.inc

@@ -100,7 +100,7 @@ function tripal_chado_load_ontologies() {
       'path' => '{tripal_chado}/files/tcontact.obo',
       'auto_load' => TRUE,
       'cv_name' => 'tripal_contact',
-      'db_name' => 'TCONTACT'
+      'db_name' => 'TContact'
     ),
     array(
       'name' => 'Tripal Publication',
@@ -131,6 +131,7 @@ function tripal_chado_load_ontologies() {
         $obo_importer = new OBOImporter();
         $obo_importer->create(array('obo_id' => $obo_id));
         $obo_importer->run();
+        $obo_importer->postRun();
       }
       else {
         print "Ontology already loaded (skipping): " . $ontologies[$i]['name'] . "...\n";

+ 2 - 2
tripal_chado/includes/tripal_chado.fields.inc

@@ -547,7 +547,7 @@ function tripal_chado_bundle_fields_info_custom(&$info, $details, $entity_type,
   
   // For the pub_id field in the base table.
   $schema = chado_get_schema($table_name);
-  if (array_key_exists('pub_id', $schema['fields'])) {
+  if (array_key_exists('pub_id', $schema['fields']) and $table_name != 'pub') {
     
     // Remove the schema__publication added by the
     // tripal_chado_bunde_instnaces_info_base function.
@@ -2053,7 +2053,7 @@ function tripal_chado_bundle_instances_info_custom(&$info, $entity_type, $bundle
   } 
   // pub_id field in table.
   $schema = chado_get_schema($table_name);
-  if (array_key_exists('pub_id', $schema['fields'])) {
+  if (array_key_exists('pub_id', $schema['fields']) and $table_name != 'pub') {
     
     // Remove the schema__publication added by the 
     // tripal_chado_bunde_instnaces_info_base function.