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