X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=anosimcommand.h;h=6e5aba0e65980914e6c25e6e0e55fadc4b0136b9;hp=0b145639d8b0f8551988e67d29ee4a2612efa809;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=ef05a77005bf7af1eb40192a7c2816da01c9499c diff --git a/anosimcommand.h b/anosimcommand.h index 0b14563..6e5aba0 100644 --- a/anosimcommand.h +++ b/anosimcommand.h @@ -12,53 +12,45 @@ #include "command.hpp" -#include "inputdata.h" -#include "sharedrabundvector.h" -#include "validcalculator.h" -#include "readphylipvector.h" -class GlobalData; +class GroupMap; class AnosimCommand : public Command { public: AnosimCommand(string); AnosimCommand(); - ~AnosimCommand(); - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } + ~AnosimCommand(){} + + vector setParameters(); + string getCommandName() { return "anosim"; } + string getCommandCategory() { return "Hypothesis Testing"; } + + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. _Australian Journal of Ecology_ 18, 117-143.\nhttp://www.mothur.org/wiki/Anosim"; } + string getDescription() { return "analysis of similarity"; } + int execute(); - void help(); + void help() { m->mothurOut(getHelpString()); } private: - struct linePair { - int start; - int num; - linePair(int i, int j) : start(i), num(j) {} - }; - vector lines; - - GlobalData* globaldata; + bool abort; GroupMap* designMap; - map > outputTypes; + string outputDir, inputDir, designFileName, phylipFileName; - 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 > convertToRanks(vector >); + double calcR(vector >, map >); + map > getRandomizedGroups(map >); + double runANOSIM(ofstream&, vector >, map >, double); + + vector< vector > distanceMatrix; + vector outputNames; + int iters; + double experimentwiseAlpha; 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 calcAnosim(ofstream&, int, vector); - double calcWithinBetween(vector&, vector, double&); - vector convertToRanks(); + }; #endif