]> git.donarmstrong.com Git - mothur.git/commitdiff
cleaned up code2
authorkdiverson <kd.iverson@gmail.com>
Mon, 2 Jul 2012 13:46:29 +0000 (09:46 -0400)
committerkdiverson <kd.iverson@gmail.com>
Mon, 2 Jul 2012 13:46:29 +0000 (09:46 -0400)
kruskalwalliscommand.cpp

index 76aebe05e36b441e29c8632d585d5ba21a4f92a6..de15a8b9cc05f6e8758e81dd1d4a659454eede27 100644 (file)
@@ -124,9 +124,24 @@ int KruskalWallisCommand::execute(){
        try {
                if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
         
+        InputData* input = new InputData(sharedfile, "sharedfile");
+        vector<SharedRAbundVector*> lookup = input->getSharedRAbundVectors();
+               string lastLabel = lookup[0]->getLabel();
+               
+               //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
+               set<string> processedLabels;
+               set<string> userLabels = labels;
+
+        ofstream out;
+               string outputFileName = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + getOutputFileNameTag("summary");
+        m->openOutputFile(outputFileName, out);
+        outputNames.push_back(outputFileName);  outputTypes["summary"].push_back(outputFileName);
+        out.setf(ios::fixed, ios::floatfield); out.setf(ios::showpoint);
+        out << "H\tpvalue\n";
+        
         //math goes here
         
-        int N; //= thisLookUp.size();
+        int N = lookUp.size();
         double H;
         double tmp = 0.0;
         vector<groupRank> vec;