]> git.donarmstrong.com Git - mothur.git/blob - classify.h
added versioning info to all shortcut files mothur makes.
[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();
30         virtual ~Classify(){};
31         virtual string getTaxonomy(Sequence*) = 0;
32         virtual string getSimpleTax()  { return simpleTax;      }
33         virtual void generateDatabaseAndNames(string, string, string, int, float, float, float, float);
34         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.
35         
36 protected:
37
38         map<string, string> taxonomy;  //name maps to taxonomy
39         //map<string, int> genusCount;  //maps genus to count - in essence a list of how many seqs are in each taxonomy
40         map<string, int>::iterator itTax;
41         map<string, string>::iterator it;
42         Database* database;
43         PhyloTree* phyloTree;
44         
45         string taxFile, templateFile, simpleTax;
46         vector<string> names;
47         
48         int readTaxonomy(string);
49         vector<string> parseTax(string);
50         MothurOut* m;
51         
52 };
53
54 /**************************************************************************************************/
55
56 #endif
57