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, string); 22 ~Bayesian(); 23 24 string getTaxonomy(Sequence*, string&, bool&); 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, string&); 38 int getMostProbableTaxonomy(vector<int>); 39 void readProbFile(ifstream&, ifstream&, string, string); 40 bool isReversed(vector<int>&); 41 vector<int> createWordIndexArr(Sequence*); 42 int generateWordPairDiffArr(); 43 44 }; 45 46 /**************************************************************************************************/ 47 48 #endif 49 50