]> git.donarmstrong.com Git - mothur.git/blobdiff - clusterdoturcommand.cpp
fixed bug with dist.shared subsampling. added mode parameter to dist.shared so...
[mothur.git] / clusterdoturcommand.cpp
index 9f51a8cfd07d83887010f2612831f2eb72e323a7..603bd73d680b485fb4df6ef6cf62e935af3f1ff5 100644 (file)
@@ -132,24 +132,25 @@ ClusterDoturCommand::ClusterDoturCommand(string option)  {
                                        m->mothurOut("You need to provide a phylip file with the cluster.classic command."); m->mothurOutEndLine(); 
                                        abort = true; 
                                }       
-                       }       
+                       }else { m->setPhylipFile(phylipfile); } 
 
                
                        //check for optional parameter and set defaults
                        namefile = validParameter.validFile(parameters, "name", true);
                        if (namefile == "not open") { abort = true; }   
                        else if (namefile == "not found") { namefile = ""; }
+                       else { m->setNameFile(namefile); }
                        
                        string temp;
                        temp = validParameter.validFile(parameters, "precision", false);
                        if (temp == "not found") { temp = "100"; }
                        //saves precision legnth for formatting below
                        length = temp.length();
-                       convert(temp, precision); 
+                       m->mothurConvert(temp, precision); 
                        
                        temp = validParameter.validFile(parameters, "cutoff", false);
                        if (temp == "not found") { temp = "10"; }
-                       convert(temp, cutoff); 
+                       m->mothurConvert(temp, cutoff); 
                        cutoff += (5 / (precision * 10.0));  
                        
                        temp = validParameter.validFile(parameters, "hard", false);                     if (temp == "not found") { temp = "T"; }
@@ -218,7 +219,7 @@ int ClusterDoturCommand::execute(){
                int estart = time(NULL);
        
                while ((cluster->getSmallDist() < cutoff) && (cluster->getNSeqs() > 1)){
-                       if (m->control_pressed) { delete cluster; delete list; delete rabund; sabundFile.close();rabundFile.close();listFile.close();  for (int i = 0; i < outputNames.size(); i++) {   remove(outputNames[i].c_str());         } outputTypes.clear();  return 0;  }
+                       if (m->control_pressed) { delete cluster; delete list; delete rabund; sabundFile.close();rabundFile.close();listFile.close();  for (int i = 0; i < outputNames.size(); i++) {   m->mothurRemove(outputNames[i]);        } outputTypes.clear();  return 0;  }
                
                        cluster->update(cutoff);