X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=eachgapignore.h;h=2e7fbd6bd228d3ed625cd1904ecd7d15075d9234;hp=9763a6d1af138dc7ebeffe66a94cf0b3c4eb5a9c;hb=615301e57c25e241356a9c2380648d117709458d;hpb=cdcf99b7760701e6869ca8e4e6e91c8e8c4ae186 diff --git a/eachgapignore.h b/eachgapignore.h index 9763a6d..2e7fbd6 100644 --- a/eachgapignore.h +++ b/eachgapignore.h @@ -17,24 +17,38 @@ class eachGapIgnoreTermGapDist : public Dist { public: + eachGapIgnoreTermGapDist() {} + eachGapIgnoreTermGapDist(const eachGapIgnoreTermGapDist& ddb) {} void calcDist(Sequence A, Sequence B){ int diff = 0; int length = 0; int start = 0; + int end = 0; + bool overlap = false; string seqA = A.getAligned(); string seqB = B.getAligned(); int alignLength = seqA.length(); - for(int i=0; i=0;i--){ + if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){ + end = i; +// cout << "end: " << end << endl; + overlap = true; break; } } - for(int i=start;i