#include "mothur.h"
#include "command.hpp"
#include "sequence.hpp"
+#include "referencedb.h"
struct Compare {
int AA, AT, AG, AC, TA, TT, TG, TC, GA, GT, GG, GC, CA, CT, CG, CC, NA, NT, NG, NC, Ai, Ti, Gi, Ci, Ni, dA, dT, dG, dC;
public:
SeqErrorCommand(string);
SeqErrorCommand();
- ~SeqErrorCommand();
- vector<string> getRequiredParameters();
- vector<string> getValidParameters();
- vector<string> getRequiredFiles();
- map<string, vector<string> > getOutputFiles() { return outputTypes; }
- int execute();
- void help();
+ ~SeqErrorCommand() {}
+
+ vector<string> setParameters();
+ string getCommandName() { return "seq.error"; }
+ string getCommandCategory() { return "Sequence Processing"; }
+ string getHelpString();
+ string getCitation() { return "http://www.mothur.org/wiki/Seq.error"; }
+ string getDescription() { return "seq.error"; }
+
+
+ int execute();
+ void help() { m->mothurOut(getHelpString()); }
private:
bool abort;
+ ReferenceDB* rdb;
+
+ struct linePair {
+ unsigned long long start;
+ unsigned long long end;
+ linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
+ };
+
+ vector<int> processIDS; //processid
+ vector<linePair> lines;
+ vector<linePair> qLines;
+ vector<linePair> rLines;
void getReferences();
map<string,int> getWeights();
Compare getErrors(Sequence, Sequence);
- void printErrorHeader();
- void printErrorData(Compare, int);
+ void printErrorHeader(ofstream&);
+ void printErrorData(Compare, int, ofstream&, ofstream&);
void printSubMatrix();
void printErrorFRFile(map<char, vector<int> >, map<char, vector<int> >);
void printErrorQuality(map<char, vector<int> >);
void printQualityFR(vector<vector<int> >, vector<vector<int> >);
+
+ int setLines(string, string, string, vector<unsigned long long>&, vector<unsigned long long>&, vector<unsigned long long>&);
+ int driver(string, string, string, string, string, string, linePair, linePair, linePair);
+ int createProcesses(string, string, string, string, string, string);
string queryFileName, referenceFileName, qualFileName, reportFileName, namesFileName, outputDir;
double threshold;
- bool ignoreChimeras;
- int numRefs;
- ofstream errorSummaryFile, errorSeqFile;
+ bool ignoreChimeras, save;
+ int numRefs, processors;
+ int maxLength, totalBases, totalMatches;
+ //ofstream errorSummaryFile, errorSeqFile;
vector<string> outputNames;
- map<string, vector<string> > outputTypes;
vector<Sequence> referenceSeqs;
vector<vector<int> > substitutionMatrix;
- int a,t,g,c,gap,n;
+ vector<vector<int> > qualForwardMap;
+ vector<vector<int> > qualReverseMap;
+ vector<int> misMatchCounts;
+ map<char, vector<int> > qScoreErrorMap;
+ map<char, vector<int> > errorForward;
+ map<char, vector<int> > errorReverse;
+ map<string, int> weights;
+ vector<string> megaAlignVector;
+
};
#endif