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:
commit
fddc5331e1
|
|
@ -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
|
// start is alignment start - band width / 2 - size of first I element, if there is one. Stop is similar
|
||||||
int offset = getBandWidth() / 2;
|
int offset = getBandWidth() / 2;
|
||||||
long readStart = includeClippedBases ? read.getUnclippedStart() : read.getAlignmentStart();
|
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);
|
long stop = (includeClippedBases ? read.getUnclippedEnd() : read.getAlignmentEnd()) + offset + ReadUtils.getLastInsertionOffset(read);
|
||||||
|
|
||||||
if ( stop > refReader.getSequenceDictionary().getSequence(read.getReferenceName()).getSequenceLength() ) {
|
if ( stop > refReader.getSequenceDictionary().getSequence(read.getReferenceName()).getSequenceLength() ) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue