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;
- string refName, queryName;
+ string refName, queryName, sequence;
double errorRate;
int weight, matches, mismatches, total;
mismatches = 0;
total = 0;
errorRate = 1.0000;
+ sequence = "";
}
};
class SeqErrorCommand : public Command {
public:
SeqErrorCommand(string);
- ~SeqErrorCommand();
- int execute();
- void help();
+ SeqErrorCommand();
+ ~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"; }
+
+ int execute();
+ void help() { m->mothurOut(getHelpString()); }
private:
bool abort;
+
+ struct linePair {
+ unsigned long int start;
+ unsigned long int end;
+ linePair(unsigned long int i, unsigned long int 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);
+ 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> >);
- string queryFileName, referenceFileName, namesFileName, errorFileName, outputDir;
+ int setLines(string, string, string, vector<unsigned long int>&, vector<unsigned long int>&, vector<unsigned long int>&);
+ 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;
- int numRefs;
- ofstream errorFile;
+ bool ignoreChimeras, filter;
+ int numRefs, processors;
+ int maxLength, totalBases, totalMatches;
+ //ofstream errorSummaryFile, errorSeqFile;
+ vector<string> outputNames;
vector<Sequence> referenceSeqs;
+ vector<vector<int> > substitutionMatrix;
+ 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