X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=flowdata.cpp;h=f4605b6dbe1613fdb3e1a6beb1929a3585ff5fe7;hp=5dc7dc3e6c780171f1ee5cacdb1d766864f18a18;hb=01d5a60fc5f396339acf529151fa8186ee7c1a41;hpb=567e4bca5d62bd8ea316ce5def320d070d7507b8 diff --git a/flowdata.cpp b/flowdata.cpp index 5dc7dc3..f4605b6 100644 --- a/flowdata.cpp +++ b/flowdata.cpp @@ -50,7 +50,7 @@ bool FlowData::getNext(ifstream& flowFile){ translateFlow(); m->gobble(flowFile); } - + if(flowFile){ return 1; } else { return 0; } } @@ -86,16 +86,18 @@ string FlowData::getSequenceName(ifstream& flowFile) { void FlowData::updateEndFlow(){ try{ + if (baseFlow.length() > 4) { return; } + //int currLength = 0; float maxIntensity = (float) maxHomoP + 0.49; int deadSpot = 0; - + while(deadSpot < endFlow){ int signal = 0; int noise = 0; - for(int i=0;i<4;i++){ + for(int i=0;i signalIntensity){ signal++; @@ -110,7 +112,7 @@ void FlowData::updateEndFlow(){ break; } - deadSpot += 4; + deadSpot += baseFlow.length(); } endFlow = deadSpot; @@ -129,13 +131,13 @@ void FlowData::translateFlow(){ sequence = ""; for(int i=0;i 4){ sequence = sequence.substr(4); }