]> git.donarmstrong.com Git - mothur.git/blobdiff - subsamplecommand.h
captured stdout from system command, fixed bug in trim.seqs added error checks for...
[mothur.git] / subsamplecommand.h
index f068ac32eb975f6fa246fe654d84f56db0e33c3a..5656dab49e7ac7d58665369e58c1950c17b93542 100644 (file)
  */
  
 #include "command.hpp"
-#include "globaldata.hpp"
 #include "sharedrabundvector.h"
 #include "listvector.hpp"
 #include "rabundvector.hpp"
 #include "inputdata.h"
+#include "sequence.hpp"
 
 
 class SubSampleCommand : public Command {
@@ -23,28 +23,39 @@ class SubSampleCommand : public Command {
 public:
        SubSampleCommand(string);
        SubSampleCommand();
-       ~SubSampleCommand();
-       vector<string> getRequiredParameters();
-       vector<string> getValidParameters();
-       vector<string> getRequiredFiles();
-       map<string, vector<string> > getOutputFiles() { return outputTypes; }
-       int execute();
-       void help();
+       ~SubSampleCommand() {}
        
-private:
-       GlobalData* globaldata;
+       vector<string> setParameters();
+       string getCommandName()                 { return "sub.sample";  }
+       string getCommandCategory()             { return "General";             }
+       string getHelpString(); 
+       string getCitation() { return "http://www.mothur.org/wiki/Sub.sample"; }
        
-       bool abort, pickedGroups, allLines;
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
+private:       
+       bool abort, pickedGroups, allLines, persample;
        string listfile, groupfile, sharedfile, rabundfile, sabundfile, fastafile, namefile;
        set<string> labels; //holds labels to be used
        string groups, label, outputDir;
        vector<string> Groups, outputNames;
-       map<string, vector<string> > outputTypes;
        int size;
+       vector<string> names;
+       map<string, vector<string> > nameMap;
        
        int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
        int getSubSampleShared();
+       int getSubSampleList();
+       int getSubSampleRabund();
+       int getSubSampleSabund();
+       int getSubSampleFasta();
        int processShared(vector<SharedRAbundVector*>&, ofstream&);
+       int processRabund(RAbundVector*&, ofstream&);
+       int processSabund(SAbundVector*&, ofstream&);
+       int processList(ListVector*&, ofstream&, set<string>&);
+       int getNames();
+       int readNames();
        
 };