Question: Detecting Rearranged Reads From Sam/Bam File
0
gravatar for Tomáš Beluský
6.1 years ago by
Brno
Tomáš Beluský90 wrote:

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.

reads variation sam bam • 2.1k views
ADD COMMENTlink modified 6.1 years ago by swbarnes25.2k • written 6.1 years ago by Tomáš Beluský90
0
gravatar for swbarnes2
6.1 years ago by
swbarnes25.2k
United States
swbarnes25.2k wrote:

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 COMMENTlink written 6.1 years ago by swbarnes25.2k

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 REPLYlink written 6.1 years ago by Tomáš Beluský90
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: 1062 users visited in the last hour