]> git.donarmstrong.com Git - mothur.git/blobdiff - kruskalwalliscommand.h
changes while testing
[mothur.git] / kruskalwalliscommand.h
index 003ea91c37fa29eb5f46825f12f898a6b842ad55..73ef6434de6d6edcd6449e8824aae2d7f099b289 100644 (file)
@@ -9,12 +9,8 @@
 #define        KRUSKALWALLISCOMMAND_H
 
 #include "command.hpp"
-
-    struct groupRank {
-        sstring group;
-        double value;
-        double rank;        
-    };
+#include "inputdata.h"
+#include "designmap.h"
 
 class KruskalWallisCommand : public Command {
    
@@ -25,31 +21,32 @@ public:
        ~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 {
+        string group;
+        double value;
+        double rank;        
+    };
+    
     int execute(); 
        void help() { m->mothurOut(getHelpString()); }
-    void assignRank(vector<groupRank>);
+    void assignRank(vector<groupRank>&);
+    void assignValue(vector<groupRank>&);
     
-private:
-    string outputDir;
-    vector<int> counts;
-    vector<double> rankSums;
-    vector<double> 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;
+    vector<string> outputNames;
+    set<string> labels;
     
+    int process(vector<SharedRAbundVector*>&, DesignMap&);    
 };
 
 #endif /* KRUSKALWALLISCOMMAND_H */