Setting flags 0x0040 and 0x0080 correctly in BAM output?

59 views
Skip to first unread message

ben berman

unread,
Apr 18, 2011, 9:36:09 PM4/18/11
to bsmap

I am using BSMAP for the first time, and I am wondering about the BAM
flags 0x0040 and 0x0080. The way I understand the spec, these should
be used to mean paired-end read1 and paired-end read2, respectively.
So in Illumina naming, the "/1" should always go to 0x0040 and the "/
2" should always go to 0x0080. In BSMAP v1.15, it seems like this is
not getting set correctly. It seems like the "first" sorted read,
which is forward strand relative to the genome assembly, is always set
to 0x0040, and the second sorted read is always 0x0080. For instance,
I get the following output (omitting sequences):

HWI-ST550_0085:7:1101:7291:57138#0/2 0x63 chr11 363691
255 105M = 363705 119 NM:i:0 ZS:Z:--
HWI-ST550_0085:7:1101:7291:57138#0/1 0x93 chr11 363705
255 105M = 363691 119 NM:i:0 ZS:Z:-+
HWI-ST550_0085:7:1101:11239:54670#0/1 0x63 chr11 368130
255 105M = 368362 337 NM:i:1 ZS:Z:++
HWI-ST550_0085:7:1101:11239:54670#0/2 0x93 chr11 368362
255 105M = 368130 337 NM:i:0 ZS:Z:+-

It seems to me that the correct flags for these, in order, should be
0xA3,0x53,0x63,0x93

Do you agree? For some applications, including bisulfite, it's
important to be able to distinguish the two ends.

Thanks very much,
Ben Berman, USC.
Reply all
Reply to author
Forward
0 new messages