X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=consensuscommand.h;h=a9878517db3b6a1e1bc86d057f1ce5d6a2554b82;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=53b8094b440be3e757bff24209ca97022a7433df;hpb=92dde9a6d6c638fcbbd5dbaa5c79167564f90e49;p=mothur.git diff --git a/consensuscommand.h b/consensuscommand.h index 53b8094..a987851 100644 --- a/consensuscommand.h +++ b/consensuscommand.h @@ -13,19 +13,26 @@ #include "tree.h" #include "treemap.h" #include "sharedutilities.h" - -class GlobalData; class ConcensusCommand : public Command { public: ConcensusCommand(string); - ~ConcensusCommand(); - int execute(); - void help(); + ConcensusCommand(); + ~ConcensusCommand() {} + + vector setParameters(); + string getCommandName() { return "consensus"; } + string getCommandCategory() { return "Hidden"; } + string getHelpString(); + string getCitation() { return "no citation"; } + string getDescription() { return "consensus"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + private: - GlobalData* globaldata; SharedUtil* util; vector t; Tree* consensusTree; @@ -35,15 +42,20 @@ private: // ie. combos FI and EGK would create nodePairs[vector containing F and I] = 1; nodePairs[vector containing E, G and K] = 1 // if you saw the combo FI again in another tree you would then update nodePairs[vector containing F and I] = 2; // requires vectors to be sorted to find key. + map< vector, vector< vector > > bestSplit; //maps a group to its best split + map< vector, int > nodePairsInitialRate; map< vector, int > nodePairsInTree; map::iterator it; map< vector, int>::iterator it2; string outputFile, notIncluded, filename; ofstream out, out2; int numNodes, numLeaves, count; //count is the next available spot in the tree vector + vector outputNames; - void getSets(); - vector getNextAvailableSet(vector); //gets next largest and highest rated set that is a subset of the set passed in. + int getSets(); + int getSubgroupRating(vector); + vector getSmallest(map< vector, int>); + vector getNextAvailableSet(vector, vector&); vector getRestSet(vector, vector); bool isSubset(vector, vector); int findSpot(string);