+void SeqErrorCommand::printErrorFRFile(map<char, vector<int> > errorForward, map<char, vector<int> > errorReverse){
+ try{
+ string errorForwardFileName = queryFileName.substr(0,queryFileName.find_last_of('.')) + ".error.seq.forward";
+ ofstream errorForwardFile;
+ m->openOutputFile(errorForwardFileName, errorForwardFile);
+ outputNames.push_back(errorForwardFileName); outputTypes["error.forward"].push_back(errorForwardFileName);
+
+ errorForwardFile << "position\ttotalseqs\tmatch\tsubstitution\tinsertion\tdeletion\tambiguous" << endl;
+ for(int i=0;i<1000;i++){
+ float match = (float)errorForward['m'][i];
+ float subst = (float)errorForward['s'][i];
+ float insert = (float)errorForward['i'][i];
+ float del = (float)errorForward['d'][i];
+ float amb = (float)errorForward['a'][i];
+ float total = match + subst + insert + del + amb;
+ if(total == 0){ break; }
+ errorForwardFile << i+1 << '\t' << total << '\t' << match/total << '\t' << subst/total << '\t' << insert/total << '\t' << del/total << '\t' << amb/total << endl;
+ }
+ errorForwardFile.close();
+
+ string errorReverseFileName = queryFileName.substr(0,queryFileName.find_last_of('.')) + ".error.seq.reverse";
+ ofstream errorReverseFile;
+ m->openOutputFile(errorReverseFileName, errorReverseFile);
+ outputNames.push_back(errorReverseFileName); outputTypes["error.reverse"].push_back(errorReverseFileName);
+
+ errorReverseFile << "position\ttotalseqs\tmatch\tsubstitution\tinsertion\tdeletion\tambiguous" << endl;
+ for(int i=0;i<1000;i++){
+ float match = (float)errorReverse['m'][i];
+ float subst = (float)errorReverse['s'][i];
+ float insert = (float)errorReverse['i'][i];
+ float del = (float)errorReverse['d'][i];
+ float amb = (float)errorReverse['a'][i];
+ float total = match + subst + insert + del + amb;
+ if(total == 0){ break; }
+ errorReverseFile << i+1 << '\t' << total << '\t' << match/total << '\t' << subst/total << '\t' << insert/total << '\t' << del/total << '\t' << amb/total << endl;
+ }
+ errorReverseFile.close();
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SeqErrorCommand", "printErrorFRFile");
+ exit(1);
+ }
+}
+
+//***************************************************************************************************************
+
+void SeqErrorCommand::printErrorQuality(map<char, vector<int> > qScoreErrorMap){
+ try{