int minLength = 0;
int start = 0;
int end = 0;
+ bool overlap = false;
string seqA = A.getAligned();
string seqB = B.getAligned();
if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
start = i;
// cout << "start: " << start << endl;
+ overlap = true;
break;
}
}
if(seqA[i] != '.' && seqB[i] != '.' && seqA[i] != '-' && seqB[i] != '-' ){
end = i;
// cout << "end: " << end << endl;
+ overlap = true;
break;
}
}
openGapB = 0;
}
}
-
+
+ //non-overlapping sequences
+ if (!overlap) { minLength = 0; }
+
if(minLength == 0) { dist = 1.0000; }
else { dist = (double)difference / minLength; }
}