]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
301527a3f9b1e07d7f82ecbd4a04778ec0f39c37
[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         
52         
53         string getPhylipFile();
54         string getColumnFile();
55         string getListFile();
56         string getRabundFile();
57         string getSabundFile();
58         string getNameFile();   //do we need this?
59         string getGroupFile();  //do we need this?
60         string getOrderFile();
61         string getOrderGroupFile();
62         string getTreeFile();
63         string getSharedFile();
64         string getFormat();     //do we need this?
65
66
67         void setListFile(string);
68         void setTreeFile(string);
69         void setGroupFile(string);              //do we need this?
70         void setPhylipFile(string);
71         void setColumnFile(string);
72         void setNameFile(string);       //do we need this?
73         void setRabundFile(string);
74         void setSabundFile(string);
75         void setSharedFile(string);
76         void setOrderFile(string file);
77         void setOrderGroupFile(string file);
78         void setFormat(string); //do we need this?
79         
80         NameAssignment* nameMap;
81         
82         void clear(); 
83         void clearLabels();
84         void clearAbund();
85         
86         void newRead();
87         
88 private:
89         MothurOut* m;
90         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, treefile, sharedfile, format, distfile, ordergroup;
91
92         static GlobalData* _uniqueInstance;
93         GlobalData( const GlobalData& ); // Disable copy constructor
94         void operator=( const GlobalData& ); // Disable assignment operator
95         GlobalData();
96         ~GlobalData();
97         
98         
99 };
100
101 #endif