Browse Source

Fixed bug in sequence retreval API function if parent has no residues

Stephen Ficklin 12 years ago
parent
commit
086eb4b649

+ 1 - 1
tripal_feature/api/tripal_feature.api.inc

@@ -558,7 +558,7 @@ function tripal_feature_get_formatted_sequence($feature_id, $feature_name,
                 INNER JOIN {feature} OF on FL.srcfeature_id = OF.feature_id                
                 INNER JOIN {cvterm} OCVT on OF.type_id = OCVT.cvterm_id
                 INNER JOIN {organism} OO on OF.organism_id = OO.organism_id
-              WHERE SF.feature_id = $3) as tbl1
+              WHERE SF.feature_id = $3 and NOT (OF.residues = \'\' or OF.residues IS NULL)) as tbl1
     ';              
     $status = tripal_core_chado_prepare('sequence_by_parent', $psql, array('int', 'int', 'int'));
     if (!$status) {

+ 1 - 1
tripal_feature/includes/gff_loader.inc

@@ -2009,4 +2009,4 @@ function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $
     watchdog('T_gff3_loader', "Could not add 'Target' alignment as it is improperly formatted:  '%target'",
       array('%target' => $tags['Target'][0]), WATCHDOG_ERROR);            
   }
-}
+}