]> git.donarmstrong.com Git - mothur.git/blob - binsequencecommand.h
fixed io
[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 "fastamap.h"
18 #include "groupmap.h"
19
20 class BinSeqCommand : public Command {
21         
22 public:
23         BinSeqCommand(string);  
24         BinSeqCommand();
25         ~BinSeqCommand();
26         
27         vector<string> setParameters();
28         string getCommandName()                 { return "bin.seqs";                    }
29         string getCommandCategory()             { return "Sequence Processing"; }
30         string getOutputFileNameTag(string, string);
31         string getHelpString(); 
32         string getCitation() { return "http://www.mothur.org/wiki/Bin.seqs"; }
33         string getDescription()         { return "maps sequences to otus"; }
34         
35         int execute(); 
36         void help() { m->mothurOut(getHelpString()); }          
37         
38 private:
39         
40         ListVector* list;
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, listfile, namesfile, groupfile, label, outputDir;
47         ofstream out;
48         ifstream in, inNames;
49         vector<string> outputNames;
50         
51         void readNamesFile();
52         int process(ListVector*);
53 };
54
55 #endif