]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
removed readseqs, readfasta, readnexus, readclustal, readseqsphylip and updated seque...
[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
95         void setListFile(string);
96         void setGroupFile(string file); 
97         void setPhylipFile(string);
98         void setColumnFile(string);
99         void setNameFile(string);
100         void setRabundFile(string);
101         void setSabundFile(string);
102         void setSharedFile(string);
103         void setFormat(string);
104         void setRandomTree(string);
105         void setGroups(string);
106         void setCalc(string);
107         void setCountEnds(string);
108         void setProcessors(string);
109
110         void clear(); 
111         void clearLabels();
112         void clearAbund();
113         
114         void parseGlobalData(string, string);
115         
116         void parseTreeFile();   //parses through tree file to find names of nodes and number of them
117                                                         //this is required in case user has sequences in the names file that are
118                                                         //not included in the tree. 
119                                                         //only takes names from the first tree in the tree file and assumes that all trees use the same names.
120
121                 
122 private:
123
124         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;
125
126
127         static GlobalData* _uniqueInstance;
128         GlobalData( const GlobalData& ); // Disable copy constructor
129         void operator=( const GlobalData& ); // Disable assignment operator
130         GlobalData();
131         ~GlobalData();
132         void reset();   //clears all non filename parameters
133         void readTreeString(ifstream&);
134         
135         
136         
137 };
138
139 #endif