]> git.donarmstrong.com Git - mothur.git/blob - parselistcommand.h
Initial revision
[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 <Carbon/Carbon.h>
13 #include <iostream>
14 #include <fstream>
15 #include <map>
16 #include "command.hpp"
17 #include "rabundvector.hpp"
18 #include "listvector.hpp"
19 #include "inputdata.h"
20 #include "groupmap.h"
21 #include "readmatrix.hpp"
22
23
24 /* The parselist() command:
25         The parselist command is similar to the shared command.  
26         It parses a list file and separates it into groups.   It outputs a .list file for each group.  
27         The parselist command parameter options are listfile and groupfile.  
28         The parselist command should be in the following format: parselist(listfile=yourListFile, groupfile=yourGroupFile). 
29         The listfile parameter and groupfile paramater are required.  */
30
31 class GlobalData;
32
33 class ParseListCommand : public Command {
34         
35 public:
36         ParseListCommand();     
37         ~ParseListCommand();
38         int execute();  
39         
40 private:
41         GlobalData* globaldata;
42         GroupMap* groupMap;
43         InputData* input;
44         ReadMatrix* read;
45         map<string, ofstream*> filehandles;
46         map<string, ListVector*> groupOfLists;
47         ListVector* list;
48         map<string, string> listGroups; //maps group name to sequences from that group in a specific OTU
49         map<string, string>::iterator it;
50         map<string, ListVector*>::iterator it2;
51         map<string, ofstream*>::iterator it3;
52         void parse(int);
53         string fileroot;
54 };
55
56 #endif