X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flowdata.cpp;h=b2e856c28e5c939a00102e19d34a97799c11ae08;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=f4605b6dbe1613fdb3e1a6beb1929a3585ff5fe7;hpb=7f1aca4ed9e6db70de82e80ca4771f7680b21d26;p=mothur.git diff --git a/flowdata.cpp b/flowdata.cpp index f4605b6..b2e856c 100644 --- a/flowdata.cpp +++ b/flowdata.cpp @@ -124,18 +124,40 @@ void FlowData::updateEndFlow(){ } //********************************************************************************************************************** - +//TATGCT +//1 0 0 0 0 1 +//then the second positive flow is for a T, but you saw a T between the last and previous flow adn it wasn't positive, so something is missing +//Becomes TNT void FlowData::translateFlow(){ - try{ - sequence = ""; - for(int i=0;i charInMiddle; + int oldspot = -1; + bool updateOld = false; + + for(int i=0;i= 1) { + if (oldspot == -1) { updateOld = true; } + else { //check for bases inbetween two 1's + if (charInMiddle.count(base) != 0) { //we want to covert to an N + sequence = sequence.substr(0, oldspot+1); + sequence += 'N'; + } + updateOld = true; + charInMiddle.clear(); + } + } for(int j=0;j 4){ @@ -144,7 +166,7 @@ void FlowData::translateFlow(){ else{ sequence = "NNNN"; } - } + } catch(exception& e) { m->errorOut(e, "FlowData", "translateFlow"); exit(1);