X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=hcluster.cpp;h=f8f48095b2ec55a8dce91d55881271f2f1837218;hp=e6e97fa9144f4ab4b79c35480e1c57b0235d733f;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=013bc4d9503742c7e8661373b3a65621a5ad2212 diff --git a/hcluster.cpp b/hcluster.cpp index e6e97fa..f8f4809 100644 --- a/hcluster.cpp +++ b/hcluster.cpp @@ -10,7 +10,6 @@ #include "hcluster.h" #include "rabundvector.hpp" #include "listvector.hpp" -#include "sparsematrix.hpp" /***********************************************************************/ HCluster::HCluster(RAbundVector* rav, ListVector* lv, string ms, string d, NameAssignment* n, float c) : rabund(rav), list(lv), method(ms), distfile(d), nameMap(n), cutoff(c) { @@ -551,7 +550,7 @@ int HCluster::combineFile() { in >> first >> second >> dist; m->gobble(in); - if (m->control_pressed) { in.close(); out.close(); remove(tempDistFile.c_str()); return 0; } + if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(tempDistFile); return 0; } //while there are still values in mergedMin that are smaller than the distance read from file while (count < mergedMin.size()) { @@ -630,7 +629,7 @@ int HCluster::combineFile() { mergedMin.clear(); //rename tempfile to distfile - remove(distfile.c_str()); + m->mothurRemove(distfile); rename(tempDistFile.c_str(), distfile.c_str()); //cout << "remove = "<< renameOK << " rename = " << ok << endl; @@ -752,7 +751,7 @@ seqDist HCluster::getNextDist(char* buffer, int& index, int size){ exit(1); } } -/***********************************************************************/ +***********************************************************************/ int HCluster::processFile() { try { string firstName, secondName; @@ -767,7 +766,7 @@ int HCluster::processFile() { //get entry while (!in.eof()) { - if (m->control_pressed) { in.close(); out.close(); remove(outTemp.c_str()); return 0; } + if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outTemp); return 0; } in >> firstName >> secondName >> distance; m->gobble(in); @@ -787,7 +786,7 @@ int HCluster::processFile() { in.close(); out.close(); - remove(distfile.c_str()); + m->mothurRemove(distfile); rename(outTemp.c_str(), distfile.c_str()); return 0;