X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getgroupscommand.h;fp=getgroupscommand.h;h=224f4f07ea1c45d3e734d8f6406e8a17f40fd1fd;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/getgroupscommand.h b/getgroupscommand.h new file mode 100644 index 0000000..224f4f0 --- /dev/null +++ b/getgroupscommand.h @@ -0,0 +1,62 @@ +#ifndef GETGROUPSCOMMAND_H +#define GETGROUPSCOMMAND_H + +/* + * getgroupscommand.h + * Mothur + * + * Created by westcott on 11/10/10. + * Copyright 2010 Schloss Lab. All rights reserved. + * + */ + + +#include "command.hpp" +#include "groupmap.h" + +class GetGroupsCommand : public Command { + +public: + + GetGroupsCommand(string); + GetGroupsCommand(); + ~GetGroupsCommand(){} + + vector setParameters(); + string getCommandName() { return "get.groups"; } + string getCommandCategory() { return "OTU-Based Approaches"; } + string getHelpString(); + string getCitation() { return "http://www.mothur.org/wiki/Get.groups"; } + string getDescription() { return "gets sequences from a list, fasta, name, group, shared, design or taxonomy file from a given group or set of groups"; } + + + int execute(); + void help() { m->mothurOut(getHelpString()); } + + +private: + set names; + map uniqueToRedundant; //if a namefile is given and the first column name is not selected + //then the other files need to change the unique name in their file to match. + //only add the names that need to be changed to keep the map search quick + string accnosfile, fastafile, namefile, groupfile, listfile, designfile, taxfile, outputDir, groups, sharedfile; + bool abort; + vector outputNames, Groups; + GroupMap* groupMap; + + int readFasta(); + int readName(); + int readGroup(); + void readAccnos(); + int readList(); + int readTax(); + int fillNames(); + int readShared(); + int readDesign(); + +}; + +#endif + + +