]> git.donarmstrong.com Git - mothur.git/blob - classify.h
worked on hcluster. made .single command run using a sharedfile. and various other...
[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
21 class Sequence;
22
23
24 /**************************************************************************************************/
25
26 class Classify {
27
28 public:
29         Classify(string, string, string, int, float, float, float, float);
30         
31         virtual ~Classify(){  delete phyloTree; delete database;  };
32         virtual string getTaxonomy(Sequence*) = 0;
33         //virtual map<string, int> getConfidenceScores() { return taxConfidenceScore; }
34         //virtual vector<string> parseTax(string);
35         virtual string getSimpleTax()  { return simpleTax;      }
36         
37 protected:
38
39         map<string, string> taxonomy;  //name maps to taxonomy
40         //map<string, int> genusCount;  //maps genus to count - in essence a list of how many seqs are in each taxonomy
41         map<string, int>::iterator itTax;
42         map<string, string>::iterator it;
43         Database* database;
44         PhyloTree* phyloTree;
45         
46         string taxFile, templateFile, simpleTax;
47         vector<string> names;
48         
49         void readTaxonomy(string);
50         vector<string> parseTax(string);
51 };
52
53 /**************************************************************************************************/
54
55 #endif
56