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