Simple question : How to extract only aignment from R1 read from a bam file ?
samtools view -f 0x40 alignments.bam
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.
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy