Browse Source

Changed GFF/Fasta loaders to use sequence ontology relationships rather than relationship ontology relationships. this is more consistent between the two and is a temporary fix with issue in the new relationship ontology

Stephen Ficklin 9 years ago
parent
commit
07dfd16334

+ 3 - 5
tripal_feature/includes/tripal_feature.fasta_loader.inc

@@ -41,10 +41,8 @@ function tripal_feature_fasta_load_form() {
   );
 
   // get the sequence ontology CV ID
-  $values = array('name' => 'sequence'
-  );
-  $cv = chado_select_record('cv', array('cv_id'
-  ), $values);
+  $values = array('name' => 'sequence');
+  $cv = chado_select_record('cv', array('cv_id'), $values);
   $cv_id = $cv[0]->cv_id;
 
   $form['seqtype'] = array('#type' => 'textfield','#title' => t('Sequence Type'),
@@ -167,7 +165,7 @@ function tripal_feature_fasta_load_form() {
   $rels = array();
   $rels[''] = '';
   $rels['part_of'] = 'part of';
-  $rels['derives_from'] = 'produced by';
+  $rels['derives_from'] = 'produced by (derives from)';
 
   // Advanced references options
   $form['advanced']['relationship']['rel_type'] = array('#title' => t('Relationship Type'),

+ 2 - 2
tripal_feature/includes/tripal_feature.gff_loader.inc

@@ -1150,7 +1150,7 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
     'subject_id' => $feature->feature_id,
     'type_id' => array(
        'cv_id' => array(
-          'name' => 'relationship'
+          'name' => 'sequence'
         ),
        'name' => 'derives_from',
     ),
@@ -1212,7 +1212,7 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
 
     // try to find the parent
     $parentcvterm = chado_query($cvterm_sql, array(':cvname' => 'sequence', ':name' => $parent_type, ':synonym' => $parent_type))->fetchObject();
-    $relcvterm = chado_query($cvterm_sql, array(':cvname' => 'relationship', ':name' => $rel_type, ':synonym' => $rel_type))->fetchObject();
+    $relcvterm = chado_query($cvterm_sql, array(':cvname' => 'sequence', ':name' => $rel_type, ':synonym' => $rel_type))->fetchObject();
     $values = array(
         'organism_id' => $organism_id,
         'uniquename' => $parent,