openInputFile(fastaFile, inFASTA);
getNumSeqs(inFASTA, numSeqs);
inFASTA.close();
- qFile.close();
+
lines.push_back(new linePair(0, numSeqs));
driverCreateTrim(fastaFile, qFileName, trimSeqFile, scrapSeqFile, trimQualFile, scrapQualFile, groupFile, fastaFileNames, qualFileNames, lines[0], lines[0]);
+ for (int j = 0; j < fastaFileNames.size(); j++) {
+ rename((fastaFileNames[j] + toString(j) + ".temp").c_str(), fastaFileNames[j].c_str());
+ }
+ if(qFileName != ""){
+ for (int j = 0; j < qualFileNames.size(); j++) {
+ rename((qualFileNames[j] + toString(j) + ".temp").c_str(), qualFileNames[j].c_str());
+ }
+ }
+
if (m->control_pressed) { return 0; }
#endif
Sequence currSeq(inFASTA);
QualityScores currQual;
if(qFileName != ""){
- currQual = QualityScores(qFile);
+ currQual = QualityScores(qFile, currSeq.getNumBases());
}
string origSeq = currSeq.getUnaligned();
else if(oligo[i] == 'B' && (seq[i] != 'C' && seq[i] != 'T' && seq[i] != 'G')) { countDiffs++; }
else if(oligo[i] == 'D' && (seq[i] != 'A' && seq[i] != 'T' && seq[i] != 'G')) { countDiffs++; }
else if(oligo[i] == 'H' && (seq[i] != 'A' && seq[i] != 'T' && seq[i] != 'C')) { countDiffs++; }
- else if(oligo[i] == 'V' && (seq[i] != 'A' && seq[i] != 'C' && seq[i] != 'G')) { countDiffs++; }
-
+ else if(oligo[i] == 'V' && (seq[i] != 'A' && seq[i] != 'C' && seq[i] != 'G')) { countDiffs++; }
}
+
}
return countDiffs;