]> git.donarmstrong.com Git - mothur.git/blob - subsamplecommand.h
changes while testing
[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 "sharedrabundvector.h"
15 #include "listvector.hpp"
16 #include "rabundvector.hpp"
17 #include "inputdata.h"
18 #include "sequence.hpp"
19 #include "counttable.h"
20
21
22 class SubSampleCommand : public Command {
23
24 public:
25         SubSampleCommand(string);
26         SubSampleCommand();
27         ~SubSampleCommand() {}
28         
29         vector<string> setParameters();
30         string getCommandName()                 { return "sub.sample";  }
31         string getCommandCategory()             { return "Sequence Processing";         }
32         
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"; }
37
38         int execute(); 
39         void help() { m->mothurOut(getHelpString()); }  
40         
41 private:        
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;
47         int size;
48         vector<string> names;
49         map<string, vector<string> > nameMap;
50     CountTable ct;
51         
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>&);
61         int getNames();
62         int readNames();
63     int getTax(set<string>&);
64         
65 };
66
67 #endif
68