Prechádzať zdrojové kódy

Added Map content type

Stephen Ficklin 8 rokov pred
rodič
commit
a584591704

+ 22 - 0
tripal_chado/includes/tripal_chado.semweb.inc

@@ -31,6 +31,7 @@ function tripal_chado_populate_chado_semweb_table() {
   tripal_chado_populate_vocab_SWO();
   tripal_chado_populate_vocab_TAXRANK();
   tripal_chado_populate_vocab_TPUB();
+  tripal_chado_populate_vocab_UO();
 }
 
 /**
@@ -448,6 +449,27 @@ function tripal_chado_populate_vocab_TPUB() {
   tripal_associate_chado_semweb_term('pub', 'pubplace', $term);
 }
 
+/**
+ * Adds the Uni Ontology database, terms and mappings.
+ */
+function tripal_chado_populate_vocab_UO() {
+  tripal_insert_db(array(
+    'name' => 'UO',
+    'description' => 'Units of Measurement Ontology',
+    'url' => 'http://purl.obolibrary.org/obo/uo',
+    'urlprefix' => 'http://purl.obolibrary.org/obo/TAXRANK_',
+  ));
+  tripal_insert_cv('uo','Units of Measurement Ontology');
+
+  $term = tripal_insert_cvterm(array(
+    'id' => 'UO:0000000',
+    'name' => 'unit',
+    'cv_name' => 'uo',
+    'description' => 'A unit of measurement is a standardized quantity of a physical quality.'
+  ));
+  tripal_associate_chado_semweb_term('featuremap', 'unittype_id', $term);
+}
+
 /**
  * Adds the Taxonomic Rank Ontology database and terms.
  */

+ 13 - 13
tripal_chado/includes/tripal_chado.setup.inc

@@ -449,19 +449,19 @@ function tripal_chado_prepare_chado() {
       throw new Exception($error['!message']);
     }
 
-//     // Create the 'Genetic Map' entity type. This uses the local:project term.
-//     $error = '';
-//     $args = array(
-//       'vocabulary' => 'data',
-//       'accession' => '1278',
-//       'term_name' => 'Genetic map',
-//       'storage_args' => array(
-//         'data_table' => 'featuremap',
-//       )
-//     );
-//     if (!tripal_create_bundle($args, $error)) {
-//       throw new Exception($error['!message']);
-//     }
+    // Create the 'Genetic Map' entity type. This uses the local:project term.
+    $error = '';
+    $args = array(
+      'vocabulary' => 'data',
+      'accession' => '1274',
+      'term_name' => 'Map',
+      'storage_args' => array(
+        'data_table' => 'featuremap',
+      )
+    );
+    if (!tripal_create_bundle($args, $error)) {
+      throw new Exception($error['!message']);
+    }
 
     // Create the 'Publication' entity type.
     $error = '';