]> git.donarmstrong.com Git - mothur.git/blob - splitgroupscommand.h
added pipeline commands which involved change to command factory and command class...
[mothur.git] / splitgroupscommand.h
1 #ifndef SPLITGROUPSCOMMAND_H
2 #define SPLITGROUPSCOMMAND_H
3
4 /*
5  *  splitgroupscommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 9/20/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 /* split.groups - given a group file, split sequences and names files in to separate files *.group1.fasta and .group1.names. */
15
16
17 #include "command.hpp"
18 #include "groupmap.h"
19 #include "sequence.hpp"
20
21 /***************************************************************************************/
22
23 class SplitGroupCommand : public Command {
24         
25 public:
26         SplitGroupCommand(string);      
27         SplitGroupCommand();
28         ~SplitGroupCommand();
29         vector<string> getRequiredParameters();
30         vector<string> getValidParameters();
31         vector<string> getRequiredFiles();
32         map<string, vector<string> > getOutputFiles() { return outputTypes; }
33         int execute();  
34         void help();
35
36         
37 private:
38         int readNames(); 
39         int splitFasta(); 
40         
41         vector<string> outputNames;
42         map<string, vector<string> > outputTypes;
43         map<string, vector<string> > nameMap;
44         map<string, vector<string> >::iterator itNames;
45         GroupMap* groupMap;
46         
47         string outputDir, namefile, groupfile, groups, fastafile;
48         vector<string> Groups;
49         bool abort;
50 };
51
52 /***************************************************************************************/
53
54 #endif
55
56
57