]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
b5e8c7cfc7cb246b9fbf9ca24097b1f3d190366c
[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 #include "tree.h"
11 #include "sparsematrix.hpp"
12 #include "sequencedb.h"
13 #include "nameassignment.hpp"
14
15
16 class ListVector;
17 class SharedListVector;
18 class SparseMatrix;
19 class FullMatrix;
20 class Tree;
21 class OrderVector;
22 class InputData;
23 class GroupMap;
24 class TreeMap;
25 class SAbundVector;
26 class RAbundVector;
27 class SequenceDB;
28
29 class GlobalData {
30 public:
31         static GlobalData* getInstance();
32         ListVector* gListVector;
33         SparseMatrix* gSparseMatrix;
34         InputData* ginput;
35         OrderVector* gorder;
36         ListVector* glist;
37         vector<Tree*> gTree;
38         SharedListVector* gSharedList;
39         SAbundVector* sabund;
40         RAbundVector* rabund;
41         GroupMap* gGroupmap;
42         FullMatrix* gMatrix;
43         TreeMap* gTreemap;
44         SequenceDB* gSequenceDB;
45         string inputFileName, argv;
46         bool allLines, runParse, jumble, sim;
47         vector<string>  Estimators, Groups; //holds estimators to be used
48         set<string> labels; //holds labels to be used
49         vector<string> Treenames;
50         map<string, string> names;
51         string saveNextLabel;
52         
53         
54         string getPhylipFile();
55         string getColumnFile();
56         string getListFile();
57         string getRabundFile();
58         string getSabundFile();
59         string getNameFile();   //do we need this?
60         string getGroupFile();  //do we need this?
61         string getOrderFile();
62         string getOrderGroupFile();
63         string getTreeFile();
64         string getSharedFile();
65         string getRelAbundFile();
66         string getFormat();     //do we need this?
67
68
69         void setListFile(string);
70         void setTreeFile(string);
71         void setGroupFile(string);              //do we need this?
72         void setPhylipFile(string);
73         void setColumnFile(string);
74         void setNameFile(string);       //do we need this?
75         void setRabundFile(string);
76         void setSabundFile(string);
77         void setSharedFile(string);
78         void setRelAbundFile(string);
79         void setOrderFile(string file);
80         void setOrderGroupFile(string file);
81         void setFormat(string); //do we need this?
82         
83         NameAssignment* nameMap;
84         
85         void clear(); 
86         void clearLabels();
87         void clearAbund();
88         
89         void newRead();
90         
91 private:
92         MothurOut* m;
93         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, treefile, sharedfile, format, distfile, ordergroup, relAbundfile;
94
95         static GlobalData* _uniqueInstance;
96         GlobalData( const GlobalData& ); // Disable copy constructor
97         void operator=( const GlobalData& ); // Disable assignment operator
98         GlobalData();
99         ~GlobalData();
100         
101         
102 };
103
104 #endif