X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=onegapignore.h;h=32818e3df6fce4bc5ab8a4ddda975572146a2a53;hb=0bcfddf7bc721a334bdae42d86a580019303537d;hp=af284fcc6857a3c5a42545ca6c78c22cded9424d;hpb=e4ca037c5e637e3d34e64cb5e8ab11b03220188d;p=mothur.git diff --git a/onegapignore.h b/onegapignore.h index af284fc..32818e3 100644 --- a/onegapignore.h +++ b/onegapignore.h @@ -25,6 +25,7 @@ public: int minLength = 0; int start = 0; int end = 0; + bool overlap = false; string seqA = A.getAligned(); string seqB = B.getAligned(); @@ -34,14 +35,16 @@ public: for(int i=0;i=0;i--){ if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){ end = i; - cout << "end: " << end << endl; +// cout << "end: " << end << endl; + overlap = true; break; } } @@ -73,7 +76,10 @@ public: openGapB = 0; } } - + + //non-overlapping sequences + if (!overlap) { minLength = 0; } + if(minLength == 0) { dist = 1.0000; } else { dist = (double)difference / minLength; } }