]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/Align.pm
error handling and seq guess fix
[biopieces.git] / code_perl / Maasha / Align.pm
index 622846dc9c374117fb41d588d571f6dd550cd9b3..a01ec4b8cadc86660a9bd69965ca14564a04035f 100644 (file)
@@ -272,7 +272,7 @@ sub align_pins
 
     $type ||= Maasha::Seq::seq_guess_type( $entry1->[ SEQ ] );
 
-    $blosum = blosum_read() if $type =~ /protein/;
+    $blosum = blosum_read() if $type eq "PROTEIN";
 
     for ( $i = 0; $i < length $entry1->[ SEQ ]; $i++ )
     {
@@ -480,9 +480,9 @@ sub align_tile
 
         $type = Maasha::Seq::seq_guess_type( $seq1 );
 
-        if ( $type =~ /rna/i ) {
+        if ( $type eq "RNA" ) {
             $seq2 = Maasha::Seq::rna_revcomp( $seq1 );
-        } elsif ( $type =~ /dna/i ) {
+        } elsif ( $type eq "DNA" ) {
             $seq2 = Maasha::Seq::dna_revcomp( $seq1 );
         } else {
             Maasha::Common::error( qq(Bad sequence type->$type) );