]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
changed heatmap and venn command to use vector of sharedrabunds instead of order...
[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
8 #include "rabundvector.hpp"
9 #include "sabundvector.hpp"
10 #include "listvector.hpp"
11
12
13 using namespace std;
14
15 class ListVector;
16 class SharedListVector;
17 class SparseMatrix;
18 class FullMatrix;
19 class Tree;
20 class OrderVector;
21 class InputData;
22 class GroupMap;
23 class TreeMap;
24 class SAbundVector;
25 class RAbundVector;
26
27 class GlobalData {
28 public:
29         static GlobalData* getInstance();
30         ListVector* gListVector;
31         SparseMatrix* gSparseMatrix;
32         InputData* ginput;
33         OrderVector* gorder;
34         ListVector* glist;
35         vector<Tree*> gTree;
36         SharedListVector* gSharedList;
37         SAbundVector* sabund;
38         RAbundVector* rabund;
39         GroupMap* gGroupmap;
40         FullMatrix* gMatrix;
41         TreeMap* gTreemap;
42         string inputFileName, helpRequest, commandName;
43         bool allLines;
44         vector<string>  Estimators, Groups; //holds estimators to be used
45         set<int> lines; //hold lines to be used
46         set<string> labels; //holds labels to be used
47         vector<string> Treenames;
48         
49         string getPhylipFile();
50         string getColumnFile();
51         string getListFile();
52         string getRabundFile();
53         string getSabundFile();
54         string getNameFile();
55         string getGroupFile();
56         string getOrderFile();
57         string getFastaFile();
58         string getTreeFile();
59         string getSharedFile();
60         string getCutOff();
61         string getFormat();
62         string getPrecision();
63         string getMethod();
64         string getFileRoot();
65         string getIters();
66         string getJumble();
67         string getFreq();
68         string getAbund();
69         string getRandomTree();
70         string getGroups();
71         string getStep();
72         string getForm();
73         string getSorted();
74         string getScale();
75
76         void setListFile(string);
77         void setPhylipFile(string);
78         void setColumnFile(string);
79         void setNameFile(string);
80         void setRabundFile(string);
81         void setSabundFile(string);
82         void setFormat(string);
83         void setRandomTree(string);
84         void setGroups(string);
85         void setCalc(string);
86
87         void clear(); 
88         void clearLabels();
89         void clearAbund();
90         
91         void parseGlobalData(string, string);
92         
93         void parseTreeFile();           //parses through tree file to find names of nodes and number of them
94                                                         //this is required in case user has sequences in the names file that are
95                                                         //not included in the tree. 
96                                                         //only takes names from the first tree in the tree file and assumes that all trees use the same names.
97
98                 
99 private:
100         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, line, label, randomtree, groups;
101         string cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund, step, form, sorted, scale;
102
103         static GlobalData* _uniqueInstance;
104         GlobalData( const GlobalData& ); // Disable copy constructor
105         void operator=( const GlobalData& ); // Disable assignment operator
106         GlobalData();
107         ~GlobalData();
108         void reset();   //clears all non filename parameters
109         void readTreeString(ifstream&);
110         
111         
112         
113 };
114
115 #endif