- if(header.clipQualRight > header.clipQualLeft){
-
- int rightIndex = 0;
- for (int i = 0; i < header.clipQualRight; i++) { rightIndex += read.flowIndex[i]; }
-
- out << header.name << ' ' << rightIndex;
- for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << ' ' << (read.flowgram[i]/(float)100); }
- out << endl;
- }
+
+ int endValue = header.clipQualRight;
+ if (header.clipQualRight == 0) {
+ endValue = read.flowIndex.size();
+ if (m->debug) { m->mothurOut("[DEBUG]: " + header.name + " has clipQualRight=0.\n"); }
+ }
+ if(endValue > header.clipQualLeft){
+
+ int rightIndex = 0;
+ for (int i = 0; i < endValue; i++) { rightIndex += read.flowIndex[i]; }
+
+ out << header.name << ' ' << rightIndex;
+ for (int i = 0; i < read.flowgram.size(); i++) { out << setprecision(2) << ' ' << (read.flowgram[i]/(float)100); }
+ out << endl;
+ }