X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=classify.h;h=7b4c1022fef35aacbc33824d99ede551e55b187c;hp=2926800284ce00cbb7ceb2768bfbe35f28a44a80;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=63e089e0b3aad1741bab60119ed7ccc784dce347 diff --git a/classify.h b/classify.h index 2926800..7b4c102 100644 --- a/classify.h +++ b/classify.h @@ -11,12 +11,11 @@ */ -/* This class is a parent to phylotyp, bayesian, knn. */ +/* This class is a parent to bayesian, knn. */ #include "mothur.h" #include "database.hpp" - - +#include "phylotree.h" class Sequence; @@ -25,23 +24,32 @@ class Sequence; class Classify { public: - Classify(string, string, string, int, int, int, int, int); - Classify(){}; - + Classify(); virtual ~Classify(){}; virtual string getTaxonomy(Sequence*) = 0; + virtual string getSimpleTax() { return simpleTax; } + virtual bool getFlipped() { return flipped; } + virtual void generateDatabaseAndNames(string, string, string, int, float, float, float, float); + 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. protected: map taxonomy; //name maps to taxonomy + map::iterator itTax; map::iterator it; Database* database; + PhyloTree* phyloTree; - string taxFile, templateFile; + string taxFile, templateFile, simpleTax; vector names; + int threadID, numLevels, numTaxa; + bool flip, flipped, shortcuts; + + int readTaxonomy(string); + vector parseTax(string); + double getLogExpSum(vector, int&); + MothurOut* m; - void readTaxonomy(string); - }; /**************************************************************************************************/