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:
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
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.
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.
Yes, he should have used an optional tag, or sent a nice e-mail to the SeqMonk/IGV team :)