Merge pull request #965 from broadinstitute/gg_nsubtil_clamp_hmm_fix

Clamp the HMM window starting coordinate to 1 instead of 0
This commit is contained in:
Geraldine Van der Auwera 2015-05-01 22:18:20 +02:00
commit fddc5331e1
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() ) {