]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
added trim.seqs command
[mothur.git] / globaldata.hpp
1 #ifndef GLOBALDATA_HPP
2 #define GLOBALDATA_HPP
3
4 #include "mothur.h"
5 #include "groupmap.h"
6 #include "treemap.h"
7 #include "rabundvector.hpp"
8 #include "sabundvector.hpp"
9 #include "listvector.hpp"
10
11 class ListVector;
12 class SharedListVector;
13 class SparseMatrix;
14 class FullMatrix;
15 class Tree;
16 class OrderVector;
17 class InputData;
18 class GroupMap;
19 class TreeMap;
20 class SAbundVector;
21 class RAbundVector;
22 class SequenceDB;
23
24 class GlobalData {
25 public:
26         static GlobalData* getInstance();
27         ListVector* gListVector;
28         SparseMatrix* gSparseMatrix;
29         InputData* ginput;
30         OrderVector* gorder;
31         ListVector* glist;
32         vector<Tree*> gTree;
33         SharedListVector* gSharedList;
34         SAbundVector* sabund;
35         RAbundVector* rabund;
36         GroupMap* gGroupmap;
37         FullMatrix* gMatrix;
38         TreeMap* gTreemap;
39         SequenceDB* gSequenceDB;
40         string inputFileName, helpRequest, commandName, vertical, argv;
41         bool allLines;
42         vector<string>  Estimators, Groups; //holds estimators to be used
43         set<int> lines; //hold lines to be used
44         set<string> labels; //holds labels to be used
45         vector<string> Treenames;
46         
47         string getPhylipFile();
48         string getColumnFile();
49         string getListFile();
50         string getRabundFile();
51         string getSabundFile();
52         string getNameFile();
53         string getGroupFile();
54         string getOrderFile();
55         string getFastaFile();
56         string getTreeFile();
57         string getSharedFile();
58         string getCutOff();
59         string getFormat();
60         string getPrecision();
61         string getMethod();
62         string getFileRoot();
63         string getIters();
64         string getJumble();
65         string getFreq();
66         string getAbund();
67         string getRandomTree();
68         string getGroups();
69         string getStep();
70         string getForm();
71         string getSorted();
72         string getCountEnds();
73         string getProcessors();
74         string getSize();
75         string getCandidateFile();
76         string getSearch();
77         string getKSize();
78         string getAlign();
79         string getMatch();
80         string getMismatch();
81         string getGapopen();
82         string getGapextend();
83         string getVertical();
84         string getTrump();
85         string getSoft();
86         string getHard();
87         string getScale();
88         string getStartPos();
89         string getEndPos();
90         string getMaxAmbig();
91         string getMaxHomoPolymer();
92         string getMinLength();
93         string getMaxLength();
94         string getFlip();
95         string getForwardMismatch();
96         string getReverseMismatch();
97         string getBarcodeMismatch();
98         string getOligosFile();
99         
100         void setListFile(string);
101         void setGroupFile(string file); 
102         void setPhylipFile(string);
103         void setColumnFile(string);
104         void setNameFile(string);
105         void setRabundFile(string);
106         void setSabundFile(string);
107         void setSharedFile(string);
108         void setFormat(string);
109         void setRandomTree(string);
110         void setGroups(string);
111         void setCalc(string);
112         void setCountEnds(string);
113         void setProcessors(string);
114
115         void clear(); 
116         void clearLabels();
117         void clearAbund();
118         
119         void parseGlobalData(string, string);
120         
121         void parseTreeFile();   //parses through tree file to find names of nodes and number of them
122                                                         //this is required in case user has sequences in the names file that are
123                                                         //not included in the tree. 
124                                                         //only takes names from the first tree in the tree file and assumes that all trees use the same names.
125
126                 
127 private:
128
129         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, line, label, randomtree, groups, cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund, step, form, sorted, trump, soft, hard, scale, countends, processors, candidatefile, search, ksize, align, match, size, mismatch, gapopen, gapextend, minLength, maxLength, startPos, endPos, maxAmbig, maxHomoPolymer, flip, forMismatch, revMismatch, barMismatch, oligoFile;
130
131
132         static GlobalData* _uniqueInstance;
133         GlobalData( const GlobalData& ); // Disable copy constructor
134         void operator=( const GlobalData& ); // Disable assignment operator
135         GlobalData();
136         ~GlobalData();
137         void reset();   //clears all non filename parameters
138         void readTreeString(ifstream&);
139         
140         
141         
142 };
143
144 #endif