X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=kruskalwalliscommand.h;h=a82d208cf15ea424413fdae4eee7c666868f4b35;hp=3b5fdcea8975ecc774116fc4f8a824d0db8e64aa;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=847bb54463913763210bd5974bc1b7830012e3ea diff --git a/kruskalwalliscommand.h b/kruskalwalliscommand.h index 3b5fdce..a82d208 100644 --- a/kruskalwalliscommand.h +++ b/kruskalwalliscommand.h @@ -9,8 +9,8 @@ #define KRUSKALWALLISCOMMAND_H #include "command.hpp" - - +#include "inputdata.h" +#include "designmap.h" class KruskalWallisCommand : public Command { @@ -21,37 +21,32 @@ public: ~KruskalWallisCommand(){} vector setParameters(); - string getCommandName() { return "kruskalwallis"; } + string getCommandName() { return "kruskal.wallis"; } string getCommandCategory() { return "Hypothesis Testing"; } - string getOutputFileNameTag(string, string); + string getOutputPattern(string); string getHelpString(); - string getCitation() { return "http://www.mothur.org/wiki/kruskalwallis"; } + string getCitation() { return "http://www.mothur.org/wiki/Kruskal.wallis"; } string getDescription() { return "Non-parametric method for testing whether samples originate from the same distribution."; } struct groupRank { - sstring group; + string group; double value; double rank; }; int execute(); void help() { m->mothurOut(getHelpString()); } - void assignRank(vector); + void assignRank(vector&); + void assignValue(vector&); -private: - string outputDir; - vector counts; - vector rankSums; - vector rankMeans; - - - bool comparevalue(const groupRank &a, const groupRank &b) { return a.value < b.value; } - bool equalvalue(const groupRank &a, const groupRank &b) { return a.value == b.value; } - bool comparerank(const groupRank &a, const groupRank &b) { return a.rank < b.rank; } - bool equalrank(const groupRank &a, const groupRank &b) { return a.rank == b.rank; } - bool equalgroup(const groupRank &a, const groupRank &b) { return a.group == b.group; } +private: + bool abort, allLines; + string outputDir, sharedfile, designfile, mclass, classes; + vector outputNames; + set labels; + int process(vector&, DesignMap&); }; #endif /* KRUSKALWALLISCOMMAND_H */