]> git.donarmstrong.com Git - mothur.git/blobdiff - getseqscommand.cpp
pat's updates on 7/19/10
[mothur.git] / getseqscommand.cpp
index 8bf93ce68db55f9b380307feb73d83ecf3700c5d..ef0a1ac36de925af45e66c1c9420272272b32f2e 100644 (file)
@@ -22,7 +22,7 @@ GetSeqsCommand::GetSeqsCommand(string option)  {
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta","name", "group", "alignreport", "accnos", "list","taxonomy","outputdir","inputdir"};
+                       string Array[] =  {"fasta","name", "group", "alignreport", "accnos", "dups", "list","taxonomy","outputdir","inputdir"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -238,10 +238,8 @@ int GetSeqsCommand::readFasta(){
                in.close();     
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
                
                return 0;
 
@@ -311,10 +309,8 @@ int GetSeqsCommand::readList(){
                in.close();     
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
                
                return 0;
 
@@ -405,10 +401,8 @@ int GetSeqsCommand::readName(){
                in.close();
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
                
                return 0;
                
@@ -454,10 +448,8 @@ int GetSeqsCommand::readGroup(){
                in.close();
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
                
                return 0;
 
@@ -500,11 +492,9 @@ int GetSeqsCommand::readTax(){
                in.close();
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
-               
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
+                       
                return 0;
 
        }
@@ -569,10 +559,8 @@ int GetSeqsCommand::readAlign(){
                in.close();
                out.close();
                
-               if (wroteSomething == false) {
-                       m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();
-                       remove(outputFileName.c_str()); 
-               }else {  outputNames.push_back(outputFileName); }
+               if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine();  }
+               outputNames.push_back(outputFileName); 
                
                return 0;