]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefactsharedcommand.cpp
fixed memory leak in parsimony calculator and added progress bars to parsimony and...
[mothur.git] / rarefactsharedcommand.cpp
index 9bd8805f4867a6e445b42324d8b13d406471eace..6a4fe85b76b56dd5903b98155f0b01121f0f0002 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "rarefactsharedcommand.h"
 #include "sharedsobs.h"
+#include "sharednseqs.h"
 
 //**********************************************************************************************************************
 
@@ -19,15 +20,16 @@ RareFactSharedCommand::RareFactSharedCommand(){
                fileNameRoot = getRootName(globaldata->inputFileName);
                format = globaldata->getFormat();
                validCalculator = new ValidCalculators();
-               
-               setGroups();
                                
                int i;
                for (i=0; i<globaldata->Estimators.size(); i++) {
                        if (validCalculator->isValidCalculator("sharedrarefaction", globaldata->Estimators[i]) == true) { 
                                if (globaldata->Estimators[i] == "sharedobserved") { 
                                        rDisplays.push_back(new RareDisplay(new SharedSobs(), new SharedThreeColumnFile(fileNameRoot+"shared.rarefaction", "")));
+                               }else if (globaldata->Estimators[i] == "sharednseqs") { 
+                                       rDisplays.push_back(new RareDisplay(new SharedNSeqs(), new SharedThreeColumnFile(fileNameRoot+"shared.r_nseqs", "")));
                                }
+
                        }
                }
                
@@ -80,6 +82,9 @@ int RareFactSharedCommand::execute(){
                        order = SharedList->getSharedOrderVector();
                }
                
+               //set users groups
+               setGroups();
+               
                while(order != NULL){
                
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){