Detecting Rearranged Reads From Sam/Bam File
1
0
Entering edit mode
11.1 years ago

Hi, how can I detect rearranged reads from SAM flags? I thought left read should have set 0x40 (first in pair) and right read 0x80 (second in pair), but I found this answer on similar question here:

"Yes, the second read is the second fastq you give to your mapping software, from the reads originating at adaptor 2. It's not like the DNA molecules and the adaptor molecules know which end of the DNA is closer to what your reference has arbitrarily designtated the beginning of the DNA sequence. So of course there can't be a correlation between read 1 and the read closer to the beginning of your reference."

What comes into my mind is that I can detect it with flag 0x10 (read being reverse complemented) and 0x20 (mate being reverse complemented). So i.e. when reads were sequenced in forward/reverse policy and I found reads where first is reversed and second isn't, it means that they were rearranged. But I am not sure about this. And how could be inversion detect then? Aren't flags about reverse complementary suitable for that?

Thanks.

sam bam reads variation • 3.4k views
ADD COMMENT
0
Entering edit mode
11.1 years ago

when reads were sequenced in forward/reverse policy and I found reads where first is reversed and second isn't, it means that they were rearranged.

Nope. Look a a .bam file for a normal sample. Notice the four flags that are the most common: 83, 99, 147,163. Those are pairs where one reads forward and one reads reverse. You have a fragment of DNA, and one read reads into it from one end, and the other also reads into it from the other end. So one is forward, and one is reverse. That's how they are supposed to look, at least with standard library preps. (With mate pair preps, they are supposed to point away from each other)

If you have two forward reads, or two reverse reads, that's a clue that something is up. Or you have one forward and one reverse, but they point away from each other, not towards each other (You could tell this by looking at the flags in combination with the isize), that's a clue that something is up.

ADD COMMENT
0
Entering edit mode

Could you give me an example of reads which point away from each other in SAM, please? I am confused how can I find them and which flags should I use. Thanks.

ADD REPLY

Login before adding your answer.

Traffic: 1946 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