X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=knn.cpp;h=1835c48f802b861f29a6a6c2360a47788d13bc46;hb=dd173a49e37f6bae73a63c32dd7c98d317bb4a79;hp=a8430723fdd653899e9239b22adaa941af113012;hpb=050220fe7822cc660615972a0054cf4a83eefbe4;p=mothur.git diff --git a/knn.cpp b/knn.cpp index a843072..1835c48 100644 --- a/knn.cpp +++ b/knn.cpp @@ -26,7 +26,7 @@ void Knn::setDistName(string s) { try { outDistName = s; ofstream outDistance; - openOutputFile(outDistName, outDistance); + m->openOutputFile(outDistName, outDistance); outDistance << "Name\tBestMatch\tDistance" << endl; outDistance.close(); } @@ -54,7 +54,7 @@ string Knn::getTaxonomy(Sequence* seq) { //use database to find closest seq vector closest = database->findClosestSequences(seq, num); - if (search == "distance") { ofstream outDistance; openOutputFileAppend(outDistName, outDistance); outDistance << seq->getName() << '\t' << database->getName(closest[0]) << '\t' << database->getSearchScore() << endl; outDistance.close(); } + if (search == "distance") { ofstream outDistance; m->openOutputFileAppend(outDistName, outDistance); outDistance << seq->getName() << '\t' << database->getName(closest[0]) << '\t' << database->getSearchScore() << endl; outDistance.close(); } if (m->control_pressed) { return tax; }