8 * Created by westcott on 2/25/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
16 /***********************************************/
21 static MothurOut* getInstance();
22 void setFileName(string);
24 void mothurOut(string);
25 void mothurOutEndLine();
26 void mothurOutJustToLog(string);
27 void errorOut(exception&, string, string);
29 string getDefaultPath() { return defaultPath; }
30 void setDefaultPath(string);
31 string getOutputDir() { return outputDir; }
32 void setOutputDir(string);
34 string getReleaseDate() { return releaseDate; }
35 void setReleaseDate(string r) { releaseDate = r; }
36 string getVersion() { return version; }
37 void setVersion(string r) { version = r; }
39 //functions from mothur.h
41 vector<unsigned long int> divideFile(string, int&);
42 vector<unsigned long int> setFilePosEachLine(string, int&);
43 vector<unsigned long int> setFilePosFasta(string, int&);
44 string sortFile(string, string);
45 void appendFiles(string, string);
46 int renameFile(string, string); //oldname, newname
47 string getFullPathName(string);
48 string hasPath(string);
49 string getExtension(string);
50 string getPathName(string);
51 string getSimpleName(string);
52 string getRootName(string);
54 int openOutputFile(string, ofstream&);
55 int openOutputFileAppend(string, ofstream&);
56 int openInputFile(string, ifstream&);
57 int openInputFile(string, ifstream&, string); //no error given
58 string getline(ifstream&);
59 string getline(istringstream&);
60 void gobble(istream&);
61 void gobble(istringstream&);
62 map<string, int> readNames(string);
65 bool checkReleaseVersion(ifstream&, string);
66 bool anyLabelsToProcess(string, set<string>&, string);
67 bool inUsersGroups(vector<string>, vector<string>);
68 bool inUsersGroups(string, vector<string>);
69 void getNumSeqs(ifstream&, int&);
70 int getNumSeqs(ifstream&);
71 int getNumNames(string);
76 void splitAtEquals(string&, string&);
77 void splitAtComma(string&, string&);
78 void splitAtComma(string&, vector<string>&);
79 void splitAtDash(string&, set<int>&);
80 void splitAtDash(string&, set<string>&);
81 void splitAtDash(string&, vector<string>&);
82 void splitAtChar(string&, vector<string>&, char);
85 int factorial(int num);
86 vector<vector<double> > binomial(int);
87 float ceilDist(float, int);
88 float roundDist(float, int);
89 unsigned int fromBase36(string);
94 //current files - if you add a new type you must edit optionParser->getParameters, get.current command and mothurOut->printCurrentFiles/clearCurrentFiles.
95 string getPhylipFile() { return phylipfile; }
96 string getColumnFile() { return columnfile; }
97 string getListFile() { return listfile; }
98 string getRabundFile() { return rabundfile; }
99 string getSabundFile() { return sabundfile; }
100 string getNameFile() { return namefile; }
101 string getGroupFile() { return groupfile; }
102 string getOrderFile() { return orderfile; }
103 string getOrderGroupFile() { return ordergroupfile; }
104 string getTreeFile() { return treefile; }
105 string getSharedFile() { return sharedfile; }
106 string getRelAbundFile() { return relabundfile; }
107 string getDesignFile() { return designfile; }
108 string getFastaFile() { return fastafile; }
109 string getSFFFile() { return sfffile; }
110 string getQualFile() { return qualfile; }
111 string getOligosFile() { return oligosfile; }
112 string getAccnosFile() { return accnosfile; }
113 string getTaxonomyFile() { return taxonomyfile; }
115 void setListFile(string f) { listfile = getFullPathName(f); }
116 void setTreeFile(string f) { treefile = getFullPathName(f); }
117 void setGroupFile(string f) { groupfile = getFullPathName(f); }
118 void setPhylipFile(string f) { phylipfile = getFullPathName(f); }
119 void setColumnFile(string f) { columnfile = getFullPathName(f); }
120 void setNameFile(string f) { namefile = getFullPathName(f); }
121 void setRabundFile(string f) { rabundfile = getFullPathName(f); }
122 void setSabundFile(string f) { sabundfile = getFullPathName(f); }
123 void setSharedFile(string f) { sharedfile = getFullPathName(f); }
124 void setRelAbundFile(string f) { relabundfile = getFullPathName(f); }
125 void setOrderFile(string f) { orderfile = getFullPathName(f); }
126 void setOrderGroupFile(string f) { ordergroupfile = getFullPathName(f); }
127 void setDesignFile(string f) { designfile = getFullPathName(f); }
128 void setFastaFile(string f) { fastafile = getFullPathName(f); }
129 void setSFFFile(string f) { sfffile = getFullPathName(f); }
130 void setQualFile(string f) { qualfile = getFullPathName(f); }
131 void setOligosFile(string f) { oligosfile = getFullPathName(f); }
132 void setAccnosFile(string f) { accnosfile = getFullPathName(f); }
133 void setTaxonomyFile(string f) { taxonomyfile = getFullPathName(f); }
135 void printCurrentFiles();
136 void clearCurrentFiles();
139 static MothurOut* _uniqueInstance;
140 MothurOut( const MothurOut& ); // Disable copy constructor
141 void operator=( const MothurOut& ); // Disable assignment operator
143 control_pressed = false; defaultPath="";
167 string defaultPath, outputDir;
168 string releaseDate, version;
170 string accnosfile, phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile, taxonomyfile;
171 string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile;
176 int mem_usage(double&, double&);
179 /***********************************************/