From 6da6af5c7f43f9f4f602d224af447805fb01c46c Mon Sep 17 00:00:00 2001 From: pschloss Date: Mon, 7 Mar 2011 22:39:32 +0000 Subject: [PATCH] fix trim.seqs / qualscores bug --- Mothur.xcodeproj/project.pbxproj | 4 ++-- qualityscores.cpp | 2 -- qualityscores.h | 1 + trimseqscommand.cpp | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 865f078..78246b6 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -1625,7 +1625,7 @@ attributes = { ORGANIZATIONNAME = "Schloss Lab"; }; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */; + buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */; compatibilityVersion = "Xcode 3.1"; developmentRegion = English; hasScannedForEncodings = 1; @@ -2049,7 +2049,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */ = { + 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB928A08733DD80010E9CD /* Debug */, diff --git a/qualityscores.cpp b/qualityscores.cpp index e26a4ff..0641d3b 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -44,7 +44,6 @@ QualityScores::QualityScores(ifstream& qFile){ else{ seqName = seqName.substr(1); } - cout << seqName << endl; string qScoreString = m->getline(qFile); while(qFile.peek() != '>' && qFile.peek() != EOF){ qScoreString += ' ' + m->getline(qFile); @@ -56,7 +55,6 @@ QualityScores::QualityScores(ifstream& qFile){ if (m->control_pressed) { break; } qScoreStringStream >> score; qScores.push_back(score); - cout << score << '\t' << count << endl; count++; } qScores.pop_back(); diff --git a/qualityscores.h b/qualityscores.h index 4453145..e522938 100644 --- a/qualityscores.h +++ b/qualityscores.h @@ -22,6 +22,7 @@ public: QualityScores(); QualityScores(ifstream&); string getName(); + vector getQualityScores() { return qScores; } void printQScores(ofstream&); void trimQScores(int, int); diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index 6aea7d8..49aca82 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -406,10 +406,10 @@ int TrimSeqsCommand::execute(){ //output group counts m->mothurOutEndLine(); int total = 0; - for (int i = 0; i < barcodeNameVector.size(); i++) { - if ((barcodeNameVector[i] != "") && (groupCounts[i] != 0)) { total += groupCounts[i]; m->mothurOut("Group " + barcodeNameVector[i] + " contains " + toString(groupCounts[i]) + " sequences."); m->mothurOutEndLine(); } - } - if (total != 0) { m->mothurOut("Total of all groups is " + toString(total)); m->mothurOutEndLine(); } +// for (int i = 0; i < barcodeNameVector.size(); i++) { +// if ((barcodeNameVector[i] != "") && (groupCounts[i] != 0)) { total += groupCounts[i]; m->mothurOut("Group " + barcodeNameVector[i] + " contains " + toString(groupCounts[i]) + " sequences."); m->mothurOutEndLine(); } +// } +// if (total != 0) { m->mothurOut("Total of all groups is " + toString(total)); m->mothurOutEndLine(); } if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; } -- 2.39.2