]> git.donarmstrong.com Git - mothur.git/blob - subsamplecommand.h
finished chimera.slayer adding trim parameter, added persample parameter to sub.sampl...
[mothur.git] / subsamplecommand.h
1 #ifndef SUBSAMPLECOMMAND_H
2 #define SUBSAMPLECOMMAND_H
3
4 /*
5  *  subsamplecommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 10/27/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12  
13 #include "command.hpp"
14 #include "globaldata.hpp"
15 #include "sharedrabundvector.h"
16 #include "listvector.hpp"
17 #include "rabundvector.hpp"
18 #include "inputdata.h"
19
20
21 class SubSampleCommand : public Command {
22
23 public:
24         SubSampleCommand(string);
25         SubSampleCommand();
26         ~SubSampleCommand();
27         vector<string> getRequiredParameters();
28         vector<string> getValidParameters();
29         vector<string> getRequiredFiles();
30         map<string, vector<string> > getOutputFiles() { return outputTypes; }
31         int execute();
32         void help();
33         
34 private:
35         GlobalData* globaldata;
36         
37         bool abort, pickedGroups, allLines, persample;
38         string listfile, groupfile, sharedfile, rabundfile, sabundfile, fastafile, namefile;
39         set<string> labels; //holds labels to be used
40         string groups, label, outputDir;
41         vector<string> Groups, outputNames;
42         map<string, vector<string> > outputTypes;
43         int size;
44         vector<string> names;
45         map<string, vector<string> > nameMap;
46         
47         int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
48         int getSubSampleShared();
49         int getSubSampleList();
50         int getSubSampleRabund();
51         int getSubSampleSabund();
52         int getSubSampleFasta();
53         int processShared(vector<SharedRAbundVector*>&, ofstream&);
54         int processRabund(RAbundVector*&, ofstream&);
55         int processSabund(SAbundVector*&, ofstream&);
56         int processList(ListVector*&, ofstream&, set<string>&);
57         int getNames();
58         int readNames();
59         
60 };
61
62 #endif
63