X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.h;h=2ec152bb557eb27970c3660136b1b879f658949d;hb=bbdb72971ea4cd171abe34985af89f97bc2a31d3;hp=9e703ceeb62c2d610776c7f245980de651ab28a1;hpb=3117b1c3109121dff476997d3c5db5b47a77729b;p=mothur.git diff --git a/filterseqscommand.h b/filterseqscommand.h index 9e703ce..2ec152b 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -1,48 +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" -#include "mothur.h" -#include "globaldata.hpp" -#include "readfasta.h" -#include "readnexus.h" -#include "readclustal.h" -#include "readseqsphylip.h" - -using namespace std; - -class FilterSeqsCommand : public Command { - -public: - FilterSeqsCommand() {}; - ~FilterSeqsCommand() {}; - int execute(); - -private: - void doTrump(); - void doSoft(); - void doFilter(); - - GlobalData* globaldata; - string filename, trump, filter; - - ReadFasta* readFasta; - ReadNexus* readNexus; - ReadClustal* readClustal; - ReadPhylip* readPhylip; - - vector columnsToRemove; - SequenceDB* db; - double soft; -}; - -#endif \ No newline at end of file +#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