]> git.donarmstrong.com Git - mothur.git/blobdiff - summaryqualcommand.h
working on pam
[mothur.git] / summaryqualcommand.h
index ac65938bc23075fc7db7cb40b9ce6d05d0d5d64e..b9edc5148ca5f7a834433815204b40f9ea317db4 100644 (file)
@@ -25,8 +25,9 @@ public:
        vector<string> setParameters();
        string getCommandName()                 { return "summary.qual";                        }
        string getCommandCategory()             { return "Sequence Processing";         }
-       string getOutputFileNameTag(string, string);
+       
        string getHelpString(); 
+    string getOutputPattern(string);   
        string getCitation() { return "http://www.mothur.org/wiki/Summary.qual"; }
        string getDescription()         { return "summarize the quality of a set of sequences"; }
        
@@ -65,7 +66,7 @@ struct seqSumQualData {
        string filename; 
        unsigned long long start;
        unsigned long long end;
-       int count;
+       int count, numSeqs;
        MothurOut* m;
     bool hasNameMap;
        map<string, int> nameMap;
@@ -100,7 +101,8 @@ static DWORD WINAPI MySeqSumQualThreadFunction(LPVOID lpParam){
                        in.seekg(pDataArray->start-1); pDataArray->m->gobble(in); 
                }
                
-               int count = 0;
+               pDataArray->count = 0;
+        pDataArray->numSeqs = 0;
                for(int i = 0; i < pDataArray->end; i++){ //end is the number of sequences to process
                                
                        if (pDataArray->m->control_pressed) { in.close(); pDataArray->count = 1; return 1; }
@@ -137,11 +139,11 @@ static DWORD WINAPI MySeqSumQualThreadFunction(LPVOID lpParam){
                                        else { pDataArray->scores.at(i)[thisScores[i]] += num; }  
                                }
                                
-                               count += num;
+                               pDataArray->numSeqs += num;
+                pDataArray->count++;
                        }
                }
                
-               pDataArray->count = count;
                in.close();
                
                return 0;