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