Skip to content

Commit

Permalink
fixed issue 46
Browse files Browse the repository at this point in the history
  • Loading branch information
walaj committed Jun 1, 2019
1 parent 7e1f982 commit 0877128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SeqLib/BamRecord.h
Expand Up @@ -639,9 +639,9 @@ class BamRecord {
uint32_t* c = bam_get_cigar(b);
int32_t p = 0;
for (size_t i = 0; i < b->core.n_cigar; ++i) {
if ( (bam_cigar_opchr(c[i]) == 'S') || (bam_cigar_opchr(c[i]) == 'H'))
if (bam_cigar_opchr(c[i]) == 'S')
p += bam_cigar_oplen(c[i]);
else // not a clip, so stop counting
else if (bam_cigar_opchr(c[i]) != 'H')
break;
}
return p;
Expand Down

0 comments on commit 0877128

Please sign in to comment.