]> git.donarmstrong.com Git - mothur.git/blobdiff - removeseqscommand.cpp
modified seqerror and qualscores
[mothur.git] / removeseqscommand.cpp
index 384a360353abd1a801e80f1e580054d17deac67d..81c42f6e426a2b59cb074a2d28cbed1c6e529c0b 100644 (file)
@@ -26,8 +26,7 @@ vector<string> RemoveSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 RemoveSeqsCommand::RemoveSeqsCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["taxonomy"] = tempOutNames;
@@ -68,10 +67,10 @@ vector<string> RemoveSeqsCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 RemoveSeqsCommand::RemoveSeqsCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -249,7 +248,7 @@ void RemoveSeqsCommand::help(){
 int RemoveSeqsCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //get names you want to keep
                readAccnos();
@@ -267,6 +266,8 @@ int RemoveSeqsCommand::execute(){
                
                if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) {        remove(outputNames[i].c_str()); } return 0; }
                
+               m->mothurOut("Removed " + toString(names.size()) + " sequences."); m->mothurOutEndLine();
+               
                if (outputNames.size() != 0) {
                        m->mothurOutEndLine();
                        m->mothurOut("Output File Names: "); m->mothurOutEndLine();