X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=homovacommand.h;fp=homovacommand.h;h=1ac2aa0471d445b14fa460319cde361841cfa505;hb=17d3033f832c6b8fff5875eb4de29f44a926d4dd;hp=0000000000000000000000000000000000000000;hpb=1e0359c041eedc99670c93d824a2cf7fa72577cc;p=mothur.git diff --git a/homovacommand.h b/homovacommand.h new file mode 100644 index 0000000..1ac2aa0 --- /dev/null +++ b/homovacommand.h @@ -0,0 +1,66 @@ +#ifndef HOMOVACOMMAND_H +#define HOMOVACOMMAND_H + +/* + * homovacommand.h + * mothur + * + * Created by westcott on 2/8/11. + * Copyright 2011 Schloss Lab. All rights reserved. + * + */ + + +#include "command.hpp" +#include "inputdata.h" +#include "sharedrabundvector.h" +#include "validcalculator.h" +#include "readphylipvector.h" + +class GlobalData; + +class HomovaCommand : public Command { + +public: + HomovaCommand(string); + HomovaCommand(); + ~HomovaCommand(); + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } + int execute(); + void help(); + +private: + struct linePair { + int start; + int num; + linePair(int i, int j) : start(i), num(j) {} + }; + vector lines; + + GlobalData* globaldata; + GroupMap* designMap; + map > outputTypes; + + vector< vector > matrix; + bool abort, allLines, pickedGroups; + set labels; //holds labels to be used + string format, groups, label, outputDir, inputDir, designfile, sets, phylipfile, calc, sharedfile; + vector Groups, outputNames, Sets; + vector< vector > namesOfGroupCombos; + int iters, processors; + vector calculators; + + int driver(int, int, vector, string); + int driver(int, int, vector, string, vector< vector >&); + int process(vector); + int calcHomova(ofstream&, int, vector); + map calcWithin(vector< vector >&, int, vector, map&); + double calcTotal(int); +}; + +#endif + +