]> git.donarmstrong.com Git - mothur.git/blobdiff - pairwiseseqscommand.cpp
added check for positive values in pairwise.seqs gap extend, gap open and mismatch...
[mothur.git] / pairwiseseqscommand.cpp
index 98b0fde32dbb4cf9bf86aad283fa1d6ad3a7ea44..a4ccbf8f33b34b5dd8eccebf91242249cc465f28 100644 (file)
@@ -203,12 +203,15 @@ PairwiseSeqsCommand::PairwiseSeqsCommand(string option)  {
                        
                        temp = validParameter.validFile(parameters, "mismatch", false);         if (temp == "not found"){       temp = "-1.0";                  }
                        m->mothurConvert(temp, misMatch);  
+            if (misMatch > 0) { m->mothurOut("[ERROR]: mismatch must be negative.\n"); abort=true; }
                        
                        temp = validParameter.validFile(parameters, "gapopen", false);          if (temp == "not found"){       temp = "-2.0";                  }
                        m->mothurConvert(temp, gapOpen);  
+            if (gapOpen > 0) { m->mothurOut("[ERROR]: gapopen must be negative.\n"); abort=true; }
                        
                        temp = validParameter.validFile(parameters, "gapextend", false);        if (temp == "not found"){       temp = "-1.0";                  }
                        m->mothurConvert(temp, gapExtend); 
+            if (gapExtend > 0) { m->mothurOut("[ERROR]: gapextend must be negative.\n"); abort=true; }
                        
                        temp = validParameter.validFile(parameters, "processors", false);       if (temp == "not found"){       temp = m->getProcessors();      }
                        m->setProcessors(temp);