]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.h
added checks to make sure windows processes completed their tasks.
[mothur.git] / screenseqscommand.h
index 54c8fbb76a9f8db6d200b02feb2e28ce106682d0..6f4e8aca688cd3342c13400aff588f4f3eaec24a 100644 (file)
@@ -23,7 +23,9 @@ public:
        vector<string> setParameters();
        string getCommandName()                 { return "screen.seqs";                         }
        string getCommandCategory()             { return "Sequence Processing";         }
+       
        string getHelpString(); 
+    string getOutputPattern(string);   
        string getCitation() { return "http://www.mothur.org/wiki/Screen.seqs"; }
        string getDescription()         { return "enables you to keep sequences that fulfill certain user defined criteria"; }
 
@@ -43,6 +45,7 @@ private:
 
        int screenNameGroupFile(set<string>);
        int screenGroupFile(set<string>);
+    int screenCountFile(set<string>);
        int screenAlignReport(set<string>);
        int screenQual(set<string>);
        int screenTaxonomy(set<string>);
@@ -55,7 +58,7 @@ private:
        #endif
 
        bool abort;
-       string fastafile, namefile, groupfile, alignreport, outputDir, qualfile, taxonomy;
+       string fastafile, namefile, groupfile, alignreport, outputDir, qualfile, taxonomy, countfile;
        int startPos, endPos, maxAmbig, maxHomoP, minLength, maxLength, processors, criteria;
        vector<string> outputNames;
        vector<string> optimize;
@@ -146,9 +149,11 @@ static DWORD WINAPI MySumThreadFunction(LPVOID lpParam){
                        in.seekg(pDataArray->start-1); pDataArray->m->gobble(in); 
                }
                
-               pDataArray->count = pDataArray->end;
+               
                for(int i = 0; i < pDataArray->end; i++){ //end is the number of sequences to process
                        
+            pDataArray->count++;
+            
                        if (pDataArray->m->control_pressed) { in.close();  pDataArray->count = 1; return 1; }
                        
                        Sequence current(in); pDataArray->m->gobble(in); 
@@ -210,9 +215,10 @@ static DWORD WINAPI MySumScreenThreadFunction(LPVOID lpParam){
                        in.seekg(pDataArray->start-1); pDataArray->m->gobble(in); 
                }
                
-               pDataArray->count = pDataArray->end;
                for(int i = 0; i < pDataArray->end; i++){ //end is the number of sequences to process
                        
+            pDataArray->count++;
+            
                        if (pDataArray->m->control_pressed) { in.close(); badAccnosFile.close(); goodFile.close(); pDataArray->count = 1; return 1; }
                        
                        Sequence currSeq(in); pDataArray->m->gobble(in);