]> git.donarmstrong.com Git - mothur.git/blobdiff - counttable.cpp
added count parameter to chimera.slayer command
[mothur.git] / counttable.cpp
index 005ab8a2846bcd95dc40d1bf1d9b86325deb5e85..376bd73487b4031077f7dd26b1c58b648d9ff04d 100644 (file)
@@ -8,7 +8,23 @@
 
 #include "counttable.h"
 
-
+/************************************************************/
+bool CountTable::testGroups(string file) {
+    try {
+        m = MothurOut::getInstance(); hasGroups = false; total = 0;
+        ifstream in;
+        m->openInputFile(file, in);
+    
+        string headers = m->getline(in); m->gobble(in);
+        vector<string> columnHeaders = m->splitWhiteSpace(headers);
+        if (columnHeaders.size() > 2) { hasGroups = true;   }
+        return hasGroups;
+    }
+       catch(exception& e) {
+               m->errorOut(e, "CountTable", "readTable");
+               exit(1);
+       }
+}
 /************************************************************/
 int CountTable::readTable(string file) {
     try {