Sfoglia il codice sorgente

Fixed GFF loader to give features with no ID a generic name with 1-based coordinates

spficklin 11 anni fa
parent
commit
21b40fa629

+ 2 - 2
tripal_feature/includes/gff_loader.inc

@@ -645,14 +645,14 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
       // the same parent.
       elseif (array_key_exists('Parent', $tags)) {
         $date = getdate();
-        $attr_uniquename = $tags['Parent'][0] . "-$type-$landmark-" . $date[0] . ":$fmin..$fmax";
+        $attr_uniquename = $tags['Parent'][0] . "-$type-$landmark-" . $date[0] . ":" . ($fmin + 1) . ".." . $fmax;
         $attr_name = $attr_uniquename;
       }
       // generate a unique name based on the date, type and location
       // and set the name to simply be the type
       else {
         $date = getdate();
-        $attr_uniquename = $date[0] . "-$type-$landmark:$fmin..$fmax";
+        $attr_uniquename = $date[0] . "-$type-$landmark:" . ($fmin + 1) . ".." . $fmax;
         $attr_name = $type;
       }      
     }

+ 1 - 1
tripal_feature/includes/seq_extract.inc

@@ -465,7 +465,7 @@ function tripal_feature_seq_extract_get_features($org_commonname, $genus, $speci
   
   if (!$type and !$feature_name and !$genus) {
     print "Please provide a type, feature name or genus\n";
-     eturn;
+     return;
   }
 
   // get the list of features

+ 1 - 1
tripal_feature/tripal_feature.drush.inc

@@ -79,7 +79,7 @@ function drush_tripal_feature_tripal_get_sequence() {
   $derive_from_parent = drush_get_option('parent');
   $aggregate = drush_get_option('agg');
   $child = drush_get_option('child');
-  
+    
   tripal_feature_seq_extract_get_features($org_commonname, $genus, $species, $analysis_name, 
     $type, $feature_name, $upstream, $downstream, $output_format, $derive_from_parent, 
     $aggregate, $child);