]> git.donarmstrong.com Git - mothur.git/blobdiff - filterseqscommand.h
working on windows paralellization, added trimOligos class to be used by trim.flows...
[mothur.git] / filterseqscommand.h
index 06eaa6db7e2deb8b74344d7f408f09734cbf43cf..3bf36c040231c5f801281f9d553c60bed01101c8 100644 (file)
@@ -1,45 +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 "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;
-       
-       ReadSeqs* readSeqs;
-       
-       vector<bool> columnsToRemove;
-       SequenceDB* db;
-       double soft;
-};
-
-#endif
\ No newline at end of file
+#ifndef FILTERSEQSCOMMAND_H\r
+#define FILTERSEQSCOMMAND_H\r
+\r
+/*\r
+ *  filterseqscommand.h\r
+ *  Mothur\r
+ *\r
+ *  Created by Thomas Ryabin on 5/4/09.\r
+ *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.\r
+ *\r
+ */\r
+\r
+#include "command.hpp"\r
+#include "filters.h"\r
+\r
+class Sequence;\r
+class FilterSeqsCommand : public Command {\r
+\r
+public:\r
+       FilterSeqsCommand(string);\r
+       FilterSeqsCommand();\r
+       ~FilterSeqsCommand() {};\r
+       \r
+       vector<string> setParameters();\r
+       string getCommandName()                 { return "filter.seqs";                 }\r
+       string getCommandCategory()             { return "Sequence Processing"; }\r
+       string getHelpString(); \r
+       string getCitation() { return "http://www.mothur.org/wiki/Filter.seqs"; }\r
+       string getDescription()         { return "removes columns from alignments based on a criteria defined by the user"; }\r
+       \r
+       int execute(); \r
+       void help() { m->mothurOut(getHelpString()); }  \r
+       \r
+private:\r
+       struct linePair {\r
+               unsigned long long start;\r
+               unsigned long long end;\r
+               linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}\r
+       };\r
+\r
+       vector<linePair*> lines;\r
+       vector<int> processIDS;\r
+\r
+       string vertical, filter, fasta, hard, outputDir, filterFileName;\r
+       vector<string> fastafileNames;  \r
+       int alignmentLength, processors;\r
+       vector<int> bufferSizes;\r
+       vector<string> outputNames;\r
+\r
+       char trump;\r
+       bool abort;\r
+       float soft;\r
+       int numSeqs;\r
+       \r
+       string createFilter();\r
+       int filterSequences();\r
+       int createProcessesCreateFilter(Filters&, string);\r
+       int createProcessesRunFilter(string, string);\r
+       int driverRunFilter(string, string, string, linePair*);\r
+       int driverCreateFilter(Filters& F, string filename, linePair* line);\r
+       #ifdef USE_MPI\r
+       int driverMPIRun(int, int, MPI_File&, MPI_File&, vector<unsigned long long>&);\r
+       int MPICreateFilter(int, int, Filters&, MPI_File&, vector<unsigned long long>&);        \r
+       #endif\r
+       \r
+};\r
+\r
+#endif\r