X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=subsamplecommand.h;h=7b251eee11c2fa7ad5be7baa6cea4427c90265c7;hb=a0f1fca79d2ddfa7ad36b4485039c68b5704fe8d;hp=98085ee9d02cd163e8d9ed76022f5a0c2ee59fea;hpb=6cf9539162b0fb0b5c0b99673e999df3cd717c55;p=mothur.git diff --git a/subsamplecommand.h b/subsamplecommand.h index 98085ee..7b251ee 100644 --- a/subsamplecommand.h +++ b/subsamplecommand.h @@ -11,42 +11,57 @@ */ #include "command.hpp" -#include "inputdata.h" -#include "readotu.h" #include "sharedrabundvector.h" +#include "listvector.hpp" +#include "rabundvector.hpp" +#include "inputdata.h" +#include "sequence.hpp" +#include "counttable.h" -class GlobalData; class SubSampleCommand : public Command { public: SubSampleCommand(string); SubSampleCommand(); - ~SubSampleCommand(); - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } - int execute(); - void help(); + ~SubSampleCommand() {} -private: - GlobalData* globaldata; - ReadOTUFile* read; - InputData* input; - vector lookup; - ListVector* list; - RAbundVector* rabund; - SAbundVector* sabund; + vector setParameters(); + string getCommandName() { return "sub.sample"; } + string getCommandCategory() { return "Sequence Processing"; } - bool abort, allLines, pickedGroups; + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "http://www.mothur.org/wiki/Sub.sample"; } + string getDescription() { return "get a sampling of sequences from a list, shared, rabund, sabund or fasta file"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + +private: + bool abort, pickedGroups, allLines, persample; + string listfile, groupfile, countfile, sharedfile, rabundfile, sabundfile, fastafile, namefile, taxonomyfile; set labels; //holds labels to be used string groups, label, outputDir; vector Groups, outputNames; - map > outputTypes; + int size; + vector names; + map > nameMap; + CountTable ct; + + int getSubSampleShared(); + int getSubSampleList(); + int getSubSampleRabund(); + int getSubSampleSabund(); + int getSubSampleFasta(); + int processShared(vector&); + int processRabund(RAbundVector*&, ofstream&); + int processSabund(SAbundVector*&, ofstream&); + int processList(ListVector*&, ofstream&, set&); + int getNames(); + int readNames(); + int getTax(set&); - int eliminateZeroOTUS(vector&); - int getSubSampleShared(vector&, ofstream&); }; #endif