]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.cpp
dist.seqs can now use n processors, and only outputs the phylip formatted distance...
[mothur.git] / screenseqscommand.cpp
index 05389072025dcaaf05b2dcaf5e3c4a3ab25c892b..ed71559fba582e8d5a696621ab943a4851579704 100644 (file)
@@ -18,11 +18,11 @@ ScreenSeqsCommand::ScreenSeqsCommand(){
                if(globaldata->getFastaFile() == "")            {       cout << "you must provide a fasta formatted file" << endl;      }
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SeqCoordCommand class Function SeqCoordCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the ScreenSeqsCommand class Function ScreenSeqsCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SeqCoordCommand class function SeqCoordCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the ScreenSeqsCommand class function ScreenSeqsCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
@@ -48,8 +48,8 @@ int ScreenSeqsCommand::execute(){
                
                set<string> badSeqNames;
                
-               string goodSeqFile = getRootName(globaldata->inputFileName) + "good" + getExtension(globaldata->inputFileName);
-               string badSeqFile = getRootName(globaldata->inputFileName) + "bad" + getExtension(globaldata->inputFileName);
+               string goodSeqFile = getRootName(globaldata->getFastaFile()) + "good" + getExtension(globaldata->getFastaFile());
+               string badSeqFile = getRootName(globaldata->getFastaFile()) + "bad" + getExtension(globaldata->getFastaFile());
                
                ofstream goodSeqOut;    openOutputFile(goodSeqFile, goodSeqOut);
                ofstream badSeqOut;             openOutputFile(badSeqFile, badSeqOut);          
@@ -73,15 +73,21 @@ int ScreenSeqsCommand::execute(){
                        }
                        gobble(inFASTA);
                }       
+               if(globaldata->getNameFile() != ""){
+                       screenNameGroupFile(badSeqNames);
+               }
+               else if(globaldata->getGroupFile() != ""){
+                       screenGroupFile(badSeqNames);
+               }
                
                return 0;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the FilterSeqsCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the ScreenSeqsCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the FilterSeqsCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the ScreenSeqsCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }