X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=e445023df07f7c0c6e3bcc6c4d0e95c574e6174d;hb=8742edef7a51b82834289e570d336f5a81ba1f2b;hp=5eb49d3802177bf998e8fe9d0ba1dd80c2828709;hpb=30c1fd8c45b6f0d66c17f2714dbb58b8ddccdce2;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index 5eb49d3..e445023 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,54 +1,68 @@ -#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; - - - string vertical, filter, fasta, hard, outputDir, filterFileName; - vector fastafileNames; - int alignmentLength, processors; - vector bufferSizes; - - char trump; - bool abort; - float soft; - int numSeqs; - - string createFilter(); - int createProcessesCreateFilter(Filters&, string); - int driverCreateFilter(Filters&, string, linePair*); - int MPICreateFilter(Filters&, vector&); - 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 setParameters(); + string getCommandName() { return "filter.seqs"; } + string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + string getCitation() { return "http://www.mothur.org/wiki/Filter.seqs"; } + string getDescription() { return "removes columns from alignments based on a criteria defined by the user"; } + + 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