]> git.donarmstrong.com Git - mothur.git/blob - bayesian.h
added modify names parameter to set.dir
[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, int, int, bool, bool);
22         ~Bayesian();
23         
24         string getTaxonomy(Sequence*);
25         
26 private:
27         vector< vector<float> > wordGenusProb;  //vector of maps from genus to probability
28                                                                                 //wordGenusProb[0][392] = probability that a sequence within genus that's index in the tree is 392 would contain kmer 0;
29         
30         vector<int> genusTotals;
31         vector<int> genusNodes;  //indexes in phyloTree where genus' are located
32         
33         vector<diffPair> WordPairDiffArr; 
34         
35         int kmerSize, numKmers, confidenceThreshold, iters;
36         
37         string bootstrapResults(vector<int>, int, int);
38         int getMostProbableTaxonomy(vector<int>);
39         void readProbFile(ifstream&, ifstream&, string, string);
40         bool checkReleaseDate(ifstream&, ifstream&, ifstream&, ifstream&);
41         bool isReversed(vector<int>&);
42         vector<int> createWordIndexArr(Sequence*);
43         int generateWordPairDiffArr();
44         
45 };
46
47 /**************************************************************************************************/
48
49 #endif
50