2 * File: kruskalwalliscommand.h
5 * Created on June 26, 2012, 11:07 AM
8 #ifndef KRUSKALWALLISCOMMAND_H
9 #define KRUSKALWALLISCOMMAND_H
11 #include "command.hpp"
12 #include "inputdata.h"
13 #include "sharedrabundvector.h"
16 class KruskalWallisCommand : public Command {
20 KruskalWallisCommand(string);
21 KruskalWallisCommand();
22 ~KruskalWallisCommand(){}
24 vector<string> setParameters();
25 string getCommandName() { return "kruskalwallis"; }
26 string getCommandCategory() { return "Hypothesis Testing"; }
27 string getOutputPattern(string);
28 string getHelpString();
29 string getCitation() { return "http://www.mothur.org/wiki/kruskalwallis"; }
30 string getDescription() { return "Non-parametric method for testing whether samples originate from the same distribution."; }
39 void help() { m->mothurOut(getHelpString()); }
40 void assignRank(vector<groupRank>&);
41 void assignValue(vector<groupRank>&);
45 string outputDir, sharedfile, groups;
48 vector<string> outputNames, Groups;
50 vector<double> rankSums;
51 vector<double> rankMeans;
55 static bool comparevalue(const groupRank &a, const groupRank &b) { return a.value < b.value; }
56 static bool equalvalue(const groupRank &a, const groupRank &b) { return a.value == b.value; }
57 static bool comparerank(const groupRank &a, const groupRank &b) { return a.rank < b.rank; }
58 static bool equalrank(const groupRank &a, const groupRank &b) { return a.rank == b.rank; }
59 static bool equalgroup(const groupRank &a, const groupRank &b) { return a.group == b.group; }
63 #endif /* KRUSKALWALLISCOMMAND_H */