Skip to content

Commit a2f7d05

Browse files
committed
Fixed check for introns for the case when deletion is next to insertion.
1 parent f455ae7 commit a2f7d05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/astrazeneca/vardict/modules/CigarParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,8 +1661,8 @@ public static String getMateReferenceName(SAMRecord record) {
16611661
* @return true if cigar operator must be skipped, false if not
16621662
*/
16631663
private boolean skipIndelNextToIntron(Cigar cigar, int ci) {
1664-
if ((cigar.numCigarElements() > ci && cigar.getCigarElement(ci + 1).getOperator() == CigarOperator.N)
1665-
|| (ci > 1 && cigar.getCigarElement(ci - 1).getOperator() == CigarOperator.N)) {
1664+
if ((cigar.numCigarElements() > ci + 1 && cigar.getCigarElement(ci + 1).getOperator() == CigarOperator.N)
1665+
|| (ci > 0 && cigar.getCigarElement(ci - 1).getOperator() == CigarOperator.N)) {
16661666
return true;
16671667
}
16681668
return false;

0 commit comments

Comments
 (0)