]> git.donarmstrong.com Git - mothur.git/blob - parselistcommand.h
0477acdb06e26ada0f64a25370138a75dc7a06ff
[mothur.git] / parselistcommand.h
1 #ifndef PARSELISTCOMMAND_H
2 #define PARSELISTCOMMAND_H
3 /*
4  *  parselistcommand.h
5  *  Dotur
6  *
7  *  Created by Sarah Westcott on 1/2/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "command.hpp"
13 #include "rabundvector.hpp"
14 #include "sharedlistvector.h"
15 #include "inputdata.h"
16 #include "groupmap.h"
17 #include "readotu.h"
18
19
20 /* The parselist() command:
21         The parselist command is similar to the shared command.  
22         It parses a list file and separates it into groups.   It outputs a .list file for each group.  
23         The parselist command parameter options are listfile and groupfile.  
24         The parselist command should be in the following format: parselist(listfile=yourListFile, groupfile=yourGroupFile). 
25         The listfile parameter and groupfile paramater are required.  */
26
27 class GlobalData;
28
29 class ParseListCommand : public Command {
30         
31 public:
32         ParseListCommand();     
33         ~ParseListCommand();
34         int execute();  
35         
36 private:
37         GlobalData* globaldata;
38         GroupMap* groupMap;
39         InputData* input;
40         ReadOTUFile* read;
41         map<string, ofstream*> filehandles;
42         map<string, SharedListVector*> groupOfLists;
43         SharedListVector* list;
44         map<string, string> listGroups; //maps group name to sequences from that group in a specific OTU
45         map<string, string>::iterator it;
46         map<string, SharedListVector*>::iterator it2;
47         map<string, ofstream*>::iterator it3;
48         void parse(int);
49         string fileroot;
50 };
51
52 #endif