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"
14 class KruskalWallisCommand : public Command {
18 KruskalWallisCommand(string);
19 KruskalWallisCommand();
20 ~KruskalWallisCommand(){}
22 vector<string> setParameters();
23 string getCommandName() { return "kruskalwallis"; }
24 string getCommandCategory() { return "Hypothesis Testing"; }
25 string getOutputFileNameTag(string, string);
26 string getHelpString();
27 string getCitation() { return "http://www.mothur.org/wiki/kruskalwallis"; }
28 string getDescription() { return "Non-parametric method for testing whether samples originate from the same distribution."; }
37 void help() { m->mothurOut(getHelpString()); }
38 void assignRank(vector<groupRank>&);
45 vector<double> rankSums;
46 vector<double> rankMeans;
50 static bool comparevalue(const groupRank &a, const groupRank &b) { return a.value < b.value; }
51 static bool equalvalue(const groupRank &a, const groupRank &b) { return a.value == b.value; }
52 static bool comparerank(const groupRank &a, const groupRank &b) { return a.rank < b.rank; }
53 static bool equalrank(const groupRank &a, const groupRank &b) { return a.rank == b.rank; }
54 static bool equalgroup(const groupRank &a, const groupRank &b) { return a.group == b.group; }
58 #endif /* KRUSKALWALLISCOMMAND_H */