set_motifs should erase the previous motifs
[mussa.git] / alg / sequence.cpp
index 7d8b12a05b45c6763f40ec6ff3eccb20473afec1..b9163c0c6b17dc103fae39e9487850c08328de49 100644 (file)
@@ -812,15 +812,16 @@ Sequence::find_motif(std::string a_motif)
   a_motif = motif_normalize(a_motif);
   //std::cout << "motif is: " << a_motif << std::endl;
 
-  if (a_motif != "")
+  if (a_motif.size() > 0)
   {
     //std::cout << "Sequence: none blank motif\n";
     motif_scan(a_motif, &motif_match_starts);
 
     a_motif_rc = rc_motif(a_motif);
     // make sure not to do search again if it is a palindrome
-    if (a_motif_rc != a_motif)
+    if (a_motif_rc != a_motif) {
       motif_scan(a_motif_rc, &motif_match_starts);
+    }
   }
   return motif_match_starts;
 }