]> git.donarmstrong.com Git - mothur.git/blobdiff - splitgroupscommand.cpp
working on pam
[mothur.git] / splitgroupscommand.cpp
index 238eda55e04a3df6e43a2fae8cee5736c4f6febc..88292bd2694e4dd044bcacc8c38d5c2c34a7d204 100644 (file)
@@ -320,7 +320,7 @@ int SplitGroupCommand::runCount(){
        try {
         
         CountTable ct;
-        ct.readTable(countfile);
+        ct.readTable(countfile, true, false);
         if (!ct.hasGroupInfo()) { m->mothurOut("[ERROR]: your count file does not contain group info, cannot split by group.\n"); m->control_pressed = true; }
         
         if (m->control_pressed) { return 0; }
@@ -362,7 +362,7 @@ int SplitGroupCommand::runCount(){
                 for (int i = 0; i < thisSeqsGroups.size(); i++) {
                     if (m->inUsersGroups(thisSeqsGroups[i], Groups)) { //if this sequence belongs to a group we want them print
                         seq.printSequence(*(ffiles[thisSeqsGroups[i]]));
-                        int numSeqs = ct.getGroupCount(seq.getName(), Groups[i]);
+                        int numSeqs = ct.getGroupCount(seq.getName(), thisSeqsGroups[i]);
                         (*(cfiles[thisSeqsGroups[i]])) << seq.getName() << '\t' << numSeqs << '\t' << numSeqs << endl;
                     }
                 }