X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqerrorcommand.cpp;h=af044fec3f1b60b07da406894ebc454d96df21bd;hb=7d072eaea23af798162774c79c97dbf4c25ad687;hp=b31c4e0d89ecdb7243e9f4e42d3dc0af1d903450;hpb=2a99ff8ba22dda9d0c1b125e5c9ff91e23ed6879;p=mothur.git diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index b31c4e0..af044fe 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -417,20 +417,22 @@ void SeqErrorCommand::getReferences(){ ifstream referenceFile; m->openInputFile(referenceFileName, referenceFile); + int numAmbigSeqs = 0; + while(referenceFile){ Sequence currentSeq(referenceFile); int numAmbigs = currentSeq.getAmbigBases(); - - if(numAmbigs != 0){ - m->mothurOut("Warning: " + toString(currentSeq.getName()) + " has " + toString(numAmbigs) + " ambiguous bases, these bases will be removed\n"); - currentSeq.removeAmbigBases(); - } + if(numAmbigs > 0){ numAmbigSeqs++; } referenceSeqs.push_back(currentSeq); m->gobble(referenceFile); } - numRefs = referenceSeqs.size(); - referenceFile.close(); + + if(numAmbigSeqs != 0){ + m->mothurOut("Warning: " + toString(numAmbigSeqs) + " reference sequences have ambiguous bases, these bases will be ignored\n"); + } + + numRefs = referenceSeqs.size(); } catch(exception& e) { m->errorOut(e, "SeqErrorCommand", "getReferences"); @@ -454,7 +456,7 @@ Compare SeqErrorCommand::getErrors(Sequence query, Sequence reference){ Compare errors; for(int i=0;i