+
+ void addGroup(string g) { Groups.push_back(g); }
+ void setGroups(vector<string>& g) { sort(g.begin(), g.end()); Groups = g; }
+ void clearGroups() { Groups.clear(); }
+ int getNumGroups() { return Groups.size(); }
+ vector<string> getGroups() { sort(Groups.begin(), Groups.end()); return Groups; }
+ void addAllGroup(string g) { namesOfGroups.push_back(g); }
+ void setAllGroups(vector<string>& g) { sort(g.begin(), g.end()); namesOfGroups = g; }
+ void clearAllGroups() { namesOfGroups.clear(); }
+ int getNumAllGroups() { return namesOfGroups.size(); }
+
+ vector<string> getAllGroups() { sort(namesOfGroups.begin(), namesOfGroups.end()); return namesOfGroups; }
+ vector<string> Treenames;
+ //map<string, string> names;
+ vector<string> binLabelsInFile;
+ vector<string> currentBinLabels;
+ string saveNextLabel, argv, sharedHeaderMode, groupMode;
+ bool printedHeaders, commandInputsConvertError;
+
+ //functions from mothur.h
+ //file operations
+ bool dirCheck(string&); //completes path, appends appropriate / or \, makes sure dir is writable.
+ vector<unsigned long long> divideFile(string, int&);
+ int divideFile(string, int&, vector<string>&);
+ vector<unsigned long long> setFilePosEachLine(string, int&);
+ vector<unsigned long long> setFilePosFasta(string, int&);
+ string sortFile(string, string);
+ int appendFiles(string, string);
+ int renameFile(string, string); //oldname, newname
+ string getFullPathName(string);
+ string findProgramPath(string programName);
+ string hasPath(string);
+ string getExtension(string);
+ string getPathName(string);
+ string getSimpleName(string);
+ string getRootName(string);
+ bool isBlank(string);
+ int openOutputFile(string, ofstream&);
+ int openOutputFileAppend(string, ofstream&);
+ int openInputFile(string, ifstream&);
+ int openInputFile(string, ifstream&, string); //no error given
+ string getline(ifstream&);
+ string getline(istringstream&);
+ void gobble(istream&);
+ void gobble(istringstream&);
+ vector<string> splitWhiteSpace(string& rest, char[], int);
+ vector<string> splitWhiteSpace(string);
+ set<string> readAccnos(string);
+ int readAccnos(string, vector<string>&);
+ map<string, int> readNames(string);
+ int readTax(string, map<string, string>&);
+ int readNames(string, map<string, string>&, map<string, int>&);
+ int readNames(string, map<string, string>&);
+ int readNames(string, map<string, string>&, bool);
+ int readNames(string, map<string, string>&, int);
+ int readNames(string, map<string, vector<string> >&);
+ int readNames(string, vector<seqPriorityNode>&, map<string, string>&);
+ int mothurRemove(string);
+ bool mothurConvert(string, int&); //use for converting user inputs. Sets commandInputsConvertError to true if error occurs. Engines check this.
+ bool mothurConvert(string, intDist&); //use for converting user inputs. Sets commandInputsConvertError to true if error occurs. Engines check this.
+ bool mothurConvert(string, float&); //use for converting user inputs. Sets commandInputsConvertError to true if error occurs. Engines check this.
+ bool mothurConvert(string, double&); //use for converting user inputs. Sets commandInputsConvertError to true if error occurs. Engines check this.
+
+
+ //searchs and checks
+ bool checkReleaseVersion(ifstream&, string);
+ bool anyLabelsToProcess(string, set<string>&, string);
+ bool inUsersGroups(vector<string>, vector<string>);
+ bool inUsersGroups(vector<int>, vector< vector<int> >);
+ bool inUsersGroups(string, vector<string>);
+ bool inUsersGroups(int, vector<int>);
+ void getNumSeqs(ifstream&, int&);
+ int getNumSeqs(ifstream&);
+ int getNumNames(string);
+ int getNumChar(string, char);
+ bool isTrue(string);
+ bool isContainingOnlyDigits(string);
+ bool isNumeric1(string);
+
+
+ //string manipulation
+ void splitAtEquals(string&, string&);
+ void splitAtComma(string&, string&);
+ void splitAtComma(string&, vector<string>&);
+ void splitAtDash(string&, set<int>&);
+ void splitAtDash(string&, set<string>&);
+ void splitAtDash(string&, vector<string>&);
+ void splitAtChar(string&, vector<string>&, char);
+ void splitAtChar(string&, string&, char);
+ vector<string> splitWhiteSpaceWithQuotes(string);
+ int removeConfidences(string&);
+ string removeQuotes(string);
+ string makeList(vector<string>&);
+ bool isSubset(vector<string>, vector<string>); //bigSet, subset
+
+ //math operation
+ int factorial(int num);
+ vector<vector<double> > binomial(int);
+ float ceilDist(float, int);
+ float roundDist(float, int);
+ unsigned int fromBase36(string);
+ int getRandomIndex(int); //highest
+ double getStandardDeviation(vector<int>&);