]> git.donarmstrong.com Git - mothur.git/blob - classify.h
working on pam
[mothur.git] / classify.h
1 #ifndef CLASSIFY_H
2 #define CLASSIFY_H
3
4 /*
5  *  classify.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/3/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 /* This class is a parent to bayesian, knn.  */
15
16 #include "mothur.h"
17 #include "database.hpp"
18 #include "phylotree.h"
19
20 class Sequence;
21
22 /**************************************************************************************************/
23
24 class Classify {
25
26 public:
27         Classify();
28         virtual ~Classify(){};
29         virtual string getTaxonomy(Sequence*) = 0;
30         virtual string getSimpleTax()  { return simpleTax;      }
31         virtual bool getFlipped()  { return flipped;    }
32         virtual void generateDatabaseAndNames(string, string, string, int, float, float, float, float);
33         virtual void setDistName(string s) {} //for knn, so if distance method is selected with knn you can create the smallest distance file in the right place.
34         
35 protected:
36
37         map<string, string> taxonomy;  //name maps to taxonomy
38         map<string, int>::iterator itTax;
39         map<string, string>::iterator it;
40         Database* database;
41         PhyloTree* phyloTree;
42         
43         string taxFile, templateFile, simpleTax;
44         vector<string> names;
45         int threadID, numLevels, numTaxa;
46         bool flip, flipped, shortcuts;
47         
48         int readTaxonomy(string);
49         vector<string> parseTax(string);
50     double getLogExpSum(vector<double>, int&);
51         MothurOut* m;
52         
53 };
54
55 /**************************************************************************************************/
56
57 #endif
58