X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clusterdoturcommand.cpp;h=603bd73d680b485fb4df6ef6cf62e935af3f1ff5;hb=4c302368ef34f0d897afefc7853edf86fb45b9f3;hp=2b7b02b63a3a97d683d16a01b4514c5aa2671626;hpb=e51cb7e261265800fa2d2831b6516e33ebc7d78b;p=mothur.git diff --git a/clusterdoturcommand.cpp b/clusterdoturcommand.cpp index 2b7b02b..603bd73 100644 --- a/clusterdoturcommand.cpp +++ b/clusterdoturcommand.cpp @@ -72,6 +72,7 @@ ClusterDoturCommand::ClusterDoturCommand(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 myArray = setParameters(); @@ -131,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"; } @@ -217,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);