From 08771285f60f3434c796cd4126ea02c577632ddb Mon Sep 17 00:00:00 2001 From: walaj Date: Sat, 1 Jun 2019 07:37:01 -0400 Subject: [PATCH] fixed issue 46 --- SeqLib/BamRecord.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SeqLib/BamRecord.h b/SeqLib/BamRecord.h index 47907fe2d..3ad3b4e22 100644 --- a/SeqLib/BamRecord.h +++ b/SeqLib/BamRecord.h @@ -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;