From: Pat Schloss Date: Wed, 13 Mar 2013 12:00:33 +0000 (-0400) Subject: Fixed a bug in the count output of seq.error when using multiple processors X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=75cff1a83a64cd46e9dd603e02597a2bb6a76119 Fixed a bug in the count output of seq.error when using multiple processors --- diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index ecd6f0c..99e7893 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -643,7 +643,7 @@ int SeqErrorCommand::createProcesses(string filename, string qFileName, string r int misMatchSize; in >> misMatchSize; m->gobble(in); if (misMatchSize > misMatchCounts.size()) { misMatchCounts.resize(misMatchSize, 0); } - for (int j = 0; j < misMatchCounts.size(); j++) { + for (int j = 0; j < misMatchSize; j++) { in >> tempNum; misMatchCounts[j] += tempNum; } m->gobble(in); diff --git a/sequence.cpp b/sequence.cpp index 224ecb1..4c631a2 100644 --- a/sequence.cpp +++ b/sequence.cpp @@ -772,6 +772,8 @@ void Sequence::trim(int length){ if(numBases > length){ unaligned = unaligned.substr(0,length); numBases = length; + aligned = ""; + isAligned = 0; } } diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index 935b9a9..ec136db 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -1854,7 +1854,13 @@ bool TrimSeqsCommand::keepFirstTrim(Sequence& sequence, QualityScores& qscores){ if(qscores.getName() != ""){ qscores.trimQScores(-1, keepFirst); } + +// sequence.printSequence(cout);cout << endl; + sequence.trim(keepFirst); + +// sequence.printSequence(cout);cout << endl << endl;; + return success; } catch(exception& e) {