]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraccodecommand.cpp
fixed get.lienage and remove.lineage bug with confidence scores that are floats....
[mothur.git] / chimeraccodecommand.cpp
index 223ddb23c1bec61748ce62217001dfac04b565ac..457eaf314bf304fe3d7f9e5eec67509f07236a35 100644 (file)
@@ -25,6 +25,7 @@ vector<string> ChimeraCcodeCommand::getValidParameters(){
 //**********************************************************************************************************************
 ChimeraCcodeCommand::ChimeraCcodeCommand(){    
        try {
+               abort = true; calledHelp = true;
                vector<string> tempOutNames;
                outputTypes["chimera"] = tempOutNames;
                outputTypes["mapinfo"] = tempOutNames;
@@ -61,10 +62,10 @@ vector<string> ChimeraCcodeCommand::getRequiredFiles(){
 //***************************************************************************************************************
 ChimeraCcodeCommand::ChimeraCcodeCommand(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
@@ -239,7 +240,7 @@ ChimeraCcodeCommand::~ChimeraCcodeCommand(){        /*      do nothing      */      }
 int ChimeraCcodeCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int s = 0; s < fastaFileNames.size(); s++) {
                                
@@ -434,6 +435,14 @@ int ChimeraCcodeCommand::execute(){
                        m->mothurOutEndLine(); m->mothurOut("It took " + toString(time(NULL) - start) + " secs to check " + toString(numSeqs) + " sequences."); m->mothurOutEndLine();
                }
                
+               
+               //set accnos file as new current accnosfile
+               string current = "";
+               itTypes = outputTypes.find("accnos");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setAccnosFile(current); }
+               }
+               
                m->mothurOutEndLine();
                m->mothurOut("Output File Names: "); m->mothurOutEndLine();
                for (int i = 0; i < outputNames.size(); i++) {  m->mothurOut(outputNames[i]); m->mothurOutEndLine();    }