X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=qualityscores.cpp;h=f76d9826ee0224cb63d3520a30a0f7b100a5cecf;hb=3a13eff5c26d6fc156a299c9fa7f5497bded94a0;hp=fd9459c0d49d005437464463e421bdd61c7db3d7;hpb=6e81846c8e5b2614f6b06643a9f558fb0e6669fa;p=mothur.git diff --git a/qualityscores.cpp b/qualityscores.cpp index fd9459c..f76d982 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -35,18 +35,18 @@ QualityScores::QualityScores(ifstream& qFile, int l){ int score; //string line; - //getline(qFile, line); + //m->getline(qFile, line); //istringstream nameStream(line); qFile >> seqName; while (!qFile.eof()) { char c = qFile.get(); if (c == 10 || c == 13 || c == -1){ break; } } // get rest of line - gobble(qFile); + m->gobble(qFile); if (seqName == "") { m->mothurOut("Error reading quality file, name blank at position, " + toString(qFile.tellg())); m->mothurOutEndLine(); } else { seqName = seqName.substr(1); } - - //getline(qFile, line); + + //m->getline(qFile, line); //istringstream qualStream(line); //while(qualStream){ @@ -57,11 +57,45 @@ QualityScores::QualityScores(ifstream& qFile, int l){ //seqLength = qScores.size(); + /*while(!in.eof()){ + string saveName = ""; + string name = ""; + string scores = ""; + + in >> name; + //cout << name << endl; + if (name.length() != 0) { + saveName = name.substr(1); + while (!in.eof()) { + char c = in.get(); + if (c == 10 || c == 13){ break; } + else { name += c; } + } + m->gobble(in); + } + + while(in){ + char letter= in.get(); + if(letter == '>'){ in.putback(letter); break; } + else{ scores += letter; } + } + + //istringstream iss (scores,istringstream::in); + + //int count = 0; int tempScore; + //while (iss) { iss >> tempScore; count++; } + //cout << saveName << '\t' << count << endl; + + m->gobble(in); + }*/ + + + for(int i=0;i> score; qScores.push_back(score); } - gobble(qFile); + m->gobble(qFile); } catch(exception& e) { @@ -70,6 +104,7 @@ QualityScores::QualityScores(ifstream& qFile, int l){ } } +/**************************************************************************************************/ /**************************************************************************************************/