1 #ifndef CONCENSUSCOMMAND_H
2 #define CONCENSUSCOMMAND_H
7 * Created by Sarah Westcott on 4/29/09.
8 * Copyright 2009 Schloss Lab UMASS AMherst. All rights reserved.
12 #include "command.hpp"
15 #include "sharedutilities.h"
19 class ConcensusCommand : public Command {
22 ConcensusCommand(string);
28 GlobalData* globaldata;
33 vector<string> treeSet; //set containing all members of the tree to start recursion. filled in getSets().
34 map< vector<string>, int > nodePairs; //<map of possible combinations these combos are the pcounts or descendants info, to how many times they occured
35 // ie. combos FI and EGK would create nodePairs[vector containing F and I] = 1; nodePairs[vector containing E, G and K] = 1
36 // if you saw the combo FI again in another tree you would then update nodePairs[vector containing F and I] = 2;
37 // requires vectors to be sorted to find key.
38 map< vector<string>, int > nodePairsInTree;
39 map<string, int>::iterator it;
40 map< vector<string>, int>::iterator it2;
41 string outputFile, notIncluded;
43 int numNodes, numLeaves, count; //count is the next available spot in the tree vector
46 vector<string> getNextAvailableSet(vector<string>); //gets next largest and highest rated set that is a subset of the set passed in.
47 vector<string> getRestSet(vector<string>, vector<string>);
48 bool isSubset(vector<string>, vector<string>);
50 int buildConcensusTree(vector<string>);