X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=c670f37919e7da8ce3e3f3ee5d294cd4d23acd94;hb=c3396974063d6efc5e5850ddf4ed8ab65cc94bb9;hp=2f318c0abbb575b6087477344199275b61305706;hpb=cb9c5129766d46fa1a266f724c1ebd41047f3a03;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index 2f318c0..c670f37 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,59 +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" -#include "mpi.h" - -class Sequence; -class FilterSeqsCommand : public Command { - -public: - FilterSeqsCommand(string); - ~FilterSeqsCommand() {}; - int execute(); - void help(); - -private: - struct linePair { - int start; - int numSeqs; - linePair(long int i, int j) : start(i), numSeqs(j) {} - }; - vector lines; - vector processIDS; - - string vertical, filter, fasta, hard, outputDir, filterFileName; - vector fastafileNames; - int alignmentLength, processors; - vector bufferSizes; - vector outputNames; - - char trump; - bool abort; - float soft; - int numSeqs; - - string createFilter(); - int filterSequences(); - int createProcessesCreateFilter(Filters&, string); - int createProcessesRunFilter(string, string); - int driverCreateFilter(Filters&, string, linePair*); - int driverRunFilter(string, string, string, linePair*); - int driverMPIRun(istringstream&, MPI_File&); - int MPICreateFilter(Filters&, string); - int setLines(string); - int parseBuffer(string, vector&); - -}; - -#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