Clamp the HMM window starting coordinate to 1 instead of 0

This commit is contained in:
Geraldine Van der Auwera 2015-04-30 01:37:20 +02:00
parent 9c2dd29bd0
commit f2b34d0823
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ public class BAQ {
// start is alignment start - band width / 2 - size of first I element, if there is one. Stop is similar
int offset = getBandWidth() / 2;
long readStart = includeClippedBases ? read.getUnclippedStart() : read.getAlignmentStart();
long start = Math.max(readStart - offset - ReadUtils.getFirstInsertionOffset(read), 0);
long start = Math.max(readStart - offset - ReadUtils.getFirstInsertionOffset(read), 1);
long stop = (includeClippedBases ? read.getUnclippedEnd() : read.getAlignmentEnd()) + offset + ReadUtils.getLastInsertionOffset(read);
if ( stop > refReader.getSequenceDictionary().getSequence(read.getReferenceName()).getSequenceLength() ) {