]> git.donarmstrong.com Git - mothur.git/blob - sharedcommand.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / sharedcommand.h
1 #ifndef SHAREDCOMMAND_H
2 #define SHAREDCOMMAND_H
3 /*
4  *  sharedcommand.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 "sharedlistvector.h"
14 #include "inputdata.h"
15
16 /* The shared() command:
17         The shared command can only be executed after a successful read.shared command.  
18         The shared command parses a .list file and separates it into groups.  
19         It outputs a .shared file containing the OTU information for each group.  
20         There are no shared command parameters.  The shared command should be in the following format: shared(). */
21
22
23 class SharedCommand : public Command {
24         
25 public:
26         SharedCommand(string);  
27         SharedCommand();
28         ~SharedCommand();
29         
30         vector<string> setParameters();
31         string getCommandName()                 { return "make.shared";                         }
32         string getCommandCategory()             { return "OTU-Based Approaches";        }
33         string getHelpString(); 
34         
35         int execute(); 
36         void help() { m->mothurOut(getHelpString()); }  
37         
38 private:
39         void printSharedData(vector<SharedRAbundVector*>);
40         int createMisMatchFile();
41         int readOrderFile();
42         bool isValidGroup(string, vector<string>);
43         int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
44         
45         SharedListVector* SharedList;
46         InputData* input;
47         GroupMap* groupMap;
48         vector<string> Groups, outputNames, order;
49         set<string> labels;
50         ofstream out;
51         string filename, fileroot, outputDir, listfile, groupfile, ordergroupfile;
52         bool firsttime, pickedGroups, abort, allLines;
53         map<string, ofstream*> filehandles;
54         map<string, ofstream*>::iterator it3;
55
56 };
57
58 #endif