]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedcommand.cpp
fixed clearcut version bug, added group count output to get.groups and remove.groups
[mothur.git] / sharedcommand.cpp
index 454bb0558cce6080cdd1859fc0382ed3d47360e3..731f981f7a7b9c14d7f0f9033671cc274b43595b 100644 (file)
@@ -26,7 +26,8 @@ vector<string> SharedCommand::getValidParameters(){
 }
 //**********************************************************************************************************************
 SharedCommand::SharedCommand(){        
-       try {
+       try {           
+               
                //initialize outputTypes
                vector<string> tempOutNames;
                outputTypes["rabund"] = tempOutNames;
@@ -320,6 +321,18 @@ int SharedCommand::execute(){
                                return 1; 
                }
                
+               //set rabund file as new current rabundfile
+               string current = "";
+               itTypes = outputTypes.find("rabund");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setRabundFile(current); }
+               }
+               
+               itTypes = outputTypes.find("shared");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setSharedFile(current); }
+               }       
+               
                m->mothurOutEndLine();
                m->mothurOut("Output File Names: "); m->mothurOutEndLine();
                for (int i = 0; i < outputNames.size(); i++) {  m->mothurOut(outputNames[i]); m->mothurOutEndLine();    }