]> git.donarmstrong.com Git - mothur.git/blob - hcluster.h
added groups option to read.otu, added qtrim option to trim.seqs, fixed bug in get...
[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     bool update(int, int, float);
26         //string getTag();
27
28 protected:      
29         void clusterBins();
30         void clusterNames();
31         int getUpmostParent(int);
32         int makeActive();
33         void printInfo();
34         void updateArrayandLinkTable();
35                 
36         RAbundVector* rabund;
37         ListVector* list;
38         
39         vector<clusterNode> clusterArray;
40         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
41         map<int, int> activeLinks;  //maps sequence to index in linkTable
42         map<int, int>::iterator it;
43         map<int, int>::iterator it2;
44         
45         int numSeqs;
46         
47         int smallRow;
48         int smallCol;
49         float smallDist;
50         
51 };
52
53 /***********************************************************************/
54
55
56
57
58
59
60
61 #endif
62
63