Extract R1 Alignment Informations From Bam
1
0
Entering edit mode
10.8 years ago

Hi,

Simple question : How to extract only aignment from R1 read from a bam file ?

Thanks

bam • 4.3k views
ADD COMMENT
2
Entering edit mode
10.8 years ago
samtools view -f 0x40 alignments.bam
ADD COMMENT
0
Entering edit mode

great that's perfect !

ADD REPLY
0
Entering edit mode

This gives first in pair reads. But what about the reads which are not in pair i.e., R1 has aligned but not R2. I see R1's with flag 0 and 16 also.

ADD REPLY
0
Entering edit mode

Then the aligner is setting the flags incorrectly. If a read came from a pair, then it should never have a flag of 0 or 16.

ADD REPLY

Login before adding your answer.

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