X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clusterdoturcommand.cpp;h=603bd73d680b485fb4df6ef6cf62e935af3f1ff5;hb=d205e70ae86dbee2efc2df02f2717975854de6ba;hp=9f51a8cfd07d83887010f2612831f2eb72e323a7;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/clusterdoturcommand.cpp b/clusterdoturcommand.cpp index 9f51a8c..603bd73 100644 --- a/clusterdoturcommand.cpp +++ b/clusterdoturcommand.cpp @@ -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);