]> git.donarmstrong.com Git - mothur.git/blobdiff - clustercommand.cpp
adds group parameter to chimera.uchime so you can check for chimeras with template...
[mothur.git] / clustercommand.cpp
index 25ab61b9f7068f7d5a36df3bd2e4596fd0905078..678912c2076a10af0580f9b778238e3134542c44 100644 (file)
@@ -75,6 +75,7 @@ ClusterCommand::ClusterCommand(string option)  {
                
                //allow user to run help
                if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        vector<string> myArray = setParameters();
@@ -134,16 +135,17 @@ ClusterCommand::ClusterCommand(string option)  {
                        phylipfile = validParameter.validFile(parameters, "phylip", true);
                        if (phylipfile == "not open") { phylipfile = ""; abort = true; }
                        else if (phylipfile == "not found") { phylipfile = ""; }        
-                       else {  distfile = phylipfile;  format = "phylip";      }
+                       else {  distfile = phylipfile;  format = "phylip";      m->setPhylipFile(phylipfile); }
                        
                        columnfile = validParameter.validFile(parameters, "column", true);
                        if (columnfile == "not open") { columnfile = ""; abort = true; }        
                        else if (columnfile == "not found") { columnfile = ""; }
-                       else {  distfile = columnfile; format = "column";       }
+                       else {  distfile = columnfile; format = "column"; m->setColumnFile(columnfile); }
                        
                        namefile = validParameter.validFile(parameters, "name", true);
                        if (namefile == "not open") { abort = true; }   
                        else if (namefile == "not found") { namefile = ""; }
+                       else { m->setNameFile(namefile); }
                        
                        if ((phylipfile == "") && (columnfile == "")) { 
                                //is there are current file available for either of these?
@@ -242,7 +244,7 @@ int ClusterCommand::execute(){
                if (m->control_pressed) { //clean up
                        delete list; delete matrix; delete rabund;
                        sabundFile.close();rabundFile.close();listFile.close();
-                       for (int i = 0; i < outputNames.size(); i++) {  remove(outputNames[i].c_str());         } outputTypes.clear();
+                       for (int i = 0; i < outputNames.size(); i++) {  m->mothurRemove(outputNames[i]);        } outputTypes.clear();
                        return 0;
                }
                
@@ -281,7 +283,7 @@ int ClusterCommand::execute(){
                        if (m->control_pressed) { //clean up
                                delete list; delete matrix; delete rabund; delete cluster;
                                sabundFile.close();rabundFile.close();listFile.close();
-                               for (int i = 0; i < outputNames.size(); i++) {  remove(outputNames[i].c_str());         } outputTypes.clear();
+                               for (int i = 0; i < outputNames.size(); i++) {  m->mothurRemove(outputNames[i]);        } outputTypes.clear();
                                return 0;
                        }
                
@@ -324,7 +326,7 @@ int ClusterCommand::execute(){
                        cout.flush();
                        print_start = false;
                }
-       
+               
                if(previousDist <= 0.0000){
                        printData("unique");
                }