X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=hcluster.h;h=78406505a1665dfa7eb95e7a8c0733ee0a7e7f5e;hb=9f4c08cab5a7a9a0e156bd4a5a3a478b476162dc;hp=dd4c679123f12d90fbc2ca1daaae5045be9a1dc1;hpb=c82900be3ceed3d9bc491bdc98b1819ef85c1af7;p=mothur.git diff --git a/hcluster.h b/hcluster.h index dd4c679..7840650 100644 --- a/hcluster.h +++ b/hcluster.h @@ -12,6 +12,7 @@ #include "mothur.h" +#include "nameassignment.hpp" class RAbundVector; class ListVector; @@ -20,11 +21,12 @@ class ListVector; class HCluster { public: - HCluster(RAbundVector*, ListVector*); + HCluster(RAbundVector*, ListVector*, string, string, NameAssignment*, float); ~HCluster(){}; - void update(int, int, float); + bool update(int, int, float); void setMapWanted(bool m); map getSeqtoBin() { return seq2Bin; } + vector getSeqs(); protected: void clusterBins(); @@ -34,22 +36,40 @@ protected: void printInfo(); void updateArrayandLinkTable(); void updateMap(); + vector getSeqsFNNN(); + vector getSeqsAN(); + int combineFile(); + int processFile(); + //seqDist getNextDist(char*, int&, int); RAbundVector* rabund; ListVector* list; + NameAssignment* nameMap; vector clusterArray; + + //note: the nearest and average neighbor method do not use the link table or active links vector< map > linkTable; // vector of maps - linkTable[1][6] = 2 would mean sequence in spot 1 has 2 links with sequence in 6 map activeLinks; //maps sequence to index in linkTable map::iterator it; + map::iterator itActive; + map::iterator it2Active; map::iterator it2; int numSeqs; int smallRow; int smallCol; - float smallDist; + float smallDist, cutoff; map seq2Bin; - bool mapWanted; + bool mapWanted, exitedBreak; + seqDist next; + string method, distfile; + ifstream filehandle; + + vector mergedMin; + string partialDist; + MothurOut* m; + };