]> git.donarmstrong.com Git - mothur.git/blobdiff - summarysharedcommand.cpp
added the Calculators Thomas made in the fall. Added parameter and command error...
[mothur.git] / summarysharedcommand.cpp
index 44bd581929a28ae16890530d4963fba1e730d328..a7c38f7726f4ff12ec876085d06dfdfea47be5e7 100644 (file)
@@ -20,6 +20,8 @@
 #include "sharedsorest.h"
 #include "sharedthetayc.h"
 #include "sharedthetan.h"
+#include "sharedkstest.h"
+#include "sharedbdiversity.h"
 #include "sharedochiai.h"
 #include "sharedanderberg.h"
 #include "sharedkulczynski.h"
@@ -64,6 +66,8 @@ SummarySharedCommand::SummarySharedCommand(){
                                        sumCalculators.push_back(new SharedThetaYC());
                                }else if (globaldata->Estimators[i] == "sharedthetan") { 
                                        sumCalculators.push_back(new SharedThetaN());
+                               }else if (globaldata->Estimators[i] == "sharedkstest") { 
+                                       sumCalculators.push_back(new SharedKSTest());
                                }else if (globaldata->Estimators[i] == "sharednseqs") { 
                                        sumCalculators.push_back(new SharedNSeqs());
                                }else if (globaldata->Estimators[i] == "sharedochiai") { 
@@ -81,9 +85,12 @@ SummarySharedCommand::SummarySharedCommand(){
                                }else if (globaldata->Estimators[i] == "sharedbraycurtis") { 
                                        sumCalculators.push_back(new SharedBrayCurtis());
                                }
+                               else if (globaldata->Estimators[i] == "sharedbdiversity") { 
+                                       sumCalculators.push_back(new SharedBDiversity());
+                               }
+                               
                        }
                }
-               
                //reset calc for next command
                globaldata->setCalc("");
 
@@ -152,6 +159,7 @@ int SummarySharedCommand::execute(){
                                int n = 1; 
                                for (int k = 0; k < (lookup.size() - 1); k++) { // pass cdd each set of groups to commpare
                                        for (int l = n; l < lookup.size(); l++) {
+                                               outputFileHandle << order->getLabel() << '\t' << (lookup[k]->getGroup() + lookup[l]->getGroup()) << '\t' << '\t'; //print out label and group
                                                outputFileHandle << order->getLabel() << '\t';
                                                
                                                //sort groups to be alphanumeric