]> git.donarmstrong.com Git - mothur.git/blobdiff - errorchecking.cpp
dist.seqs can now use n processors, and only outputs the phylip formatted distance...
[mothur.git] / errorchecking.cpp
index 5f5cd1fbc90f864f540671fc876eda1f642a9666..db16ef377cd67eb9cc5e086bcb1afcd7be31bc40 100644 (file)
@@ -276,13 +276,25 @@ bool ErrorCheck::checkInput(string input) {
                        }
                }
                
-               if ((commandName == "filter.seqs") || (commandName == "dist.seqs")) { 
+               if (commandName == "filter.seqs") { 
                        if (fastafile == "") {
-                                cout << "You must enter either a fasta file before you can use the filter.seqs or dist.seqs command." << endl; return false; 
+                                cout << "You must enter either a fasta file before you can use the filter.seqs command." << endl; return false; 
                        }
                        validateReadFiles();
                }
                
+               if (commandName == "dist.seqs") {
+                       if (fastafile == "") {
+                                cout << "You must enter either a fasta file before you can use the dist.seqs command." << endl; return false; 
+                       }else {
+                               ifstream filehandle;
+                               int ableToOpen = openInputFile(fastafile, filehandle);
+                               filehandle.close();
+                               //unable to open
+                               if (ableToOpen == 1) { return false; }
+                       }
+               }
+               
                if (commandName == "align.seqs") {
                        if ((fastafile == "") || (candidatefile == "")) {
                                cout << "You must enter fasta and a candidate file to use the align.seqs command." << endl; return false;