浏览代码

Fixed memory leak in GFF loader

Ficklin 10 年之前
父节点
当前提交
51218fc64e

+ 2 - 2
tripal_core/api/tripal_core.chado_query.api.inc

@@ -905,7 +905,7 @@ function chado_delete_record($table, $match, $options = NULL) {
  * Additional Options Include:
  *  - has_record
  *     Set this argument to 'TRUE' to have this function return a numeric
- *     value for the number of recrods rather than the array of records.  this
+ *     value for the number of records rather than the array of records.  this
  *     can be useful in 'if' statements to check the presence of particula records.
  *  - return_sql
  *     Set this to 'TRUE' to have this function return an array where the first
@@ -1349,7 +1349,7 @@ function chado_select_record($table, $columns, $values, $options = NULL) {
     }
     $sql = drupal_substr($sql, 0, -2);  // get rid of the trailing ', '
   }
-  
+
   // Limit the records returned
   if (array_key_exists('limit', $options) and is_numeric($options['limit'])) {
     $sql .= " LIMIT " . $options['limit'];

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

@@ -477,6 +477,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
       // check to see if we have FASTA section, if so then set the variable
       // to start parsing
       if (preg_match('/^##FASTA/i', $line)) {
+        print "Parsing FASTA portion...\n";
         if ($remove) {
           // we're done because this is a delete operation so break out of the loop.
           break;
@@ -498,7 +499,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
           $result = chado_query($sel_cvterm_sql, $query);
           $cvterm = $result->fetchObject();
           if (!$cvterm) {
-            tripal_report_error('tripal_feature', TRIPAL_ERROR, 
+            tripal_report_error('tripal_feature', TRIPAL_ERROR,
              'cannot find feature type \'%landmark_type\' on line %line_num of the GFF file',
               array('%landmark_type' => $landmark_type, '%line_num' => $line_num));
             return '';
@@ -672,11 +673,6 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
           }
         }
       }
-
-      if ($skip_line) {
-        continue;
-      }
-
       // if neither name nor uniquename are provided then generate one
       if (!$attr_uniquename and !$attr_name) {
         // check if an alternate ID field is suggested, if so, then use