]> git.donarmstrong.com Git - mothur.git/blob - bayesian.h
finished work on classify.seqs bayesian method and various bug fixes
[mothur.git] / bayesian.h
1 #ifndef BAYESIAN_H
2 #define BAYESIAN_H
3
4 /*
5  *  bayesian.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/3/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "classify.h"
15
16 /**************************************************************************************************/
17
18 class Bayesian : public Classify {
19         
20 public:
21         Bayesian(string, string, string, int, int);
22         ~Bayesian() {};
23         
24         string getTaxonomy(Sequence*);
25         //map<string, int> getConfidenceScores() { return taxConfidenceScore; }
26         
27 private:
28         //map<string, vector<double> > taxonomyProbability;     //probability of a word being in a given taxonomy. 
29                                                                                                         //taxonomyProbability[bacteria;][0] = probabtility that a sequence within bacteria; would contain kmer 0;
30                                                                                                         //taxonomyProbability[bacteria;][1] = probabtility that a sequence within bacteria; would contain kmer 1...
31         
32         vector< vector<float> > wordGenusProb;  //vector of maps from genus to probability
33                                                                                                 //wordGenusProb[0][392] = probability that a sequence within genus that's index in the tree is 392 would contain kmer 0;
34         
35         vector<int> genusTotals;
36         vector<int> genusNodes;  //indexes in phyloTree where genus' are located
37         
38         int kmerSize, numKmers, confidenceThreshold;
39         
40         string bootstrapResults(vector<int>, int, int);
41         int getMostProbableTaxonomy(vector<int>);
42         void readProbFile(ifstream&, ifstream&);
43         //map<string, int> parseTaxMap(string);
44         
45 };
46
47 /**************************************************************************************************/
48
49 #endif
50