]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefactsharedcommand.cpp
working on citations
[mothur.git] / rarefactsharedcommand.cpp
index fb5527a03faa02c913e48a583e0a32705932ec45..fe92f97038eea51cd87a05608bad0e2525070c58 100644 (file)
@@ -81,6 +81,7 @@ RareFactSharedCommand::RareFactSharedCommand(string option)  {
                                
                //allow user to run help
                if(option == "help") {  help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        vector<string> myArray = setParameters();
@@ -146,6 +147,11 @@ RareFactSharedCommand::RareFactSharedCommand(string option)  {
                                 if (calc == "default")  {  calc = "sharedobserved";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
                        if (groups == "not found") { groups = ""; }