X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=anosimcommand.h;fp=anosimcommand.h;h=5b62df52451251a99cc895cc24fcf488bd4f9349;hb=e74ac2023625728a7e1e57fa15004101a6270cd9;hp=0000000000000000000000000000000000000000;hpb=83bf613d5a7ffb4dcc75b3cad106d1eed1f9e498;p=mothur.git diff --git a/anosimcommand.h b/anosimcommand.h new file mode 100644 index 0000000..5b62df5 --- /dev/null +++ b/anosimcommand.h @@ -0,0 +1,68 @@ +#ifndef ANOSIMCOMMAND_H +#define ANOSIMCOMMAND_H + +/* + * anosimcommand.h + * mothur + * + * Created by westcott on 2/14/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 AnosimCommand : public Command { + +public: + AnosimCommand(string); + AnosimCommand(); + ~AnosimCommand(); + 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 calcAnosim(ofstream&, int, vector); + double calcWithin(vector&, vector); + double calcBetween(vector&); + vector convertToRanks(); +}; + +#endif + + +