#include "command.hpp"
#include "inputdata.h"
-#include "sharedrabundvector.h"
-
+#include "designmap.h"
class KruskalWallisCommand : public Command {
~KruskalWallisCommand(){}
vector<string> 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 {
int execute();
void help() { m->mothurOut(getHelpString()); }
void assignRank(vector<groupRank>&);
+ void assignValue(vector<groupRank>&);
private:
- string outputDir, sharedfile;
- bool abort;
- set<string> labels;
+ bool abort, allLines;
+ string outputDir, sharedfile, designfile, mclass;
vector<string> outputNames;
- vector<int> counts;
- vector<double> rankSums;
- vector<double> rankMeans;
-
-
-
- static bool comparevalue(const groupRank &a, const groupRank &b) { return a.value < b.value; }
- static bool equalvalue(const groupRank &a, const groupRank &b) { return a.value == b.value; }
- static bool comparerank(const groupRank &a, const groupRank &b) { return a.rank < b.rank; }
- static bool equalrank(const groupRank &a, const groupRank &b) { return a.rank == b.rank; }
- static bool equalgroup(const groupRank &a, const groupRank &b) { return a.group == b.group; }
+ set<string> labels;
+ int process(vector<SharedRAbundVector*>&, DesignMap&);
};
#endif /* KRUSKALWALLISCOMMAND_H */