]> git.donarmstrong.com Git - mothur.git/blob - clusterclassic.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / clusterclassic.h
1 #ifndef CLUSTER_H
2 #define CLUSTER_H
3
4
5 #include "mothur.h"
6 #include "mothurout.h"
7 #include "listvector.hpp"
8 #include "rabundvector.hpp"
9 #include "nameassignment.hpp"
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         void update(double&);
27         double getSmallDist() { return smallDist; }     
28         int getNSeqs() { return nseqs; }        
29         ListVector* getListVector() { return list; }
30         RAbundVector* getRAbundVector() { return rabund; }              
31         string getTag();
32         void setMapWanted(bool m);  
33         map<string, int> getSeqtoBin()  {  return seq2Bin;      }
34
35 private:        
36         double getSmallCell();
37         void clusterBins();
38         void clusterNames();
39         void updateMap();
40         void print();
41         
42         struct colDist {
43                 int col;
44                 int row;
45                 double dist;
46                 colDist(int r, int c, double d) : row(r), col(c), dist(d) {}
47         };
48         
49         RAbundVector* rabund;
50         ListVector* list;
51         vector< vector<double> > dMatrix;       
52         //vector<colDist> rowSmallDists;
53         
54         int smallRow;
55         int smallCol, nseqs;
56         double smallDist;
57         bool mapWanted, sim;
58         double cutoff, aboveCutoff;
59         map<string, int> seq2Bin;
60         string method;
61         
62         MothurOut* m;
63 };
64
65 #endif
66
67