]> git.donarmstrong.com Git - mothur.git/blobdiff - qualityscores.cpp
added picrust and ref taxonomy parameters to make.biom
[mothur.git] / qualityscores.cpp
index 26492245e2b9805144125052d57045a834bc3f95..0c55650b33149148c80374a0b8c03d41a7a4ea53 100644 (file)
@@ -32,22 +32,22 @@ QualityScores::QualityScores(ifstream& qFile){
                m = MothurOut::getInstance();
 
                int score;
-               seqName = getSequenceName(qFile);
+               seqName = getSequenceName(qFile); m->gobble(qFile);
                
         if (m->debug) { m->mothurOut("[DEBUG]: name = '" + seqName + "'\n.");  }
         
                if (!m->control_pressed) {
-            string qScoreString = m->getline(qFile);
+            string qScoreString = m->getline(qFile); m->gobble(qFile);
             
             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);
-                if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + temp + "'\n.");  }
+                string temp = m->getline(qFile); m->gobble(qFile);
+                //if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + temp + "'\n.");  }
                 qScoreString +=  ' ' + temp;
             }
-            //cout << "done reading " << endl; 
+            //cout << "done reading " << endl;
             istringstream qScoreStringStream(qScoreString);
             int count = 0;
             while(!qScoreStringStream.eof()){
@@ -55,7 +55,7 @@ QualityScores::QualityScores(ifstream& qFile){
                 string temp;
                 qScoreStringStream >> temp;  m->gobble(qScoreStringStream);
                 
-                if (m->debug) { m->mothurOut("[DEBUG]: score " + toString(qScores.size()) + " = '" + temp + "'\n.");  }
+                //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"; }
@@ -68,7 +68,7 @@ QualityScores::QualityScores(ifstream& qFile){
         }
                
                seqLength = qScores.size();
-               //cout << "seqlength = " << seqLength << '\t' << count << endl;
+               //cout << "seqlength = " << seqLength  << endl;
                
        }
        catch(exception& e) {
@@ -200,7 +200,7 @@ bool QualityScores::stripQualThreshold(Sequence& sequence, double qThreshold){
                
                if(seqName != sequence.getName()){
                        m->mothurOut("sequence name mismatch btwn fasta: " + sequence.getName() + " and qual file: " + seqName);
-                       m->mothurOutEndLine();  
+                       m->mothurOutEndLine();  m->control_pressed = true;
                }
                
                int end;