BAM Flag From Bismark Alignment: Forward and Reverse Chain
1
2
Entering edit mode
8.1 years ago
Shicheng Guo ★ 9.4k

Hi All,

I am a little confuse to the Flag of the BAM file from Bismark alignment. For the single-end data, everything is ok. Flag=0, or 16, in which 0 = 'Forward strand' while 16 = 'Reverse strand'.

However, for the paired-end data, it seems the situation is complicated. Do you know how to convert 99, 147, 83, 163 to 'Forward or Reverse strand'?

In my own opinion, 83 and 163 indicate 'Reverse strand' while 99 and 147 indicate "Forward strand" in bismark, right? However, actually in classic/traditional/conventional world,

99=64+32+2+1 = Forward (Up)

147=128+16+2+1 = Reverse (Bottom)

83= 64+16+2+1 = Reverse (Bottom)

163= 128+32+2+1 = Forward(Up)

Bismark Alignment:

enter image description here

Thanks.

19-08-2015: 0.14.4 released Bismark: Changed the FLAG values of paired-end alignments to the CTOT or CTOB strands so that reads can be properly displayed in SeqMonk when imported as BAM files. This change affects only paired-end alignments in --pbat or --non_directional mode. In detail we simply swapped the Read 1 and Read 2 FLAG values round so reads now resemble exactly concordant read pairs to the OT or OB strands. Note that results produced by the methylation extractor or further downstream of that are not affected by this change

bismark BAM Chain • 2.9k views
ADD COMMENT
1
Entering edit mode

The 'traditional' values are correct - what makes you think Bismark is using them wrong? I recently used Bismark and the results it gave made no sense at all. It wasnt just the flags, whole QNAMEs were garbled. The % of reads like this were small, but even 1 non-standard query is enough to stress you out right.

ADD REPLY
1
Entering edit mode

Yes. I remember that Felix said he change the flag rule so that the bam was easy to visualize by seqmonk or IGV. However, this change will split the world into two parts.

ADD REPLY
1
Entering edit mode

Yes, he should have used an optional tag, or sent a nice e-mail to the SeqMonk/IGV team :)

ADD REPLY
1
Entering edit mode
8.1 years ago

I'm not familiar with the "chain" terminology, I guess by forward and reverse chain you mean top/bottom strand? If that's the case:

A read comes from the top strand if:

  • It is aligned to the forward strand AND it is unpaired (samflag 0) or
  • It is aligned to the forward strand AND it is paired AND it is first in pair (samflag 65) or
  • It is aligned to the reverse strand AND it is paired AND it is second in pair (samflag 145)

Otherwise the read comes from the bottom strand.

ADD COMMENT
0
Entering edit mode

Hi Dariber, 99 and 163 isn't in forward (up) strand?

ADD REPLY

Login before adding your answer.

Traffic: 2589 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6