X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=amovacommand.h;h=98d19ddfc249d550c5d6d5b7c33cf036642393a0;hp=3b90b967437df2c0ad360675fc89537976dce989;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=ea34218a94af7cb96d4a1b44e444a87c7ab7456c diff --git a/amovacommand.h b/amovacommand.h index 3b90b96..98d19dd 100644 --- a/amovacommand.h +++ b/amovacommand.h @@ -11,53 +11,41 @@ */ #include "command.hpp" -#include "inputdata.h" -#include "sharedrabundvector.h" -#include "validcalculator.h" -#include "readphylipvector.h" - -class GlobalData; +class GroupMap; class AmovaCommand : public Command { public: AmovaCommand(string); AmovaCommand(); - ~AmovaCommand(); - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } - int execute(); - void help(); + ~AmovaCommand() {} -private: - struct linePair { - int start; - int num; - linePair(int i, int j) : start(i), num(j) {} - }; - vector lines; + vector setParameters(); + string getCommandName() { return "amova"; } + string getCommandCategory() { return "Hypothesis Testing"; } - GlobalData* globaldata; - GroupMap* designMap; - map > outputTypes; + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46.\nhttp://www.mothur.org/wiki/Amova"; } + string getDescription() { return "analysis of molecular variance"; } - 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 execute(); + void help() { m->mothurOut(getHelpString()); } - int driver(int, int, vector, string); - int driver(int, int, vector, string, vector< vector >&); - int process(vector); - int calcAmova(ofstream&, int, vector); - double calcWithin(vector< vector >&, int, vector); - double calcTotal(int); +private: + double runAMOVA(ofstream&, map >, double); + double calcSSWithin(map >&); + double calcSSTotal(map >&); + map > getRandomizedGroups(map >); + + bool abort; + vector outputNames, Sets; + + string outputDir, inputDir, designFileName, phylipFileName; + GroupMap* designMap; + vector< vector > distanceMatrix; + int iters; + double experimentwiseAlpha; }; #endif