X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=screenseqscommand.h;h=49d992ac193c7aa42ad4492c9190bda40671fc0b;hb=3094cb29c613d9687e861e1d0cf9104b7141d24e;hp=f88fe2c442cf1d8ea6b0457a45390383c0c45698;hpb=dc874a77f24b3808775e2ce7e39595c647a07f82;p=mothur.git diff --git a/screenseqscommand.h b/screenseqscommand.h index f88fe2c..49d992a 100644 --- a/screenseqscommand.h +++ b/screenseqscommand.h @@ -11,27 +11,60 @@ */ #include "mothur.h" #include "command.hpp" -#include "globaldata.hpp" -#include "readfasta.h" -#include "readnexus.h" -#include "readclustal.h" -#include "readseqsphylip.h" -#include - -using namespace std; class ScreenSeqsCommand : public Command { public: + ScreenSeqsCommand(string); ScreenSeqsCommand(); - ~ScreenSeqsCommand(); - int execute(); + ~ScreenSeqsCommand() {} + + vector 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); - 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 processIDS; //processid + vector lines; + + int screenNameGroupFile(set); + int screenGroupFile(set); + int screenAlignReport(set); + int screenQual(set); + int screenTaxonomy(set); + + int driver(linePair*, string, string, string, set&); + int createProcesses(string, string, string, set&); + + #ifdef USE_MPI + int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, vector&, set&); + #endif + + bool abort; + string fastafile, namefile, groupfile, alignreport, outputDir, qualfile, taxonomy; + int startPos, endPos, maxAmbig, maxHomoP, minLength, maxLength, processors, criteria; + vector outputNames; + vector optimize; + map nameMap; + int readNames(); + + int getSummary(vector&); + int createProcessesCreateSummary(vector&, vector&, vector&, vector&, vector&, string); + int driverCreateSummary(vector&, vector&, vector&, vector&, vector&, string, linePair*); }; #endif