]> git.donarmstrong.com Git - mothur.git/blobdiff - getlabelcommand.cpp
added pipeline commands which involved change to command factory and command class...
[mothur.git] / getlabelcommand.cpp
index 1c08eb1fab8905674700bdc440a93ebd38b88a4f..fe4387aa118487b5e60e120246b746222f93a5da 100644 (file)
@@ -9,6 +9,41 @@
 
 #include "getlabelcommand.h"
 
+//**********************************************************************************************************************
+vector<string> GetlabelCommand::getValidParameters(){  
+       try {
+               string Array[] =  {"outputdir","inputdir"};
+               vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetlabelCommand", "getValidParameters");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+vector<string> GetlabelCommand::getRequiredParameters(){       
+       try {
+               vector<string> myArray;
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetlabelCommand", "getRequiredParameters");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+vector<string> GetlabelCommand::getRequiredFiles(){    
+       try {
+               string Array[] =  {"list","rabund","sabund", "or"};
+               vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetlabelCommand", "getRequiredFiles");
+               exit(1);
+       }
+}
 //**********************************************************************************************************************
 
 GetlabelCommand::GetlabelCommand(string option)  {
@@ -59,7 +94,7 @@ int GetlabelCommand::execute(){
                
                filename = globaldata->inputFileName;
                ifstream in;
-               openInputFile(filename, in);
+               m->openInputFile(filename, in);
                string label;
                int numBins = 0;
                int count = -1;