Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Apparently CIGAR elements can have 0 length according to the spec, bu…

…t 0Ms were causing left alignment of indels to fail. Fixed.
  • Loading branch information...
commit 1774b660fb00d5bb72991475030b8b3c863c79d3 1 parent 63dddfb
@eitanbanks eitanbanks authored
View
2  public/java/src/org/broadinstitute/sting/utils/sam/AlignmentUtils.java
@@ -646,7 +646,7 @@ private static Cigar moveCigarLeft(Cigar cigar, int indexOfIndel) {
// get the indel element and move it left one base
CigarElement ce = cigar.getCigarElement(indexOfIndel - 1);
- elements.add(new CigarElement(ce.getLength() - 1, ce.getOperator()));
+ elements.add(new CigarElement(Math.max(ce.getLength() - 1, 0), ce.getOperator()));
elements.add(cigar.getCigarElement(indexOfIndel));
if (indexOfIndel + 1 < cigar.numCigarElements()) {
ce = cigar.getCigarElement(indexOfIndel + 1);
Please sign in to comment.
Something went wrong with that request. Please try again.