Skip to content

Commit

Permalink
diganostic print
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Nov 29, 2023
1 parent efeeb6d commit 2792a5d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/org/broad/igv/sam/SAMAlignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,17 @@ boolean validateMMTag(String mm, byte[] sequence) {
int baseCount = 0;
for (int i = 0; i < sequence.length; i++) if (sequence[i] == base) baseCount++;
// Count # of bases implied by tag
int modified = tokens.length - 1;
int modified = tokens.length - 1; // All tokens but the first are "skip" numbers
int skipped = 0;
for (int i = 1; i < tokens.length; i++) skipped += Integer.parseInt(tokens[i]);
if (modified + skipped > baseCount) {
System.out.println("m+skipped = " + (modified + skipped) + " base count = " + baseCount);
// System.out.println("Cigar = " + record.getCigarString());
// System.out.println("MM = " + mm);
// System.out.println("modified count = " + modified);
// System.out.println("skipped count = " + skipped);
// System.out.println("mod + skipped = " + (modified + skipped));
// System.out.println("base count = " + baseCount);
// System.out.println();
return false;
}
}
Expand Down

0 comments on commit 2792a5d

Please sign in to comment.