X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqerrorcommand.cpp;h=5ec6cf2d1cc4778399d289ea2280c882f936b944;hb=01f8d2c7d982a6209211f5abbcf2a086fdf60d0a;hp=8fd6368154773bcc38e2b950d7b170c88be2186e;hpb=49d2b7459c5027557564b21e9487dadafbbbdc96;p=mothur.git diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index 8fd6368..5ec6cf2 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -782,7 +782,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName, if (queryFile.eof()) { break; } #endif - if(index % 100 == 0){ m->mothurOut(toString(index) + '\n'); } + if(index % 100 == 0){ m->mothurOut(toString(index)); m->mothurOutEndLine(); } } queryFile.close(); if(qFileName != "" && rFileName != ""){ reportFile.close(); qualFile.close(); } @@ -790,7 +790,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName, errorSeqFile.close(); //report progress - if(index % 100 != 0){ m->mothurOut(toString(index) + '\n'); } + if(index % 100 != 0){ m->mothurOut(toString(index)); m->mothurOutEndLine(); } return index; } @@ -821,12 +821,16 @@ void SeqErrorCommand::getReferences(){ // // int endPos = rdb->referenceSeqs[i].getEndPos(); // if(endPos < minEndPos) { minEndPos = endPos; } + if (rdb->referenceSeqs[i].getNumBases() == 0) { + m->mothurOut("[WARNING]: " + rdb->referenceSeqs[i].getName() + " is blank, ignoring.");m->mothurOutEndLine(); + }else { + referenceSeqs.push_back(rdb->referenceSeqs[i]); + } - referenceSeqs.push_back(rdb->referenceSeqs[i]); } referenceFileName = rdb->getSavedReference(); - m->mothurOut("It took " + toString(time(NULL) - start) + " to load " + toString(rdb->referenceSeqs.size()) + " sequences.");m->mothurOutEndLine(); + m->mothurOut("It took " + toString(time(NULL) - start) + " to load " + toString(referenceSeqs.size()) + " sequences.");m->mothurOutEndLine(); }else { int start = time(NULL); @@ -844,9 +848,12 @@ void SeqErrorCommand::getReferences(){ // // int endPos = currentSeq.getEndPos(); // if(endPos < minEndPos) { minEndPos = endPos; } - referenceSeqs.push_back(currentSeq); - - if (rdb->save) { rdb->referenceSeqs.push_back(currentSeq); } + if (currentSeq.getNumBases() == 0) { + m->mothurOut("[WARNING]: " + currentSeq.getName() + " is blank, ignoring.");m->mothurOutEndLine(); + }else { + referenceSeqs.push_back(currentSeq); + if (rdb->save) { rdb->referenceSeqs.push_back(currentSeq); } + } m->gobble(referenceFile); } @@ -860,7 +867,7 @@ void SeqErrorCommand::getReferences(){ for(int i=0;imothurOut("Warning: " + toString(numAmbigSeqs) + " reference sequences have ambiguous bases, these bases will be ignored\n"); @@ -964,7 +971,6 @@ int SeqErrorCommand::getErrors(Sequence query, Sequence reference, Compare& erro errors.errorRate = (double)(errors.total-errors.matches) / (double)errors.total; errors.queryName = query.getName(); errors.refName = reference.getName(); - //return errors; return 0; }