]> git.donarmstrong.com Git - mothur.git/blobdiff - deuniquetreecommand.cpp
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / deuniquetreecommand.cpp
index 7f33ad65e13a44ed77dc2fab585cbded550475ad..64ea9b700d3e7193fb3502ae2bd5dd160cb26297 100644 (file)
@@ -104,8 +104,8 @@ DeuniqueTreeCommand::DeuniqueTreeCommand(string option)  {
                        }
                        
                        m->runParse = true;
-                       m->Groups.clear();
-                       m->namesOfGroups.clear();
+                       m->clearGroups();
+                       m->clearAllGroups();
                        m->Treenames.clear();
                        m->names.clear();
                        
@@ -116,7 +116,7 @@ DeuniqueTreeCommand::DeuniqueTreeCommand(string option)  {
                                treefile = m->getTreeFile(); 
                                if (treefile != "") { m->mothurOut("Using " + treefile + " as input file for the tree parameter."); m->mothurOutEndLine(); }
                                else {  m->mothurOut("You have no current tree file and the tree parameter is required."); m->mothurOutEndLine(); abort = true; }                                                               
-                       }       
+                       }else { m->setTreeFile(treefile); }     
                        
                        namefile = validParameter.validFile(parameters, "name", true);
                        if (namefile == "not open") { abort = true; }
@@ -124,7 +124,7 @@ DeuniqueTreeCommand::DeuniqueTreeCommand(string option)  {
                                namefile = m->getNameFile(); 
                                if (namefile != "") { m->mothurOut("Using " + namefile + " as input file for the name parameter."); m->mothurOutEndLine(); }
                                else {  m->mothurOut("You have no current name file and the name parameter is required."); m->mothurOutEndLine(); abort = true; }                                                               
-                       }
+                       }else { m->setNameFile(namefile); }
                        
                        outputDir = validParameter.validFile(parameters, "outputdir", false);           if (outputDir == "not found"){  outputDir = m->hasPath(treefile);       }
                }
@@ -181,8 +181,8 @@ int DeuniqueTreeCommand::execute() {
                                
                                if (m->control_pressed) { 
                                        delete tmap; for (int i = 0; i < T.size(); i++) { delete T[i]; }
-                                       for (int i = 0; i < outputNames.size(); i++) {  remove(outputNames[i].c_str()); } outputTypes.clear();
-                                       m->Groups.clear();
+                                       for (int i = 0; i < outputNames.size(); i++) {  m->mothurRemove(outputNames[i]); } outputTypes.clear();
+                                       m->clearGroups();
                                        return 0;
                                }