]> git.donarmstrong.com Git - mothur.git/blob - hcluster.h
fixed some bugs and added mgcluster command
[mothur.git] / hcluster.h
1 #ifndef HCLUSTER_H
2 #define HCLUSTER_H
3
4 /*
5  *  hcluster.h
6  *  Mothur
7  *
8  *  Created by westcott on 10/13/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "mothur.h"
15
16 class RAbundVector;
17 class ListVector;
18
19 /***********************************************************************/
20 class HCluster {
21         
22 public:
23         HCluster(RAbundVector*, ListVector*);
24         ~HCluster(){};
25     void update(int, int, float);
26         void setMapWanted(bool m); 
27         map<string, int> getSeqtoBin()  {  return seq2Bin;      }
28
29 protected:      
30         void clusterBins();
31         void clusterNames();
32         int getUpmostParent(int);
33         int makeActive();
34         void printInfo();
35         void updateArrayandLinkTable();
36         void updateMap();
37                 
38         RAbundVector* rabund;
39         ListVector* list;
40         
41         vector<clusterNode> clusterArray;
42         vector< map<int, int> > linkTable;  // vector of maps - linkTable[1][6] = 2  would mean sequence in spot 1 has 2 links with sequence in 6
43         map<int, int> activeLinks;  //maps sequence to index in linkTable
44         map<int, int>::iterator it;
45         map<int, int>::iterator it2;
46         
47         int numSeqs;
48         int smallRow;
49         int smallCol;
50         float smallDist;
51         map<string, int> seq2Bin;
52         bool mapWanted;
53         
54 };
55
56 /***********************************************************************/
57
58
59
60
61
62
63
64 #endif
65
66