Question: BAM Flag From Bismark Alignment: Forward and Reverse Chain
2
gravatar for Shicheng Guo
3.1 years ago by
Shicheng Guo7.4k
Shicheng Guo7.4k wrote:

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

chain bismark bam • 1.3k views
ADD COMMENTlink modified 2.4 years ago • written 3.1 years ago by Shicheng Guo7.4k
1

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 REPLYlink written 3.1 years ago by John12k
1

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 REPLYlink modified 3.1 years ago • written 3.1 years ago by Shicheng Guo7.4k
1

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

ADD REPLYlink modified 3.1 years ago • written 3.1 years ago by John12k
1
gravatar for dariober
3.1 years ago by
dariober10.0k
WCIP | Glasgow | UK
dariober10.0k wrote:

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 COMMENTlink written 3.1 years ago by dariober10.0k

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

ADD REPLYlink written 3.1 years ago by Shicheng Guo7.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1425 users visited in the last hour