X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=75e7895c6ef2d4a532dfae9d37ea4fc035243b75;hb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;hp=e8af5ec35c505d4b73875cee2fd1b3b78fb22b68;hpb=251a6e0e38cce0c439757ec39f0a84a5d0bd0222;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index e8af5ec..75e7895 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,41 +1,66 @@ -#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, fasta, hard, outputDir, filterFileName; - vector fastafileNames; - 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 setParameters(); + string getCommandName() { return "filter.seqs"; } + string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + + int execute(); + void help() { m->mothurOut(getHelpString()); } + +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; + + 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