]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.h
changed rarefaction.single output
[mothur.git] / mothurout.h
index 7bbd315b0420ce2a4d42d759aa244303f4998f9d..5ba3d083677a35f4ef0004506bf63f25facb481f 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "mothur.h"
 
-
 /***********************************************/
 
 class MothurOut {
@@ -37,21 +36,33 @@ class MothurOut {
                void setReleaseDate(string r) { releaseDate = r; }
                string getVersion() { return version; }
                void setVersion(string r) { version = r; }
-               vector<string> Groups;
+       
+               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> namesOfGroups;
+               vector<string> binLabelsInFile;
+               vector<string> currentBinLabels;
                string saveNextLabel, argv, sharedHeaderMode;
                bool printedHeaders;
                
                //functions from mothur.h
                //file operations
-               vector<unsigned long int> divideFile(string, int&);
+               vector<unsigned long long> divideFile(string, int&);
                int divideFile(string, int&, vector<string>&);
-               vector<unsigned long int> setFilePosEachLine(string, int&);
-               vector<unsigned long int> setFilePosFasta(string, int&);
+               vector<unsigned long long> setFilePosEachLine(string, int&);
+               vector<unsigned long long> setFilePosFasta(string, int&);
                string sortFile(string, string);
-               void appendFiles(string, string);
+               int appendFiles(string, string);
                int renameFile(string, string); //oldname, newname
                string getFullPathName(string);
                string hasPath(string);
@@ -70,7 +81,10 @@ class MothurOut {
                void gobble(istringstream&);
                map<string, int> readNames(string);
                int readNames(string, map<string, string>&);
+               int readNames(string, map<string, vector<string> >&);
                int readNames(string, vector<seqPriorityNode>&, map<string, string>&);
+               int mothurRemove(string);
+       
                
                //searchs and checks
                bool checkReleaseVersion(ifstream&, string);
@@ -80,6 +94,7 @@ class MothurOut {
                void getNumSeqs(ifstream&, int&);
                int getNumSeqs(ifstream&);
                int getNumNames(string);
+               int getNumChar(string, char);
                bool isTrue(string);
                bool isContainingOnlyDigits(string);
        
@@ -92,6 +107,7 @@ class MothurOut {
                void splitAtDash(string&, set<string>&);
                void splitAtDash(string&, vector<string>&);
                void splitAtChar(string&, vector<string>&, char);
+               int removeConfidences(string&);
                
                //math operation
                int factorial(int num);
@@ -183,7 +199,7 @@ class MothurOut {
                        gui = false;
                        printedHeaders = false;
                        sharedHeaderMode = "";
-               };
+               }
                ~MothurOut();
 
                string logFileName;
@@ -193,7 +209,8 @@ class MothurOut {
                string accnosfile, phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile, taxonomyfile;
                string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile, processors, flowfile;
 
-       
+               vector<string> Groups;
+               vector<string> namesOfGroups;
                ofstream out;
                
                int mem_usage(double&, double&);