X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=qualityscores.cpp;h=33ca1728052e4db59372fc2d8129e5bcbaf729c5;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=4998b3d1c4dabd18b97fb8f33e36860127e757e5;hpb=c85db0a4be3a1f8037a71a23ca73f9762184e28a;p=mothur.git diff --git a/qualityscores.cpp b/qualityscores.cpp index 4998b3d..33ca172 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -34,13 +34,17 @@ QualityScores::QualityScores(ifstream& qFile){ int score; seqName = getSequenceName(qFile); + if (m->debug) { m->mothurOut("[DEBUG]: name = '" + seqName + "'\n."); } + if (!m->control_pressed) { string qScoreString = m->getline(qFile); - //cout << qScoreString << endl; + + if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + qScoreString + "'\n."); } + while(qFile.peek() != '>' && qFile.peek() != EOF){ if (m->control_pressed) { break; } string temp = m->getline(qFile); - //cout << temp << endl; + if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + temp + "'\n."); } qScoreString += ' ' + temp; } //cout << "done reading " << endl; @@ -51,6 +55,8 @@ QualityScores::QualityScores(ifstream& qFile){ string temp; qScoreStringStream >> temp; m->gobble(qScoreStringStream); + if (m->debug) { m->mothurOut("[DEBUG]: score " + toString(qScores.size()) + " = '" + temp + "'\n."); } + //check temp to make sure its a number if (!m->isContainingOnlyDigits(temp)) { m->mothurOut("[ERROR]: In sequence " + seqName + "'s quality scores, expected a number and got " + temp + ", setting score to 0."); m->mothurOutEndLine(); temp = "0"; } convert(temp, score);