Skip to content

Commit

Permalink
document sam flags
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaenick committed Jun 30, 2023
1 parent 825ab10 commit 72544c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bamstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ int bam_reader(char* bamfile, char* outfile) {
uint64_t cnt;
bam1_t *b = bam_init1();
while (bam_read1(fp, b) >= 0) {
// 0x4 - read is unmapped
// 0x400 - optical or PCR duplicate
if (((b->core.flag & 0x4) == 0) && ((b->core.flag & 0x400) == 0)) {
int32_t tid = b->core.tid;
char* ref = hdr->target_name[tid];
Expand Down

0 comments on commit 72544c7

Please sign in to comment.