}
else{
if(reportFileName != ""){
- m->mothurOut("we are ignoring the report file if your sequences are not aligned. we will check that the sequences in your fasta and and qual fileare the same length.");
+ m->mothurOut("we are ignoring the report file if your sequences are not aligned. we will check that the sequences in your fasta and and qual file are the same length.");
m->mothurOutEndLine();
}
}
m->mothurOut("It took " + toString(time(NULL) - start) + " secs to check " + toString(numSeqs) + " sequences.");
m->mothurOutEndLine();
+ //set fasta file as new current fastafile
+ string current = "";
+ itTypes = outputTypes.find("errorseq");
+ if (itTypes != outputTypes.end()) {
+ if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); }
+ }
+
m->mothurOutEndLine();
m->mothurOut("Output File Names: "); m->mothurOutEndLine();
for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
int numSeqs = 0;
map<string, int>::iterator it;
- qScoreErrorMap['m'].assign(41, 0);
- qScoreErrorMap['s'].assign(41, 0);
- qScoreErrorMap['i'].assign(41, 0);
- qScoreErrorMap['a'].assign(41, 0);
+ qScoreErrorMap['m'].assign(101, 0);
+ qScoreErrorMap['s'].assign(101, 0);
+ qScoreErrorMap['i'].assign(101, 0);
+ qScoreErrorMap['a'].assign(101, 0);
errorForward['m'].assign(maxLength,0);
errorForward['s'].assign(maxLength,0);
qualForwardMap.resize(maxLength);
qualReverseMap.resize(maxLength);
for(int i=0;i<maxLength;i++){
- qualForwardMap[i].assign(41,0);
- qualReverseMap[i].assign(41,0);
+ qualForwardMap[i].assign(101,0);
+ qualReverseMap[i].assign(101,0);
}
}
else if(qFileName != "" && !aligned){
qualForwardMap.resize(maxLength);
qualReverseMap.resize(maxLength);
for(int i=0;i<maxLength;i++){
- qualForwardMap[i].assign(41,0);
- qualReverseMap[i].assign(41,0);
+ qualForwardMap[i].assign(101,0);
+ qualReverseMap[i].assign(101,0);
}
}
int numParentSeqs = -1;
int closestRefIndex = -1;
- numParentSeqs = chimeraTest.analyzeQuery(query.getName(), query.getAligned(), outChimeraReport);
+ string querySeq = query.getAligned();
+ if (!aligned) { querySeq = query.getUnaligned(); }
+
+ numParentSeqs = chimeraTest.analyzeQuery(query.getName(), querySeq, outChimeraReport);
closestRefIndex = chimeraTest.getClosestRefIndex();
outputNames.push_back(errorQualityFileName); outputTypes["errorquality"].push_back(errorQualityFileName);
errorQualityFile << "qscore\tmatches\tsubstitutions\tinsertions\tambiguous" << endl;
- for(int i=0;i<41;i++){
+ for(int i=0;i<101;i++){
errorQualityFile << i << '\t' << qScoreErrorMap['m'][i] << '\t' << qScoreErrorMap['s'][i] << '\t' << qScoreErrorMap['i'][i] << '\t'<< qScoreErrorMap['a'][i] << endl;
}
errorQualityFile.close();
string sname = ""; nameStream >> sname;
sname = sname.substr(1);
+
+ for (int i = 0; i < sname.length(); i++) {
+ if (sname[i] == ':') { sname[i] = '_'; m->changedSeqNames = true; }
+ }
map<string, int>::iterator it = firstSeqNames.find(sname);
istringstream nameStream(input);
string sname = ""; nameStream >> sname;
+ for (int i = 0; i < sname.length(); i++) {
+ if (sname[i] == ':') { sname[i] = '_'; m->changedSeqNames = true; }
+ }
+
map<string, int>::iterator it = firstSeqNamesReport.find(sname);
if(it != firstSeqNamesReport.end()) { //this is the start of a new chunk