]> git.donarmstrong.com Git - mothur.git/blob - clusterclassic.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / clusterclassic.h
1 #ifndef CLUSTERCLASSIC_H
2 #define CLUSTERCLASSIC_H
3
4
5 #include "mothurout.h"
6 #include "listvector.hpp"
7 #include "rabundvector.hpp"
8 #include "nameassignment.hpp"
9 #include "counttable.h"
10
11 /*
12  *  clusterclassic.h
13  *  Mothur
14  *
15  *  Created by westcott on 10/29/10.
16  *  Copyright 2010 Schloss Lab. All rights reserved.
17  *
18  */
19
20
21 class ClusterClassic {
22         
23 public:
24         ClusterClassic(float, string, bool);
25         int readPhylipFile(string, NameAssignment*);
26     int readPhylipFile(string, CountTable*);
27         void update(double&);
28         double getSmallDist() { return smallDist; }     
29         int getNSeqs() { return nseqs; }        
30         ListVector* getListVector() { return list; }
31         RAbundVector* getRAbundVector() { return rabund; }              
32         string getTag() { return tag; }
33         void setMapWanted(bool m);  
34         map<string, int> getSeqtoBin()  {  return seq2Bin;      }
35
36 private:        
37         double getSmallCell();
38         void clusterBins();
39         void clusterNames();
40         void updateMap();
41         void print();
42         
43         struct colDist {
44                 int col;
45                 int row;
46                 float dist;
47                 colDist(int r, int c, double d) : row(r), col(c), dist(d) {}
48         };
49         
50         RAbundVector* rabund;
51         ListVector* list;
52         vector< vector<float> > dMatrix;        
53         //vector<colDist> rowSmallDists;
54         
55         int smallRow;
56         int smallCol, nseqs;
57         double smallDist;
58         bool mapWanted, sim;
59         double cutoff, aboveCutoff;
60         map<string, int> seq2Bin;
61         string method, tag;
62         
63         MothurOut* m;
64 };
65
66 #endif
67
68