]> git.donarmstrong.com Git - mothur.git/blob - subsamplecommand.h
added classify.shared command and random forest files. added count file to pcr.seqs...
[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 "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"; }
36
37         int execute(); 
38         void help() { m->mothurOut(getHelpString()); }  
39         
40 private:        
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;
46         int size;
47         vector<string> names;
48         map<string, vector<string> > nameMap;
49     CountTable ct;
50         
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>&);
60         int getNames();
61         int readNames();
62         
63 };
64
65 #endif
66