//**********************************************************************************************************************
bool FlowData::getNext(ifstream& flowFile){
-
try {
+
seqName = getSequenceName(flowFile);
- flowFile >> endFlow;
+ if (m->debug) { m->mothurOut("[DEBUG]: flow = " + seqName + " "); }
+ flowFile >> endFlow;
+ if (m->debug) { m->mothurOut(toString(endFlow) + " "); }
if (!m->control_pressed) {
- for(int i=0;i<numFlows;i++) { flowFile >> flowData[i]; }
+ if (m->debug) { m->mothurOut(" "); }
+ for(int i=0;i<numFlows;i++) {
+ flowFile >> flowData[i];
+ if (m->debug) { m->mothurOut(toString(flowData[i]) + " "); }
+ }
+ if (m->debug) { m->mothurOut("\n"); }
updateEndFlow();
translateFlow();
m->gobble(flowFile);
flowFile >> name;
if (name.length() != 0) {
- for (int i = 0; i < name.length(); i++) {
- if (name[i] == ':') { name[i] = '_'; m->changedSeqNames = true; }
- }
+ m->checkName(name);
}else{ m->mothurOut("Error in reading your flowfile, at position " + toString(flowFile.tellg()) + ". Blank name."); m->mothurOutEndLine(); m->control_pressed = true; }
return name;
//**********************************************************************************************************************
+bool FlowData::hasGoodHomoP(){
+
+ try{
+
+ float maxIntensity = (float) maxHomoP + 0.49;
+
+ for(int i=0;i<endFlow;i++){
+ if(flowData[i] > maxIntensity){
+ return 0;
+ }
+ }
+ return 1;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "FlowData", "hasMinFlows");
+ exit(1);
+ }
+}
+
+//**********************************************************************************************************************
+
bool FlowData::hasMinFlows(int minFlows){
try{