}
//create cluster
- if (method == "furthest") { cluster = new CompleteLinkage(rabund, list, matrix, cutoff); }
- else if(method == "nearest"){ cluster = new SingleLinkage(rabund, list, matrix, cutoff); }
- else if(method == "average"){ cluster = new AverageLinkage(rabund, list, matrix, cutoff); }
+ if (method == "furthest") { cluster = new CompleteLinkage(rabund, list, matrix, cutoff, method); }
+ else if(method == "nearest"){ cluster = new SingleLinkage(rabund, list, matrix, cutoff, method); }
+ else if(method == "average"){ cluster = new AverageLinkage(rabund, list, matrix, cutoff, method); }
tag = cluster->getTag();
if (outputDir == "") { outputDir += hasPath(globaldata->inputFileName); }
print_start = true;
start = time(NULL);
loops = 0;
+ double saveCutoff = cutoff;
while (matrix->getSmallDist() < cutoff && matrix->getNNodes() > 0){
if (print_start && isTrue(timing)) {
loops++;
- cluster->update();
+ cluster->update(cutoff);
float dist = matrix->getSmallDist();
float rndDist = roundDist(dist, precision);
sabundFile.close();
rabundFile.close();
listFile.close();
+
+ if (saveCutoff != cutoff) { mothurOut("changed cutoff to " + toString(cutoff)); mothurOutEndLine(); }
+
//if (isTrue(timing)) {
mothurOut("It took " + toString(time(NULL) - estart) + " seconds to cluster"); mothurOutEndLine();
//}
+
+
return 0;
}
catch(exception& e) {