1 #ifndef SUBSAMPLECOMMAND_H
2 #define SUBSAMPLECOMMAND_H
8 * Created by westcott on 10/27/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
13 #include "command.hpp"
14 #include "sharedrabundvector.h"
15 #include "listvector.hpp"
16 #include "rabundvector.hpp"
17 #include "inputdata.h"
18 #include "sequence.hpp"
19 #include "counttable.h"
22 class SubSampleCommand : public Command {
25 SubSampleCommand(string);
27 ~SubSampleCommand() {}
29 vector<string> setParameters();
30 string getCommandName() { return "sub.sample"; }
31 string getCommandCategory() { return "General"; }
32 string getOutputFileNameTag(string, string);
33 string getHelpString();
34 string getCitation() { return "http://www.mothur.org/wiki/Sub.sample"; }
35 string getDescription() { return "get a sampling of sequences from a list, shared, rabund, sabund or fasta file"; }
38 void help() { m->mothurOut(getHelpString()); }
41 bool abort, pickedGroups, allLines, persample;
42 string listfile, groupfile, countfile, sharedfile, rabundfile, sabundfile, fastafile, namefile;
43 set<string> labels; //holds labels to be used
44 string groups, label, outputDir;
45 vector<string> Groups, outputNames;
48 map<string, vector<string> > nameMap;
51 int getSubSampleShared();
52 int getSubSampleList();
53 int getSubSampleRabund();
54 int getSubSampleSabund();
55 int getSubSampleFasta();
56 int processShared(vector<SharedRAbundVector*>&);
57 int processRabund(RAbundVector*&, ofstream&);
58 int processSabund(SAbundVector*&, ofstream&);
59 int processList(ListVector*&, ofstream&, set<string>&);