X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=c670f37919e7da8ce3e3f3ee5d294cd4d23acd94;hb=af27acb766f6947c45e1eb65438d878c7ea48ef3;hp=611cbbc1b226c13d859273dc0cb356bb3b3d13d5;hpb=7e354c9abb09ea3cf5b500a16cc7f6dd79ccb6f5;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index 611cbbc..c670f37 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,40 +1,65 @@ -#ifndef FILTERSEQSCOMMAND_H -#define FILTERSEQSCOMMAND_H - -/* - * filterseqscommand.h - * Mothur - * - * Created by Thomas Ryabin on 5/4/09. - * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. - * - */ - -#include "command.hpp" -#include "filters.h" - -class Sequence; -class FilterSeqsCommand : public Command { - -public: - FilterSeqsCommand(string); - ~FilterSeqsCommand() {}; - int execute(); - void help(); - -private: - string vertical, filter, fastafile, hard; - int alignmentLength; - - char trump; - bool abort; - float soft; - int numSeqs; - - Filters F; - - vector a, t, g, c, gap; - -}; - -#endif +#ifndef FILTERSEQSCOMMAND_H +#define FILTERSEQSCOMMAND_H + +/* + * filterseqscommand.h + * Mothur + * + * Created by Thomas Ryabin on 5/4/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "command.hpp" +#include "filters.h" + +class Sequence; +class FilterSeqsCommand : public Command { + +public: + FilterSeqsCommand(string); + FilterSeqsCommand(); + ~FilterSeqsCommand() {}; + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } + int execute(); + void help(); + +private: + struct linePair { + unsigned long int start; + unsigned long int end; + linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {} + }; + + vector lines; + vector processIDS; + + string vertical, filter, fasta, hard, outputDir, filterFileName; + vector fastafileNames; + int alignmentLength, processors; + vector bufferSizes; + vector outputNames; + map > outputTypes; + + char trump; + bool abort; + float soft; + int numSeqs; + + string createFilter(); + int filterSequences(); + int createProcessesCreateFilter(Filters&, string); + int createProcessesRunFilter(string, string); + int driverRunFilter(string, string, string, linePair*); + int driverCreateFilter(Filters& F, string filename, linePair* line); + #ifdef USE_MPI + int driverMPIRun(int, int, MPI_File&, MPI_File&, vector&); + int MPICreateFilter(int, int, Filters&, MPI_File&, vector&); + #endif + +}; + +#endif