X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=e068405816e3d8c0bc1e21b2fb8316f779009526;hb=2df35fdeea85f574630d75b11fb5b08c39aec31a;hp=cfa56b39df6a4001014e1bc42048bed50bede8fa;hpb=cd37904452dc95b183ff313ff05720c562902487;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index cfa56b3..e068405 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,42 +1,60 @@ -#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" - -class Sequence; -class FilterSeqsCommand : public Command { - -public: - FilterSeqsCommand(string); - ~FilterSeqsCommand() {}; - int execute(); - void help(); - -private: - void doHard(); - void doTrump(Sequence); - void doVertical(); - void doSoft(); - void getFreqs(Sequence); - string vertical, filter, fastafile, hard; - int alignmentLength; - - char trump; - bool abort; - float soft; - int numSeqs; - - 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() {}; + int execute(); + void help(); + +private: + struct linePair { + unsigned long int start; + int num; + linePair(unsigned long int i, long int j) : start(i), num(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 + int setLines(string); + + +}; + +#endif