Entering edit mode
10.8 years ago
Nicolas Rosewick
11k
Hi,
Simple question : How to extract only aignment from R1 read from a bam file ?
Thanks
Hi,
Simple question : How to extract only aignment from R1 read from a bam file ?
Thanks
samtools view -f 0x40 alignments.bam
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
great that's perfect !
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.
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.