Browse Source

Disabled creation of fields for analysisprop from the tripal_analysis_[KEGG|blast|interpro] modules

Stephen Ficklin 8 years ago
parent
commit
c7915cc290
1 changed files with 18 additions and 0 deletions
  1. 18 0
      tripal_chado/includes/tripal_chado.fields.inc

+ 18 - 0
tripal_chado/includes/tripal_chado.fields.inc

@@ -452,6 +452,15 @@ function tripal_chado_bundle_create_fields_linker(&$info, $details, $entity_type
     $sql = 'SELECT DISTINCT type_id FROM {' . $prop_table . '}';
     $props = chado_query($sql);
     while ($prop = $props->fetchObject()) {
+      // The tripal_analysis_KEGG, tripal_analysis_blast, and
+      // tripal_analysis_interpro modules store results in the analysisprop
+      // table which is probably not the best place, but we don't want to
+      // create a ton of fields for this.
+      if ($prop_table == 'analysisprop' and
+          ($prop->type_id->dbxref_id->db_id->name == 'KEGG_BRITE' or
+           $prop->type_id->dbxref_id->db_id->name == 'tripal')) {
+        continue;
+      }
       $term = chado_generate_var('cvterm', array('cvterm_id' => $prop->type_id));
       $field_name = strtolower(preg_replace('/[^\w]/','_', $term->dbxref_id->db_id->name . '__' . $term->name));
       $field_name = substr($field_name, 0, 32);
@@ -1377,6 +1386,15 @@ function tripal_chado_bundle_create_instances_linker(&$info, $entity_type, $bund
      }
      $props = chado_query($sql, $args);
      while ($prop = $props->fetchObject()) {
+       // The tripal_analysis_KEGG, tripal_analysis_blast, and
+       // tripal_analysis_interpro modules store results in the analysisprop
+       // table which is probably not the best place, but we don't want to
+       // create a ton of fields for this.
+       if ($prop_table == 'analysisprop' and
+           ($prop->type_id->dbxref_id->db_id->name == 'KEGG_BRITE' or
+            $prop->type_id->dbxref_id->db_id->name == 'tripal')) {
+         continue;
+       }
        $term = chado_generate_var('cvterm', array('cvterm_id' => $prop->type_id));
        $field_name = strtolower(preg_replace('/[^\w]/','_', $term->dbxref_id->db_id->name . '__' . $term->name));
        $field_name = substr($field_name, 0, 32);