X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqerrorcommand.cpp;h=641a3abce04bde1b8002e11af636fcd5e58bc6e2;hb=2a29fceeeb8754c3fd97ba830d2fbed5c4349ee8;hp=1fe60e8954acd14dc1a1e02d37c0d8bd987cc1c0;hpb=367747fb506bf228d3b2d645868d275ba0714e90;p=mothur.git diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index 1fe60e8..641a3ab 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -298,7 +298,7 @@ SeqErrorCommand::SeqErrorCommand(string option) { } 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(); } } @@ -407,6 +407,13 @@ int SeqErrorCommand::execute(){ 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(); } @@ -759,7 +766,10 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName, 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(); @@ -1378,6 +1388,10 @@ int SeqErrorCommand::setLines(string filename, string qfilename, string rfilenam 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::iterator it = firstSeqNames.find(sname); @@ -1438,6 +1452,10 @@ int SeqErrorCommand::setLines(string filename, string qfilename, string rfilenam istringstream nameStream(input); string sname = ""; nameStream >> sname; + for (int i = 0; i < sname.length(); i++) { + if (sname[i] == ':') { sname[i] = '_'; m->changedSeqNames = true; } + } + map::iterator it = firstSeqNamesReport.find(sname); if(it != firstSeqNamesReport.end()) { //this is the start of a new chunk