]> git.donarmstrong.com Git - mothur.git/blob - binsequencecommand.h
added pipeline commands which involved change to command factory and command class...
[mothur.git] / binsequencecommand.h
1 #ifndef BINSEQCOMMAND_H
2 #define BINSEQCOMMAND_H
3 /*
4  *  binsequencecommand.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 4/3/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 /* The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name. */
13
14 #include "command.hpp"
15 #include "inputdata.h"
16 #include "listvector.hpp"
17 #include "readotu.h"
18 #include "fastamap.h"
19 #include "groupmap.h"
20
21
22 class GlobalData;
23
24 class BinSeqCommand : public Command {
25         
26 public:
27         BinSeqCommand(string);  
28         BinSeqCommand();
29         ~BinSeqCommand();
30         vector<string> getRequiredParameters();
31         vector<string> getValidParameters();
32         vector<string> getRequiredFiles();
33         map<string, vector<string> > getOutputFiles() { return outputTypes; }
34         int execute();
35         void help();    
36         
37 private:
38         GlobalData* globaldata;
39         ListVector* list;
40         ReadOTUFile* read;
41         InputData* input;
42         FastaMap* fasta;
43         GroupMap* groupMap;
44         bool abort, allLines;
45         set<string> labels; //holds labels to be used
46         string filename, fastafile, namesfile, groupfile, label, outputDir;
47         ofstream out;
48         ifstream in, inNames;
49         vector<string> outputNames;
50         map<string, vector<string> > outputTypes;
51         
52         void readNamesFile();
53         int process(ListVector*);
54 };
55
56 #endif