helpString += "The seq.error command reads a query alignment file and a reference alignment file and creates .....\n";
helpString += "Example seq.error(...).\n";
helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
- helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n\n";
+ helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n";
return helpString;
}
catch(exception& e) {
else{ minCompare.weight = 1; }
printErrorData(minCompare, numParentSeqs);
-
+
if(!ignoreSeq){
-
- for(int i=0;i<minCompare.total;i++){
+
+ for(int i=0;i<minCompare.sequence.length();i++){
char letter = minCompare.sequence[i];
errorForward[letter][i] += minCompare.weight;
ofstream errorCountFile;
m->openOutputFile(errorCountFileName, errorCountFile);
outputNames.push_back(errorCountFileName); outputTypes["error.count"].push_back(errorCountFileName);
- m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n\n");
+ m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n");
m->mothurOut("Errors\tSequences\n");
errorCountFile << "Errors\tSequences\n";
for(int i=0;i<misMatchCounts.size();i++){
int numAmbigs = currentSeq.getAmbigBases();
if(numAmbigs > 0){ numAmbigSeqs++; }
- int startPos = currentSeq.getStartPos();
- if(startPos > maxStartPos) { maxStartPos = startPos; }
-
- int endPos = currentSeq.getEndPos();
- if(endPos < minEndPos) { minEndPos = endPos; }
+// int startPos = currentSeq.getStartPos();
+// if(startPos > maxStartPos) { maxStartPos = startPos; }
+//
+// int endPos = currentSeq.getEndPos();
+// if(endPos < minEndPos) { minEndPos = endPos; }
referenceSeqs.push_back(currentSeq);
+
m->gobble(referenceFile);
}
referenceFile.close();