]> git.donarmstrong.com Git - mothur.git/blob - splitmatrix.h
fixed bug in cluster.split with classify method
[mothur.git] / splitmatrix.h
1 #ifndef SPLITMATRIX_H
2 #define SPLITMATRIX_H
3 /*
4  *  splitmatrix.h
5  *  Mothur
6  *
7  *  Created by westcott on 5/19/10.
8  *  Copyright 2010 Schloss Lab. All rights reserved.
9  *
10  */
11
12
13 #include "mothur.h"
14 #include "mothurout.h"
15
16 /******************************************************/
17
18 class SplitMatrix  {
19         
20         public:
21
22                 SplitMatrix(string, string, string, float, string, bool); //column formatted distance file, namesfile, cutoff, method, large
23                 SplitMatrix(string, string, float, string); //fastafile, taxFile, cutoff, method
24                 
25                 ~SplitMatrix();
26                 int split();
27                 vector< map<string, string> > getDistanceFiles();  //returns map of distance files -> namefile sorted by distance file size
28                 string getSingletonNames() { return singleton; } //returns namesfile containing singletons
29         
30         private:
31                 MothurOut* m;
32
33                 string distFile, namefile, singleton, method, taxFile, fastafile;
34                 vector< map< string, string> > dists;
35                 float cutoff;
36                 bool large;
37                                 
38                 int splitDistance();
39                 int splitClassify();
40                 int splitDistanceLarge();
41                 int splitDistanceRAM();
42                 int splitNames(vector<set<string> >& groups);
43                 int splitDistanceFileByTax(map<string, int>&, int);
44                 int createDistanceFilesFromTax(map<string, int>&, int);
45 };
46
47 /******************************************************/
48
49 #endif
50