]> git.donarmstrong.com Git - mothur.git/blob - clusterclassic.h
added classic parameter to cluster.split. working on make.contigs command. fixed...
[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
10 /*
11  *  clusterclassic.h
12  *  Mothur
13  *
14  *  Created by westcott on 10/29/10.
15  *  Copyright 2010 Schloss Lab. All rights reserved.
16  *
17  */
18
19
20 class ClusterClassic {
21         
22 public:
23         ClusterClassic(float, string, bool);
24         int readPhylipFile(string, NameAssignment*);
25         void update(double&);
26         double getSmallDist() { return smallDist; }     
27         int getNSeqs() { return nseqs; }        
28         ListVector* getListVector() { return list; }
29         RAbundVector* getRAbundVector() { return rabund; }              
30         string getTag() { return tag; }
31         void setMapWanted(bool m);  
32         map<string, int> getSeqtoBin()  {  return seq2Bin;      }
33
34 private:        
35         double getSmallCell();
36         void clusterBins();
37         void clusterNames();
38         void updateMap();
39         void print();
40         
41         struct colDist {
42                 int col;
43                 int row;
44                 double dist;
45                 colDist(int r, int c, double d) : row(r), col(c), dist(d) {}
46         };
47         
48         RAbundVector* rabund;
49         ListVector* list;
50         vector< vector<double> > dMatrix;       
51         //vector<colDist> rowSmallDists;
52         
53         int smallRow;
54         int smallCol, nseqs;
55         double smallDist;
56         bool mapWanted, sim;
57         double cutoff, aboveCutoff;
58         map<string, int> seq2Bin;
59         string method, tag;
60         
61         MothurOut* m;
62 };
63
64 #endif
65
66