]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.h
finished shhh.seqs command, fixed bug with remove.groups and get.groups that caused...
[mothur.git] / screenseqscommand.h
index f88fe2c442cf1d8ea6b0457a45390383c0c45698..49d992ac193c7aa42ad4492c9190bda40671fc0b 100644 (file)
  */
 #include "mothur.h"
 #include "command.hpp"
-#include "globaldata.hpp"
-#include "readfasta.h"
-#include "readnexus.h"
-#include "readclustal.h"
-#include "readseqsphylip.h"
-#include <set>
-
-using namespace std;
 
 class ScreenSeqsCommand : public Command {
        
 public:
+       ScreenSeqsCommand(string);
        ScreenSeqsCommand();
-       ~ScreenSeqsCommand();
-       int execute();
+       ~ScreenSeqsCommand() {}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "screen.seqs";                         }
+       string getCommandCategory()             { return "Sequence Processing";         }
+       string getHelpString(); 
+       string getCitation() { return "http://www.mothur.org/wiki/Screen.seqs"; }
+       string getDescription()         { return "enables you to keep sequences that fulfill certain user defined criteria"; }
+
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
+       
 private:
-       void screenNameGroupFile(set<string>);
-       int numSeqs;    
-       GlobalData* globaldata; 
-       ReadSeqs* readSeqs;
-       SequenceDB* db;
+
+       struct linePair {
+               unsigned long long start;
+               unsigned long long end;
+               linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
+       };
+
+       vector<int> processIDS;   //processid
+       vector<linePair*> lines;
+
+       int screenNameGroupFile(set<string>);
+       int screenGroupFile(set<string>);
+       int screenAlignReport(set<string>);
+       int screenQual(set<string>);
+       int screenTaxonomy(set<string>);
+       
+       int driver(linePair*, string, string, string, set<string>&);
+       int createProcesses(string, string, string, set<string>&);
+       
+       #ifdef USE_MPI
+       int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long long>&, set<string>&);
+       #endif
+
+       bool abort;
+       string fastafile, namefile, groupfile, alignreport, outputDir, qualfile, taxonomy;
+       int startPos, endPos, maxAmbig, maxHomoP, minLength, maxLength, processors, criteria;
+       vector<string> outputNames;
+       vector<string> optimize;
+       map<string, int> nameMap;
+       int readNames();
+       
+       int getSummary(vector<unsigned long long>&);
+       int createProcessesCreateSummary(vector<int>&, vector<int>&, vector<int>&, vector<int>&, vector<int>&, string);
+       int driverCreateSummary(vector<int>&, vector<int>&, vector<int>&, vector<int>&, vector<int>&, string, linePair*);       
 };
 
 #endif