Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#827 closed discussion (fixed)

set unset and flip bits in BamRead::flag

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.16
Component: omic Version: 0.12.2
Keywords: Cc:

Description

I need to twist my neck and roll my head every time I need to manipulate the flag in BamRead. Perhaps we should add some functionality to set, unset, and flip a bit in the 16-bit FLAG. Set is as trivial as get, I suppose, but unset and flip cause headache. Here are the recipes:

set:   flag |= BAM_FX
unset: flag &= ~BAM_FX
flip:  flag ^= BAM_FX

Change History (3)

comment:1 Changed 3 years ago by Peter

Milestone: yat 0.x+yat 0.16

comment:2 Changed 3 years ago by Peter

Resolution: fixed
Status: newclosed

(In [3731]) added functions to access and modify bits in flag; closes #827

comment:3 Changed 3 years ago by Peter

(In [3732]) one more convenience function to access BamRead::flag; refs #827 and r3731

Note: See TracTickets for help on using tickets.