Quellcode durchsuchen

Fixed a bug in the Ontology loader

spficklin vor 14 Jahren
Ursprung
Commit
65080700fe
2 geänderte Dateien mit 4 neuen und 15 gelöschten Zeilen
  1. 3 3
      tripal_cv/obo_loader.php
  2. 1 12
      tripal_cv/tripal_cv.module

+ 3 - 3
tripal_cv/obo_loader.php

@@ -369,7 +369,7 @@ function tripal_cv_obo_add_cvterm_prop($cvterm,$property,$value,$rank){
       );
       );
       $cvproptype = tripal_cv_obo_add_cv_term($term,$cv,0,0);
       $cvproptype = tripal_cv_obo_add_cv_term($term,$cv,0,0);
       if(!$cvproptype){  
       if(!$cvproptype){  
-         tripal_cv_obo_quiterror("Cannot add/upste cvterm property: internal:$property");
+         tripal_cv_obo_quiterror("Cannot add cvterm property: internal:$property");
       }
       }
    }
    }
 
 
@@ -479,10 +479,10 @@ function tripal_cv_obo_add_synonyms($term,$cvterm){
                'definition' => array(''),
                'definition' => array(''),
                'is_obsolete' => array(0),
                'is_obsolete' => array(0),
             );
             );
-            if(!tripal_cv_obo_add_cv_term($term,$syncv,0,1)){
+            $syntype = tripal_cv_obo_add_cv_term($term,$syncv,0,1);
+            if(!$syntype){
                tripal_cv_obo_quiterror("Cannot add synonym type: internal:$type");
                tripal_cv_obo_quiterror("Cannot add synonym type: internal:$type");
             }
             }
-            $syntype = db_fetch_object(db_query($cvtsql,$type,'synonym_type'));
          }       
          }       
 
 
          // make sure the synonym doesn't already exists
          // make sure the synonym doesn't already exists

+ 1 - 12
tripal_cv/tripal_cv.module

@@ -287,14 +287,6 @@ function tripal_cv_obo_form(&$form_state = NULL){
 	}
 	}
 
 
 
 
-   $form['instructions']= array(
-      '#value' => t('Use this interface to upload a controlled vocabulary in OBO format.  A new vocabulary and its 
-                     associated terms will be added to the database the first time an OBO is uploaded.  Each
-                     subsequent upload will update the terms.  The format of the OBO should be in v1.2 format,
-                     however, this loader does support some older styles formats. '),
-      '#weight'        => -2
-   );
-
    $form['obo_existing'] = array(
    $form['obo_existing'] = array(
       '#type' =>'fieldset',
       '#type' =>'fieldset',
       '#title' => t('Use a Saved Ontology OBO Reference')
       '#title' => t('Use a Saved Ontology OBO Reference')
@@ -310,10 +302,7 @@ function tripal_cv_obo_form(&$form_state = NULL){
       '#value' => t('The Ontology OBO files listed in the drop down below have been automatically added upon 
       '#value' => t('The Ontology OBO files listed in the drop down below have been automatically added upon 
                      installation of the Tripal CV module or were added from a previous upload.  Select
                      installation of the Tripal CV module or were added from a previous upload.  Select
                      an OBO, then click the submit button to load the vocabulary into the database.  If the
                      an OBO, then click the submit button to load the vocabulary into the database.  If the
-                     vocabularies already exist then the ontology will be updated.  Note that the name of the 
-                     ontology provided here may not match the namespace of the vocabulary.  For instance,
-                     the Gene Ontology will add three vocabularies: biological_process, cellular_component, and 
-                     molecular_function.'),
+                     vocabularies already exist then the ontology will be updated.'),
       '#weight'        => -1
       '#weight'        => -1
    );
    );