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 "Sequence Processing"; }
33 string getHelpString();
34 string getOutputPattern(string);
35 string getCitation() { return "http://www.mothur.org/wiki/Sub.sample"; }
36 string getDescription() { return "get a sampling of sequences from a list, shared, rabund, sabund or fasta file"; }
39 void help() { m->mothurOut(getHelpString()); }
42 bool abort, pickedGroups, allLines, persample;
43 string listfile, groupfile, countfile, sharedfile, rabundfile, sabundfile, fastafile, namefile, taxonomyfile;
44 set<string> labels; //holds labels to be used
45 string groups, label, outputDir;
46 vector<string> Groups, outputNames;
49 map<string, vector<string> > nameMap;
52 int getSubSampleShared();
53 int getSubSampleList();
54 int getSubSampleRabund();
55 int getSubSampleSabund();
56 int getSubSampleFasta();
57 int processShared(vector<SharedRAbundVector*>&);
58 int processRabund(RAbundVector*&, ofstream&);
59 int processSabund(SAbundVector*&, ofstream&);
60 int processList(ListVector*&, ofstream&, set<string>&);
63 int getTax(set<string>&);